M=4; N=20;
xbs=5; ybs=0;
xIrs=0; yIrs=100;
xu=3; yu=100;
xp=2; yp=95;
xEve1=2; yEve1=105;
L0=10^(-30/10);
cbu=5; cbe1=5;
cbr=3.5;cbp=5;
cru=2; cre1=3; crp=2;
dbu=sqrt((xbs-xu)^2+(ybs-yu)^2);
dbe1=sqrt((xbs-xEve1)^2+(ybs-yEve1)^2);
dbr=sqrt((xbs-xIrs)^2+(ybs-yIrs)^2);
dbp=sqrt((xbs-xp)^2+(ybs-yp)^2);
dru=sqrt((xIrs-xu)^2+(yIrs-yu)^2);
dre1=sqrt((xIrs-xEve1)^2+(yIrs-yEve1)^2);
drp=sqrt((xIrs-xp)^2+(yIrs-yp)^2);
fadingbu=sqrt(L0*dbu^(-cbu)); fadingbe1=sqrt(L0*dbe1^(-cbe1)); fadingbr=sqrt(L0*dbr^(-cbr));
fadingbp=sqrt(L0*dbp^(-cbp));
fadingru=sqrt(L0*dru^(-cru)); fadingre1=sqrt(L0*dre1^(-cre1));
fadingrp=sqrt(L0*drp^(-crp));
for n=1:1:N
T_init(n)=exp(sqrt(-1)*2*pi*n/N);
end
T=diag(T_init);
gbr=(randn(N,M)+sqrt(-1)*randn(N,M))/sqrt(2);
gbu=(randn(M,1)+sqrt(-1)*randn(M,1))/sqrt(2);
gbe1=(randn(M,1)+sqrt(-1)*randn(M,1))/sqrt(2);
gbp=ones(M,1);
grp=ones(N,1);
gru=(randn(N,1)+sqrt(-1)*randn(N,1))/sqrt(2);
gre1=(randn(N,1)+sqrt(-1)*randn(N,1))/sqrt(2);
hbp=fadingbp*gbp;
hrp=fadingrp*grp;
hbr=fadingbr*gbr;
hbu=fadingbu*gbu;
hbe1=fadingbe1*gbe1;
hru=fadingru*gru;
hre1=fadingre1*gre1;
HI=hru'*T*hbr+hbu';
Hi=HI';
HE=hre1'*T*hbr+hbe1';
He=HE';
HP=hrp'*T*hbr+hbp';
Hp=HP';
H=Hi*Hi';
End=1+10^(1/5)*100*Hi'*Hi;
Rmin=0.7;
for A=1:0.01:End
cvx_begin sdp
variable W(M,M) hermitian
variable SI(M,M) hermitian
minimize trace(W+SI)
subject to
trace((W+(1-A*2^Rmin)*SI)*H)>=0.1*A*2^(Rmin)-0.1; %(a)
Hp'*(W+SI)*Hp<=0.1;
trace(W+SI)<=10^(0.2);
He'*(W-(A-1)*SI)*He<=0.1*A-0.1;
W == hermitian_semidefinite(M)
SI == hermitian_semidefinite(M)
cvx_end
cvx_status
end
I got infeasible as written and with RHS = 0.
Follow the advice in https://yalmip.github.io/debugginginfeasible , which also applies to CVX, except for section 1.
thank you very much!
i found the problem is that the constraints of my channel loss parameters are too harsh so constraint (a) is hard to meet.