I am trying to solve this SOCP problem using CVX. But I am getting this error. How to resolve this issue?
I am attaching my code here.
variable Gamma nonnegative
variable b(N*Nb,1,K) complex
b(:,i)'*Truehk(:,i) - norm(Pk(:,:,i)'*b(:,i),2) >= 1
for r=1: K
real(b(:,r)'*Truehk(:,t)) + norm(Pk(:,:,t)'*b(:,r),2) <= Gamma
In b(:,i)’*Truehk(:,i) - norm(Pk(:,:,i)’*b(:,i),2) >= 1
Perhaps you want to use real(b(:,r)’ as you do in the subsequent inequality constraint?
I also suggest you not use the quiet option until you have verified everything, inckuding the solution process, is working correctly. That way you will see solver output and CVX output.after the solver concludes.
I have choose Pk and unit norm vector uk as
Pk = sqrtm(EllipsoidConfigurationMatrix);
unitNormVector = randn(NNb,1);
uk = randunitNormVector/norm(unitNormVector);
I have formulated my robust beamforming problem as SOCP.
This is your problem, lifted from wherever, so you will have to tell us what it is supposed to mean.Is the left-most term in each inequality supposed to be real? If not, what do the inequalities mean?
If none of the input data is complex, I presume your variables should be real (i…e, not complex), and then everything would be fine, If input data and your b are complex, do you want real(b'*h) (with indices, etc. filled in)?
hk is complex channel vector and bk’s are also complex beamforming vector. Gamma worst-case interference which is real.
I have omitted the real thing in first inequality constraint by concatenating the real and imaginary parts.
As I wrote, it is your problem, so you will have to figure out what the inequalities mean. If the LHS of the inequalities is not real, then how are the inequalities to be interpreted? If they apply separately for real and imaginary parts, then use real(b'*h) for one set of inequalities, and also formulate a second set of inequalities with imag(b'*h) >= 0 , or imag(b'*h) == 0, or whatever it is you want.
Or perhaps your last post indicates you have now “solved” the problem of how to formulate and input in CVX, in which case I suppose all is well.
You can do whatever you want compliant with CVX’s rules. As to whether that is a valid formulation of your problem, meaningful in the real world, that is for you to determine, because forum readers don’t know how to interpret your problem. Is 2 + sqrt(-1) >= 1? You tell us (that is a rhetorical request, i.e., you don’t have to provide it), because we don’t know.