Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
matlab code for solving LMI

Subject: matlab code for solving LMI

From: musthov

Date: 11 Sep, 2006 23:06:41

Message: 1 of 4

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

Subject: matlab code for solving LMI

From: Johan Löfberg

Date: 12 Sep, 2006 07:18:13

Message: 2 of 4

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
>
>

Subject: matlab code for solving LMI

From: musthov

Date: 12 Sep, 2006 19:48:08

Message: 3 of 4

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:
> 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:
> >
> >
> > 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=3D[2 3 2;3 5 2;2 2 4]
> > F1=3D[-2 2 1;2 0 0;1 0 0]
> > F2=3D[-4 -3 2;-3 4 1;2 1 0]
> > F3=3D[0 -2 0;-2 -4 2; 0 2 0]
> > F4=3D[0 0 0;0 0 0;0 0 -1]
> > X=3D[x1 x2;x2 x3]>0
> >
> > Any suggestion will be highly appreciated.
> >
> >
> > Thanks in advance.
> >
> >
> > Regards
> > Musthov
> >
> >

Subject: matlab code for solving LMI

From: Johan Löfberg

Date: 13 Sep, 2006 04:21:54

Message: 4 of 4

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:
>> 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
>> >
>> >
>
>

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us