How can we solve a LPV and LMI problem with YALMIP?

577 views
Skip to first unread message

mingda ju

unread,
Jun 5, 2018, 5:26:03 AM6/5/18
to YALMIP

Hi everyone

I wrote a script to solve a LPV, LMI problem, I want to get the appropriate P and F and decay rate

The problem is as follow:

and the code :


P = sdpvar(10,10,'full');

F = sdpvar(1,10);

h = sdpvar(1,1);

t = sdpvar(1,1);

A = sdpvar(10,10,'full');

B = sdpvar(10,1,'full');


Uncertainty = [uncertain(t), 0 <= t <= 2*pi];

Lyapunov = [];


h = cos(t)/6;

for i = 1:3

    for j = 1:2

        Lyapunov = [Lyapunov,P*h*(SysRed1(i,j).A-SysRed1(i,j).B*F)+P*(h*(SysRed1(i,j).A-SysRed1(i,j).B*F))'<=0];

    end

end


h = (1-cos(t))/6;      

for i = 1:3

    for j = 1:2

        Lyapunov = [Lyapunov,P*h*(SysRed2(i,j).A-SysRed2(i,j).B*F)+P*(h*(SysRed2(i,j).A-SysRed2(i,j).B*F))'<=0];

    end

end



Lyapunov = [Lyapunov,P>=zeros(10,10)]


optimize([Lyapunov,Uncertainty])


value(F)

value(P)




Is it supposed to use Semudi as solver? but yalmip used FMINCON as default, I don't know if this is right,

please help me if you know how to solve it,

Thanks in advance!


SysRed1.mat
SysRed2.mat
test1.m

Johan Löfberg

unread,
Jun 5, 2018, 5:53:09 AM6/5/18
to YALMIP
I strongly doubt you want P to be fully parameterized. Looks like a Lyapunov matrix which should be symmetric

Why are you defining matrices A and B?

If you have x' = Ax where A = sum Ai*hi, hi convex combination, theory says that you only have to look at the vertices Ai. You never optimize over h. You want it to hold for all possible h, and by convexity you only have to check the vertices so Ai'*P + P*Ai < 0 etc

And if you want to solve a quasi-convex decay-rate problem, you have to manually write the bisection, or use the bisection module


Johan Löfberg

unread,
Jun 5, 2018, 5:55:32 AM6/5/18
to YALMIP
and you have to perform a linearizing coordinate change to get rid of the product of P and F.

I advice you to read

Johan Löfberg

unread,
Jun 5, 2018, 5:56:14 AM6/5/18
to YALMIP

mingda ju

unread,
Jun 5, 2018, 6:01:31 AM6/5/18
to YALMIP
Thank you very much for your advice! I will read them to try to understand.

mingda ju

unread,
Jun 6, 2018, 9:58:05 AM6/6/18
to YALMIP
Hello Johan,
I'm sorry for disturbing you again,'
I have changed my code:


Y = sdpvar(10,10);
L = sdpvar(1,10,'full');
sdpvar t1 t2 

A1 = SysRed1(1,1).A;
A1(6:10,6:10)=1.0e-09;
A2 = SysRed2(1,1).A;
A2(6:10,6:10)=1.0e-09;

B1 = SysRed1(1,1).B;
B1(6:10,1)=1.0e-09;
B2 = SysRed2(1,1).B;
B2(6:10,1)=1.0e-09;


A = A1*t1+A2*t2
B = B1*t1+B2*t2


F = [Y >=0];

F = [F,A*Y+Y*A'-B*L-L'*B'<=0];

F = [F, 0 <= [t1 t2] <= 1, t1+t2 == 1, uncertain([t1 t2])];

optimize(F)

K = value(L)*inv(value(Y))
inv(value(Y))
eig(inv(value(Y)))

It seems it starts to work, but I met a problem :
 'The coefficient matrix is not full row rank, numerical problems may occur.'
 info: 'Numerical problems (SeDuMi-1.3)'
       problem: 4


cause my matrix A is like :



and B is like : 







I tried to replace the zeros by a small value like e-09, but it doesn't work...

could you please give me some advise..

Thank you for your time!



m0606.m
SysRed1.mat
SysRed2.mat

Johan Löfberg

unread,
Jun 6, 2018, 11:15:05 AM6/6/18
to YALMIP
I don't see why you would add small numbers where there are zeros. 

You  have very bad numerics. Look at the matrices, and A1 is on the order of 1e6 etc.

Already trying to solve the following simplified problem fails as the solver gets lost in the numerics and thinks it is infeasible
optimize([A1*Y+Y*A1'-B1*L-L'*B1' <= -eye(10), Y>=0])



mingda ju

unread,
Jun 6, 2018, 11:27:37 AM6/6/18
to YALMIP
I will try to improve the numeric, thank you for your help!
Reply all
Reply to author
Forward
0 new messages