My original problem is as follows:

And my code is as follows

" w_diag = zeros(N_point,1);

```
for i = 1:L
w_diag(index_xr(i)) = sqrt(w(i));
end
sigma_comm = 0;
cvx_begin
variable Wr(M,M) complex % the dimension of radar beamforing matrix: M*M
variable Wc(M,M) complex % the dimension of comm beamforing matrix
MSE = (diag(rou)+(1/(sigma^2))*T*B'*kron((Wr+Wc),eye(M))*B);
% rou,B are known already which means they're certain vectors, and "sigma,T,M" are scalars.
MSE_inv = matrix_frac(w_diag,MSE);
minimize real(MSE_inv)
subject to
real(eta*h*Wr*h') <= real(h*Wc*h') ;
real(trace(Wc)+trace(Wr)) <= P;
Wr == hermitian_semidefinite(M)
Wc == hermitian_semidefinite(M)
cvx_end"
```

My target function is to minimize the performance of radar/sensing, so i think the constraints of communication, i.e. "real(eta*h*Wr*h’) <= real(h*Wc*h’) " would contradict with it. However when i run the code and get the answer, the constraint term does not take equal signs. And usually the right-hand side is twice the left-hand side. Can someone help me figure out what the problem might be?

when I set P=1, cvx outputs failed and when I enlarge P to 20, solver outputs inaccurated solved. but the constraints are still not satisfied.

## Calling SDPT3 4.0: 1098 variables, 334 equality constraints

For improved efficiency, SDPT3 is solving the dual problem.

num. of constraints = 334

dim. of sdp var = 61, num. of sdp blk = 3

dim. of linear var = 2

dim. of free var = 665 *** convert ublk to lblk

SDPT3: Infeasible path-following algorithms

## version predcorr gam expon scale_data

HKM 1 0.000 1 0

it pstep dstep pinfeas dinfeas gap prim-obj dual-obj cputime

## 0|0.000|0.000|1.7e+05|9.1e+00|1.4e+08| 5.146303e+05 0.000000e+00| 0:0:00| chol 1 1

1|0.517|0.003|8.2e+04|9.1e+00|4.3e+07| 4.863410e+05 -3.062990e+01| 0:0:00| chol 1 1

2|0.862|0.958|1.1e+04|3.8e-01|8.3e+05| 2.972459e+05 -5.080734e+03| 0:0:00| chol 1 1

3|0.924|0.937|8.6e+02|2.4e-02|6.0e+04| 4.391345e+04 -1.965404e+03| 0:0:00| chol 1 1

4|0.965|0.927|3.0e+01|2.0e-03|2.3e+03| 1.860715e+03 -1.592929e+02| 0:0:00| chol 1 1

5|0.978|0.970|6.7e-01|8.0e-05|5.6e+01| 4.742025e+01 -4.833199e+00| 0:0:00| chol 1 1

6|0.988|0.988|8.0e-03|3.1e-06|6.7e-01| 5.622810e-01 -6.727240e-02| 0:0:00| chol 1 1

7|0.982|0.988|1.5e-04|2.6e-06|1.3e-02| 5.969480e-04 -1.056069e-02| 0:0:00| chol 2 2

8|0.728|0.901|4.6e-05|9.9e-07|3.5e-03|-6.700170e-03 -9.551582e-03| 0:0:00| chol 3 3

9|0.675|0.653|2.2e-05|2.8e-07|1.3e-03|-8.196857e-03 -9.143454e-03| 0:0:00| chol 3 3

10|0.861|0.856|5.1e-05|4.7e-08|2.2e-04|-9.411736e-03 -9.077604e-03| 0:0:00| chol 4 4

11|0.857|0.748|6.1e-05|1.0e-08|4.4e-05|-9.631838e-03 -9.013083e-03| 0:0:01| chol 7 7

12|0.854|0.723|5.6e-05|2.7e-09|1.0e-05|-9.626896e-03 -8.963247e-03| 0:0:01| chol 29 24

13|0.848|0.393|3.8e-05|2.0e-09|1.2e-05|-9.426156e-03 -8.952026e-03| 0:0:01| chol

linsysolve: Schur complement matrix not positive definite

switch to LU factor. lu 11 30

14|0.238|0.372|4.0e-05|1.8e-09|7.9e-06|-9.444732e-03 -8.940534e-03| 0:0:01| lu 13 ^19

15|0.166|0.432|3.9e-05|1.4e-09|4.1e-06|-9.415753e-03 -8.920883e-03| 0:0:01| lu 11 ^24

16|0.018|0.045|3.7e-05|2.0e-09|4.0e-06|-9.410340e-03 -8.920473e-03| 0:0:01| lu 11 ^20

17|0.001|0.010|3.7e-05|2.6e-09|4.3e-06|-9.409003e-03 -8.919688e-03| 0:0:01|

stop: steps too short consecutively

## number of iterations = 17

primal objective value = -9.40900341e-03

dual objective value = -8.91968790e-03

gap := trace(XZ) = 4.26e-06

relative gap = 4.18e-06

actual relative gap = -4.81e-04

rel. primal infeas (scaled problem) = 3.72e-05

rel. dual " " " = 2.60e-09

rel. primal infeas (unscaled problem) = 0.00e+00

rel. dual " " " = 0.00e+00

norm(X), norm(y), norm(Z) = 1.0e+00, 1.3e+03, 1.9e+04

norm(A), norm(b), norm© = 1.9e+04, 2.0e+00, 6.4e+03

Total CPU time (secs) = 0.86

CPU time per iteration = 0.05

termination code = -5

DIMACS: 3.7e-05 0.0e+00 7.1e-09 0.0e+00 -4.8e-04 4.2e-06

Status: Inaccurate/Solved

Optimal value (cvx_optval): +0.00891969