<<

. 6
( 17)



>>

24.1
27.3
0.35
0.83
86.8 72.9 27.7
2.5
24.5
1.7 6.55 5.2

Elm
South 54.7 53.45


20 + j10 60 + j10
4.8
5.6
61.59
40

Figure 4.6 The ¬ve-bus test network, and the power ¬‚ow results. From G.W. Stagg and A.H. El-
Abiad, Computer Methods in Power System Analysis, # 1968 McGraw-Hill. Reproduced by
permission of The McGraw-Hill Companies


Nodal voltages of original network
Table 4.1
Network bus
Nodal voltage North South Lake Main Elm
Magnitude (p.u.) 1.06 1.00 0.987 0.984 0.972
À 2.06 À 4.64 À 4.96 À 5.77
Phase angle (deg) 0.00




takes place in the transmission line connecting the two generator buses: 89.3 MW, and
74.02 MVAR leave North, and 86.8 MW and 72.9 MVAR arrive at South. This is also the
transmission line that incurs higher active power loss (i.e. 2.5 MW). The active power
system loss is 6.12 MW.
The operating conditions demand a large amount of reactive power generation by
the generator connected at North (i.e. 90.82 MVAR). This amount is well in excess of the
reactive power drawn by the system loads (i.e. 40 MVAR). The generator at South draws the
excess of reactive power in the network (i.e. 61.59 MVAR). This amount includes the net
reactive power produced by several of the transmission lines.
119
CONSTRAINED POWER FLOW SOLUTIONS

4.4 CONSTRAINED POWER FLOW SOLUTIONS

The handling of PV buses in power ¬‚ow algorithms may fall within the category of
constrained power ¬‚ow solutions “ generators regulate nodal voltage magnitude by
supplying or absorbing reactive power up to their design limits. Load tap-changing and
phase-shifting transformers are used to regulate nodal voltage magnitude and active power
¬‚ow, respectively. They also give rise to constrained power ¬‚ow solutions. Suitable power
¬‚ow models of tap-changing and phase-shifting transformers are developed in this section.


4.4.1 Load Tap-changing Transformers

The power ¬‚ow models for load tap-changing (LTC) transformers addressed in this section
are based on the two-winding, single-phase transformer model presented in Section 3.3.3,
which is quite a general one. The model makes provisions for complex taps on both the
primary and the secondary windings, and the magnetising branch of the transformer is
included to account for core losses.
However, the LTC model does not require complex taps, and Equation (3.89) simpli¬es to
the following expression:
! ! !
Um Yk Ym þ Yk Y0 ÀTk Um Yk Ym
2
1
Ik Vk
¼2 : °4:50Þ
ÀTk Um Yk Ym Tk Yk Ym þ Ym Y0 Vm
Tk Yk þ Um Ym þ Y0 2
Im 2


It is assumed in this expression that the primary and secondary sides of the transformer are
connected to bus k and bus m, respectively. This is with a view to developing LTC models
aimed at systems applications. Also, the subscript sc is dropped in the transformer
admittance terms.
Comprehensive bus power injection equations for the LTC transformer may be derived
based on Equation (4.50), but this involves very arduous algebra. Simpler expressions may
be derived if a number of practical assumptions are introduced in this equation. For instance,
it may be assumed that the tap-changing facility is only on the primary side (Um ¼ 1); the
impedance is all on the primary side (Ym ¼ 0); and the impact of the magnetising branch is
negligibly small in the power ¬‚ow solution (Y0 ¼ 0). Incorporating these simplifying
assumptions in Equation (4.50) we obtain an expression that is compatible with
Equation (3.78):
! ! ! ! !
ÀTk Yk
Yk Ykk Tk Ykm
Ik Vk Vk
¼ ¼ : °4:51Þ
ÀTk Yk Tk Yk2 2
Tk Ymk Tk Ymm Vm
Im Vm

Power ¬‚ow equations at both ends of the transformer are derived, where Tk is allowed to
vary within design rating values (Tk min < Tk < Tk max):

Pk ¼ Vk Gkk þ Tk Vk Vm ½Gkm cos°k À m Þ þ Bkm sin°k À m ފ; °4:52Þ
2

Qk ¼ ÀVk Bkk þ Tk Vk Vm ½Gkm sin°k À m Þ À Bkm cos°k À m ފ; °4:53Þ
2

Pm ¼ Tk Vm Gmm þ Tk Vm Vk ½Gmk cos°m À k Þ þ Bmk sin°m À k ފ; °4:54Þ
22

Qm ¼ ÀTk Vm Bmm þ Tk Vm Vk ½Gmk sin°m À k Þ À Bmk cos°m À k ފ; °4:55Þ
22
120 CONVENTIONAL POWER FLOW

where
Ykk ¼ Ymm ¼ Gkk þ jBkk ¼ Yk ;
°4:56Þ
Ykm ¼ Ymk ¼ Gkm þ jBkm ¼ ÀYk :
The set of linearised power ¬‚ow equations for the nodal power injections, Equations (4.52)“
(4.55), assuming that the load tap changer (LTC) is controlling nodal voltage magnitude at
its sending end (bus k), may be written as:
2 3°iÞ 2 3°iÞ
2 3 q P k q Pk q Pk q Pk
ÁPk °iÞ Ák
6 q k q m q Tk Tk q Vm Vm 7 6 7
6 7 6 76 7
6 7 6 q Pm q Pm q Pm 76 7
6 7 q Pm
6 Vm 7 6 Ám 7
6 ÁPm 7 6 76 7
Tk
6 7
7 ¼ 6 q k q m q Tk q Vm 76 7
6 7: °4:57Þ
6 76
6 7 6 q Qk q Qk q Qk 7 6 ÁTk 7
q Qk
6 7 6 V7 6 7
6 ÁQk 7 T
6 q k q m q Tk k q Vm m 7 6 Tk 7
6 7 6 76 7
4 5 4 q Qm q Qm q Qm 5 4 ÁV 5
q Qm m
Tk Vm
ÁQm q k q m q Tk q Vm Vm
The tap variable Tk is adjusted, within limits, to constrain the voltage magnitude at bus k at a
speci¬ed value Vk. For this mode of operation Vk is maintained constant at the target value.
The Jacobian elements in matrix Equation (4.57) are given as follows:
qPk qPk
¼À ¼ ÀQk À Vk Bkk ; °4:58Þ
2
qk qm
qPk qPk
Tk ¼ Vm ¼ Pk À Vk Gkk ; °4:59Þ
2
qTk qVm
qQk qQk
¼À ¼ Pk À Vk Gkk ; °4:60Þ
2
qk qm
qQk qQk
Tk ¼ Vm ¼ Qk þ Vk Bkk ; °4:61Þ
2
qTk qVm
qPm qPm
¼À ¼ ÀQm À Tk Vm Bmm ; °4:62Þ
22
qm qk
qPm qPm
Vm ¼ Tk ¼ Pm þ Tk Vm Gmm ; °4:63Þ
22
qVm qTk
qQm qQm
¼À ¼ Pm À Tk Vm Gmm ; °4:64Þ
22
qm qk
qQm qQm
Vm ¼ Tk ¼ Qm À Tk Vm Bmm : °4:65Þ
22
qVm qTk

If nodal voltage magnitude control by the LTC takes place on its receiving end (bus m) as
opposed to the sending end (bus k), the second and third columns in Equation (4.57) are
interchanged, and Jacobian elements similar to Equations (4.58)“(4.65) are derived and used
as entries in Equation (4.57). Also, note that in the state variables vector ÁTk and ÁVk
commute places.
At the end of each iteration, i, the tap controller is updated using the following relation:
 
