2. start
Read line data,Busdata,
Tolerance for ΔP andΔQ
Compute Y bus
From Y-bus,find Bus susceptance matrix
B’(imaginary part of Y-bus for all buses except slack)
B’’(I.P of Y-bus for load buses)
Initialize voltage state vector X°
Set iteration count, iter = 1
Bus no. i = 1
i = i + 1
3. Calculate Pi and Qi
Pi
cal = ∑j=1
N |Vi| |Yij| |Vj| cos(Өij + δj – δi)
Qi
cal = - ∑j=1
N |Vi| |Yij| |vj| sin(Өij + δj –
δi)
Is
i refer
to
P-V bus
Check
For Q-limit
Calculate ΔPi= Pi(spec)-Pi
cal
Qi(spec)= Qi (max)
ΔQi = Qi(spec)- Qi
cal
Qi(spec)= Qi (min)
ΔQi = Qi(spec)- Qi
cal
Calculate Δ Pi and Δ Qi
Δ Pi = Pi(spec)- Pi
cal
Δ Qi = Qi(spec)-Qi
cal
No
Yes
Qi
cal < Qi
(min)
Qi
cal > Qi
(min)
4. Is
i < N
Calculate Δδ and ΔV
Δδi = -[B’]-1
ΔVi = -[B’’]-1
update bus voltage
Vnew = Vold + ΔV, δnew = δold + Δδ
Check for tolerance
ΔPi < Ɛ, ΔQi < Ɛ
ΔPi
|Vi|
ΔPi
|Vi|
Yes
No
Yes
No
5. Calculate line flows, slack bus
power,total line losses, reactive
power generated at P-V buses
Iter = iter + 1
Print
Stop