where
R_{k}(\mathbf{V}) & \triangleq \log_2(1+\gamma_k) \nonumber \
& \triangleq \log_2 \left( 1+\frac{|(V^H Z_{k}) w_k|^2 p_k}{\sum_{j=1,j\neq k}^{K}|(V^H Z_{k}) w_j|^2 p_j + \sigma^2} \right)
I write the code following the problem as below, but the result failed.
Please help to check why failed and how do i debug it, many thanks.
I = 3;
K = 6;
M = 30;
Nt = 8;
noise = 1e-12;
Puav = 0.03;
Pris = 9e-4;
lambda = 0.8;
tau = 0.1;
Rmin = 1;
e_theta = 2 * rand(1, M, I) - 1 + j * (2 * rand(1, M, I) - 1);
Z = 2 * rand(M*I, Nt, K) - 1 + j * (2 * rand(M*I, Nt, K) - 1);
w = 2 * rand(Nt, 1, K) - 1 + j * (2 * rand(Nt, 1, K) - 1);
p = rand(6, 1);
Pt_sum = sum(p);
P_sum = Pt_sum + Puav + Pris;
cvx_begin
variable c1(M * I) nonnegative
variable c2(K) nonnegative
variable V(M * I) complex
variable V_gamma(K) nonnegative
V_ini_R_sum = 0;
for Vk = 1:K
for Vi = 1:I
phi(:, :, Vi) = e_theta(:, :, Vi)';
V_noH((Vi - 1) * M + 1 : Vi * M) = phi(:, :, Vi)';
end
V_ini = V_noH';
V_ini_Hwp(:, :, Vk) = abs( V_ini' * Z(:, :, Vk) * w(:, :, Vk))^2 * p(Vk);
V_ini_interference_sum = 0;
for Vj = 1:K
if Vj ~= Vk
V_ini_interference = abs( V_ini' * Z(:, :, Vk) * w(:, :, Vj))^2 * p(Vj);
V_ini_interference_sum = V_ini_interference_sum + V_ini_interference;
end
end
V_ini_gamma(Vk) = V_ini_Hwp(:, :, Vk) / (V_ini_interference_sum + noise);
V_ini_R(Vk) = log(1 + V_ini_gamma(Vk)) / log(2);
V_ini_R_sum = V_ini_R_sum + V_ini_R(Vk);
V_R(Vk) = log(1 + V_gamma(Vk)) / log(2);
end
maximize ( sum(V_R) - lambda * P_sum - tau * ( sum(abs(c1)) + sum(abs(c2)) ) )
subject to
pow_abs(V,2) <= 1 + c1
2 * real( V_ini' * V ) - pow_abs(V_ini,2) >= 1 - c1
for Vks = 1:K
( V_gamma(Vks) - V_ini_gamma(Vks) ) / ( (1 + V_ini_gamma(Vks)) * log(2) ) >= Rmin - c2(Vks)
end
cvx_end
=============================================================================
Successive approximation method to be employed.
SDPT3 will be called several times to refine the solution.
Original size: 858 variables, 384 equality constraints
6 exponentials add 48 variables, 30 equality constraints
Cones | Errors |
Mov/Act | Centering Exp cone Poly cone | Status
--------±--------------------------------±--------
6/ 6 | 8.000e+00 1.747e+01 0.000e+00 | Failed
6/ 6 | 5.613e+00 1.706e+00 0.000e+00 | Failed
6/ 6 | 1.110e+00 5.659e-02 0.000e+00 | Failed
0/ 0 | 0.000e+00 0.000e+00 0.000e+00 | Failed
0/ 0 | 0.000e+00 0.000e+00 0.000e+00 | Failed
0/ 0 | 0.000e+00 0.000e+00 0.000e+00 | Failed
Status: Failed
Optimal value (cvx_optval): NaN