ÁTk °iÞ °iÀ1Þ
°iÞ °iÀ1Þ
¼ þ Tk : °4:66Þ
Tk Tk
Tk
121
CONSTRAINED POWER FLOW SOLUTIONS

The implementation of the LTC model within the power ¬‚ow algorithm bene¬ts from the
introduction of a controlled bus, termed the PVT bus. It resembles a generator PV bus but
here the voltage control is exerted by an LTC as opposed to a generator. The nodal voltage
magnitude and the bus active and reactive powers are speci¬ed, whereas the LTC tap Tk is
handled as a state variable. If Tk is within limits, the speci¬ed voltage is attained and the
controlled bus remains PVT. However, if Tk goes out of limits, Tk is ¬xed at the violated limit
and the bus becomes PQ.
It should be remarked that a more comprehensive set of nodal power equations may be
derived for the two-winding transformer by basing the power equation derivations on
Equation (4.50) as opposed to Equation (4.51). There is no need to assume that the
transformer impedance is all placed on the primary side. Also, the effect of the magnetising
admittance may be included in the nodal power equations of the LTC transformer.
Alternatively, it may be assumed that the tap-changing facility is on the secondary side as
opposed to the primary side, in which case Tk ¼ 1, and Um min < Um < Um max .



4.4.1.1 State variable initialisation and limit checking

Further to the recommendations given in Section 4.3.3 for initialising the nodal voltage
magnitudes and phase angles of power ¬‚ow solutions of networks that contain only
conventional plat components, it is normal to select the initial tapping position of LTCs to be
at their nominal value. Hence, Tk ¼ 1 and Um ¼ 1 are used for cases of two-winding LTCs.
The status of LTC taps is checked at each iterative step to assess whether or not the LTC
is still operating within limits and capable of regulating voltage magnitude. For an
LTC regulating nodal voltage magnitude at bus k with tapping facilities in the primary
winding
Tk min < Tk < Tk max : °4:67Þ

If either of the following conditions occur during the iterative process:
° iþ1Þ ° iÞ
þ ÁTk ! Tk max ;
Tk
°4:68Þ
° iþ1Þ ° iÞ
þ ÁTk Tk min ;
Tk

bus k becomes a PQ bus and the tap is ¬xed at the violated limit. The nodal voltage
magnitude at bus k is allowed to vary and Vk replaces Tk as the state variable. The tap-
changing transformer works as a conventional transformer, and the set of linearised power
¬‚ow equations is given as follows:
3°iÞ 2 3°iÞ
2 3°iÞ 2
q Pk q Pk q Pk q Pk
ÁPk Ák
7
Vk Vm
76
6 7 6 q k q m q Vk q Vm 76 7
6 7 6
76 7
6 7 6 q Pm q Pm q Pm q Pm 7 6 Ám 7
6 ÁPm 7 6 Vm 7 6 7
6 7 6 q Vk
76 7
q m q Vk q Vm
6 7 6
76 7:
k
¼6 °4:69Þ
6 7
7 6 ÁVk 7
6 7 6 q Qk q Qk q Qk q Qk
Vm 7 6 7
6 ÁQk 7 6
7 6V 7
Vk
6 7 6 q k q m q Vk q Vm 7 6 k7
6 7 6
56 7
4 5 4qQ 4 ÁVm 5
q Qm q Qm q Qm
m
Vk Vm
ÁQm q k q m q Vk q Vm Vm
122 CONVENTIONAL POWER FLOW

Checking of LTC taps limits normally starts after the ¬rst or second iteration since nodal
voltage values computed at the beginning of the iterative process may be quite inaccurate,
leading to misleading LTC tapping requirements.
Similar criteria would apply if the LTC tapping facilities were on the secondary winding,
with Um and Tk changing roles in Equation (4.50). Moreover, relevant power equations and
Jacobian elements, equivalent to Equations (4.52)“(4.55) and (4.58)“(4.65), are derived.
The linearised Equation (4.57) is modi¬ed accordingly.


4.4.1.2 Load tap changer computer program in Matlab1 code

Program 4.3 incorporates LTC transformer representation within the Newton“Raphson
power ¬‚ow program given in Section 4.3.6. The functions PowerFlowsData, YBus, and
PQ¬‚ows are also used here. In the main LTC Newton“Raphson program, the function
LTCPowerFlowsData is added to read LTC data, LTCNewtonRaphson replaces New-
tonRaphson, and LTCPQ¬‚ows is used to calculate power ¬‚ows and losses in the LTC
transformer.
Function LTCNewtonRaphson borrows the following functions from NewtonRaphson:
NetPowers; CalculatedPowers; GeneratorsLimits; PowerMismatches; Newton-
RaphsonJacobian; and StateVariablesUpdates. Furthermore, four new functions are
added to cater for LTC representation, namely: LTCCalculatedPowers; LTCUpdates;
LTCLimits; and LTCNewtonRaphsonJacobian.

PROGRAM 4.3 Program written in Matlab1 to incorporate load tap-changing representa-
tion within the Newton“Raphson power ¬‚ow algorithm.

%- - - Main LTC Program

PowerFlowsData; %Function to read network data

LTCPowerFlowsData; %Function to read LTC data

[YR,YI] = YBus(tlsend,tlrec,tlresis,tlreac,tlsuscep,tlcond,shbus,...
shresis,shreac,ntl,nbb,nsh);

[VM,VA,it,Tap] = LTCNewtonRaphson(tol,itmax,ngn,nld,nbb,bustype,...
genbus,loadbus,PGEN,QGEN,QMAX,QMIN,PLOAD,QLOAD,YR,YI,VM,VA,NLTC,...
LTCsend,LTCrece,Rltc,Xltc,Tap,TapHi,TapLo,Bus,LTCVM);

[PQsend,PQrec,PQloss,PQbus] = PQ¬‚ows(nbb,ngn,ntl,nld,genbus,...
loadbus,tlsend,tlrec,tlresis,tlreac,tlcond,tlsuscep,PLOAD,QLOAD,...
VM,VA);

[LTCPQsend,LTCPQrece] = LTCPQ¬‚ows(NLTC,LTCsend,LTCrece,Rltc,Xltc,...
Tap,VM,VA);

it %Iteration number
VM %Nodal voltage magnitude (p.u.)
123
CONSTRAINED POWER FLOW SOLUTIONS

VA = VA*180/pi %Nodal voltage phase angle(Deg)
PQsend %Sending active and reactive powers (p.u.)
PQrec %Receiving active and reactive powers (p.u.)
Tap %Final transformer tap position


% End of Main LTCNewtonRaphson PROGRAM



function [VM,VA,it,Tap] = LTCNewtonRaphson(tol,itmax,ngn,nld,nbb,...
bustype,genbus,loadbus,PGEN,QGEN,QMAX,QMIN,PLOAD,QLOAD,YR,YI,VM,...
VA,NLTC,LTCsend,LTCrec,Rltc,Xltc,Tap,TapHi,TapLo,Bus,LTCVM);
% GENERAL SETTINGS
¬‚ag = 0;
it = 1;
% CALCULATE NET POWERS
[PNET,QNET] = NetPowers(nbb,ngn,nld,genbus,loadbus,PGEN,QGEN,PLOAD,...
QLOAD);



while (it <= itmax & ¬‚ag==0)


