For Programmers: Free Programming Magazines  


Home > Archive > Matlab > September 2006 > matlab code for solving LMI









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author matlab code for solving LMI
musthov

2006-09-12, 4:11 am

Hi,

I am looking for matlab code for solving LMI to the resarch goal.
Are there any simple matlab codes to solve LMI with interior point
method?
My problem is:
minimize J
s.t
F0 + x1F1 + x2F2 + x3F3 + JF4 <0 with
F0=[2 3 2;3 5 2;2 2 4]
F1=[-2 2 1;2 0 0;1 0 0]
F2=[-4 -3 2;-3 4 1;2 1 0]
F3=[0 -2 0;-2 -4 2; 0 2 0]
F4=[0 0 0;0 0 0;0 0 -1]
X=[x1 x2;x2 x3]>0

Any suggestion will be highly appreciated.


Thanks in advance.


Regards
Musthov

Johan Löfberg

2006-09-12, 8:36 am

Since you have all the data in a nice numerical format, the call to
sedumi is "easy"

C = [0;0;0;0;-F0(:)];
A = [-eye(4);F1(:) F2(:) F3(:) F4(:)];
b = [0 0 0 -1];
K.l = 4;
K.s = 3;
[primal,x] = sedumi(A,b,C,K)
% x are is your variables [x1 x2 x3 x4]

In more advanced cases, a modelling tool is recommended, such as
YALMIP <http://control.ee.ethz.ch/~joloef/wiki/pmwiki.php>
free, requires an SDP solver such as sedumi, sdpt3,dsdp,csdp,...)

Your YALMIP model would be

sdpvar x1 x2 x3 J
constr = set(F0 + x1*F1 + x2*F2 + x3*F3 + J*F4 <0) + set([x1 x2;x2
x3] >0);
solvesdp(constr,J)
double([x1 x2 x3 J])

musthov wrote:
>
>
> Hi,
>
> I am looking for matlab code for solving LMI to the resarch goal.
> Are there any simple matlab codes to solve LMI with interior point
> method?
> My problem is:
> minimize J
> s.t
> F0 + x1F1 + x2F2 + x3F3 + JF4 <0 with
> F0=[2 3 2;3 5 2;2 2 4]
> F1=[-2 2 1;2 0 0;1 0 0]
> F2=[-4 -3 2;-3 4 1;2 1 0]
> F3=[0 -2 0;-2 -4 2; 0 2 0]
> F4=[0 0 0;0 0 0;0 0 -1]
> X=[x1 x2;x2 x3]>0
>
> Any suggestion will be highly appreciated.
>
>
> Thanks in advance.
>
>
> Regards
> Musthov
>
>

musthov

2006-09-12, 10:03 pm

Thank's for your recommended.

I have tried some packages such as SeDuMi, YALMIP and so on, and I'd
like say they are all done very well. However, they are too powerful
for my problem, and these software is very complex when I try to debug
step by step, so its difficult for me to understand step by step how
this software solve my problem .

I mean a simple matlab code that solve my problem, so I can understand
step by step how to solve this problem clearly.

regards,
Ahmed

Johan L=F6fberg wrote:[color=darkred]
> Since you have all the data in a nice numerical format, the call to
> sedumi is "easy"
>
> C =3D [0;0;0;0;-F0(:)];
> A =3D [-eye(4);F1(:) F2(:) F3(:) F4(:)];
> b =3D [0 0 0 -1];
> K.l =3D 4;
> K.s =3D 3;
> [primal,x] =3D sedumi(A,b,C,K)
> % x are is your variables [x1 x2 x3 x4]
>
> In more advanced cases, a modelling tool is recommended, such as
> YALMIP <http://control.ee.ethz.ch/~joloef/wiki/pmwiki.php>
> free, requires an SDP solver such as sedumi, sdpt3,dsdp,csdp,...)
>
> Your YALMIP model would be
>
> sdpvar x1 x2 x3 J
> constr =3D set(F0 + x1*F1 + x2*F2 + x3*F3 + J*F4 <0) + set([x1 x2;x2
> x3] >0);
> solvesdp(constr,J)
> double([x1 x2 x3 J])
>
> musthov wrote:

Johan Löfberg

2006-09-13, 4:12 am

I answered you on sci-op with some code.

/johan

musthov wrote:
>
>
> Thank's for your recommended.
>
> I have tried some packages such as SeDuMi, YALMIP and so on, and
> I'd
> like say they are all done very well. However, they are too
> powerful
> for my problem, and these software is very complex when I try to
> debug
> step by step, so its difficult for me to understand step by step
> how
> this software solve my problem .
>
> I mean a simple matlab code that solve my problem, so I can
> understand
> step by step how to solve this problem clearly.
>
> regards,
> Ahmed
>
> Johan Löfberg wrote:
call[color=darkred]
> to
as[color=darkred]
sdpt3,dsdp,csdp,...)[color=darkred]
> x2;x2
resarch[color=darkred]
> goal.
interior[color=darkred]
> point
>
>

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com