{log-concave} <= {real constant}

I have been following an example from Boyd’s book. The code is attached below:

% problem constants
n = 5;                 % number of transmitters and receivers
sigma = 0.5*ones(n,1); % noise power at the receiver i
Pmin = 0.1*ones(n,1);  % minimum power at the transmitter i
Pmax = 5*ones(n,1);    % maximum power at the transmitter i
SINR_min = 2;          % threshold SINR for each receiver

% path gain matrix
G = [1.0  0.1  0.2  0.1  0.0
0.1  1.0  0.1  0.1  0.0
0.2  0.1  2.0  0.2  0.2
0.1  0.1  0.2  1.0  0.1
0.0  0.0  0.2  0.1  1.0];

% variables are power levels
cvx_begin gp
 variable P(n)
  % objective function is the total transmitter power
  minimize( sum(P) )
  subject to
    % formulate the inverse SINR at each receiver using vectorize features
    Gdiag = diag(G);          % the main diagonal of G matrix
    Gtilde = G - diag(Gdiag); % G matrix without the main diagonal
    % inverse SINR
    inverseSINR = (sigma + Gtilde*P)./(Gdiag.*P);
    % constraints are power limits and minimum SINR level
    Pmin <= P <= Pmax;
    inverseSINR <= (1/SINR_min);
cvx_end

fprintf(1,'\nThe minimum total transmitter power is %3.2f.\n',cvx_optval);
disp('Optimal power levels are: '), P

I am trying to solve a similar problem in Cvx but it gives me “Disciplined convex programming error:
Invalid constraint: {log-concave} <= {real constant}”. I know that the RHS is a constant (not convex), but so it is in the above example, but why does it runs smoothly? This is my code I am trying to execute:

N = 3;
A = [0,0.01,0.81;0.01,0,1.45;0.81,1.45,0];
I = 20;
Pmin = 0.1*ones(N,1);
Pmax = 1*ones(N,1);
cvx_begin gp
variable P(N)
minimize (norm(A * P,2))
subject to
R = A' * P;
Pmin <= P <= Pmax;
1./R <= (1/I);
cvx_end

Your inequality 1./R <= (1/I); is going in the wrong direction for convexity.

Note that inverseSINR is log-convex, as is R. But 1./R is log-concave, hence the error in your program, but not in the example.

Thank you very much for your response. I have changed the constraint to non-increasing function. I have attached the code below:

N = 4;
A = [0,1,1,1; 1,0,1,1; 1,1,0,1; 1,1,1,0];

Pmin = 0.1*ones(N,1);
Pmax = 5*ones(N,1);
S_min = 1;
sigma = 0.5;

cvx_begin gp
variable P(N)
minimize sum(A * P)
subject to
Pmin <= P <= Pmax;
transpose((transpose(A.*P))./(sigma + repmat(A*P,1,N) - transpose(A.*P) - diag(diag(repmat(A*P,1,N) - transpose(A.*P))))) >= S_min;
cvx_end

Now, it is giving me an error in the element-wise multiplication step i.e., A.*P, whereas I have tested it on MATLAB the syntax of the code is correct. I have also proved it with symbols in MATLAB. I am attaching the code here.

N = 4;
A = [0,1,1,1; 1,0,1,1; 1,1,0,1; 1,1,1,0];
syms a b c d
P = [a; b; c; d];
sigma = 0.5;
X = transpose((transpose(A.*P))./(sigma + repmat(A*P,1,N) - transpose(A.*P) - diag(diag(repmat(A*P,1,N) - transpose(A.*P)))))

A.*P has mismatched dimensions in MATLAB prior to MATLAB R2016b, and as far as I know in CVX. You seem to be relying on the implicit expansion added to MATLAB in R2016b https://blogs.mathworks.com/loren/2016/10/24/matlab-arithmetic-expands-in-r2016b/ .I don;t believe this is supported by CVX, i.e., when one or more of the operands is a CVX variable or expression.

1 Like