## Load Flow of 33 buses distribution system, current in between buses equal zero

Problems with modeling
Haithamtaha
User Posts: 6
Joined: 1 year ago

### Load Flow of 33 buses distribution system, current in between buses equal zero

I Have a problem using GAMS in load flow modelling on 33 buses distribution system,

The problem is that when I display the values of the current in between buses C(I,j,t) after running it gives me all zeros and all voltages equal 1, why the voltage values are fixed at all buses and why the current are zeros ???

The resistance, reactance and current limit of each line is already defined in amp.at the beginning of the model as per the below table

Table LN(i,j,*) 'network technical characteristics'
r x Limit
1 .2 0.057625 0.029375 200
2 .3 0.308125 0.156937 200
3 .4 0.228750 0.116500 200
4 .5 0.238187 0.121312 200
5 .6 0.511875 0.441875 200
6 .7 0.117000 0.386750 200
7 .8 0.444625 0.146937 200
8 .9 0.643750 0.462500 200
9 .10 0.652500 0.462500 100
10.11 0.122875 0.040625 100
11.12 0.234000 0.077375 100
12.13 0.917500 0.721875 100
13.14 0.338500 0.445562 100
14.15 0.369375 0.328750 100
15.16 0.466437 0.340625 100
16.17 0.805625 1.075625 100
17.18 0.457500 0.358750 100
2 .19 0.102500 0.097812 100
19.20 0.940125 0.847125 100
20.21 0.255937 0.299000 100
21.22 0.443062 0.585812 100
3 .23 0.282000 0.192687 100
23.24 0.561250 0.443187 100
24.25 0.560000 0.438187 100
6 .26 0.126875 0.064625 100
26.27 0.177625 0.090437 100
27.28 0.661875 0.583562 100
28.29 0.502625 0.437875 100
29.30 0.317187 0.161562 100
30.31 0.609000 0.601875 100
31.32 0.194062 0.226187 100
32.33 0.213125 0.331375 100
8 .21 1.250000 1.250000 100
9 .15 1.250000 1.250000 100
12.22 1.250000 1.250000 100
18.33 0.312500 0.312500 100
25.29 0.312500 0.312500 100;

the demand load is set at each bus as per the below table

Table BD(i,*) 'demands of each bus in KW'
Pd Qd
2 100 60
3 90 40
4 120 80
5 60 30
6 60 20
7 200 100
8 200 100
9 60 20
10 60 20
11 45 30
12 60 35
13 60 35
14 120 80
15 60 10
16 60 20
17 60 20
18 90 40
19 90 40
20 90 40
21 90 40
22 90 40
23 90 50
24 420 200
25 420 200
26 60 25
27 60 25
28 60 20
29 120 70
30 200 600
31 150 70
32 210 100
33 60 40 ;

Set
i 'network buses' / 1*33 /
slack(i) / 1 /

Alias (i,j);
LN(i,j,'x')\$(LN(i,j,'x')=0) = LN(j,i,'x');
LN(i,j,'r')\$(LN(i,j,'r')=0) = LN(j,i,'r');
LN(i,j,'Limit')\$(LN(i,j,'Limit')=0) = LN(j,i,'Limit');
LN(i,j,'bij')\$LN(i,j,'Limit') = 1/LN(i,j,'x');
LN(i,j,'z')\$LN(i,j,'Limit') = sqrt(sqr(LN(i,j,'x')) + sqr(LN(i,j,'r')));
LN(j,i,'z')\$(LN(i,j,'z')=0) = LN(i,j,'z');
LN(i,j,'Yij')\$LN(i,j,'Limit') = 1/LN(i,j,'Z');
LN(i,j,'th')\$(LN(i,j,'Limit') and LN(i,j,'x') and LN(i,j,'r')) = arctan(LN(i,j,'x')/(LN(i,j,'r')));
LN(i,j,'th')\$(LN(i,j,'Limit') and LN(i,j,'x') and LN(i,j,'r')=0) = pi/2;
LN(i,j,'th')\$(LN(i,j,'Limit') and LN(i,j,'r') and LN(i,j,'x')=0) = 0;
LN(j,i,'th')\$LN(i,j,'Limit') = LN(i,j,'th');
Parameter cx(i,j);
cx(i,j)\$(LN(i,j,'limit') and LN(j,i,'limit')) = 1;
cx(i,j)\$(cx(j,i)) = 1;
Variable OF,Pij(i,j,t), Qij(i,j,t),C(i,j,t);

Free Variable V(i,t), Va(i,t);

The power flow equations are modelled as per the below equations

eq1 (i,j,t)\$cx(i,j)..
Pij(i,j,t) =e= (V(i,t)*V(j,t)*cos(Va(i,t) - Va(j,t) + LN(i,j,'th')))*LN(i,j,'Yij'); power in between buse I,j
eq2 (i,j,t)\$cx(i,j)..
Qij(i,j,t) =e= (V(i,t)*V(j,t)*sin(Va(i,t) - Va(j,t) + LN(i,j,'th')))*LN(i,j,'Yij'); reactive power in between bus I,j
eq3 (i,t)..
BD(i,'pd')/Sbase =e=Sum (j, Pij(i,j,t));
eq4 (i,t)..
BD(i,'qd')/Sbase =e=Sum (j, Qij(i,j,t));

The absolute value of current of the lines in between buses modelled by the below equation

eq11 (i,j,t)..
C(i,j,t)=e=abs((V(i,t)*cos(Va(i,t))-(V(j,t)*cos(Va(j,t))))*LN( j , i ,' Yij '));

constraint of the of lower and upper limit of the absolute value of current in between buses is given by the below equation
C.lo(i,j,t)=0;
C.up(i,j,t)=1*LN(i,j,'Limit')/Ibase;

I set the upper and lower limits of the voltage and voltage angle as follow:
V.lo(i,t) = 0.9;
V.up(i,t) = 1.1;
V.l(i,t)=1;
Va.l(i,t) = 0;
Va.up(i,t) = pi/2;
Va.lo(i,t) =-pi/2;

mean while the slack bus voltage and angle are set to be fixed
V.fx(slack,t)=1;
Va.fx(slack,t) = 0;

The problem is that when I display the values of the current C(I,j,t) after running it gives me all zeros and all voltages equal 1, why the voltage values are fixed at all buses and why the current are zeros ??? 