 # How to resolve this norm constraint?

W is a vector of N complex elements.
D is a binary variable

The requirements are:
When D==1, L_{\min}\le ||W||_2^2\le L_{\max}
and when D==0, ||W||_2^2=0

I have formulated the following constraints to fulfill the requirements
||W||_2^2\ge 0
||W||_2^2\le L_{\min}
||W||_2^2\le DL_{\max}
||W||_2^2\ge DL_{\min}

I have modeled it as

``````                    norm(W)>=0;
norm(W)<=sqrt(Lmax);
norm(W)<=D*sqrt(Lmax);
norm(W)>=D*sqrt(Lmin);
``````

I am experiencing the following error

``````    Error using cvxprob/newcnstr (line 192)
Disciplined convex programming error:
Invalid constraint: {convex} >= {real affine}
``````

How can I overcome this?

`norm(W)>=0;` is redundant by definition of norm. On the other hand `norm(W)>=const` is non-convex, hence you cannot model it with cvx.

1 Like

Thanks a lot. Would you please help in modeling my constraints in CVX. Yes, we can omit ||W_2^2||\ge 0 as it is default by norm definition. In case, it is impossible, I can ignore the L_{\min}. I mean, if D==1, then norm(W)>0 and norm(W)<=L_{\max}. When D==0, norm(W)==0.

Look at Stephen Boyd’s answer at How to handle nonlinear equality constraints? for a heuristic convex-concave procedure (i.e., Successive Convex Approximation (SCP)).

However, as Johan Lofberg mentions in his comment at https://or.stackexchange.com/questions/5345/how-do-model-this-constraints-correctly , you are probably better off using a non-convex solver under YALMIP - that could be Gurobi as a global non-convex bliinear (quadratic) solver, or a general purpose global non-convex solver such as BARON or YALMIP’s BMIBNB. Gurobi may be a good way to go, provided there are no nonlinearitities in your problem other than quadratics (bilinear).

You can see some of my other answers on this forum in which I suggestion SCP may not be the way to go.