% CALCULATED POWERS
[PCAL,QCAL] = CalculatedPowers(nbb,VM,VA,YR,YI);



% CALCULATED LTC POWERS
[PCAL,QCAL,ltcPCAL,ltcQCAL] = LTCCalculatedPowers(NLTC,LTCsend,...
LTCrec,Tap,Rltc,Xltc,VM,VA,PCAL,QCAL);



% POWER MISMATCHES
[DPQ,DP,DQ,¬‚ag] = PowerMismatches(nbb,tol,bustype,¬‚ag,PNET,QNET,...
PCAL,QCAL);
% Check for convergence
if ¬‚ag == 1
break
end
% JACOBIAN FORMATION
[JAC] = NewtonRaphsonJacobian(nbb,bustype,PCAL,QCAL,VM,VA,YR,YI);



% LTC JACOBIAN UPDATING
[JAC] = LTCNewtonRaphsonJacobian(bustype,LTCsend,LTCrec,NLTC,Tap,...
Bus,Rltc,Xltc,ltcPCAL,ltcQCAL,VM,VA,JAC);
124 CONVENTIONAL POWER FLOW

% SOLVE FOR THE STATE VARIABLES VECTOR
D = JAC\DPQ™;

% UPDATE STATE VARIABLES
[VA,VM] = StateVariablesUpdates(nbb,D,VA,VM);

% UPDATE LTC TAPs
[VM,Tap] = LTCUpdates(VM,D,bustype,NLTC,LTCsend,LTCrec,Tap,Bus,...
LTCVM);

% CHECK FOR POSSIBLE LTC TAPs™ LIMITS VIOLATIONS
[Tap,bustype] = LTCLimits(bustype,NLTC,Tap,TapHi,TapLo,LTCsend,...
LTCrec);

it = it + 1;
end

function [PCAL,QCAL,ltcPCAL,ltcQCAL] = LTCCalculatedPowers(NLTC,...
LTCsend,LTCrec,ltctap,Rltc,Xltc,VM,VA,PCAL,QCAL)

for ii = 1: NLTC
kk = (ii-1)*2+1;
% Calculate LTC admittances
denom = Rltc(ii)^2+Xltc(ii)^2;
YRS = Rltc(ii)/denom;
YIS = -Xltc(ii)/denom;
YRM = -Rltc(ii)/denom;
YIM = Xltc(ii)/denom;

A1 = VA(LTCsend(ii))-VA(LTCrec(ii));
A2 = VA(LTCrec(ii))-VA(LTCsend(ii));
% Calculate LTC powers
ltcPCAL(kk) = VM(LTCsend(ii))^2*YRS + ltctap(ii)*VM(LTCsend(ii))*...
VM(LTCrec(ii))*(YRM*cos(A1) + YIM*sin(A1));
ltcQCAL(kk) = -VM(LTCsend(ii))^2*YIS + ltctap(ii)*VM(LTCsend(ii))*...
VM(LTCrec(ii))*(YRM*sin(A1) - YIM*cos(A1));

ltcPCAL(kk+1) = (VM(LTCrec(ii))*ltctap(ii))^2*YRS + ltctap(ii)*...
VM(LTCsend(ii))*VM(LTCrec(ii))*(YRM*cos(A2)+YIM*sin(A2));
ltcQCAL(kk+1) = - (VM(LTCrec(ii))*ltctap(ii))^2*YIS + ltctap(ii)*...
VM(LTCsend(ii))*VM(LTCrec(ii))*(YRM*sin(A2)-YIM*cos(A2));

% Update calculated powers PCAL and QCAL
PCAL(LTCsend(ii)) = PCAL(LTCsend(ii)) + ltcPCAL(kk);
QCAL(LTCsend(ii)) = QCAL(LTCsend(ii)) + ltcQCAL(kk);

PCAL(LTCrec(ii)) = PCAL(LTCrec(ii)) + ltcPCAL(kk+1);
125
CONSTRAINED POWER FLOW SOLUTIONS

QCAL(LTCrec(ii)) = QCAL(LTCrec(ii)) + ltcQCAL(kk+1);
end



function [JAC] = LTCNewtonRaphsonJacobian(bustype,LTCsend,LTCrec,...
NLTC,Tap,Bus,Rltc,Xltc,ltcPCAL,ltcQCAL,VM,VA,JAC)
% LTC JACOBIAN MODIFICATION
for ii = 1: NLTC
ind = Bus(ii)-LTCsend(ii);
JAC(:,2*Bus(ii))= 0.0;
for nn = 1: 2
% Calculate LTC admittances
denom = Rltc(ii)^2+Xltc(ii)^2;
YRS = Rltc(ii)/denom;
YIS = - Xltc(ii)/denom;
% Calculate LTC Jacobian entries
JKK(1,1) = - (VM(LTCsend(ii))^2)*YIS;
JKK(1,2) = (VM(LTCsend(ii))^2)*YRS;
JKK(2,1) = - (VM(LTCsend(ii))^2)*YRS;
JKK(2,2) = - (VM(LTCsend(ii))^2)*YIS;


JKM(1,1) = ltcQCAL((ii-1)*2+nn) + (VM(LTCsend(ii))^2)*YIS;
JKM(1,2) = ltcPCAL((ii-1)*2+nn) + (VM(LTCsend(ii))^2)*YRS;
JKM(2,1) = - (ltcPCAL((ii-1)*2+nn) + (VM(LTCsend(ii))^2)*YRS);


if ind == 0
JKM(2,2) = -(-ltcQCAL((ii-1)*2+nn) + (VM(LTCsend(ii))^2)*YIS);
else
JKM(2,2) = ltcQCAL((ii-1)*2+nn) + (VM(LTCsend(ii))^2)*YIS;
end


if ((bustype(LTCsend(ii)) == 4) & (Bus(ii) == LTCsend(ii)) )
JKK(1,2) = (ltcPCAL((ii-1)*2+nn) + (VM(LTCsend(ii))^2)*YRS);
if (nn == 2)
JKK(2,2) = -(-ltcQCAL((ii-1)*2+nn)+ (VM(LTCsend(ii))^2)*YIS);
else
JKK(2,2) = ltcQCAL((ii-1)*2+nn) + (VM(LTCsend(ii))^2)*YIS;
JKM(2,1) = - (ltcPCAL((ii-1)*2+nn) + ...
(VM(LTCsend(ii))^2)*YRS);
JKM(2,2) = (ltcQCAL((ii-1)*2+nn) + ...
(VM(LTCsend(ii))^2)*YIS);
end
end


% Add LTC contribution to system JAC
126 CONVENTIONAL POWER FLOW

if ( (bustype(LTCsend(ii))==2) & (bustype(LTCrec(ii))>2))
JKK(1,2) = 0;
JKK(2,1) = 0;
JKK(2,2) = 0;
if nn == 1
JKM(2,1) = 0;
JKM(2,2) = 0;
else
JKM(1,2) = 0;
JKM(2,2) = 0;
end
elseif ( (bustype(LTCsend(ii))==1) & (bustype(LTCrec(ii))>2))
JKK = zeros;
JKM = zeros;
JMK = zeros;
end


kk = 2*LTCsend(ii)-1;
mm = 2*LTCrec(ii)-1;
JAC(kk:kk+1,kk:kk+1) = JAC(kk:kk+1,kk:kk+1) + JKK;
JAC(kk:kk+1,mm:mm+1) = JAC(kk:kk+1,mm:mm+1) + JKM;
send = LTCsend(ii);
LTCsend(ii) = LTCrec(ii);
LTCrec(ii) = send;
VM(LTCsend(ii)) = VM(LTCsend(ii))*Tap(ii);
end
end



