phasor-algebra-explained
phasor-algebra-explained
I lags V by vi
We can thank Euler for many of the methods used in modern AC circuit analysis.
Euler is recognized as the greatest mathematician in history.
He defined the exponential function for complex numbers and found its relation
to trigonometric functions.
e = Euler
this says that the RMS voltage is purely real and not time dependent.
also notice that the angle information is gone.
𝐿𝑒𝑡: i(t) 4Ω
𝑓 = 60𝐻𝑧 ∴ 𝜔 = 2𝜋60 = 377
𝑉𝑆 = 4 𝑉𝑅𝑀𝑆 + VR(t) -
𝜃𝑣 = 45° +
𝑅 = 4Ω 4 2 cos(𝜔𝑡 + 45°) VL(t) 10.61mH
𝐿 = 10.61𝑚𝐻 ∴ 𝜔𝐿 = 4Ω -
𝑉𝑝𝑘 𝜔𝐿
𝑖 𝑡 = cos 𝜔𝑡 + 𝜃𝑣 − tan−1
𝑅2 + 𝜔𝐿 2 𝑅
4 2 4 1
𝑖 𝑡 = cos 377𝑡 + 45° − tan−1 =4 cos 377𝑡 + 45° − 45°
42 + 42 4 16
𝑖 𝑡 = cos 377𝑡
Now using Euler’s identity… This states that if we have a time dependent
𝐴𝑒 𝑗𝜃 = 𝐴 cos 𝜃 + 𝑗𝐴 sin 𝜃 cosinusoid of the form…
𝑉(𝑡) = 𝐴 cos 𝜔𝑡 + 𝜃
and recognizing…
We can transform it to a complex phasor…
𝐴 cos 𝜃 = ℜ𝑒 𝐴𝑒 𝑗𝜃
ℜ𝑒 4 2𝑒 𝑗(377𝑡+45°) = ℜ𝑒 4𝑒 𝑗(377𝑡) + ℜ𝑒 4𝑒 𝑗(377𝑡+90°) 𝑽 = 𝐴𝑒 𝑗𝜃
ℜ𝑒 4 2𝑒 𝑗(377𝑡+45°) = ℜ𝑒 4𝑒 𝑗(377𝑡) + 4𝑒 𝑗(377𝑡+90°) 𝑽 = 𝐴 cos 𝜃 + 𝑗𝐴 sin 𝜃
For complex numbers… notice the notation for a phasor…
the real part of the left side = real part of the right side. you will usually see it in boldface or with
likewise, an arrow over it… or both.
the imaginary part of the left side = imaginary part of right side. must distinguish it as a complex quantity!
So we can write… to transform a phasor back to the time domain …
multiply it by ejt and consider only the real part.
4 2𝑒 𝑗(377𝑡+45°) = 4𝑒 𝑗(377𝑡) + 4𝑒 𝑗(377𝑡+90°)
4 2𝑒 𝑗(377𝑡) 𝑒 𝑗(45°) = 4𝑒 𝑗(377𝑡) + 4𝑒 𝑗(377𝑡) 𝑒 𝑗(90°) 𝑉(𝑡) = ℜ𝑒 𝑽𝑒 𝑗𝜔𝑡
notice all three terms are vectors rotating at the same rate and
The Phasor definition only works on cos()!
the relative angles associated with them are constant.
to use it with sin() requires conversion to cos().
So the time dependent terms effectively cancel out.
𝑉𝐿
sin 𝜔𝑡 = 𝐿𝐼𝐿
𝜔
𝑉𝐿 𝜔𝐿 𝜔𝐿
𝑍𝐿 = = = 𝜋
Im 𝐼𝐿 sin 𝜔𝑡 cos 𝜔𝑡 − 2
𝑗𝜔𝐿 𝜋
𝑐𝑜𝑛𝑣𝑒𝑟𝑡𝑖𝑛𝑔 cos 𝜔𝑡 − 𝑡𝑜 𝑎 𝑝ℎ𝑎𝑠𝑜𝑟 …
2
ℜ𝑒 𝜔𝐿 𝜔𝐿
𝒁𝐿 = 𝜋 = = 𝑗𝜔𝐿
𝑒 −𝑗
2 −𝑗
Complex Plane
𝒁𝐿 = 𝑗𝜔𝐿
𝑿𝐿 = 𝑗𝜔𝐿
Phasor Algebra Explained (cont.)
−𝑗
𝜔𝐶
−𝑗
𝑿𝐶 =
𝜔𝐶
Phasor Algebra Explained (cont.)
Almost trivial… But consider an AC source across a Resistor…
IR(t) 𝑉𝑅 𝑡 = 𝑉cos 𝜔𝑡 ⟸ 𝑉 𝑖𝑠 𝑡ℎ𝑒 𝑟𝑒𝑓𝑒𝑟𝑒𝑛𝑐𝑒 (𝑧𝑒𝑟𝑜 𝑝ℎ𝑎𝑠𝑒 𝑎𝑛𝑔𝑙𝑒)
𝑉𝑅 𝑡 = 𝑅𝐼𝑅 𝑡 ⟸ 𝑅 ℎ𝑎𝑠 𝑛𝑜 𝑡𝑖𝑚𝑒 𝑑𝑒𝑝𝑒𝑛𝑑𝑒𝑛𝑐𝑒 Im
𝑉𝑅
+ 𝑍𝑅 = =𝑅
R 𝐼𝑅
Vcos(t) VR(t) 𝑅
𝒁𝑅 = 𝑅 ℜ𝑒
-
Complex Plane
The Impedance of a Resistor is not frequency dependent, purely real and positive.
Since it is purely real, it is called “Resistance” and assigned the variable R
Current through a Resistor is in phase with the voltage across the Resistor
𝒁𝑹 = 𝑅
𝒁 = 𝑅 + 𝑗𝑋 = 𝒁 𝑒 𝑗𝜃𝑧
𝒁 = 𝑅2 + 𝑋 2
−1
𝑋
𝜃𝑧 = tan
𝑅
Phasor Algebra Explained (cont.)
Since 3 circuit analysis is all about Power… Let’s Explore
Consider an AC source across some combination of Load Impedances…
Assume that the Voltage and Current magnitudes and phases are known.
𝑣 = 2 𝑉cos 𝜔𝑡 + 𝜃𝑣 𝑖 = 2 𝐼cos 𝜔𝑡 + 𝜃𝑖
Icos(t +i) we can shift the phase of these sinusoids with no impact to our analysis
in reality we are choosing a time reference… when t = 0, i(0) = I
𝑣 = 2 𝑉cos 𝜔𝑡 + 𝜃𝑣 − 𝜃𝑖 𝑖 = 2 𝐼cos 𝜔𝑡
Vcos(t +v) 𝐿𝑜𝑎𝑑 𝑠 = 𝑣𝑖 ⟸ 𝑖𝑛𝑠𝑡𝑎𝑛𝑡𝑎𝑛𝑒𝑜𝑢𝑠 𝑝𝑜𝑤𝑒𝑟
𝑠 = 2𝑉𝐼cos 𝜔𝑡 + 𝜃𝑣 − 𝜃𝑖 cos 𝜔𝑡
s is a combination of real and reactive power
staying in the time domain and using trig identities:
2𝑉𝐼
𝑠= cos 𝜔𝑡 + 𝜃𝑣 − 𝜃𝑖 + 𝜔𝑡 + cos 𝜔𝑡 + 𝜃𝑣 − 𝜃𝑖 − 𝜔𝑡
2
𝑠 = 𝑉𝐼 cos 2𝜔𝑡 + 𝜃𝑣 − 𝜃𝑖 + cos 𝜃𝑣 − 𝜃𝑖
𝑠 = 𝑉𝐼 cos 2𝜔𝑡 cos 𝜃𝑣 − 𝜃𝑖 − sin 2𝜔𝑡 sin 𝜃𝑣 − 𝜃𝑖 + cos 𝜃𝑣 − 𝜃𝑖
𝑠 = 𝑉𝐼 cos 2𝜔𝑡 cos 𝜃𝑣 − 𝜃𝑖 + cos 𝜃𝑣 − 𝜃𝑖 − 𝑉𝐼sin 2𝜔𝑡 sin 𝜃𝑣 − 𝜃𝑖
𝑠 = 𝑉𝐼 cos 𝜃𝑣 − 𝜃𝑖 [1 + cos 2𝜔𝑡 ] − 𝑉𝐼 sin 𝜃𝑣 − 𝜃𝑖 sin 2𝜔𝑡
• this term is instantaneous real power • this term is instantaneous reactive power
• average value = VIcos(v - i) = P • time and frequency dependent
• a sinusoid centered around zero
• has zero average value in time
• has twice the frequency of the source voltage
• let’s take an aside and look at this sinusoid
Phasor Algebra Explained (cont.)
Reactive Power in time domain
𝑉𝐼 sin 𝜃𝑣 − 𝜃𝑖
Absorbing
Power
+ +
45
- -
Delivering
Power
sin(2t)
This term is real power average value this term is reactive power
of this term although the average value is zero …
is zero we need to keep it for it’s half cycle properties
𝜋
𝑠 = 𝑉𝐼 cos 𝜃𝑣 − 𝜃𝑖 − 𝑉𝐼 sin 𝜃𝑣 − 𝜃𝑖 cos 2𝜔𝑡 −
𝜋
2
𝑺 = 𝑉𝐼 cos 𝜃𝑣 − 𝜃𝑖 − 𝑉𝐼 sin 𝜃𝑣 − 𝜃𝑖 𝑒 −𝑗 2
𝑺 = 𝑉𝐼 cos 𝜃𝑣 − 𝜃𝑖 + 𝑗𝑉𝐼 sin 𝜃𝑣 − 𝜃𝑖
Im Im
𝑺 = 𝑽𝑰∗ = 𝑃 + 𝑗𝑄
𝑗𝜃𝑣
𝑽 = 𝑉𝑒
𝑄
v - i jQ ∠𝑺 = tan−1
v S 𝑃
ℜ𝑒 ℜ𝑒
i P
𝑰 = 𝐼𝑒 𝑗𝜃𝑖
Complex Plane Complex Plane
Generally…
If you are multiplying phasors:
• use polar notation
• with polar notation, you multiply the magnitudes,
and add the angles
If you are adding phasors:
• use rectangular notation
• with rectangular notation, you add the real parts
together, and add the imaginary parts together
Phasor Algebra Explained (cont.)
Phasors at work
example:
consider this circuit … Convert to per-unit and phasors
S1 R X S1 R jX
V2 V2
S2 S2
I I
V1cos(t + ) 𝑃, 𝑄 1∠0 𝑃 + 𝑗𝑄
𝑤ℎ𝑒𝑟𝑒:
magnitude of V1 is known 𝑉𝐵𝑎𝑠𝑒 = 𝑉𝐿𝐿
𝑆𝐵𝑎𝑠𝑒 = 100 𝑀𝑉𝐴 2
realize V1 is line-line voltage if 3 (RMS ) 𝑃 𝑄 𝑉𝐿𝐿
𝑃= 𝑄= 𝑍𝐵𝑎𝑠𝑒 =
the angle of V1 is chosen as zero (reference) 100 100 𝑆𝐵𝑎𝑠𝑒
R is known and represents 1 t-line resistance (Ω) 𝑅 𝑋 𝑉1
𝑅= 𝑋= 𝑉1 = =1
X is known and represents 1 t-line inductive reactance (Ω) 𝑍𝐵𝑎𝑠𝑒 𝑍𝐵𝑎𝑠𝑒 𝑉𝐵𝑎𝑠𝑒
t-line shunt capacitance (C) is ignored… ok for short line 𝑽2 = 𝑉2 ∠𝜃2 𝑺2 = 𝑃 + 𝑗𝑄
is known, 260 in this example
S2 (P and Q) are known (MW and MVAR) all linear circuit analysis techniques still apply …
Find: Kirchhoff’s Voltage Law (KVL)
I (magnitude and angle) Kirchhoff’s Current Law (KCL)
V2 (magnitude and angle) nodal analysis
S1 (magnitude and angle) mesh analysis
Thevenin’s theorem
Norton’s theorem
Superposition theorem
Phasor Algebra Explained (cont.)
Phasors at work
example (cont.)
𝑃𝑅 + 𝑄𝑋 + 𝑗 𝑄𝑅 − 𝑃𝑋 = 𝑉2 ∠𝜃2 − 𝑉22
Now start writing equations … 𝑃𝑅 + 𝑄𝑋 + 𝑗 𝑄𝑅 − 𝑃𝑋 = −𝑉22 + 𝑉2 cos 𝜃2 + 𝑗𝑉2 sin 𝜃2
S1 R jX V 2
A B <-- since these are known… make a substitution
S2
I Equating real and imaginary parts …
1∠0 𝑃 + 𝑗𝑄 𝐴 = −𝑉22 + 𝑉2 cos 𝜃2 𝐵 = 𝑉2 sin 𝜃2
𝐴 + 𝑉22 𝐵
cos 𝜃2 = sin 𝜃2 =
𝑉2 𝑉2
2
𝐴2 + 2𝐴𝑉22 + 𝑉24 𝐵2
1 − 𝑉2 ∠𝜃2 cos (𝜃2 ) = 2
sin (𝜃2 ) = 2
𝑰= 𝑉22 𝑉2
𝑅 + 𝑗𝑋
∗
∗
1 − 𝑉2 ∠𝜃2 sin2 𝜃2 + cos 2 𝜃2 = 1
𝑰 =
𝑅 + 𝑗𝑋 𝐵2 𝐴2 + 2𝐴𝑉22 + 𝑉24
+ =1
1 − 𝑉2 ∠ − 𝜃2 𝑉22 𝑉22
𝑰∗ =
𝑅 − 𝑗𝑋 𝐵2 + 𝐴2 + 2𝐴𝑉22 + 𝑉24 = 𝑉22
𝑺2 = 𝑃 + 𝑗𝑄 = 𝑽2 𝑰∗ 𝐵2 + 𝐴2 + 2𝐴𝑉22 − 𝑉22 +𝑉24 = 0
1 − 𝑉2 ∠ − 𝜃2 𝐵2 + 𝐴2 + (2𝐴 − 1)𝑉22 + 𝑉24 = 0
𝑃 + 𝑗𝑄 = 𝑉2 ∠𝜃2 𝑉24 + (2𝐴 − 1)𝑉22 + 𝐴2 + 𝐵2 = 0
𝑅 − 𝑗𝑋
2
𝑉2 ∠𝜃2 − 𝑉2
𝑃 + 𝑗𝑄 = After V2 is found …
𝑅 − 𝑗𝑋 𝑉24 + (2𝐴 − 1)𝑉22 + 𝐴2 + 𝐵2 = 0
𝐵
𝑃 + 𝑗𝑄 𝑅 − 𝑗𝑋 = 𝑉2 ∠𝜃2 − 𝑉22 𝜃2 = sin−1
𝑃𝑅 + 𝑄𝑋 − 𝑗𝑃𝑋 + 𝑗𝑄𝑅 = 𝑉2 ∠𝜃2 − 𝑉22 𝑉2
𝑃𝑅 + 𝑄𝑋 + 𝑗(𝑄𝑅 − 𝑃𝑋) = 𝑉2 ∠𝜃2 − 𝑉22
we ended up with a mess … 1 − 𝑉2 ∠𝜃2
• 4th order equation 𝑰=
• numerical solution required
𝑅 + 𝑗𝑋
𝑺1 = 1𝑰∗
help with conjugate identities
Phasor Algebra Explained (cont.)
Numerical Solution
let’s put some numbers in and try to find a solution …
Swing Gen
Why is a numerical solution required?…
• this type of problem is know as load flow or power flow
69 kV • notice that the load is not a “passive” impedance
1∠0 𝑉2 ∠𝜃2
• if the load were simply R + jX … simple solution
P1 P2 • since the load power is constant …
• the load power will determine the current
𝒁 • the current will determine the Bus2 voltage
Q1 Q2 P = 24.0 MW • If Bus2 voltage increases …
Q = 8.0 MVAR • current must decrease to provide the same power
𝒁 = 0.10281 + 𝑗0.22476 • If current is changed … Bus2 voltage will change
• so you have to iterate through Bus2 voltage values
Power flow simulations must have a swing generator … to find the operating point that satisfies the constant
• maintains Bus1 voltage at 1.0pu and 0 (reference) load power
• provides real and reactive power needed
to solve the system (load + losses)
base voltage of this system is 69kV
t-line impedance represents 15.0 miles of 336.4 ACSR conductor
load power was chosen
𝑉24 + 2𝐴 − 1 𝑉22 + 𝐴2 + 𝐵2 = 0
69 kV
Newton – Raphson requires the derivative:
1∠0 𝑉2 ∠𝜃2
P1 P2 4𝑉23 + 2 2𝐴 − 1 𝑉2
𝒁
each iteration adjusts the value of V until a
Q1 Q2 P = 24.0 MW solution is found
Q = 8.0 MVAR
𝒁 = 0.10281 + 𝑗0.22476
Solution …
Swing Gen
69 kV
1∠0 0.954 ∠ − 2.75°
24.7 24.0
𝒁
9.6 8.0 P = 24.0 MW
221.8 Amps Q = 8.0 MVAR
Newton – Raphson solution
import math
def get_flow_data(r, x, p, q):
z = complex(r, x) # define complex line impedance
v2 = 1 # first guess at v2
p /= 100.0 # convert P to pu
q /= 100.0 # convert Q to pu
tol = 1e-5 # set convergence tolerance
iterations = 0 # initialize iterations
max_iterations = 99 # define max iterations
a = p * r + q * x # substitution variable
b = q * r - p * x # substitution variable
f_v2 = (v2 ** 4) + (2*a-1) * (v2 ** 2) + (a ** 2) + (b ** 2) # initialv2 solution with guess
while abs(f_v2) > tol and iterations < max_iterations: # loop while v2 solution != 0
f_v2 = (v2 ** 4) + (2*a-1) * (v2 ** 2) + a ** 2 + b ** 2 # v2 solution (this iteration)
f_v2_prime = 4*(v2 ** 3) + 2*(2*a-1) * v2 # derivative of v2 solution
v2 -= f_v2 / f_v2_prime # adjust next iteration v2
iterations += 1 # increment counter
theta2 = math.asin(b / v2) # calculate bus2 angle (radians)
theta2_deg = theta2 * 180 / math.pi # convert bus2 angle to degrees
v2 *= complex(math.cos(theta2), math.sin(theta2)) # define complex v2
i = (1 - v2) / z # calculate complex current
s1 = i.conjugate() # calculate sending complex power
s1_p = s1.real # sending real power
s1_q = s1.imag # sending reactive power
mag_v2 = round(abs(v2), 3) # formatting
theta2_deg = round(theta2_deg, 3) # formatting
s1_p = round(s1_p * 100, 3) # formatting
s1_q = round(s1_q * 100, 3) # formatting
return [mag_v2, theta2_deg, s1_p, s1_q, i, iterations]
# =============================================================================
# ================================ MAIN ===================================
# =============================================================================
if __name__ == '__main__':
P = 24.0 # <--- Input Load Real Power
Q = 8.0 # <--- Input Load Reactive Power
R = 0.10281 # <--- Input Line Resistance (pu)
X = 0.22476 # <--- Input Line Reactance (pu)
V2,Theta2,S1_P,S1_Q,I,Iterations = get_flow_data(R,X,P,Q) # get results
print '\n|V2| =', V2 # print V2 magnitude
print u'\u03B8'+'2 = ', Theta2 # print V2 angle
print 'P1 = ', S1_P # print sending real power
print 'Q1 = ', S1_Q # print sending reactive power
if Iterations > 98: # if no solution...
print 'DID NOT CONVERGE' # print message
Questions or Comments …
contact us