PROPT Global Dynamic System: Difference between revisions
From TomWiki
Jump to navigationJump to search
No edit summary |
|||
(One intermediate revision by one other user not shown) | |||
Line 8: | Line 8: | ||
<math> J = -x^2(t_f) </math> | <math> J = -x^2(t_f) </math> | ||
subject to: | subject to: | ||
<math> \frac{dx}{dt} = -x^2+u </math> | <math> \frac{dx}{dt} = -x^2+u </math> | ||
<math> x(t_0) = 9 </math> | <math> x(t_0) = 9 </math> | ||
<math> -5 <= u <= 5 </math> | <math> -5 <= u <= 5 </math> | ||
<source lang="matlab"> | <source lang="matlab"> | ||
Line 81: | Line 85: | ||
[[File:globalDynamicSystem_01.png]] | [[File:globalDynamicSystem_01.png]] | ||
[[Category:PROPT Examples]] |
Latest revision as of 05:03, 14 February 2012
This page is part of the PROPT Manual. See PROPT Manual. |
Deterministic Global Optimization of Nonlinear Dynamic Systems, Youdong Lin and Mark A. Stadtherr, Department of Chemical and Biomolecular Engineering, University of Notre Dame
Problem Description
Find u over t in [0; 1 ] to minimize:
subject to:
% Copyright (c) 2007-2008 by Tomlab Optimization Inc.
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)};
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 Development license 999007. Valid to 2011-12-31 ===================================================================================== Problem: --- 1: Global Dynamic System - Trial 16 f_k -8.232621699200782600 sum(|constr|) 0.000000000019587887 f(x_k) + sum(|constr|) -8.232621699181194700 Solver: multiMin with local solver snopt. EXIT=0. INFORM=0. Find local optima using multistart local search Did 20 local tries. Found 1 global, 2 minima. TotFuncEv 822. TotConstrEv 782 FuncEv 822 GradEv 782 ConstrEv 782 ConJacEv 35 Iter 482 CPU time: 0.452403 sec. Elapsed time: 0.451000 sec.
Plot result
figure(1);
subplot(2,1,1);
plot(t,x,'*-');
legend('x');
subplot(2,1,2);
plot(t,u,'*-');
legend('u');