function [VM,Tap] = LTCUpdates(VM,D,bustype,NLTC,LTCsend,LTCrec,Tap,...
Bus,LTCVM)
for ii = 1: NLTC
if ((bustype(LTCsend(ii)) == 4) & (Bus(ii) == LTCsend(ii)))
Tap(ii) = Tap(ii) + (D(2*LTCsend(ii))*Tap(ii));
VM(LTCsend(ii)) = LTCVM(ii);
elseif ( (bustype(LTCrec(ii)) == 4) & (Bus(ii) == LTCrec(ii)) )
Tap(ii) = Tap(ii) + D(2*LTCrec(ii))*Tap(ii);
VM(LTCrec(ii)) = LTCVM(ii);
end
end


function [Tap,bustype] = LTCLimits(bustype,NLTC,Tap,TapHi,TapLo,...
LTCsend,LTCrec)
% CHECK FOR POSSIBLE LTCs™ TAPS LIMITS VIOLATIONS
for ii = 1: NLTC
for kk = 1: 2
127
CONSTRAINED POWER FLOW SOLUTIONS

if (bustype(LTCsend(ii)) == 4)
if ( Tap(ii) > TapHi(ii) )
Tap(ii) = TapHi(ii);
bustype(LTCsend(ii)) = 3;
elseif (Tap(ii) < TapLo(ii))
Tap(ii) = TapLo(ii);
bustype(LTCsend(ii)) = 3;
end
end
LTCsend(ii) = LTCrec(ii);
end
end

function [LTCPQsend,LTCPQrec] = LTCPQ¬‚ows(NLTC,LTCsend,LTCrec,Rltc,...
Xltc,Tap,VM,VA)
for ii = 1: NLTC
% Calculate LTC admittances
denom = Rltc(ii)^2+Xltc(ii)^2;
YRS = Rltc(ii)/denom;
YIS = -Xltc(ii)/denom;
YRM = -Rltc(ii)/denom;
YIM = Xltc(ii)/denom;
for jj = 1 : 2
A1 = VA(LTCsend(ii))-VA(LTCrec(ii));
% Calculate LTC powers
ltcPCAL = VM(LTCsend(ii))^2*YRS + Tap(ii)*VM(LTCsend(ii))*
VM(LTCrec(ii))*(YRM*cos(A1) + YIM*sin(A1));
ltcQCAL = -VM(LTCsend(ii))^2*YIS + Tap(ii)*VM(LTCsend(ii))*
VM(LTCrec(ii))*(YRM*sin(A1) - YIM*cos(A1));
if jj == 1
LTCPQsend = ltcPCAL + j*ltcQCAL;
else
LTCPQrec = ltcPCAL + j*ltcQCAL;
end
send = LTCsend(ii);
LTCsend(ii) = LTCrec(ii);
LTCrec(ii) = send;
end
end



4.4.1.3 Test case of voltage magnitude control with
load tap-changing

The original ¬ve-bus network described in Section 4.3.9 is modi¬ed to include one LTC in
series with the transmission line connected between bus Lake and bus Main. An additional
bus, termed Lakefa, is used to connect the LTC as shown in Figure 4.7. The LTC is used to
128 CONVENTIONAL POWER FLOW

40 + j5
45 + j15
85.2
131.11

12.1
Lake
North Main
12.1
38.9 37.7 Lakefa

92.2 73.2
12 6.5
T = 1.04 4.6
13.6 4.1 2.6
19.5
32
4.9
7
89.6 72 32.6
8.1
19.7
5.2 4.0 2.0

Elm
South 57.3 56


20 + j10 60 + j10
8
9.2
55.7
40

Modi¬ed test network and power ¬‚ow results
Figure 4.7




maintain the voltage magnitude at Lake at 1 p.u. The initial condition of the tap is set to a
nominal value (i.e. T ¼ 1). The winding impedance contains no resistance, and an inductive
reactance of 0.1 p.u.
The data given in function PowerFlowsData in Section 4.3.9 is modi¬ed to
accommodate the inclusion of the LTC. The transmission line originally connected between
Lake and Main is now connected between Lakefa (bus 6) and Main (bus 4). Only the
modi¬ed code lines are shown here:

%The convention used for the types of buses available in power ¬‚ow
%studies is expanded to include nodal voltage control by LTC:
%bustype = 5

nbb = 6 ;
bustype(3) = 5 ; VM(1) = 1 ; VA(1) =0 ;
bustype(6) = 3 ; VM(1) = 1 ; VA(1) =0 ;

tlsend(6) = 6 ; tlrec(6) = 4 ; tlresis(6) = 0.01 ; tlreac(6) = 0.03 ;
tlcond(6) = 0 ; tlsuscep(6) = 0.02 ;
129
CONSTRAINED POWER FLOW SOLUTIONS

Function LTCPowerFlowsData is as follows:

%This function is used exclusively to enter LTC data:
% Load Tap Changing transformers data
% NLTC: Number of LTC™s
% LTCsend: Sending end bus
% LTCrec: Receiving end bus
% Rltc: LTC winding resistaance
% Xltc: LTC winding reactance
% Tap: Initial value of LTC tap
% TapHi: Higher value of LTC tap
% TapLo: Lower value of LTC tap
% Bus: Controlled bus
% LTCVM: Target volatge magnitude at LTC bus


NLTC = 1 ;
LTCsend(1) = 3 ; LTCrec(1) = 6 ; Rltc(1) = 0 ; Xltc(1) = 0.1 ;
Tap(1) = 1 ; TapHi(1) = 1.5 ; TapLo(1) = 0.5 ; Bus(1) = 3 ; LTCVM(1) = 1 ;



Convergence is obtained in 5 iterations to a power mismatch tolerance of 1e“12. The
power ¬‚ow results are shown in Figure 4.7. The nodal voltages are given in Table 4.2. It
should be noted that the LTC upholds the target value of 1 p.u. voltage magnitude at Lake
with a tap setting of T ¼ 1:04.


Nodal voltages in the modi¬ed network
Table 4.2
System bus
Nodal voltage North South Lake Lakefa Main Elm
Magnitude (p.u.) 1.060 1.000 1.000 0.969 0.969 0.966
À 2.16 À 4.41 À 5.13 À 5.99 À 5.99
Phase angle (deg) 0.00




It is interesting to note that the voltages at Main and Elm deteriorate compared with
the case when no voltage regulation takes place at Lake; the base case presented in
Section 4.3.9. It is also interesting to note that the LTC achieves its voltage regulation
objective at the expense of consuming reactive power; it draws 10 MVAR from the system.
There is a general redistribution of reactive power ¬‚ows throughout the network owing to
the inclusion of the LTC and its control action; however, the net amount of active and
reactive power generated or absorbed by the two generators changes little (i.e. 171.11 MVA
and 29.5 MVAR). The system active power loss is 6.11 MW. To show the prowess of the
Newton“Raphson method towards convergence, in Table 4.3 we give the maximum absolute
power mismatches in the system buses, which are shown to decrease quadratically towards
zero.
130 CONVENTIONAL POWER FLOW

Maximum absolute power mismatches
Table 4.3
ÁP ÁQ
Iteration
6.0e À 1 1.2e À 1
1
2.4e À 2 2.5e À 2
2
1.5e À 4 7.5e À 4
3
1.5e À 8 1.6e À 7
4
5 0 0



