# SDP LMI results do not satisfy all constraints

I would like to solve the following LMIs with CVX SDP:

P == X_0*Q

[P X_1* Q ; transpose(X_1*Q) P] > 0

where P is to be positive definite and Q is a non-square matrix, both of which are decision variables.
X_{1,T} is a 1 x T matrix containing the states of a system sampled T times consecutively:

X_{1,T} = [ x(1) x(2), … x(T)] %Not including initial conditions x(0)

I have implemented this into MATLAB:

n= number of states, where T = number of samples taken

However, when verifying the above constraints with the produced P and Q from the solver, none of the constraints are satisfied, except that P is positive definite (implicitly given).

## The log produced is as follows: Calling SDPT3 4.0: 96 variables, 42 equality constraints

num. of constraints = 42
dim. of sdp var = 8, num. of sdp blk = 1
dim. of free var = 60 *** convert ublk to lblk
number of nearly dependent constraints = 34
To remove these constraints, re-run sqlp.m with OPTIONS.rmdepconstr = 1.

SDPT3: Infeasible path-following algorithms

## number of iterations = 21 primal objective value = 0.00000000e+00 dual objective value = 2.70821227e-05 gap := trace(XZ) = 1.63e+15 relative gap = 1.63e+15 actual relative gap = -2.71e-05 rel. primal infeas (scaled problem) = 1.23e+07 rel. dual " " " = 2.83e+14 rel. primal infeas (unscaled problem) = 0.00e+00 rel. dual " " " = 0.00e+00 norm(X), norm(y), norm(Z) = 3.8e+04, 2.1e+11, 2.0e+14 norm(A), norm(b), norm© = 2.0e+13, 1.0e+00, 1.0e+00 Total CPU time (secs) = 0.63 CPU time per iteration = 0.03 termination code = -5 DIMACS: 1.2e+07 0.0e+00 2.8e+14 0.0e+00 -2.7e-05 1.6e+15

Status: Failed
Optimal value (cvx_optval): NaN

Here is the code to reproduce the result:

A=[1.38 -0.2077 6.715 -5.676; -0.5814 -4.29 0 0.675; 1.067 4.273 -6.654 5.893;0.048 4.273 1.343 -2.104];
B=[0 0; 5.679 0; 1.136 -3.146; 1.136 0];
C=[1 0 1 -1;0 1 0 0];
D=0;

T=15;
n = 4;
%Randomly generated inputs
u=[0.590904730405336	0.0503399867389541	0.834189061056900	0.863710865055866	0.669042590081555	0.217993798750154	0.122189150923420	0.599585548122814	0.0563430185433568	0.0196210667655841	0.832221475282818	0.520129415310742	0.0976979181614431	0.108016694136759	0.143156022083576; 0.459380047966325	0.228687584020221	0.0156446926965270	0.0780690530324343	0.500211324281102	0.571615725404089	0.671166232988653	0.0559761573877905	0.152500637002470	0.435175545696952	0.617390171454084	0.863868222933611	0.908052203186769	0.516996758096945	0.559370572403004];
x(:,1)=[1;1;1;1];  %Arbitrary initial conditions

for i=1:T
x(:,i+1)=A*x(:,i)+B*u(:,i);
end
X_1=x(:,2:(T-1+2));

I am wondering if I have implemented this incorrectly into CVX or perhaps I need to reformulate the problem better. Any help/insight would be appreciated! Thanks!

x has some huge values which appear to be beyond SDPT3’s ability to handle. So the solver failed. All variable values after the solver fails are meaningless.

You need to improve the formulation to not have huge values of x.

In the future, instead of posting an image of your code, please copy and pasted the code into your post, using Preformatted text icon.

1 Like

Thank you very much! And duly noted on the preformatting for future posts!