TomSym Optimal Feedback - A tomSym BMI demonstration

From TomWiki
Jump to navigationJump to search

Notice.png

This page is part of the TomSym Manual. See TomSym Manual.

A sample problem from the PENBMI manual.

LQ optimal feedback

Minimize trace(P) subject to P >= 0 (LMI) (A+B*K)'*P+P*(A+B*K) <= -eye(2)-K'*K (BMI)

% Variables
toms 2x2 symmetric P
toms 1x2           K

% Constants
A = [-1 2;-3 -4];
B = [1;1];

% Constraints
F = { MI( P >= 0 )
    MI( (A+B*K)'*P + P'*(A+B*K) <= -eye(2) - K'*K )};

%Solve the problem
solution = ezsolve(trace(P),F,[],'Optimal feedback');

% Evaluate K using the returned solution
K_opt = subs(K,solution)
Problem type appears to be: bmi
Time for symbolic processing: 0.05479 seconds
Starting numeric solver
===== * * * =================================================================== * * *
TOMLAB - TOMLAB Development license  999007. Valid to 2011-12-31
=====================================================================================
Problem: ---  1: Optimal feedback               f_k       0.466972876644368870
                                              f(x_0)      0.000000000000000000

Solver: PENBMI.  EXIT=0.  INFORM=0.
BMI Solver PENBMI 2.1
Solution obtained.

FuncEv   13 GradEv   13 Iter   13 MinorIter   31
Elapsed time: 0.002000 sec. 
K_opt =
   -0.3634   -0.1741