Hello everyone,
I'm currently having some problems running Yalmip with SeDumI as solver. My optimization problem concerns the minimization of total transmit power W (NxN matrix) with taking in account the queue length of each user Q_i(t) in a MIMO system.
I'm also adding an auxiliary variable s(j) for my problem that takes discrete values: 0 or 1.
I have also the SINR constraint that is modified with regards to this value s(j).
The increase of the user i queue length is modeled by this model: Q_i(t+1) = max( Q_i(t)-s(j)) + beta; with beta a given value.
here's my data code:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%Cleaning%%%%%%%%%
close all
clear all
clc
%%%%%%%%%%%%Simulation Parameters%%%%%%%
V=5;
K=25;
gamma=5;
N=4;
beta=0.5;
T=50;
%%%%%preallocating%%%%%%
Q=zeros(T,K);
A=zeros(1,K);
sum_QxS=zeros(T,1);
%defining the SDP variables
S=sdpvar(2,2,K);
W=sdpvar(N,N,K);
% gaussian channel%%%
h=(1/sqrt(2))*(randn(N,1,K)+1i*randn(N,1,K));
H=zeros(N,N,K); %H=h*h'
sum_trace_W=0;
b=0;
I=[0 1;1 0];
%%%%%coding
for j=1:K
H(:,:,j)=h(:,1,j)*h(:,1,j)';
s(j)=0.5*trace(I*S(:,:,j)); %%%%S is 2x2 matrix with rank =1,2
end
for j=1:K
sum_trace_W=sum_trace_W+trace(W(:,:,j));
b=b+trace(H(:,:,j).*W(:,:,j));
end
for j=1:K
A(j)=gamma*(1+b-trace(H(:,:,j).*W(:,:,j)));
end
for j=1:K
for l=1:T-1
Q(l+1,j)=max(Q(l,j)-s(j),0)+beta;
end
end
for i=1:K
sum_QxS=sum_QxS+s(i)*Q(:,i);
end
for j=1:K
F=[(1+gamma)*trace(H(:,:,j).*W(:,:,j))+ A(j)*(1-s(j))>=(1+b)*gamma]; %% SINR constraint
F=[F, S(:,:,j)>=0, S(1,1,j)==1, S(2,2,j)==1, W(:,:,j)>=0]; %%%%SDP constraints
obj=V*sum_trace_W - sum_QxS; %%%%objective funtion
option = sdpsettings('solver','sedumi'); % setting the solver on SeDuMi
solvesdp(F,obj,option);
obj=double(obj);
Wf(:,:,j)=double(W(:,:,j));
Sf(:,:,j)=double(S(:,:,j));
end
%%%
My objective here is to have the objective function and its values changing in time. I still don't understand where the NaN problem occurs in the constraints.
If some of you could help me please with this problem I'll be very thankful.
I'm sorry if my optimization problem is not very clear. I would explain it further if necessary.
Thank you.