PROPT Quadruple Integral: Difference between revisions
(Created page with "{{Part Of Manual|title=the PROPT Manual|link=PROPT Manual}} ITERATIVE DYNAMIC PROGRAMMING, REIN LUUS 12.4.5 Example 5 CHAPMAN & HALL/CRC Monographs and Surveys in...") |
No edit summary |
||
| Line 1: | Line 1: | ||
{{Part Of Manual|title=the PROPT | {{Part Of Manual|title=the PROPT Manual|link=[[PROPT|PROPT Manual]]}} | ||
ITERATIVE DYNAMIC PROGRAMMING, REIN LUUS | ITERATIVE DYNAMIC PROGRAMMING, REIN LUUS | ||
| Line 112: | Line 112: | ||
title('Quadruple Integral control'); | title('Quadruple Integral control'); | ||
</source> | </source> | ||
[[File:quadrupleIntegral_01.png]] | |||
Revision as of 14:25, 2 November 2011
|
This page is part of the PROPT Manual. See PROPT Manual. |
ITERATIVE DYNAMIC PROGRAMMING, REIN LUUS
12.4.5 Example 5
CHAPMAN & HALL/CRC Monographs and Surveys in Pure and Applied Mathematics
Problem Formulation
Find u over t in [0; t_F ] 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 = t_F }
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} = x_3 } 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_3}{dt} = x_4 } 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_4}{dt} = u }
The initial condition are:
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(0) = [0.1 \ 0.2 \ 0.3 \ 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 \ 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 -1 <= u <= 1 }
% Copyright (c) 2007-2008 by Tomlab Optimization Inc.Problem setup
toms t
toms t_f
p = tomPhase('p', t, 0, t_f, 30);
setPhase(p);
tomStates x1 x2 x3 x4
tomControls u
% Initial guess
x0 = {t_f == 5
icollocate({x1 == 0.1-0.1*t/t_f
x2 == 0.2-0.2*t/t_f; x3 == 0.3-0.3*t/t_f})
collocate(u == -1)};
% Box constraints
cbox = {0.1 <= t_f <= 100
-1 <= collocate(u) <= 1};
% Boundary constraints
cbnd = {initial({x1 == 0.1; x2 == 0.2; x3 == 0.3; x4 == 0})
final({x1 == 0; x2 == 0; x3 == 0; x4 == 0})};
% ODEs and path constraints
ceq = collocate({
dot(x1) == x2; dot(x2) == x3
dot(x3) == x4; dot(x4) == u});
% Objective
objective = t_f;Solve the problem
options = struct;
options.name = 'Quadruple Integral';
solution = ezsolve(objective, {cbox, cbnd, ceq}, x0, options);
t = subs(collocate(t),solution);
x1 = subs(collocate(x1),solution);
x2 = subs(collocate(x2),solution);
x3 = subs(collocate(x3),solution);
x4 = subs(collocate(x4),solution);
u = subs(collocate(u),solution);Problem type appears to be: lpcon
Time for symbolic processing: 0.12859 seconds
Starting numeric solver
===== * * * =================================================================== * * *
TOMLAB - TOMLAB Development license 999007. Valid to 2011-12-31
=====================================================================================
Problem: --- 1: Quadruple Integral f_k 4.849598187644263100
sum(|constr|) 0.000000078353877264
f(x_k) + sum(|constr|) 4.849598265998140300
f(x_0) 5.000000000000000000
Solver: snopt. EXIT=0. INFORM=1.
SNOPT 7.2-5 NLP code
Optimality conditions satisfied
FuncEv 1 ConstrEv 58 ConJacEv 58 Iter 31 MinorIter 474
CPU time: 0.109201 sec. Elapsed time: 0.096000 sec.
Plot result
subplot(2,1,1)
plot(t,x1,'*-',t,x2,'*-',t,x3,'*-',t,x4,'*-');
legend('x1','x2','x3','x4');
title('Quadruple Integral state variables');
subplot(2,1,2)
plot(t,u,'+-');
legend('u');
title('Quadruple Integral control');