4.4.1.4 Combined voltage magnitude control by means of
generators and load tap changers

The option of controlling nodal voltage magnitude by adjusting LTCs and generators in a
combined fashion is a practical operating situation; such controls are prioritised. It is normal
to choose the generator as the ¬rst regulating component, holding the associated LTC taps at
their initial condition so long as the generator™s reactive limits are not reached. If the
generator hits one of its reactive limits then the master LTC tap becomes active and the bus
is converted to PVT; the bus becomes controlled by the LTC as opposed to the generator.
The control of nodal voltage magnitude by the generator has higher priority. If the set of
LTCs associated with a given generator are controlling buses different from the generator
bus and the generator reaches one of its reactive limits then the LTC is switched to control
the generator bus so that it changes to a PVT bus. The previous PVT bus controlled by the
LTC is converted to a PQ bus in the absence of another LTC available to regulate that bus.
These control actions are shown schematically in Figure 4.8.

PVT OPEN PVT PVT
PQ OPEN
m m
n n
T1 T1
T2 T2




PV PVT
k k


(a) (b)

Figure 4.8 Control of nodal voltage magnitude using: (a) one generator and two load tap changers
(LTCs) and (b) two LTCs after the generator violates one of its reactive limits



4.4.1.5 Control coordination between one load tap changer
and one generator

This test case serves to illustrate the situation where the voltage magnitude at a given bus is
controlled by one generator and one LTC. The ¬ve-bus network is modi¬ed to include one
131
CONSTRAINED POWER FLOW SOLUTIONS

40 + j5
45 + j15
86.88
131.31


Lake
North Main
21.8
21.9
42.9 41.4

88.4 74.2
4.9
12.6 13.5 6.7 10.9 16.26
25.5
29.1
5.2
6.4
85.9 73.2 29.6
7.9
25.9
8.7 10.71 11.9

Elm
South 50.4
T = 0.92 49.3


60 + j10
20 + j10
21.9
21.9
55
40

Control coordination between the generator and load tap changer at South
Figure 4.9




LTC, as shown in Figure 4.9. The minimum reactive power limit of the generator connected
at South is speci¬ed to be “55 MVAR. The LTC tap, located on the primary winding, is used
to control voltage magnitude when the generator violates its minimum reactive power limit.
The LTC works as a conventional transformer, with the tap ¬xed at the value given by the
initial condition for as long as the generator operates within its reactive limits. The initial
condition of the tap is set to a nominal value (i.e. T ¼ 1). The winding impedance contains
no resistance and an inductive reactance of 0.1 p.u. Once the generator violates reactive
limits the LTC becomes active. The controlled bus is PV when controlled by the generator
and then changes to PVT when controlled by the LTC.
For the condition when the target voltage magnitude at South is 1 p.u. the generator
violates its minimum reactive power limit, and voltage magnitude control switches to the
LTC. Convergence is obtained in 7 iterations. The power ¬‚ow results are shown in
Figure 4.9.
The nodal voltages are very similar to the base case presented in Section 4.3.9. The value
of LTC tap required to achieve 1 p.u. voltage magnitude at South is 0.92. As expected, the
LTC achieves its operating point at the expense of consuming reactive power. However, in
this case it draws only 2.9 MVAR from the system. The system active power loss increases
to 6.31 MW.
132 CONVENTIONAL POWER FLOW

4.4.2 Phase-shifting Transformer

A ¬‚exible power ¬‚ow model for the phase-shifting transformer is described in this section.
It is derived from the two-winding, single-phase transformer model presented by
Section 3.3.4, which contains complex taps on both the primary and secondary windings.
Comprehensive bus power injection equations for the phase shifter may be derived with
reference to Equation (3.91). However, simpler expressions may be derived if some practical
assumptions are introduced at this stage. For instance, it is reasonable to assume that the
phase-changing facility is only on the primary side, (i.e. u ¼ 0); the primary and secondary

windings admittances may be combined together ½Y ¼ Ysc p Ysc s °Ysc p þ Ysc s ފ; and the
impact of the magnetising branch is negligibly small in the power ¬‚ow solution (Y0 ¼ 0):
! ! ! ! !
ÀY °cos  þ j sin Þ
Ik Y Vk Ykk Ykm Vk
¼ ¼ :
ÀY °cos  À j sin Þ
Im Y Vm Ymk Ymm Vm
°4:70Þ

Similar to the power ¬‚ow LTC model, it is assumed in this expression that the primary and
secondary sides of the transformer are connected to bus k and bus m, respectively. Also,
the subscripts sc and u are dropped in the admittance term and in the phase angle ,
respectively.
Based on Equation (4.70), equations for the nodal power injections of the phase-shifting
transformer, where  is allowed to vary within design rating values ( min <  <  max), are
as follows:
Pk ¼ Vk Gkk þ Vk Vm ½Gkm cos°k À m Þ þ Bkm sin°k À m ފ; °4:71Þ
2

Qk ¼ ÀVk Bkk þ Vk Vm ½Gkm sin°k À m Þ À Bkm cos°k À m ފ; °4:72Þ
2

Pm ¼ Vm Gmm þ Vm Vk ½Gmk cos°m À k Þ þ Bmk sin°m À k ފ; °4:73Þ
2

Qm ¼ ÀVm Bmm þ Vm Vk ½Gmk sin°m À k Þ À Bmk cos°m À k ފ; °4:74Þ
2


where
9
Ykk ¼ Gkk þ jBkk ¼ Y; >
>
>
=
Ymm ¼ Gmm þ jBmm ¼ Y;
°4:75Þ
Ykm ¼ Gkm þ jBkm ¼ ÀY °cos  þ j sin Þ; >
>
>
;
Ymk ¼ Gmk þ jBmk ¼ ÀY °cos  À j sin Þ:
Alternatively, substituting Equations (4.75) into Equations (4.71)“(4.74) leads to the
following more explicit expressions:

Pk ¼ Vk G À Vk Vm ½G cos°k À m À Þ þ B sin°k À m À ފ; °4:76Þ
2

Qk ¼ ÀVk B À Vk Vm ½G sin°k À m À Þ À B cos°k À m À ފ; °4:77Þ
2

Pm ¼ Vm G À Vm Vk ½G cos°m À k þ Þ þ B sin°m À k þ ފ; °4:78Þ
2

Qm ¼ ÀVm B À Vm Vk ½G sin°m À k þ Þ À B cos°m À k þ ފ: °4:79Þ
2


If the phase-shifting transformer is used to control the active power ¬‚owing through it at a
speci¬ed value then the Jacobian is enlarged to accommodate one additional equation. In
133
CONSTRAINED POWER FLOW SOLUTIONS

this situation  enters as an extra state variable in the Jacobian equation. If the control
is exerted at the sending end (bus k) of the phase shifter then PPS is the target power to be
km
regulated.
The set of linearised power ¬‚ow equations for the phase-shifting transformer is,

