Thank you for your suggestion. I have added expression holder variables according to the rules in the link. The power optimization result is still that only the elements in the first column are non-zero, and the other elements are zero. The following are my code:
function [pBest,isfeasible,numOfLoop,Tafter,Tbefore] = functionPowerOptimization_maxSumRate(N,gamma,beta,Pmax,tau_p,Tbefore,tau_c)
L= size(beta,1);
K = size(beta,2);
dl_power=(Pmax/L)*ones(L,K);
Tafter=1e6;
%Set the accuracy of the bisection
delta = 0.00001;
numOfLoop=0;
while (Tafter - Tbefore)/Tbefore > delta
if numOfLoop==0
P0=dl_power;
[feasible,nuSolution] = functionFeasibilityProblemP1(L,K,N,beta,Pmax,gamma,P0);
if feasible
isfeasible=true;
pBest = nuSolution;
else
isfeasible=false;
[pBest,~]=chooseAP_S4_one(beta,Pmax);
end
Tafter = functionComputeSumSE_DL(gamma,K,N,beta,tau_p,tau_c,pBest);
numOfLoop=numOfLoop+1;
else
P0=dl_power;
[feasible,nuSolution] = functionFeasibilityProblemP1(L,K,N,beta,Pmax,gamma,P0);
if feasible
isfeasible=true;
pBest = nuSolution;
else
isfeasible=false;
[pBest,~]=chooseAP_S4_one(beta,Pmax);
end
Tbefore=Tafter;
Tafter = functionComputeSumSE_DL(gamma,K,N,beta,tau_p,tau_c,pBest);
numOfLoop=numOfLoop+1;
end
end
end
function [feasible,nuSolution] = functionFeasibilityProblemP1(L,K,N,beta,Pmax,gamma,P0)
% Pmax = 200;
for k=1:K
daoshuUI(k)=Ksum(beta(:,k));
daoshuDS(k)=Nsqrt(P0(:,k))’*sqrt(gamma(:,k))*sum(sqrt(gamma(:,k))./(sqrt(P0(:,k))+eps));
daoshuRminus(k)=-daoshuUI(k)/((sum(P0’*beta(:,k))+1)*log(2));
end
cvx_begin sdp
variable nu(L,K) %Power allocation
expressions TaylorDS(K,1) TaylorRminus(K,1) object(K,1)
for k=1:K TaylorDS(k)=log(sum(nu’beta(:,k))+1+N(sqrt(P0(:,k))’*sqrt(gamma(:,k)))^2+daoshuDS(k)*sum(sum(nu-P0)))/log(2);
TaylorRminus(k)=-log(sum(P0’*beta(:,k))+1)/log(2)+daoshuRminus(k)sum(sum(nu-P0));
object(k)=TaylorDS(k)+TaylorRminus(k);
end
maximize sum(object)
subject to
for l = 1:L
sum(nu(l,:)) <= PmaxK/L;
nu(l,:)>=0;
end
cvx_end
if contains(cvx_status,‘Solved’) % feasible
feasible = true;
nuSolution = nu;
else
feasible = false;
nuSolution = [];
end
end
The following is the optimization output.
CVX Warning:
Models involving “log” or other functions in the log, exp, and entropy
family are solved using an experimental successive approximation method.
This method is slower and less reliable than the method CVX employs for
other models. Please see the section of the user’s guide entitled
The successive approximation method
for more details about the approach, and for instructions on how to
suppress this warning message in the future.
Calling Mosek 9.1.9: 140 variables, 30 equality constraints
MOSEK Version 9.1.9 (Build date: 2019-11-21 11:34:40)
Copyright © MOSEK ApS, Denmark. WWW: mosek.com
Platform: Windows/64-X86
Problem
Name :
Objective sense : min
Type : CONIC (conic optimization problem)
Constraints : 30
Cones : 10
Scalar variables : 140
Matrix variables : 0
Integer variables : 0
Optimizer started.
Presolve started.
Linear dependency checker started.
Linear dependency checker terminated.
Eliminator started.
Freed constraints in eliminator : 0
Eliminator terminated.
Eliminator - tries : 1 time : 0.00
Lin. dep. - tries : 1 time : 0.00
Lin. dep. - number : 0
Presolve terminated. Time: 0.03
Problem
Name :
Objective sense : min
Type : CONIC (conic optimization problem)
Constraints : 30
Cones : 10
Scalar variables : 140
Matrix variables : 0
Integer variables : 0
Optimizer - threads : 12
Optimizer - solved problem : the primal
Optimizer - Constraints : 10
Optimizer - Cones : 10
Optimizer - Scalar variables : 40 conic : 30
Optimizer - Semi-definite variables: 0 scalarized : 0
Factor - setup time : 0.00 dense det. time : 0.00
Factor - ML order time : 0.00 GP order time : 0.00
Factor - nonzeros before factor : 55 after factor : 55
Factor - dense dim. : 0 flops : 1.53e+03
ITE PFEAS DFEAS GFEAS PRSTATUS POBJ DOBJ MU TIME
0 1.8e+03 1.3e+00 2.1e+01 0.00e+00 1.194318353e+01 -8.051020016e+00 1.0e+00 0.08
1 1.8e+02 1.3e-01 6.5e+00 -9.90e-01 1.482572519e+02 1.375600292e+02 1.0e-01 0.22
2 5.0e+01 3.7e-02 2.9e+00 -8.64e-01 4.053756770e+02 4.130095697e+02 2.9e-02 0.22
3 1.5e+01 1.1e-02 5.0e-01 1.12e-01 2.875951316e+02 2.887811397e+02 8.8e-03 0.23
4 1.1e+00 8.1e-04 1.4e-02 5.09e-01 3.563578425e+02 3.569383519e+02 6.3e-04 0.23
5 1.4e-01 1.1e-04 7.0e-04 9.21e-01 3.574532772e+02 3.575444665e+02 8.2e-05 0.25
6 1.0e-02 7.5e-06 1.3e-05 9.88e-01 3.575265299e+02 3.575330245e+02 5.8e-06 0.25
7 3.3e-04 2.4e-07 7.7e-08 9.99e-01 3.575415321e+02 3.575417413e+02 1.9e-07 0.25
8 3.4e-05 2.5e-08 2.6e-09 1.00e+00 3.575428754e+02 3.575428969e+02 1.9e-08 0.27
9 1.5e-06 1.1e-09 2.3e-11 1.00e+00 3.575430572e+02 3.575430582e+02 8.4e-10 0.27
10 8.4e-08 6.2e-11 3.1e-13 1.00e+00 3.575430664e+02 3.575430665e+02 4.8e-11 0.27
11 4.8e-09 3.4e-12 4.1e-15 1.00e+00 3.575430670e+02 3.575430670e+02 2.6e-12 0.28
12 3.7e-10 2.6e-13 8.5e-17 1.00e+00 3.575430670e+02 3.575430670e+02 2.0e-13 0.28
13 3.7e-10 2.6e-13 8.5e-17 1.00e+00 3.575430670e+02 3.575430670e+02 2.0e-13 0.30
14 3.7e-10 2.6e-13 8.5e-17 1.00e+00 3.575430670e+02 3.575430670e+02 2.0e-13 0.30
Optimizer terminated. Time: 0.34
Interior-point solution summary
Problem status : PRIMAL_AND_DUAL_FEASIBLE
Solution status : OPTIMAL
Primal. obj: 3.5754306701e+02 nrm: 3e+03 Viol. con: 3e-08 var: 0e+00 cones: 9e-11
Dual. obj: 3.5754306701e+02 nrm: 3e+00 Viol. con: 0e+00 var: 3e-12 cones: 0e+00
Optimizer summary
Optimizer - time: 0.34
Interior-point - iterations : 15 time: 0.30
Basis identification - time: 0.00
Primal - iterations : 0 time: 0.00
Dual - iterations : 0 time: 0.00
Clean primal - iterations : 0 time: 0.00
Clean dual - iterations : 0 time: 0.00
Simplex - time: 0.00
Primal simplex - iterations : 0 time: 0.00
Dual simplex - iterations : 0 time: 0.00
Mixed integer - relaxations: 0 time: 0.00
Status: Solved
Optimal value (cvx_optval): +33.2967
The optimization variable nu is a 10 * 10 matrix, and the sum of elements in each row of nu is required to be less than 200. After optimization, the value of nu is:
nu =
** (1,1) 200.0000**
** (2,1) 200.0000**
** (3,1) 200.0000**
** (4,1) 200.0000**
** (5,1) 200.0000**
** (6,1) 200.0000**
** (7,1) 200.0000**
** (8,1) 200.0000**
** (9,1) 200.0000**
** (10,1) 200.0000**
But this nu does not maximize the sumrate.