PROPT Fuller Phenomenon: Difference between revisions
(Created page with "{{Part Of Manual|title=the PROPT Manual|link=PROPT Manual}} A Short Introduction to Optimal Control, Ugo Boscain, SISSA, Italy 3.6 Fuller Phenomenon. ==Problem De...") |
|||
| (3 intermediate revisions by one other user not shown) | |||
| Line 1: | Line 1: | ||
{{Part Of Manual|title=the PROPT | {{Part Of Manual|title=the PROPT Manual|link=[[PROPT|PROPT Manual]]}} | ||
A Short Introduction to Optimal Control, Ugo Boscain, SISSA, Italy | A Short Introduction to Optimal Control, Ugo Boscain, SISSA, Italy | ||
| Line 10: | Line 10: | ||
<math> J = \int_0^{inf} x_1^2 \mathrm{d}t </math> | <math> J = \int_0^{inf} x_1^2 \mathrm{d}t </math> | ||
subject to: | subject to: | ||
<math> \frac{dx_1}{dt} = x_2 </math> | <math> \frac{dx_1}{dt} = x_2 </math> | ||
<math> \frac{dx_2}{dt} = u </math> | <math> \frac{dx_2}{dt} = u </math> | ||
<math> x(t_0) = [10 \ 0 ] </math> | <math> x(t_0) = [10 \ 0 ] </math> | ||
<math> x(t_f) = [0 \ 0 ] </math> | <math> x(t_f) = [0 \ 0 ] </math> | ||
<math> |u| <= 1 </math> | <math> |u| <= 1 </math> | ||
<source lang="matlab"> | <source lang="matlab"> | ||
| Line 70: | Line 76: | ||
<pre> | <pre> | ||
Problem type appears to be: con | Problem type appears to be: con | ||
Time for symbolic processing: 0. | Time for symbolic processing: 0.095364 seconds | ||
Starting numeric solver | Starting numeric solver | ||
===== * * * =================================================================== * * * | ===== * * * =================================================================== * * * | ||
| Line 85: | Line 91: | ||
FuncEv 28 GradEv 26 ConstrEv 27 ConJacEv 26 Iter 14 MinorIter 248 | FuncEv 28 GradEv 26 ConstrEv 27 ConJacEv 26 Iter 14 MinorIter 248 | ||
CPU time: 0.062400 sec. Elapsed time: 0. | CPU time: 0.062400 sec. Elapsed time: 0.073000 sec. | ||
</pre> | </pre> | ||
| Line 102: | Line 108: | ||
title('Fuller Phenomenon control'); | title('Fuller Phenomenon control'); | ||
</source> | </source> | ||
[[File:fullerPhenomenon_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. |
A Short Introduction to Optimal Control, Ugo Boscain, SISSA, Italy
3.6 Fuller Phenomenon.
Problem Description
Find u over t in [0; inf ] to minimize:
Failed to parse (SVG with PNG fallback (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle J = \int_0^{inf} x_1^2 \mathrm{d}t }
subject to:
Failed to parse (SVG with PNG fallback (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \frac{dx_1}{dt} = x_2 }
Failed to parse (SVG with PNG fallback (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \frac{dx_2}{dt} = u }
Failed to parse (SVG with PNG fallback (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle x(t_0) = [10 \ 0 ] }
Failed to parse (SVG with PNG fallback (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle x(t_f) = [0 \ 0 ] }
Failed to parse (SVG with PNG fallback (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle |u| <= 1 }
% Copyright (c) 2007-2008 by Tomlab Optimization Inc.Problem setup
toms t
toms t_f
p = tomPhase('p', t, 0, t_f, 60);
setPhase(p);
tomStates x1 x2
tomControls u
% Initial guess
x0 = {t_f == 10
icollocate(x1 == 10-10*t/t_f)
icollocate(x2 == 0)
collocate(u == -1+2*t/t_f)};
% Box constraints
cbox = {1 <= t_f <= 1e4
-1 <= collocate(u) <= 1};
% Boundary constraints
cbnd = {initial({x1 == 10; x2 == 0})
final({x1 == 0; x2 == 0})};
% ODEs and path constraints
ceq = collocate({dot(x1) == x2; dot(x2) == u});
% Objective
objective = integrate(x1.^2);Solve the problem
options = struct;
options.name = 'Fuller Phenomenon';
options.solver = 'snopt';
solution = ezsolve(objective, {cbox, cbnd, ceq}, x0, options);
t = subs(collocate(t),solution);
x1 = subs(collocate(x1),solution);
x2 = subs(collocate(x2),solution);
u = subs(collocate(u),solution);Problem type appears to be: con
Time for symbolic processing: 0.095364 seconds
Starting numeric solver
===== * * * =================================================================== * * *
TOMLAB - TOMLAB Development license 999007. Valid to 2011-12-31
=====================================================================================
Problem: --- 1: Fuller Phenomenon f_k 242.423532418144080000
sum(|constr|) 0.000000063716024856
f(x_k) + sum(|constr|) 242.423532481860090000
f(x_0) 333.333333333328370000
Solver: snopt. EXIT=0. INFORM=1.
SNOPT 7.2-5 NLP code
Optimality conditions satisfied
FuncEv 28 GradEv 26 ConstrEv 27 ConJacEv 26 Iter 14 MinorIter 248
CPU time: 0.062400 sec. Elapsed time: 0.073000 sec.
Plot result
subplot(2,1,1)
plot(x1,x2,'*-');
legend('x1 vs x2');
title('Fuller Phenomenon state variables');
subplot(2,1,2)
plot(t,u,'+-');
legend('u');
title('Fuller Phenomenon control');