3°iÞ 2 3°iÞ
2 3°iÞ 2
q Pk q Pk q Pk q Pk q Pk Á k
Á Pk
76 7
Vk Vm
6 7 6 q k q m q Vk q Vm q 76 7
6 7 6
76 7
6 7 6 q Pm
7 6 Á m 7
q Pm q Pm q Pm q Pm
6 Á Pm 7 6
76 7
6 7 6 Vk Vm
76 7
6 q k q m q Vk q Vm q
6 7
76 7
6 7 6
7 6 Á Vk 7
7
6 6 q Qk q Qk q Qk q Qk q Qk
76 7
6 Á Qk 7 ¼ 6
7 6 Vk 7 ; °4:80Þ
Vk Vm
6 7 6 q k q m q Vk q Vm q 76 7
6 7 6
7 6 Á Vm 7
7
6 6 q Qm
76 7
q Qm q Qm q Qm q Qm
6 7 6
76V 7
6 Á Qm 7 6 Vk Vm
76 m7
6 q k q m q Vk q Vm q
6 7
76 7
6 7 6 56 7
4 5 4qP q P q P q P q Pkm 4 Á PS 5
km km km km
PS Vk Vm
Á Pkm q k q m q Vk q Vm q

where ÁPPS , given by
km

ÁPPS ¼ P;reg À PPS ;
km km km

is the active power ¬‚ow mismatch for the phase shifter; PPS is the calculated power as given
km
by Equation (4.76); ÁPS , given by

ÁPS ¼ °iÞ À °iÀ1Þ ;

is the incremental change in the phase shifter angle at the ith iteration.
The Jacobian elements in matrix Equation (4.80) are as follows:

qPk qPk qQk qPk
¼À ¼À Vm ¼ À ¼ ÀQk À Vk B; °4:81Þ
2
qk qm qVm q
qPk
Vk ¼ Pk þ Vk G; °4:82Þ
2
qVk
qQk qQk qPk qQk
¼À ¼ Vm ¼ À ¼ Pk À Vk G; °4:83Þ
2
qk qm qVm q
qQk
Vk ¼ Qk À Vk B; °4:84Þ
2
qVk
qPm qPm qQm qPm
¼À ¼À Vk ¼ ¼ ÀQm À Vm B; °4:85Þ
2
qm qk qVk q
qPm
Vm ¼ Pm þ Vm G; °4:86Þ
2
qVm
qQm qQm qPm qQm
¼À ¼ Vk ¼ ¼ Pm À Vm G; °4:87Þ
2
qm qk qVk q
qQm
Vm ¼ Qm À Vm B: °4:88Þ
2
qVm
134 CONVENTIONAL POWER FLOW

It should be noted that since PPS ¼ Pk , the following relationships hold true and simplify
km
the evaluation of the Jacobian matrix,

q P q Pk
¼ ; °4:89Þ
km
q k q k
q P q Pk
¼ ; °4:90Þ
km
q m q m
q P q Pk
Vk ¼ Vk ; °4:91Þ
km
q Vk q Vk
q P q Pk
Vm ¼ Vm ; °4:92Þ
km
q Vm q Vm
q P q Pk
¼ : °4:93Þ
km
q q

At the end of each iterative step, i, the phase angle  is updated by using the following
relation:
°iÞ
°iÞ ¼ °iÀ1Þ þ ÁPS °4:94Þ

It should be noted that a more comprehensive power ¬‚ow phase-shifter model may be
obtained by basing the power derivations on Equation (3.91) as opposed to Equation (4.70).
For instance, the effect of the magnetising admittance may be included in the nodal power
equations of the transformer. Also, it may be considered that the phase-shifting facility
is on the secondary side as opposed to the primary side, in which case t ¼ 0 and
u min < u < u max . The associated Jacobian elements have the same form as Equa-
tions (4.81)“(4.93).


4.4.2.1 State variable initialisation and limit checking

Similar to the case with LTCs, it is normal to initialise the tapping positions of phase-
shifting transformers at their nominal values. Hence, t ¼ 0 and u ¼ 0 are used for cases
of two-winding phase shifters.
The status of phase-shifter taps is checked at each iterative step to assess whether or not
they are still within limits and capable of regulating active power ¬‚ow. For a phase shifter
connected between buses k and m, and regulating active power ¬‚ow at bus k with tapping
facilities available in the primary winding, we may write:
min <  < max : °4:95Þ
If either of the following conditions occur during the iterative process:

°iþ1Þ þ Á°iÞ ! max ;
°4:96Þ
°iþ1Þ þ Á°iÞ min ;
the tap is ¬xed at the violated limit. The active power ¬‚ow in branch k“m is allowed to vary,
and  is removed from the state variable vector. It becomes a constant parameter within the
135
CONSTRAINED POWER FLOW SOLUTIONS

nodal admittance matrix of the phase-shifting transformer in Equation (4.70). Checking of
phase-shifter tap limits starts from iteration 1.



4.4.2.2 Phase-shifter computer program in Matlab1 code

Program 4.4 incorporates phase-shifting transformer representation within the Newton“
Raphson power ¬‚ow program given in Section 4.3.6. The functions PowerFlowsData,
YBus, and PQ¬‚ows are also used here.
In the main phase-shifter Newton“Raphson program, the function PSPowerFlowsData
is added to read phase-shifter data, PSNewtonRaphson replaces NewtonRaphson, and
PSPQ¬‚ows is used to calculate power ¬‚ows and losses in the phase-shifting transformer.
Function PSNewtonRaphson uses the following functions from NewtonRaphson:
NetPowers; CalculatedPowers; GeneratorsLimits; PowerMismatches; Newton-
RaphsonJacobian; and StateVariablesUpdates. Furthermore, ¬ve new functions are
added to cater for phase shifters representation; namely: PSCalculatedPowers;
PSUpdates; PSNewtonRaphsonJacobian; PSPowerMismatches; and PSLimits.


PROGRAM 4.4 Program written in Matlab1 to incorporate phase-shifter representation
within the Newton“Raphson power ¬‚ow algorithm.

%- - - Main PS Program

PowerFlowsData; %Function to read network data

PSPowerFlowsData; %Function to read PS data

[YR,YI] = YBus(tlsend,tlrec,tlresis,tlreac,tlsuscep,tlcond,shbus,...
shresis,shreac,ntl,nbb,nsh);

[VM,VA,Tap,it] = PSNewtonRaphson(nmax,tol,itmax,ngn,nld,nbb,...
bustype,genbus,loadbus,PGEN,QGEN,QMAX,QMIN,PLOAD,QLOAD,YR,YI,VM,...
VA,NPS,PSsend,PSrec,Rps,Xps,Tap,TapHi,TapLo,Bus,psP);

[PQsend,PQrec,PQloss,PQbus] = PQ¬‚ows(nbb,ngn,ntl,nld,genbus,...
loadbus,tlsend,tlrec,tlresis,tlreac,tlcond,tlsuscep,PLOAD,QLOAD,...
VM,VA);

[PQPSsend,PQPSrec,PQPSloss] = PSPQ¬‚ows(VM,VA,NPS,PSsend,PSrec,Rps,...
Xps,Tap);

it %Iteration number
VM %Nodal voltage magnitude (p.u.)
VA = VA*180/pi %Nodal voltage phase angle(Deg)
PQsend %Sending active and reactive powers (p.u.)
PQrec %Receiving active and reactive powers (p.u.)
136 CONVENTIONAL POWER FLOW

Tap %Final transformer phase-shifting position
% End of Main PSNewtonRaphson Function


function [VM,VA,Tap,it] = PSNewtonRaphson(nmax,tol,itmax,ngn,nld,...
nbb,bustype,genbus,loadbus,PGEN,QGEN,QMAX,QMIN,PLOAD,QLOAD,YR,YI,...
VM,VA,NPS,PSsend,PSrec,Rps,Xps,Tap,TapHi,TapLo,Bus,psP);


