I have the similar problem and I also want to consult about it, thanks!
clc;
clear;
%%基本参数
L=5;
H=1;
B_total=2510^6;
B_h=B_total/H;
N0=3.9810^(-21);
P_l=1;
e=10^(-2);
K=2;
G=1;
N=2;
Mx=3;
My=3;
M=9;
%%位置设定
LEO_loc_x=[0,50010^3,0,25010^3,50010^3];
LEO_loc_y=[0,0,50010^3,25010^3,50010^3];
LEO_loc_z=[120010^3,120010^3,120010^3,120010^3,120010^3];
user_loc_x=50010^3rand(1,2);
user_loc_y=50010^3rand(1,2);
user_loc_z=0rand(1,2);
% scatter3([LEO_loc_x,user_loc_x],[LEO_loc_y,user_loc_y],[LEO_loc_z,user_loc_z])
%%信道产生
k_factor=db2pow(10);
L_p=@(wavelength,d)(wavelength/(4pid))^2;
% h_rician=@(L_p,k)sqrt(L_p)sqrt(k/(k+1)) + sqrt(1/(k+1)) * sqrt(1/2) (randn(1,1) + 1irandn(1,1));5 10^(-12)
h_rician=@(L_p,k)(normrnd(sqrt((k)/(2(k+1))),1/(2*(k+1)))+1inormrnd(sqrt((k)/(2(k+1))),1/(2*(k+1))))5 10^(-12);
h=zeros(N,L,M);
for i=1:5
for k=1:2
for q=1:9
d=sqrt((LEO_loc_x(i)-user_loc_x(k))^2+(LEO_loc_y(i)-user_loc_y(k))^2+(LEO_loc_z(i)-user_loc_z(k))^2);
path_loss=L_p(1/(2010^9),d);
h(k,i,q)=h_rician(path_loss,k_factor);
end
end
end
h_1=zeros(N,L,M);
for i=1:5
for k=1:2
d=sqrt((LEO_loc_x(i)-user_loc_x(k))^2+(LEO_loc_y(i)-user_loc_y(k))^2+(LEO_loc_z(i)-user_loc_z(k))^2);
vx=(user_loc_x(k)-LEO_loc_x(i))/sqrt((LEO_loc_x(i)-user_loc_x(k))^2+(LEO_loc_y(i)-user_loc_y(k))^2)(user_loc_x(k)-LEO_loc_x(i))/d;
vy=(user_loc_y(k)-LEO_loc_y(i))/sqrt((LEO_loc_x(i)-user_loc_x(k))^2+(LEO_loc_y(i)-user_loc_y(k))^2);
Vx=;
temp=1;
for q=1:Mx
Vx=[Vx,temp];
temp=tempexp(-1jpivx);
end
Vx=1/sqrt(Mx)Vx;
Vy=[x];
temp=1;
for q=1:My
Vy=[Vy,temp];
temp=tempexp(-1jpivy);
end
Vy=1/sqrt(My)Vy;
V=kron(Vx,Vy);
for q=1:9
h_1(k,i,q)=h(k,i,q)V(q);
end
end
end
h_final=zeros(N,ML);
for i=1:5
for k=1:2
for q=1:9
h_final(k,(i-1)9+q)=h_1(k,i,q);
end
end
end
%%上面的h_final的每一行表示一个用户与所有卫星之间的信道
%%求解
W_=rand(KML,KM*L);
A1=;
A2=;
A3=;
A4=;
A5=;
for i=1:5
if i==1
A1=[A1,eye(9,9)];
A2=[A2,zeros(9,9)];
A3=[A3,zeros(9,9)];
A4=[A4,zeros(9,9)];
A5=[A5,zeros(9,9)];
elseif i==2
A1=[A1,zeros(9,9)];
A2=[A2,eye(9,9)];
A3=[A3,zeros(9,9)];
A4=[A4,zeros(9,9)];
A5=[A5,zeros(9,9)];
elseif i==3
A1=[A1,zeros(9,9)];
A2=[A2,zeros(9,9)];
A3=[A3,eye(9,9)];
A4=[A4,zeros(9,9)];
A5=[A5,zeros(9,9)];
elseif i==4
A1=[A1,zeros(9,9)];
A2=[A2,zeros(9,9)];
A3=[A3,zeros(9,9)];
A4=[A4,eye(9,9)];
A5=[A5,zeros(9,9)];
else
A1=[A1,zeros(9,9)];
A2=[A2,zeros(9,9)];
A3=[A3,zeros(9,9)];
A4=[A4,zeros(9,9)];
A5=[A5,eye(9,9)];
end
end
C1=blkdiag(A1’*A1,A1’*A1);
C2=blkdiag(A2’*A2,A2’*A2);
C3=blkdiag(A3’A3,A3’A3);
C4=blkdiag(A4’A4,A4’A4);
C5=blkdiag(A5’A5,A5’A5);
Q1=(h_final(1,:)).'conj(h_final(1,:));
Q1_1=blkdiag(Q1,zeros(ML,ML));
Q2_1=blkdiag(zeros(ML,ML),Q1);
Q2=(h_final(2,:)).'conj(h_final(2,:));
Q1_2=blkdiag(Q2,zeros(ML,ML));
Q2_2=blkdiag(zeros(ML,ML),Q2);
cvx_begin
variable t
variable W(KML,KML) complex
maximize t
subject to
(-rel_entr(1,1/(B_hN0)real(trace(Q1_1W+Q2_1W))+1)+rel_entr(1,1/(B_hN0)real(trace(Q2_1W_))+1)-(log(exp(1))1/(B_hN0)real(trace(Q2_1(W-W_))))/(1/(B_hN0)real(trace(Q2_1W_))+1))>=t
(-rel_entr(1,1/(B_hN0)real(trace(Q1_2W+Q2_2W))+1)+rel_entr(1,1/(B_hN0)real(trace(Q1_2W_))+1)-(log(exp(1))1/(B_hN0)real(trace(Q1_2(W-W_))))/(1/(B_hN0)real(trace(Q1_2W_))+1))>=t
real(trace(C1W))<=P_l
real(trace(C2W))<=P_l
real(trace(C3W))<=P_l
real(trace(C4W))<=P_l
real(trace(C5*W))<=P_l
real(W)>=0
cvx_end
=====================================
Using Pade approximation for exponential
cone with parameters m=3, k=3
=====================================
Using Pade approximation for exponential
cone with parameters m=3, k=3
Calling SDPT3 4.0: 12196 variables, 31 equality constraints
num. of constraints = 31
dim. of sdp var = 24, num. of sdp blk = 12
dim. of linear var = 4059
dim. of free var = 8101 *** convert ublk to lblk
SDPT3: Infeasible path-following algorithms
version predcorr gam expon scale_data
HKM 1 0.000 1 0
it pstep dstep pinfeas dinfeas gap prim-obj dual-obj cputime
0|0.000|0.000|1.4e+03|6.1e+03|5.6e+08| 1.274206e+02 0.000000e+00| 0:0:00| chol 1 1
1|0.512|0.913|6.6e+02|5.3e+02|1.2e+07| 1.503482e+02 -8.368921e+02| 0:0:00| chol 1 1
2|0.638|0.489|2.4e+02|2.7e+02|3.2e+06| 3.699953e+02 -1.058279e+03| 0:0:00| chol 1 1
3|0.966|0.952|8.0e+00|1.3e+01|1.1e+05| 3.443707e+02 -7.164495e+02| 0:0:00| chol 1 1
4|0.975|0.787|2.0e-01|2.9e+00|2.2e+04| 3.705221e+01 -3.914234e+02| 0:0:00| chol 1 1
5|0.721|0.307|5.7e-02|2.0e+00|1.8e+04| 1.378878e+01 -3.007867e+02| 0:0:00| chol 1 1
6|0.953|0.910|2.6e-03|1.9e-01|1.6e+03| 3.276415e+00 -2.877933e+01| 0:0:00| chol 1 1
7|1.000|0.592|1.4e-08|8.4e-02|7.6e+02| 8.421474e-01 -1.436285e+01| 0:0:00| chol 1 1
8|0.987|0.838|5.9e-09|1.7e-02|1.4e+02| 6.169128e-02 -2.500714e+00| 0:0:00| chol 1 1
9|0.984|0.986|1.4e-09|2.2e-03|1.7e+01| 1.933753e-03 -3.967287e-02| 0:0:00| chol 1 1
10|1.000|0.802|2.0e-09|1.2e-03|2.8e+00| 2.451019e-04 -8.736485e-03| 0:0:00| chol 1 1
11|1.000|0.871|2.0e-09|4.1e-04|5.5e-01| 2.388039e-05 -1.123119e-03| 0:0:00| chol 2 2
12|1.000|0.736|4.0e-09|6.3e-04|1.4e-01| 3.273246e-06 -2.762564e-04| 0:0:00| chol 2 2
13|1.000|0.996|1.7e-09|1.7e-04|1.6e-02| 5.882618e-07 9.469744e-06| 0:0:00| chol 2 2
14|1.000|1.000|5.5e-10|1.8e-05|1.3e-03| 1.214511e-06 -6.670955e-06| 0:0:00| chol 6 6
15|1.000|1.000|4.0e-09|1.5e-06|1.1e-04| 9.139673e-08 -5.289981e-07| 0:0:00| chol 2 2
16|1.000|1.000|2.6e-11|1.3e-07|9.2e-06| 3.211349e-09 -4.138372e-08| 0:0:00| chol
linsysolve: Schur complement matrix not positive definite
switch to LU factor. lu 4 1
17|1.000|0.956|1.3e-09|1.1e-08|4.0e-07|-8.719519e-09 -3.694809e-09| 0:0:00| lu 30 4
18|1.000|0.283|7.4e-08|6.6e-10|3.2e-07|-4.318339e-07 -3.046268e-09| 0:0:00| lu 8 4
19|0.613|0.036|6.6e-07|6.0e-10|1.4e-06|-5.767571e-06 -3.000409e-09| 0:0:00| lu 8 ^26
20|0.001|0.003|5.7e-07|1.6e-09|1.5e-06|-6.650360e-06 -3.116617e-09| 0:0:00|
stop: steps too short consecutively
number of iterations = 20
primal objective value = -4.31833875e-07
dual objective value = -3.04626780e-09
gap := trace(XZ) = 3.24e-07
relative gap = 3.24e-07
actual relative gap = -4.29e-07
rel. primal infeas (scaled problem) = 7.42e-08
rel. dual " " " = 6.65e-10
rel. primal infeas (unscaled problem) = 0.00e+00
rel. dual " " " = 0.00e+00
norm(X), norm(y), norm(Z) = 8.5e+02, 3.4e+01, 3.1e+01
norm(A), norm(b), norm(C) = 5.3e+01, 4.0e+00, 2.7e+00
Total CPU time (secs) = 0.31
CPU time per iteration = 0.02
termination code = -5
DIMACS: 1.5e-07 0.0e+00 9.1e-10 0.0e+00 -4.3e-07 3.2e-07
Status: Inaccurate/Solved
Optimal value (cvx_optval): +4.31834e-07