import matplotlib.pyplot as plt
import numpy as np
import schemdraw
import schemdraw.elements as elm
from matplotlib.axes import Axes
from src.drawing_utils import Arc, Arrow, Point, Segment, clear_axes
from src.figure_utils import process_figure
from src.plotting_utils import (
configure_matplotlib,
format_xaxis,
rm,
set_discrete_colors,
)
from src.schemdraw_utils import configure_schemdraw
configure_matplotlib()
configure_schemdraw()
In the previous chapters, we learned how complex numbers can simplify calculations involving voltage and current. We will see how complex numbers can also provide simplified power calculations. But first, in order to understand the nuances of AC power, we will see how power can be derived and quantified for a general AC circuit in the time domain.
Consider the circuit of Figure 1. Such a circuit is useful because it can be used to model any series connection between one or more impedances and one or more voltage sources—as long as the voltage sources can be lumped together as one vS(t) and the impedances can be lumped together as one Z.
Applying the trigonometric identity cosθacosθb=(cos(θa−θb)+cos(θa+θb))/2 gives us the following expression for p(t). We see that p(t) is a sinusoid, just like vS(t) and i(t). However, p(t) oscillates with twice the frequency of the voltage and current (2ω, instead of ω), and does not necessarily oscillate around zero. The time-invariant part of p(t) is the “centerline” around which the sinusoid oscillates, which is also equal to the sinusoid’s time-averaged value denoted by pˉ.
We can derive p(t) for a purely resistive AC circuit as follows, by setting X=0. We can see that p(t) is always greater than (or equal to) zero, as illustrated in Figure 2(a). Because resistor R always dissipates power and in the real world likely represents a device that can do useful work—such as a light bulb or laptop—we call this real or active power. In the X=0 case, we can quantify our circuit’s active power by its peak value (relative to pˉ) of ∣VS∣2/2R.
Similarly, we can derive p(t) for an AC circuit with only inductors and capacitors as follows, by setting R=0. The average power pˉ is now zero; p(t) oscillates around zero as illustrated in Figure 2(b) and (c). Recall from Chapter 1 that inductive and capacitive components store energy. The rate at which the component stores or releases electrical energy is what we call its electric power—positive when converting from electrical energy and negative when converting back to electrical energy. When an AC voltage is applied to an inductive or capacitive component, it stores and releases energy in a cycle. The average power going into the component is equal to the average power going out of it over time. Power is exchanged back and forth between the AC voltage source and the inductor or capacitor, but none is dissipated or does any useful work. We call this reactive power. In the R=0 case, we can quantify our circuit’s reactive power by its peak value of ∣VS∣2/2X.
Figure 2:Electrical current and power waveforms for purely resistive, inductive, and capacitive loads.
But how do we quantify the power for a circuit with nonzero RandX? There are two components—power being dissipated, and power being exchanged. Firstly, the power dissipated by the resistive load is:
Applying the trigonometric identity cos2θ=(cos2θ+1)/2 gives us the following—the circuit’s active power—whose peak value (relative to pˉR) is VS2R/2(R2+X2). Note that even though this is only active power and is only dissipated by the resistor, it is affected by X in addition to R.
To the expression enclosed in square brackets, we now apply the trigonometric identity acos(x+θa)+bcos(x+θb)=ccos(x+θc), where c=a2+b2+2abcos(θa−θb) and θc=arctan[(asinθa+bsinθb)/(acosθa+bcosθb)].
Thus, reactive load’s power is the following—the circuit’s reactive power—whose peak value is VS2X/2(R2+X2). Note that even though this is only reactive power and is only exchanged by the reactive load, it is affected by R in addition to X.
The previous section informed us of the nuances of AC power, but the calculations were tedious. We ought to be able to determine the active and reactive power of a circuit—or of any of its components—more easily. Perhaps if AC voltage and current calculations are simplified by working in the phasor domain, then so would AC power calculations. If p(t)=v2(t)/R for a purely resistive circuit, then surely the equivalent for a circuit that includes reactive components would be P=VS2/Z? Let’s attempt to use this definition:
If we were to naively convert this phasor into the time domain as follows, we would find that it does not match Equation (3) for p(t) which we derived in the previous section. Firstly, because it oscillates around zero rather than around ∣VS∣2R/2(R2+X2). Secondly, because its amplitude is ∣VS∣2/R2+X2 rather than ∣VS∣2/2R2+X2. And thirdly, because it oscillates at natural frequency ω rather than 2ω. Clearly, this does not work—power cannot be represented by a phasor.
However, this does not necessarily mean that AC power cannot be quantified by a complex number or that complex numbers cannot somehow be used to simplify AC power calculations. Note that active and reactive power do not depend on θS. In Equation (11), if we were to treat θS as if it were zero, we could write:
Note how the real part, ∣VS∣2R/(R2+X2), and the imaginary part, ∣VS∣2X/(R2+X2), are two times the peak values of the circuit’s active and reactive power that we derived in the previous section. These are the peak-to-peak values of the active and reactive power. This means that we are en route to a way to use complex numbers to quantify AC power. In practice, it is not the entire expression ∣VS∣2R/(R2+X2)+j∣VS∣2X/(R2+X2) that we denote P, but just half of the real part ∣VS∣2R/2(R2+X2). We denote a negative half of the imaginary part −∣VS∣2X/2(R2+X2) by Q, and the expression as a whole by complex number S. Thus, S=P+jQ. S is what we call complex power.
rather than as VS2/Z, we can remove θS from our calculations and make them simpler. For example, for a circuit like that in Figure 1, we can calculate complex power S easily using only complex number division:
Clearly the 21 coefficients are tedious to work with. In practice, electrical engineers often work with the root mean square (RMS) values of voltage, VRMS=VS/2, and current, IRMS=I/2, such that the above complex power formulae become:
Looking at complex power in polar form, its magnitude ∣S∣ is what we call apparent power, and its angle ϕ=arctan(Q/P) is the same as the phase angle arctan(X/R) by which the current lags (or leads) the voltage. Table 1 summarizes the values taken on by P, Q, S, and ϕ for different types of load.
Table 1:Active power, reactive power, complex power, and phase angle of purely resistive, inductive, and capacitive loads.
In What is a Phasor?, we saw how a triangle could be used to depict a phasor (and thus any complex number) in the complex plane. Accordingly, complex power is often depicted as a power triangle (Figure 3), which aids in remembering the relationships between P, Q, S, and ϕ.
Even though power p(t) is a sinusoid, and a phasor rotating in the complex plane traces out a sinusoid, S is not a phasor and would not form p(t) if rotated about the origin. However, if S were rotated about P, it would correctly trace out p(t) as illustrated in Figure 4(a). Figure 4(b), (c), and (d) are for purely resistive, inductive, and capacitive loads and correspond to Figure 2(a), (b), and (c).
This section introduces the concept of the power factor. The power factor is a general concept in AC systems, but is particularly consequential for the electrical grid and its users. So, understanding why the concept of the power factor exists and its implications first requires a high-level understanding of the electrical grid. The electrical grid can be roughly modeled at a very high level by the circuit shown in Figure 5. Voltage source vS represents a generating station. The resistances of value Ri and the reactance X represent loads connected to the grid in parallel, from multiple grid users. Whereas the resistances of value Ri may represent loads such as light bulbs or laptops, X represents a reactive load, such as an inductive ballast in a fluorescent light, or a large industrial induction motor. Resistance r represents the resistance of transmission lines between the generating station and the grid loads. Note that liberties have been taken at every part of this model. In reality, grids are complex circuits with multiple generating stations and loads, all connected with a network of transmission and distribution lines. Generating stations cannot just be represented by voltage sources, and more accurate transmission line models incorporate reactances. Nonetheless, the circuit shown in Figure 5 is a sufficient model for the purposes of understanding the power factor.
Figure 5:A rough, high-level model of the electrical grid for the purposes of understanding the power factor.
Using the formulae for impedances in series and in parallel, the total impedance looking into the grid loads from the generating station is as follows. We can see that the presence of reactive load X reduces the magnitude of the impedance ∣Z∣.
Adapting Equation (3), the power p(t) from the generating station is as follows. The average and peak-to-peak values of p(t) are pˉ and ∣VS∣2/∣Z∣, respectively.
And adapting Equation (7), the power pr(t) dissipated by resistance r is as follows. The average and peak-to-peak values of pr(t) are pˉr and ∣VS∣2r/∣Z∣2, respectively.
If ∣Z∣ is reduced due to the presence of reactive load X, then this will increase the peak-to-peak value of p(t), the peak-to-peak value of pr(t), and the average value of pr(t). This has a number of consequences. Firstly, the generating station VS must be able to produce higher peak instantaneous power. Secondly, the transmission line r must be able to dissipate a higher average power without overheating. And thirdly, because the transmission line r is dissipating more power, its voltage drop is higher. Thus, the generating station must operate at higher voltage and power in order to maintain the same voltage and power for each connected load. Thus, reactive loads tend to incur higher infrastructure costs, in the form of higher-capacity generators and transmission lines, and higher operating costs. This extra demand on the grid would exist even if reactive load X were instead a resistive load—but, with a reactive load, the extra demand is unnecessary. With a reactive load, extra power is being transferred back and forth needlessly between the load and the generating station. Whenever the reactive load stores energy, the generating station must be providing it, and whenever the reactive load releases energy, the generating station must be absorbing it.
It would not be fair for the generating station or grid operator to pay for the higher infrastructure costs that reactive loads require, nor would it be fair for the generating station to pay for the higher operating costs. So, the cost of the extra demand on the grid is often passed onto the grid user who is responsible for it according to their power meter—for example, an industrial utility customer. This is done by having grid users’ power meters report the apparent power ∣S∣, rather than just the active power P, over time. Grid users can reduce their electricity costs, without reducing their active power usage, by reducing their reactive loads. This reduces their reactive power Q, which in turn reduces ∣S∣.
The ratio between P and ∣S∣ is what is known as the power factor (PF):
The power factor ranges from 0 for a purely reactive load to 1 for a purely resistive load. However, a negative power factor can arise when the “load” (the grid user) is actually supplying active power rather than consuming it. The power factor is described as lagging for a more inductive load with ϕ>0, or leading for a more capacitive load with ϕ<0. Because the power factor is the ratio between the adjacent side and hypotenuse of the power triangle, it can be reformulated as cosϕ.
Increasing the power factor reduces electricity costs. This can be done by choosing resistive loads over reactive loads where possible (e.g., LEDs over fluorescent lights), by implementing power factor correction (PFC), or by choosing loads that have power factor correction built-in. Implementing power factor correction is important when installing loads that necessarily have a low power factor (such as an induction motor) or when a grid user seeks to reduce the costs incurred by low-power-factor loads that they already have and want to keep using (such as fluorescent lights).
Most loads with a low power factor are inductive. Because of this, their lagging power factor (inductive reactance) can be counteracted using loads with a leading power factor—such as synchronous motors, or large banks of capacitors whose sole purpose is to do power factor correction. The reactive power exchanged by a capacitor is exactly 180∘ out-of-phase with an inductive load, meaning that when the the inductive load stores energy, the capacitor discharges to provide that energy, and when the inductive load releases energy, the capacitor charges to absorb that energy. The required capacitance C can be calculated such that the power exchanged by the capacitor is exactly opposite to that exchanged by the inductive load. This can be done by calculating what value of C sets the total reactance to zero. Let the impedance of the inductive load be Re(ZL)+jIm(ZL) rather than just ωL to account for the fact that its equivalent circuit likely includes resistances. The capacitor can be placed in series or in parallel with the inductive load, but if in parallel, the power-factor-corrective capacitors do not need to be co-located with a facility’s inductive loads.
For a capacitor C in series with inductive load ZL:
The capacitor is taking the place of the generating station in terms of providing and absorbing the extra energy that the inductive load must store and release. But, because this extra energy no longer needs to be transmitted over long distances to and from a generating station, the infrastructure and other costs are reduced and no longer passed on to the grid user. The grid users with the highest cost savings from power factor correction are industrial plants with many, large induction motors. Residential utility customers are usually not metered or charged for their reactive power, and so would not typically benefit from power factor correction. There do exist small capacitive devices that plug directly into wall outlets and supposedly do power factor correction for residents, but they would save nothing for most residential utility customers—that is, if they do any power factor correction at all.