Problem: LQR: RIOTS 95 Manual
Find u(t) over t in [0; 1 ] to minimize
| J = | ∫ |
| (0.625*x2 + 0.5*x*u +0.5*u2) dt |
subject to:
| = |
| *x + u |
| x(0) = 1 |
Reference: [29]
toms t
p = tomPhase('p', t, 0, 1, 20);
setPhase(p);
tomStates x
tomControls u
% Initial guess
x0 = icollocate(x == 1-t);
% ODEs and constraints
ceq = {collocate(dot(x) == 0.5*x+u)
initial(x == 1)};
% Objective
objective = integrate(0.625*x.^2+0.5*x.*u+0.5*u.^2);
options = struct; options.name = 'LQR Problem'; solution = ezsolve(objective, ceq, x0, options); t = subs(collocate(t),solution); x = subs(collocate(x),solution); u = subs(collocate(u),solution);
Problem type appears to be: qp
Starting numeric solver
===== * * * =================================================================== * * *
TOMLAB - Tomlab Optimization Inc. Development license 999001. Valid to 2011-02-05
=====================================================================================
Problem: 1: LQR Problem f_k 0.380797077977577230
sum(|constr|) 0.000000000046131558
f(x_k) + sum(|constr|) 0.380797078023708770
f(x_0) 0.000000000000000000
Solver: CPLEX. EXIT=0. INFORM=1.
CPLEX Barrier QP solver
Optimal solution found
FuncEv 3 GradEv 3 ConstrEv 3 Iter 3
CPU time: 0.015625 sec. Elapsed time: 0.016000 sec.
subplot(2,1,1)
plot(t,x,'*-');
legend('x');
title('LQR Problem state variable');
subplot(2,1,2)
plot(t,u,'+-');
legend('u');
title('LQR Problem control');