% GENERAL SETTINGS
¬‚ag = 0;
it = 1;
% CALCULATE NET POWERS
[PNET,QNET] = NetPowers(nbb,ngn,nld,genbus,loadbus,PGEN,QGEN,PLOAD,...
QLOAD);


while (it < itmax & ¬‚ag==0)
% CALCULATED POWERS
[PCAL,QCAL] = CalculatedPowers(nbb,VM,VA,YR,YI);
% CALCULATED PS POWERS
[PCAL,QCAL,psPCAL,psQCAL] = PSCalculatedPowers(VM,VA,PCAL,QCAL,...
PSsend, PSrec,NPS,Tap,Rps,Xps);



% POWER MISMATCHES
[DPQ,DP,DQ,¬‚ag] = PowerMismatches(nmax,nbb,tol,bustype,¬‚ag,PNET,...
QNET,PCAL,QCAL);


% PS POWER MISMATCHES
[DPQ,¬‚ag] = PSPowerMismatches(nbb,DPQ,¬‚ag,tol,NPS,PSsend,PSrec,Bus,...
psP,psPCAL);


%Check for convergence
if ¬‚ag == 1
break
end


% JACOBIAN FORMATION
[JAC] = NewtonRaphsonJacobian(nmax,nbb,bustype,PCAL,QCAL,VM,VA,...
YR,YI);

% PS JACOBIAN UPDATING
[JAC] = PSNewtonRaphsonJacobian(nbb,VM,VA,JAC,NPS,PSsend,PSrec,Tap,...
Bus,Rps,Xps,psPCAL,psQCAL);
137
CONSTRAINED POWER FLOW SOLUTIONS

% SOLVE FOR THE STATE VARIABLES VECTOR
D = JAC\DPQ™;

% UPDATE STATE VARIABLES
[VA,VM] = StateVariablesUpdates(nbb,D,VA,VM);

% UPDATE PS TAPS
[Tap] = PSUpdates(nbb,D,NPS,Tap);

% CHECK FOR PS TAPS LIMITS VIOLATIONS
[Tap,Bus] = PSLimits(NPS,Tap,TapHi,TapLo,Bus);

it = it + 1;

end


function [PCAL,QCAL,psPCAL,psQCAL] = PSCalculatedPowers(VM,VA,PCAL,...
QCAL, PSsend,PSrec,NPS,Tap,Rps,Xps)
for ii = 1: NPS
% Calculate PS admittances
denom = Rps(ii)^2+Xps(ii)^2;
YR = Rps(ii)/denom;
YI = - Xps(ii)/denom;
% Calculate PS powers
for nn = 1: 2
kk = (ii-1)*2+nn;
A1=VA(PSsend(ii))-VA(PSrec(ii))-Tap(ii);
psPCAL(kk) = (VM(PSsend(ii))^2)*YR - VM(PSsend(ii))*VM(PSrec(ii))...
* (YR*cos(A1)+YI*sin(A1));
psQCAL(kk) = -(VM(PSsend(ii))^2)*YI - VM(PSsend(ii))*VM(PSrec(ii))...
* (YR*sin(A1)-YI*cos(A1));

% Update calculated powers PCAL and QCAL
PCAL(PSsend(ii)) = PCAL(PSsend(ii)) + psPCAL(kk);
QCAL(PSsend(ii)) = QCAL(PSsend(ii)) + psQCAL(kk);

send = PSsend(ii);
PSsend(ii) = PSrec(ii);
PSrec(ii) = send;
Tap(ii)=-Tap(ii);
end
end


function [DPQ,¬‚ag] = PSPowerMismatches(nbb,DPQ,¬‚ag,tol,NPS,PSsend,...
PSrec,Bus,psP,psPCAL);
138 CONVENTIONAL POWER FLOW

% ADD PS POWER MISMATCHES TO DPQ
ll = 1;
for ii = 1: NPS
if (PSsend(ii) == Bus(ii))
DPQ(ii+2*nbb) = psP(ii) - psPCAL(ii);
elseif (PSrec(ii) == Bus(ii))
DPQ(ii+2*nbb) = psP(ii) + psPCAL(ll+1);
end
if (Bus(ii) == 0)
DPQ(ii+2*nbb) = 0;
end
ll = ll + 2;
end
% Check for convergence
if (¬‚ag == 1)
for ll = 2*nbb+1 : 2*nbb + NPS
if (abs(DPQ) < tol)
¬‚ag = 1;
else
¬‚ag = 0;
end
end
end



function [JAC] = PSNewtonRaphsonJacobian(nbb,VM,VA,JAC,NPS,PSsend,...
PSrec,Tap,Bus,Rps,Xps,psPCAL,psQCAL)
% PS JACOBIAN MODIFICATION
for ii = 1: NPS
nn = (ii-1)*2+1;
pp = 2*nbb+ii;

% Calculate PS admittances
denom = Rps(ii)^2+Xps(ii)^2;
YR = Rps(ii)/denom;
YI = -Xps(ii)/denom;

% Calculate PS Jacobian entries
for kk1 = 1: 2
kk = 2*PSsend(ii)-1;
mm = 2*PSrec(ii)-1;
nn = (ii-1)*2+kk1;

JKK(1,1) = -(VM(PSsend(ii))^2)*YI;
JKK(1,2) = (VM(PSsend(ii))^2)*YR;
JKK(2,1) = -(VM(PSsend(ii))^2)*YR;
JKK(2,2) = -(VM(PSsend(ii))^2)*YI;
139
CONSTRAINED POWER FLOW SOLUTIONS

JKM(1,1) = psQCAL(nn) + (VM(PSsend(ii))^2)*YI;
JKM(1,2) = psPCAL(nn) - (VM(PSsend(ii))^2)*YR;
JKM(2,1) = -psPCAL(nn) + (VM(PSsend(ii))^2)*YR;
JKM(2,2) = psQCAL(nn) + (VM(PSsend(ii))^2)*YI;

% Add PS contribution to system JAC
JAC(kk:kk+1,kk:kk+1) = JAC(kk:kk+1,kk:kk+1) + JKK;
JAC(kk:kk+1,mm:mm+1) = JAC(kk:kk+1,mm:mm+1) + JKM;

send = PSsend(ii);
PSsend(ii) = PSrec(ii);
PSrec(ii) = send;
end
kk = 2*PSsend(ii)-1;
mm = 2*PSrec(ii)-1;
nn = (ii-1)*2+1;
JKE(1) = psQCAL(nn) + (VM(PSsend(ii))^2)*YI;
JKE(2) = -psPCAL(nn) + (VM(PSsend(ii))^2)*YR;
JEK(1) = -psQCAL(nn) - (VM(PSsend(ii))^2)*YI;
JEK(2) = psPCAL(nn) + (VM(PSsend(ii))^2)*YR;
JME(1) = -psQCAL(nn+1) - (VM(PSrec(ii))^2)*YI;
JME(2) = psPCAL(nn+1) - (VM(PSrec(ii))^2)*YR;
JEM(1) = psQCAL(nn) + (VM(PSsend(ii))^2)*YI;
JEM(2) = psPCAL(nn) - (VM(PSsend(ii))^2)*YR;
JE(1) = psQCAL(nn) + (VM(PSsend(ii))^2)*YI;

