TomSym Optimal Feedback - A tomSym BMI demonstration

From TomWiki
Revision as of 17:00, 2 November 2011 by Mbot (talk | contribs) (Created page with "{{Part Of Manual|title=the TomSym Manual|link=TomSym Manual}} A sample problem from the PENBMI manual. LQ optimal feedback Minimize trace(P) subject to P >= 0 ...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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)
Warning: Could not find an exact (case-sensitive) match for
'positivesemidefinite'.
D:\tomlab\tomsym\@tomSym\positiveSemidefinite.m is a case-insensitive match and
will be used instead.
You can improve the performance of your code by using exact
name matches and we therefore recommend that you update your
usage accordingly. Alternatively, you can disable this warning using
warning('off','MATLAB:dispatcher:InexactCaseMatch').
This warning will become an error in future releases. 
Problem type appears to be: bmi
Time for symbolic processing: 0.080616 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
CPU time: 0.015600 sec. Elapsed time: 0.025000 sec. 
K_opt =
   -0.3634   -0.1741