Why this problem in CVX is infeasible? Need help!

% function [sume,sumpower,Fbb,Frf,usergroup] = QT(H,R,G,Imax,imax,yipuson,Pmax,sigma2,index,Rmin)

% index 只能取四种组合:
% [1,1] Pro SBF + AGNES
% [2,1] Pro SLNR + AGNES
% [3,1] ZF + AGNES
% [3,2] ZF + K-means

%test
clear all
clc
K = 9; % 用户数
G = 4; %射频链路数
Nt = 4; %Number of ULA TX antennas 1616的发送天线阵列
Nr = 1; %Number of ULA RX antennas 接收端4
4的天线阵列
Imax = 50;
imax = 20;
IMAX = 1:Imax;
ITER = 300; % Number of iterations 迭代次数
L=6; %每个用户的LoS和NLoS
SNR_dB = [0];
SNR = 10.^(SNR_dB/10.);
sigma2 = 1/SNR;
Pmax=32;%发射总功率限制
Rmin = 0.01; %QoS
yipuson = 1e-3;
index = [1,1];
% [H,theta,fai]=userchannel(Nt,Nr,K,L); %用户采用NLoS信道
H =[0.144682289924726 - 0.316245731245331i,0.706232540284524 + 0.913435156367736i,-0.254671363469307 - 0.517388576198444i,0.650366113985987 + 0.906127896119521i;
0.0708150356140429 - 1.70759892538158i,-0.362873886716024 - 0.602706739899060i,-0.482424434314683 - 0.158743452248704i,-0.142047363499696 + 1.69581165952808i;
-1.17811529837719 + 1.05409529246976i,0.0592892995993264 + 0.0437161825671438i,0.0128399229803866 + 0.0317925361090698i,0.211457170417020 - 0.238198883048252i;
0.698869396558609 + 0.210318720915450i,0.0119008494150858 - 0.283785429569513i,0.0959370927838028 + 0.684453299878534i,-0.236201225652144 - 0.671931112777728i;
-0.562426586281260 - 0.00935618049777097i,0.949262859258580 + 0.172226239398016i,-0.964803619963384 + 0.000904210276795152i,0.337825873164882 - 1.15645513898965i;
0.786494963979183 - 0.224888940748627i,-0.191626605725431 + 0.443512561485816i,-0.107880826201091 - 0.0597436086114109i,0.229018364647799 + 0.876240779016573i;
-0.472558547029130 - 1.35333056291623i,1.02286359477251 + 1.16469876938639i,-0.857594762759457 + 0.122385707312317i,-0.394226394988999 - 0.451285651845988i;
-0.617455898176657 + 0.690812863286035i,0.727628373140419 + 0.381040005392391i,-0.139997572309411 + 0.664633845174106i,0.602921451386039 - 0.144558921397740i;
-0.795568821611681 + 0.403486972757454i,0.609968973152602 - 0.855732878515344i,-0.812985658161464 - 0.136052510307244i,1.39790336463920 + 0.0914621449424365i];

Nrf = G;

yipuson1 = 1e-5;