if (Bus(ii) ˜= 0)
JAC(kk:kk+1,pp) = JAC(kk:kk+1,pp) + JKE™;
JAC(mm:mm+1,pp) = JAC(mm:mm+1,pp) + JME™;
JAC(pp,kk:kk+1) = JAC(pp,kk:kk+1) + JEK;
JAC(pp,mm:mm+1) = JAC(pp,mm:mm+1) + JEM;
JAC(pp,pp) = JAC(pp,pp) + JE(1);
else
JAC(1:pp,pp) = zeros;
JAC(pp,1:pp) = zeros;
JAC(pp,pp) = 1;
end
end

function [Tap] = PSUpdates(nbb,D,NPS,Tap)
for ii = 1: NPS
Tap(ii) = Tap(ii) + D(ii+nbb*2);
end

function [Tap,Bus] = PSLimits(NPS,Tap,TapHi,TapLo,Bus)
% CHECK FOR POSSIBLE PS TAPs™ LIMITS VIOLATIONS
140 CONVENTIONAL POWER FLOW

for ii = 1: NPS
if (Bus(ii) ˜= 0)
if (Tap(ii) > TapHi(ii))
Tap(ii) = TapHi(ii);
Bus(ii) = 0;
elseif (Tap(ii) < TapLo(ii))
Tap(ii) = TapLo(ii);
Bus(ii) = 0;
end
end
end

function[PQPSsend,PQPSrec,PQPSloss] = PSPQ¬‚ows(VM,VA,NPS,PSsend,...
PSrec,Rps,Xps,Tap)
%
PQPSsend = zeros(1,NPS);
PQPSrec = zeros(1,NPS);
% Calculate active and reactive powers at the sending and reciving ends of
% Phase shifter transformers
for ii = 1: NPS
Vsend = (VM(PSsend(ii))*cos(VA(PSsend(ii))) + ...
VM(PSsend(ii))*sin(VA(PSsend(ii)))*i);
Vrec = (VM(PSrec(ii))*cos(VA(PSrec(ii))) + ...
VM(PSrec(ii))*sin(VA(PSrec(ii)))*i);
Zself = (Rps(ii) + Xps(ii)*i);
Ymutual = -(cos(Tap(ii)) + sin(Tap(ii))*i)/Zself;

current = Vsend/Zself + Vrec*Ymutual;
PQPSsend(ii) = Vsend*conj(current);
Ymutual = -(cos(Tap(ii)) - sin(Tap(ii))*i)/Zself;
current = Vsend*Ymutual + Vrec/Zself;
PQPSrec(ii) = Vrec*conj(current);
PQPSloss(ii) = PQPSsend(ii) + PQPSrec(ii);
end


4.4.2.3 Test cases for phase-shifting transformers

The PSNewtonRaphson power ¬‚ow function is used to solve two test cases. The ¬rst case
corresponds to a straightforward active power ¬‚ow control in a phase-shifter-upgraded
transmission line. The second case is an assessment of the power ¬‚ow feasibility region of a
two phase-shifting transformer system.

Active power flow

The ¬ve-bus network is modi¬ed to include one phase-shifting transformer in series with the
transmission line connecting bus Lake and bus Main. The phase shifter is used to maintain
141
CONSTRAINED POWER FLOW SOLUTIONS

active power ¬‚owing from Lakefa towards Main at 40 MW. This bus is added to enable
connection of the phase shifter. The initial value of the complex tap is set to the nominal
value (i.e. 1¬0 ). The winding contains no resistance, and an inductive reactance of 0.1 p.u.
The data given in function PowerFlowsData in Section 4.3.9 is modi¬ed to
accommodate for the inclusion of the phase shifter. The transmission line originally
connected between Lake and Main is now connected between Lakefa (bus 6) and Main
(bus 4). Only the modi¬ed code lines are shown here:

nbb = 6 ;
bustype(6) = 4 ; VM(1) = 1 ; VA(1) =0 ;

tlsend(6) = 6 ; tlrec(6) = 4 ; tlresis(6) = 0.01 ; tlreac(6) = 0.03 ;
tlcond(6) = 0 ; tlsuscep(6) = 0.02 ;

Function PSPowerFlowsData is as follows:

% Phase-Shifting Transformers Data

% NPS: number of PS™s
% PSsend: Sending end bus
% PSrec: Receiving end bus
% Rps: PS winding resistance
% Xps: PS windding reactance
% Tap: Initial value of PS tap
% TapHi: Higher value of PS tap
% TapLo: Lower value of PS tap
% Bus: Controlled bus
% psP: Target active power at Bus
NPS = 1;
PSsend(1) = 3 ; PSrec(1) = 6 ; Rps(1) = 0 ; Xps(1) = 0.1 ;
Tap(1) = 0 ; TapHi(1) = 10*pi/180 ; TapLo(1) = -10*pi/180 ;
Bus(1) = 6 ; psP(1) = 0.4 ;
nmax = nmax + NPS;

Convergence is obtained in 5 iterations to a power mismatch tolerance of 1e À 12. The
phase shifter upholds its target value. The power ¬‚ow results are shown in Figure 4.10. The
nodal voltages are given in Table 4.4. The maximum absolute power mismatches of
the system buses and phase shifter are shown in Table 4.5.
As expected, the nodal voltage magnitudes do not change compared with the base
case presented in Section 4.3.9. However, the voltage phase angle difference between
Lake and Main does increase in value to re¬‚ect the larger amount of active power ¬‚owing
through this transmission line, which increases from 19.4 MW to 40 MW. This is slightly
more than a twofold increase in transmitted power, and the phase angle difference changes
from “0.32 to “2.74 .
The value of tap required to achieve the 40 MW ¬‚ow through the phase shifter is À 5.83 .
The phase shifter achieves its operating point at the expense of consuming 1.7 MVAR. The
system active power loss is 6.6 MW.
142 CONVENTIONAL POWER FLOW

40 + j5
45 + j15
92.68
131.6

40
Lake
North Main
39.8
50.3 48.2 Lakefa

81.31 76.4
φ = ’5.83° 2.7
16.3 4.1 13.4
15.4 1.7
36.8

2.8 13.6
6
79 75.8 13.7
4.2
37.6
2.4 13.2 2.7

Elm
South 47.7 46.8


60 + j10
20 + j10
7.3
7.2
60.34
40

Modi¬ed test network and power ¬‚ow results
Figure 4.10




Nodal voltages of the modi¬ed network
Table 4.4
System buses
Nodal voltage North South Lake Lakefa Main Elm
Magnitude (p.u.) 1.06 1.000 0.984 0.987 0.984 0.972
À 1.77 À 5.8 À 2.33 À 3.06 À 4.95
Phase angle (deg) 0.00




Maximum absolute mismatches
Table 4.5
Bus
ÁP ÁQ Phase shifter Á
Iteration
6.0e À 1 1.2e À 1 4e À 1
1
2.1e À 2 3.7e À 2 8e À 3
2
9.6e À 5 1.8e À 4 9.3e À 5
3
3.6e À 9 5.3e À 9 4.7e À 9
4
5 0 0 0
143
CONSTRAINED POWER FLOW SOLUTIONS

Feasible active power control region

When two or more phase-shifting transformers are close together, electrically speaking, they
may interact with each other. The amount of active power ¬‚ow controlled by these series
controllers is con¬ned to a region in which the phase angle controllers operate within limits
and where the solution of the power ¬‚ow equations exists. Figure 4.11 shows the feasible


80 A
South“Lake ac tive powe r flow (MW)




70
60 C
50
40
30
20
10
0
’10 B
’20
’30 D
’40
-10 0 10 20 30 40 50 60 70 80 90
North“Lake active power flow (MW)

<<

. 6
( 17)



>>