Strange error

hi guys,

i’m using cvx toolbox in matlab R2013b, and i have incorporated a linear constraint in my convex problem, sth like: norm(eye(16)*w,2) <= 1/sqrt(b); where w is a complex variable and b is a positive scalar. the cvx toolbox works fine for some values of b, but doesn’t work for some other values. why is that? can somebody help me?

The constraint

norm(eye(16)*w,2) <= 1/sqrt(b)

is nonlinear, not linear, but it is convex and DCP-compliant.

You haven’t explained what you mean by “doesn’t work”. Can you provide your entire program and show the output when it works and when it doesn’t work? Note: Do not use quiet mode. Is it just the case that your problem is infeasible if b is too small?

Why do you multiply eye(16) by w, instead of just using w? It’s not wrong, but seems like an odd thing to do.

Edit: I don’t have time now to look carefully at your program, but as I guessed before seeing your “answer” in response to my post, it is the case that for values of b which are too small, your problem is being reported to be infeasible. So have you looked into why it is infeasible for these “small” values of b, and whether it should be, given the problem you are trying to model? Is your scaling good (how did you decide on +/- 1e-12?)? You haven’t provided the values of your MATLAB variables, so forum readers can’t reproduce your problem.

here’s my code:

    variable w(16,1) complex;          % complex variable declaration 

    minimize (norm(a(:,:,cnt).' * w - f_d ));      

    subject to
        % Num_LD distortionless constraints                 
            imag(w.' * a(:,m,cnt)) <= 1e-12;
            imag(w.' * a(:,m,cnt)) >= -1e-12;
            real(w.' * a(:,m,cnt)) >= 1-1e-12;
            real(w.' * a(:,m,cnt)) <= 1+1e-12;
        % For a response <= 1
            max(abs(a(:,:,cnt).' * w)) <= 1.0;   
        % b- constraint%%
            norm(w) <= 1/sqrt(b);


it works with large values of b (10^3 or higher) and doesn’t work with lower values. it returns : infeasible problem. any idea?

That is, without a doubt, a scaling problem. Typical convex optimization solvers cannot handle extremely small values like 1e-12; it thinks they are effectively 0. You will have to rescale your problem.