%真实信道关联矩阵
R = zeros(K,Nt,Nt);
for k = 1:K
R(k,:,:slight_smile: = H(k,:)’*H(k,:); %基站知道完美的信道信息
end
[K,~,Nt] = size®;
%--------------------用户分组------------------------
% usergroup = groupfun(R,H,Nrf,index);
usergroup = [9,4,0,0,0,0,0,0,0;2,8,3,0,0,0,0,0,0;7,0,0,0,0,0,0,0,0;1,6,5,0,0,0,0,0,0];
Fbb = [1.79179801553289 + 0.00148589112164216i,0.0105415316686055 - 0.298344637311487i,0.0899700593661216 - 0.354940146311844i,-0.264742581841531 - 0.270148494322568i;-0.0434970610481377 + 0.0105867911803651i,0.864514780571278 - 0.0100974834016520i,-0.0512912568628991 - 0.0289678789870955i,-0.0904905059322563 - 0.0565474187955564i;-4.04982145350834e-16 - 1.07995238760222e-15i,-4.77114236077858e-16 - 3.46992171692988e-16i,2.17977951951129 - 1.11926915266511e-15i,-2.68322662661278e-16 + 8.88818820065483e-16i;-0.712379476279450 + 0.937989353601491i,-0.287622402156940 + 0.601993831947810i,-1.51499664862809 + 0.174642758628908i,1.31315821108020 - 0.0528940814867692i];
Frf = [0.422525398718716 + 0.00844235238773664i,0.556259081818932 + 0.437558234278222i,0.104226767424442 + 0.165613704663450i,0.266144120121557 + 0.350197742877308i;0.0121329557742394 - 0.0740239731039389i,0.173244131656720 + 0.554943949371016i,0.250624555472408 + 0.357337769003948i,0.356807279476188 + 0.0793709188578480i;-0.178369326880166 - 0.835683386581078i,-0.275653862260710 - 0.143687363086992i,0.722498242633016 - 0.312260596196851i,0.567718990713792 - 0.266888915617443i;0.254054372326319 - 0.145080299959768i,-0.00121216854337460 - 0.253987657120526i,0.369649170448035 - 0.122698952968264i,0.521424285458654 + 0.0866016142933595i];
%--------------------波束设计并重新排列用户------------------------
% [usergroup,Fbb,Frf,power0] = beamforming(R,H,Pmax,index,sigma2,usergroup);

d = Frf*Fbb;

%% -------------------优化功率Pg,u----------------------

ind = zeros(1,Nrf); %簇索引
usel = 0;
for g = 1:Nrf
user_g = usergroup(g,:);
user_g(user_g == 0)=[]; %将数组里面为0的元素去掉
ind(g) = usel+length(user_g);
usel = ind(g);
end
ind = [0,ind]; %ind 1*(Nrf+1) 第一个值为0,后面的表示每个RF链路依次服务的用户数

% 将K个用户的功率排成以一列 K*1

p0 = [];
for g = 1:Nrf
user_g = usergroup(g,:);
user_g(user_g == 0)=[]; %将数组里面为0的元素去掉
for u = 1:length(user_g)
p0 = [p0;power0(g,u)]; %按簇编号的顺序将功率排起来 K*1向量
end
end

%-----设置t的初始值-----
t_min = Rmin;
R_temp = zeros(Nrf,K); %计算在初始功率下速率

%--------------------计算ita-------------------------
ita = zeros(Nrf,K); %ita 每个Rg,u分母部分
for g = 1:Nrf
user_g = usergroup(g,:);
user_g(user_g == 0)=[]; %将数组里面为0的元素去掉
for u = 1:length(user_g) % 对第n个簇中的用户操作
itaa = sigma2; %噪声项
bb(:,:slight_smile: = R(user_g(u),:,:);
for i = 1:u-1 % 簇内干扰
itaa = itaa+ norm(d(:,g)'bbd(:,g),‘fro’)*power0(g,i);
end

    for q = 1:Nrf % 簇外干扰
        if q~=g
            user_q = usergroup(q,:);
            user_q(user_q == 0)=[];  %将数组里面为0的元素去掉
            for v = 1:length(user_q)  % 对第n个簇中的用户操作
                itaa = itaa + norm(d(:,q)'*bb*d(:,q),'fro')*power0(q,v);
            end
        end
    end
    
    ita(g,u) = itaa;  %sinr dominator
    %                     F2(g,u) = log2(ita(g,u));
end

end

for g = 1:Nrf
user_g = usergroup(g,:);
user_g(user_g == 0)=[]; %将数组里面为0的元素去掉
for u = 1:length(user_g)
bb(:,:slight_smile: = R(user_g(u),:,:);
R_temp(g,u) = log2(1+norm(d(:,g)'bbd(:,g),‘fro’)*power0(g,u)/ita(g,u));
end
end
t_max = max(max(R_temp));
% t_max = 2;

% for g = 1:Nrf
% user_g = usergroup(g,:);
% user_g(user_g == 0)=[]; %将数组里面为0的元素去掉
% for u = 1:length(user_g)
% bb(:,:slight_smile: = R(user_g(u),:,:);
% R_temp(g,u) = trace(bb);
% end
% end
% [row,colomn] = find(R_temp == max(max(R_temp)));
% bb_max(:,:slight_smile: = R(usergroup(row,colomn),:,:);
% [U,V] = eig(bb_max);
% [~,in] = max(diag(V));
% uu = U(:,in);
% for i = 1:Nt
% fmax(i) = uu(i)/abs(uu(i))/sqrt(Nt);
% end
% fmax = fmax’;
% t_max = norm(fmax’bb_maxfmax,‘fro’)Pmax/(Ntsigma2);

% 迭代

it=0; % t 的迭代

while (it<Imax)&&((abs(t_max - t_min)>yipuson)||(it==0))

t = (t_min+t_max)/2;

it=it+1;

convalue = zeros(2,K);
convalue(1,:)=ones(1,K);

itt=0;
while  (itt<imax)&&(norm(convalue(1,:)-convalue(2,:),'fro')>yipuson1)
    
    itt=itt+1;
    
    m = zeros(Nrf,K);  %m的顺序与power0的顺序是一致的,按照每个用户对应排列
    %--------------------计算ita-------------------------
    ita =  zeros(Nrf,K);  %ita 每个Rg,u分母部分
    for g = 1:Nrf
        user_g = usergroup(g,:);
        user_g(user_g == 0)=[];  %将数组里面为0的元素去掉
        for u = 1:length(user_g)  % 对第n个簇中的用户操作
            itaa = sigma2;  %噪声项
            bb(:,:) = R(user_g(u),:,:);
            for i = 1:u-1 % 簇内干扰
                itaa = itaa+ norm(d(:,g)'*bb*d(:,g),'fro')*power0(g,i);
            end
            
            for q = 1:Nrf % 簇外干扰
                if q~=g
                    user_q = usergroup(q,:);
                    user_q(user_q == 0)=[];  %将数组里面为0的元素去掉
                    for v = 1:length(user_q)  % 对第n个簇中的用户操作
                        itaa = itaa + norm(d(:,q)'*bb*d(:,q),'fro')*power0(q,v);
                    end
                end
            end
            
            ita(g,u) = itaa;  %sinr dominator
            %                     F2(g,u) = log2(ita(g,u));
        end
    end
    
    %计算辅助变量m
    for g = 1:Nrf
        user_g = usergroup(g,:);
        user_g(user_g == 0)=[];  %将数组里面为0的元素去掉
        for u = 1:length(user_g)
            bb(:,:) = R(user_g(u),:,:);
            m(g,u) = sqrt( norm(d(:,g)'*bb*d(:,g),'fro')*power0(g,u) )/ita(g,u);
        end
    end

% bigger = Rmin; %max(Rmin,t); %max(Rmin,t)
delta = 2^Rmin-1;

    cvx_begin
    variable po(K,1) nonnegative
    minimize (sum(po))
    subject to
          
    A0 = [];    %C1,去掉相加约束
    b0 = [];  %max P limitation
    c=[];
    
    %QT&QoS
    for g = 1:Nrf
        user_g = usergroup(g,:);
        user_g(user_g == 0)=[];  %将数组里面为0的元素去掉
        for u = 1:length(user_g)
            c0 = -m(g,u)^2 * sigma2 - delta;  %安排每一个P前面的系数,对每一个用户都有功率约束
            bb(:,:) = R(user_g(u),:,:);
            c0 = c0 + 2*m(g,u)*sqrt( norm(d(:,g)'*bb*d(:,g),'fro')*po(ind(g)+u) );   %C2最小功率约束g,u的系数
            
            for i = 1:u-1 % 簇内干扰
                c0 = c0 - m(g,u)^2*norm(d(:,g)'*bb*d(:,g),'fro')*po(ind(g)+i);
            end
            
            for q = 1:Nrf
                if q ~=  g
                    user_q = usergroup(q,:);  % 第q个簇的用户
                    user_q(user_q==0) = [];
                    for v = 1:length(user_q)  % 对第n个簇中的用户操作
                        c0 = c0 - m(g,u)^2*norm(d(:,q)'*bb*d(:,q),'fro')*po(ind(q)+v); %本簇外用户功率对位因子
                    end
                end
            end
            c = [c ; -c0];  % (K+1)*K  不等式约束
        end
    end
    d0 = zeros(K,1);

% c <= d0;

    %t
    for g = 1:Nrf
        user_g = usergroup(g,:);
        user_g(user_g == 0)=[];  %将数组里面为0的元素去掉
        for u = 1:length(user_g)
            c0 = -m(g,u)^2 * sigma2 - 2^t+1;  %安排每一个P前面的系数,对每一个用户都有功率约束
            bb(:,:) = R(user_g(u),:,:);
            c0 = c0 + 2*m(g,u)*sqrt( norm(d(:,g)'*bb*d(:,g),'fro')*po(ind(g)+u) );   %C2最小功率约束g,u的系数
            
            for i = 1:u-1 % 簇内干扰
                c0 = c0 - m(g,u)^2*norm(d(:,g)'*bb*d(:,g),'fro')*po(ind(g)+i);
            end
            
            for q = 1:Nrf
                if q ~=  g
                    user_q = usergroup(q,:);  % 第q个簇的用户
                    user_q(user_q==0) = [];
                    for v = 1:length(user_q)  % 对第n个簇中的用户操作
                        c0 = c0 - m(g,u)^2*norm(d(:,q)'*bb*d(:,q),'fro')*po(ind(q)+v); %本簇外用户功率对位因子
                    end
                end
            end
            c = [c ; -c0];  % (K+1)*K  不等式约束
        end
    end
    d0 = [d0;zeros(K,1)];
    c <= d0;
    
    % SIC constraint linear unequivalent constraint
    for g = 1:Nrf
        user_g = usergroup(g,:);
        user_g(user_g == 0)=[];  %将数组里面为0的元素去掉
        for u = 1:length(user_g)
            bgu(:,:) = R(user_g(u),:,:);
            for r = u+1:length(user_g)   %对于r>u的用户才有此限制
                a0 = zeros(1,K);
                bgr(:,:) = R(user_g(r),:,:);
                for q = 1:Nrf
                    if q ~=  g
                        user_q = usergroup(q,:);  % 第q个簇的用户
                        user_q(user_q==0) = [];
                        for v = 1:length(user_q)  % 对第n个簇中的用户操作
                            a0(ind(q)+v) = norm(d(:,g)'*bgr*d(:,g),'fro')*norm(d(:,q)'*bgu*d(:,q),'fro')-norm(d(:,g)'*bgu*d(:,g),'fro')*norm(d(:,q)'*bgr*d(:,q),'fro'); %本簇外用户功率对位因子
                        end
                    end
                end
                A0 = [A0;a0];  % (K+1)*K  C2不等式约束
                b0 = [b0;(norm(d(:,g)'*bgu*d(:,g),'fro')-norm(d(:,g)'*bgr*d(:,g),'fro'))*sigma2];    %  (K+1)*1  omega
            end
        end
    end
    
    A0*po <= b0;
    
    cvx_end
    
    for g = 1:Nrf
        user_g = usergroup(g,:);
        user_g(user_g == 0)=[];  %将数组里面为0的元素去掉
        power0(g,1:length(user_g)) = po(ind(g)+1:ind(g+1));  %power0 Nrf*K
    end
    
    p0 = [];
    for g = 1:Nrf
        user_g = usergroup(g,:);
        user_g(user_g == 0)=[];  %将数组里面为0的元素去掉
        for u = 1:length(user_g)
            p0 = [p0;power0(g,u)];
        end
    end
    
    convalue(1,:) = convalue(2,:);
    convalue(2,:) = p0;
    
end


% 判断是否feasible
if sum(p0) <= Pmax
    t_min = t;
else
    t_max = t;
end

%% 计算容量
%干扰项F1
F1 = zeros(Nrf,K);
F2 = zeros(Nrf,K);
for g = 1:Nrf
    user_g = usergroup(g,:);
    user_g(user_g == 0)=[];  %将数组里面为0的元素去掉
    for u = 1:length(user_g)  % 对第n个簇中的用户操作
        bb(:,:) = R(user_g(u),:,:);
        
        itaa = sigma2;  %噪声项
        
        for i = 1:u-1 % 簇内干扰
            itaa = itaa+ norm(d(:,g)'*bb*d(:,g),'fro')*p0(ind(g)+i);
        end
        
        for q = 1:Nrf % 簇外干扰
            if q~=g
                user_q = usergroup(q,:);
                user_q(user_q == 0)=[];  %将数组里面为0的元素去掉
                for v = 1:length(user_q)  % 对第n个簇中的用户操作
                    itaa = itaa + norm(d(:,q)'*bb*d(:,q),'fro')*p0(ind(q)+v);  %簇外干扰
                end
            end
        end
        F2(g,u) = log2(itaa);
        F1(g,u) = log2(norm(d(:,g)'*bb*d(:,g),'fro')*p0(ind(g)+u)+itaa);  %sinr dominator
    end
end

%% 计算容sume
sume = zeros(Nrf,K);
for g = 1:Nrf
    user_g = usergroup(g,:);
    user_g(user_g == 0)=[];  %将数组里面为0的元素去掉
    for u = 1:length(user_g)
        sume(g,u) = F1(g,u)-F2(g,u);
    end
end
rmax = sum(sum(sume));
SE(it) = rmax;   %存储每一次迭代的系统容量值
T(it) = t;

end

% sume
sumpower = sum(p0);
% %test
sum(p0);
plot(SE);
hold on
plot(T);
n = length(unique(SE));

Help! Why it is infeasible? I think the constraints are reasonable. There should be a specific po answer.


Everything except for item 1 is also applicable to CVX.