# TOMLAB  
# REGISTER (TOMLAB)
# LOGIN  
# myTOMLAB
TOMLAB LOGO

« Previous « Start » Next »

42  Global Dynamic System

Deterministic Global Optimization of Nonlinear Dynamic Systems, Youdong Lin and Mark A. Stadtherr, Department of Chemical and Biomolecular Engineering, University of Notre Dame

42.1  Problem Description

Find u over t in [0; 1 ] to minimize:

J = −x2(tf


subject to:

dx
dt
 = −x2+u 
x(t0) = 9 
−5 <= u <= 5 


Reference: [35]

42.2  Problem setup

toms t
p = tomPhase('p', t, 0, 1, 20);
setPhase(p);

tomStates x
tomControls u

% Box constraints, bounds and odo
c = {-10 <= icollocate(x) <= 10
    -5  <= collocate(u)  <= 5
    initial(x == 9)
    collocate(dot(x) == -x.^2+u)};

42.3  Solve the problem

options = struct;
options.name = 'Global Dynamic System';
Prob = sym2prob('con',-final(x)^2, c, [], options);
Prob.xInit = 20;
Result = tomRun('multiMin', Prob, 1);
solution = getSolution(Result);
t = subs(collocate(t),solution);
x = subs(collocate(x),solution);
u = subs(collocate(u),solution);
===== * * * =================================================================== * * *
TOMLAB - Tomlab Optimization Inc. Development license  999001. Valid to 2010-02-05
=====================================================================================
Problem: ---  1: Global Dynamic System - Trial 20  f_k      -8.232621699198103800
                                          sum(|constr|)      0.000000000064096284
                                 f(x_k) + sum(|constr|)     -8.232621699134007500

Solver: multiMin with local solver snopt.  EXIT=0.  INFORM=0.
Find local optima using multistart local search
Did 20 local tries. Found 1 global, 3 minima. TotFuncEv 761. TotConstrEv 721

FuncEv  761 GradEv  721 ConstrEv  721 ConJacEv   39 Iter  441
CPU time: 1.218750 sec. Elapsed time: 1.234000 sec.

42.4  Plot result

figure(1);
subplot(2,1,1);
plot(t,x,'*-');
legend('x');

subplot(2,1,2);
plot(t,u,'*-');
legend('u');

pngs/globalDynamicSystem_01.png

« Previous « Start » Next »