# Infeasible value for SDR OPF problem

(Xristos Agathokleous) #1

Hello i am new in cvx!!I have the following simple power network and i want to solve the opf problem with the sdp relaxation technique.

My code is the following:

function [W,Pg]=mpopfcase6(ybus,6);
Pload=[0 0 0.7 0 0 0.7];
Qload=[0 0 0.7 0 0 0.7];
cvx_begin
variable W(n,n) complex semidefinite;
variable Pg(n);
variable Qg(n);
minimize 0.1*(Pg(1)) ;
subject to
0.9^2<= W(1,1)<=1.1^2;
0.9^2<= W(2,2)<=1.1^2;
0.9^2<=W(3,3)<=1.1^2;
0.9^2<= W(4,4)<=1.1^2;
0.9^2<= W(5,5)<=1.1^2;
0.9^2<= W(6,6)<=1.1^2;
for i=1:n
for j=1:n
if i~=j
abs(-conj(ybus(i,j))*W(i,i)+conj(ybus(i,j))*W(i,j))<=1.6;
W(i,j)==conj(W(j,i));
end
end
end
W(1,2)==0; W(1,3)==0; W(1,6)==0; W(2,1)==0;
W(2,5)==0; W(2,6)==0; W(3,1)==0; W(3,4)==0; W(3,5)==0; W(3,6)==0;
W(4,3)==0; W(4,5)==0; W(4,6)==0; W(5,2)==0; W(5,3)==0; W(5,4)==0;
W(6,1)==0; W(6,2)==0; W(6,3)==0; W(6,4)==0;

`````` W==semidefinite(n);
W(1,1)==1;
Pg(2)==0;Pg(3)==0;  Pg(4)==0; Pg(5)==0; Pg(6)==0;
Qg(2)==0; Qg(3)==0;  Qg(4)==0; Qg(5)==0; Qg(6)==0
``````

cvx_end
end

The system is very simple and the optimal solution is the only solution of the system(slack bus gives the power to the loads, there isn’t any other generator).I dont know what is going wrong, i am sure that SDP relax problem of optimal power flow problem is convex…)
ybus parameter is the admittance matrix of the system.