did you use cvx_precision best that would be the first thing to try. Also showing us the LMI might help. If it is badly conditioned in the sense of not have any strictly feasible points then you will have difficulty finding a good solution with guaranteed nonnegativity.
I’m puzzled by solutions I’m getting with Mosek. @Erling.
Given a state-space realization (A,B,Co,Do) (problem data) which is controllable but does not satisfy the Kalman-Yakubovich-Popov Lemma (Positive-Real Lemma), my problem consists of computing perturbations to the elements of matrices (C,D) so that the KYP is satisfied while minimizing the perturbation size. That is to say I want the nearest model that satisfies the KYP LMI constraints.
I measure proximity by norm which and the constraints are the KYP constraints explicitly written:
subject to [-A'*P-P*A, -P*B+Co+\deltaC(x); -B'*P+(Co+\deltaC(x) )', (D+\deltaD)+(D+\deltaD)'] ==
P == semidefinite
I perturb only parameter matrices Co and Do while keeping A and B fixed, A is obviously stable.
Mosek does find a solution which satisfies the Lyapunov inequality with a positive definite auxiliar Lyapunov variable but the LMI constraint is violated.
Mosek signals the problem as unbounded (perhaps because the unfeasible start) and the solver stalls with both primal and dual almost identical in value.
I had initially thought relaxing the semidefinite constraints but violations are large in mgnitude, ie the KYP LMI is indefinite and I cannot force it to be definite by computiong perturbations to it.
By the way, I pinned @Erling because when I switch from Mosek to SDPt3 The solver presents a solution even though the duality gap is not zero as well. I tend to believe Mosek to be the best. There is something fishy in my problem.
By newer version you mean the Beta 9.0.81?
Because the version I have is the one downloaded from link
22.214.171.124, even though the log strangely refers to a much older 126.96.36.199) maybe there is something wrong with the link at Mosek websit. But I get version 188.8.131.52 even when I download 184.108.40.206.
MOSEK 220.127.116.11 is provided in the CVX distribution, and is the version chosen for use by CVX if cvx_solver mosek is specified. You can either get rid of or rename the mosek directory under CVX so that CVX doesn’t find it. Or see what the version you want is called in the output of cvx_solver and specify that with cvx_solver.
How do I specify the other/newer version to CVX ? Is there a way to set the path in CVX? I set the matlab path but it failed to find the solver.
Actually, the question is how to set the location for the solver when I want cvx to use other version than the one provided in the CVX distribution.