optimization_in_scilab.pdf

# It can be shown that this problem can be formulated

• No School
• AA 1
• 70

This preview shows page 50 - 53 out of 70 pages.

It can be shown that this problem can be formulated as a Σ problem as follows: maximize Trace(P) under constraints P - P T = 0 and APA T + Q 0 EP 0 R CP P T E T P T C T P 0 . The evaluation function is: function [LME,LMI,OBJ]=ric_dscr_eval(XLIST) LME=P-P’ LMI=[A*P*A’+Q,zeros(A*C’),E*P;zeros(C*A’),R,C*P;P*E’,P*C’,P] OBJ=-trace(P) which can be used as follows (asuming E , A , C , Q and R are defined and have compatible sizes–note that E and A need not be square). --> P_init=zeros(A’*A) --> P=lmisolver(XLIST0,ric_dscr_eval) Linear programming with equality constraints Consider the following classical optimization problem minimize e T x subject to Ax + b 0 , Cx + d = 0 . where A and C are matrices and e , b and d are vectors with appropriate dimensions. Here the sign is to be understood elementwise. This problem can be formulated in LMITOOL as follows: function [LME,LMI,OBJ]=linprog_eval(XLIST) [x]=XLIST(:) [m,n]=size(A) 47

Subscribe to view the full document.

LME=C*x+d LMI=list() tmp=A*x+b for i=1:m LMI(i)=tmp(i) end OBJ=e’*x and solved in Scilab by (assuming A , C , e , b and d and an initial guess x0 exist in the environment): --> x=lmisolver(x0,linprog_eval) Sylvester Equation The problem of finding matrix X satisfying AX + XB = C or AXB = C where A and B are square matrices (of possibly different sizes) is a well-known problem. We refer to the first equation as the continuous Sylvester equation and the second, the discrete Sylvester equation. These two problems can easily be formulated as Σ problems as follows: function [LME,LMI,OBJ]=sylvester_eval(XLIST) [X]=XLIST(:) if flag==’c’ then LME=A*X+X*B-C else LME=A*X*B-C end LMI=[] OBJ=[] with a solver function such as: function [X]=sylvester(A,B,C,flag) [na,ma]=size(A);[nb,mb]=size(B);[nc,mc]=size(C); if ma<>na|mb<>nb|nc<>na|mc<>nb then error("invalid dimensions");end XLISTF=lmisolver(zeros(nc,mc),sylvester_eval) X=XLISTF(:) Then, to solve the problem, all we need to do is to (assuming A , B and C are defined) --> X=sylvester(A,B,C,’c’) for the continuous problem and --> X=sylvester(A,B,C,’d’) for the discrete problem. 48
7.3 Function LMITOOL The purpose of LMITOOL is to automate most of the steps required before invoking lmisolver . In particular, it generates a *.sci file including the solver function and the evaluation function or at least their skeleton. The solver function is used to define the initial guess and to modify optimization parameters (if needed). lmitool can be invoked with zero, one or three arguments. 7.3.1 Non-interactive mode lmitool can be invoked with three input arguments as follows: Syntax txt=lmitool(probname,varlist,datalist) where probname : a string containing the name of the problem, xlist : a string containing the names of the unknown matrices (separated by commas if there are more than one). dlist : a string containing the names of data matrices (separated by commas if there are more than one).

Subscribe to view the full document.

• Fall '19

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern