February 19, 2018, 11:29pm
I am writing the following code using CVX,
A = [-1 0
B1 = eye(2);
B2 = eye(2);
C = eye(2);
g2 = 3; g3 = -1;
variable k(2, 2)
variable W(2, 2) semidefinite
(A - B1*k)*W+W*(A - B1*k)' == - B2*B2';
trace(C'*W*C) <= g2;
max(eig(A - B1*k)) <= g3;
but I am getting the following error,
Only scalar quadratic forms can be specified in CVX
Besides, I am going to define W variable as a positive definite matrix.
It’s appreciated if anyone helps.
You are multiplying 2 matrix variables in the first constraint. That is not allowed in CVX. I will presume that the first constraint is non-convex unless you show otherwise.
Additionally, you need to change the last constraint to
lambda_max(A - B1*k) <= g3;
CVX will enforce that the argument of lambda_max is symmetric.
February 19, 2018, 11:51pm
Thanks for your reply.
Is it possible to use “gram” command in CVX (to compute the controllability grammian)?
No. gram command cannot be used in CVX (on CVX variables or expressions). Controllability grammians are not my area, so I can’t help with model formulations. I leave it to you to determine whether you can formulate an appropriate LMI, which will be acceptable to CVX.