# DCP error: {complex affine} >= {constant}

Hi,

I encountered a problem with DCP. The constraint is like

sum = 0;
for m=1:3
sum = sum + trace(h(3,1,m) * h(3,1,m)’ * W);
end
sum >= threshold;

I used the SDP mode, in which W is the variable. h is a series of complex valued column vectors I generated ahead.

I think h*h’ is Hermitian, isn’t it?

Thank you very much in advance!

Let’s presume for the moment that you were NOT using SDP mode. I believe that in CVX (mcg can correct me if I am wrong), both sides of a constraint inequality must be real. This is unlike in MATLAB, in which the veracity of complex inequalities is based on taking the real parts of both sides.

h(3,1,m) * h(3,1,m)’ is complex, not real, and winds up making ‘sum’ complex, not real. Therefore, sum can not be used as one of the sides of a constraint inequality. Should the constraint be based on the real part of sum, real(sum), or the imaginary part, imag(sum), both of which are valid in CVX because sum is complex affine? If you want the constraint as abs(sum) >= threshold, then I think you’re out of luck.

Given that sum is one-dimensional, I don’t believe that SDP mode essentially (see next sentence) comes into play in the portion of the code you have shown. I think in SDP mode, sum >= threshold, with sum being scalar complex affine, would be accepted as an LMI if threshold were 0, but with warning message indicating the LMI is not symmetric, and so is probably wrong, and would be rejected as an element-wise inequality if threshold is not 0. mcg can feel free to correct or fine tune anything I have written which is not correct.