PROPT Singular Control 5: Difference between revisions
From TomWiki
Jump to navigationJump to search
(Created page with "{{Part Of Manual|title=the PROPT Manual|link=PROPT Manual}} ITERATIVE DYNAMIC PROGRAMMING, REIN LUUS 10.3 Yeo's singular control problem CHAPMAN & HALL/CRC Monograph...") |
No edit summary |
||
Line 12: | Line 12: | ||
<math> J = x_4(t_F) </math> | <math> J = x_4(t_F) </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} = -x_3*u + 16*x_5 - 8 </math> | <math> \frac{dx_2}{dt} = -x_3*u + 16*x_5 - 8 </math> | ||
<math> \frac{dx_3}{dt} = u </math> | <math> \frac{dx_3}{dt} = u </math> | ||
<math> \frac{dx_4}{dt} = x_1^2 + x_2^2 + 0.0005*(x_2+16*x_5-8-0.1*x_3*u^2)^2 </math> | <math> \frac{dx_4}{dt} = x_1^2 + x_2^2 + 0.0005*(x_2+16*x_5-8-0.1*x_3*u^2)^2 </math> | ||
<math> \frac{dx_5}{dt} = 1 </math> | <math> \frac{dx_5}{dt} = 1 </math> | ||
The initial condition are: | The initial condition are: | ||
<math> x(0) = [0 \ -1 \ -sqrt(5) \ 0 \ 0] </math> | <math> x(0) = [0 \ -1 \ -sqrt(5) \ 0 \ 0] </math> | ||
<math> -4 <= u <= 10 </math> | <math> -4 <= u <= 10 </math> | ||
The state x4 is implemented as a cost directly. x4 in the implementation is x5. u has a low limit of 9 in the code. | The state x4 is implemented as a cost directly. x4 in the implementation is x5. u has a low limit of 9 in the code. |
Revision as of 08:12, 9 November 2011
This page is part of the PROPT Manual. See PROPT Manual. |
ITERATIVE DYNAMIC PROGRAMMING, REIN LUUS
10.3 Yeo's singular control problem
CHAPMAN & HALL/CRC Monographs and Surveys in Pure and Applied Mathematics
Problem Formulation
Find u over t in [0; 1 ] to minimize:
subject to:
The initial condition are:
The state x4 is implemented as a cost directly. x4 in the implementation is x5. u has a low limit of 9 in the code.
% Copyright (c) 2007-2008 by Tomlab Optimization Inc.
Problem setup
toms t
p = tomPhase('p', t, 0, 1, 80);
setPhase(p)
tomStates x1 x2 x3 x4
tomControls u
% Initial guess
x0 = {icollocate({x1 == 0; x2 == -1
x3 == -sqrt(5); x4 == 0})
collocate(u == 3)};
% Box constraints
cbox = {0 <= collocate(u) <= 10};
% Boundary constraints
cbnd = initial({x1 == 0; x2 == -1
x3 == -sqrt(5); x4 == 0});
% ODEs and path constraints
ceq = collocate({dot(x1) == x2
dot(x2) == -x3.*u + 16*x4 - 8
dot(x3) == u; dot(x4) == 1});
% Objective
objective = integrate(x1.^2 + x2.^2 + ...
0.0005*(x2+16*x4-8-0.1*x3.*u.^2).^2);
Solve the problem
options = struct;
options.name = 'Singular Control 5';
solution = ezsolve(objective, {cbox, cbnd, ceq}, x0, options);
t = subs(collocate(t),solution);
u = subs(collocate(u),solution);
Problem type appears to be: con Time for symbolic processing: 0.16034 seconds Starting numeric solver ===== * * * =================================================================== * * * TOMLAB - TOMLAB Development license 999007. Valid to 2011-12-31 ===================================================================================== Problem: --- 1: Singular Control 5 f_k 0.119318613152343460 sum(|constr|) 0.000000483936371958 f(x_k) + sum(|constr|) 0.119319097088715420 f(x_0) 1.024412849382206200 Solver: snopt. EXIT=0. INFORM=1. SNOPT 7.2-5 NLP code Optimality conditions satisfied FuncEv 374 GradEv 372 ConstrEv 372 ConJacEv 372 Iter 345 MinorIter 938 CPU time: 4.180827 sec. Elapsed time: 4.185000 sec.
Plot result
figure(1)
plot(t,u,'+-');
legend('u');
title('Singular Control 5 control');