EE 217 - Smarter Electric Energy Systems (i.e., Smart Grid) Section 1: The Electromechanical Grid Paul Hines September 16, 2015 1 Introduction See slides. 1.1 What is “Smart Grid” • My working definition, “Using information technology to make electricity work better: cleaner, more cost efficient, and more reliable.” – IT broadly defined — anything that requires a semi-conductor – Policy is also an essential component • According to DOE (smartgrid.gov): “What makes the grid smart? In short, the digital technology that allows for two-way communication between the utility and its customers, and the sensing along the transmission lines is what makes the grid smart. Like the Internet, the Smart Grid will consist of controls, computers, automation, and new technologies and equipment working together, but in this case, these technologies will work with the electrical grid to respond digitally to our quickly changing electric demand. - See more at: http://www.smartgrid.gov/” 1.1.1 Benefits of Smart Grid From smartgrid.gov: • More efficient transmission of electricity • Quicker restoration of electricity after power disturbances • Reduced operations and management costs for utilities, and ultimately lower power costs for consumers • Reduced peak demand, which will also help lower electricity rates 1 • Increased integration of large-scale renewable energy systems • Better integration of customer-owner power generation systems, including renewable energy systems • Improved security 2 History [See the slides] 3 Power Grid physics 3.1 Energy and power • Energy is work (either the potential to do work, or a quantity of work done) E = Fd • Power is the time rate of change in work. The flow rate of energy dE ˆdt P = t E = P (t)dt −∞ • Example. – My 15 lb weight. If I lift the weight 1 meter I do work: E = mgh = (6.8kg)(9.8m/s2 )(1m) = 67N m = 67J – Note that the standard units used for measuring electricity are the (k,M,G) WattHour. When you have several things turned on at home, your home uses about 1kW. – If it takes me 0.5 s to lift it, the average power is: ∆E 67 J = = 130 = 130W ∆t 0.5 s – For comparison purposes, “Dr. Alejandro Lucía, Universidad Europea de Madrid, Spain, has predicted that Lance Armstrong on his ascent of the Alpe D’Huez (a 14 km climb of 8% mean gradient) in the 2001 Tour de France produced one of the greatest performances in the history of cycling: 38 minutes of near-maximal to maximal effort at an estimated mean power output as high as 475-500 watts!” 2 ∗ Source: http://education.polarusa.com/consumer/powerkit/Article2.asp – Note that I am not reporting 12 digits, even though my calculator gives them, and that I’ve reported units. Significant figures and units are important. If you give me more than 2+ more/less significant digits than is warranted, you will likely lose points. • Note that it is easy to get energy and power confused when we are talking about the power grid. – When we talk about the capacity of a power plant we use the units of power (typically MW, or kW for a home system) – When we talk about the energy produced by a power plant we use the units of energy (typically MWh for wholesale and kWh for retail) 3.2 Charge, voltage, current, resistance and power • Charge is the number of non-matched electrons or “holes” in an object. The unit of charge is the Coulomb: – 1C = 6.022 × 1023 elementary charges • Moving two opposite charges closer or further requires force over a distance (energy). Therefore, a pair of charges has energy. • Voltage is the energy density in a charge dE dq V = Sometimes we use the symbol E for voltages; sometimes V . Each Coulomb of charge in a 9 V battery has a potential energy difference of 9 J. • Current is the flow rate of charge, in C/s=Ampere. dq dt I= • A typical 9V battery has about 500 milli-Amp-hours of capacity. Find the amount of charge and energy in the battery: – Charge: 500Ah 3600s = 1800C 1 1h – Energy: ˆ E= 1800C V dq 0 if V is constant for each unit of charge (which is not the case) then E = V Q = 9(1800C) = 16kJ 3 • Resistance is the extent to which a particular object (like a wire) resists the flow of charge between a source and a sink. R= V I – The greater the resistance, the lesser the current. – This relationship between Voltage/Current/Resistance is known as Ohm’s law. • Conductance is the inverse of resistance: G= I V • Electrical power is the product of voltage and current, which may both change with time. p(t) = v(t)i(t) (1) • We can combine Ohm’s law and (1) to get: P = V2 = I 2R R The P = I 2 R is particularly important in power systems calculations when computing the losses in (for example) a transmission line. The implication is that if we double the power flowing through a line, the losses go up by a factor of four. 3.3 KCL/KVL Kirchhoff’s Voltage Law and Kirchhoff’s Current Law are both ways of saying that energy (or power at an instant of time) cannot be created or destroyed (as long as we are not converting between mass and energy; i.e., in Nuclear power). • KCL says that the currents coming into (or going out of) a node must sum to zero. Since currents carry power and all currents at a node have the same voltage, this is the same as saying that the power coming in is equal to the power going out. n X b=1 4 Iba = 0 • KVL says that voltages going around any loop in an electrical circuit must sum to zero (because if we added or subtracted energy by traveling around the loop, we would violate conservation of mass-energy). n X Vk = 0 k=1 – KVL is analogous to saying that “what goes up, must come down.” If we trace the path of a baseball through the course of a game, for example, the total amount of energy gained/lost by going up and down must be zero. • KVL, KCL and Ohm’s law together give power grids unique properties that make flows within a power grid quite a bit different from flows in a, for example a traffic network. For example, we can route a package through a traffic network. However, electricity flows from a power plant to a factory over every path in the system, in inverse proportion to the resistance along each path. • Compare cars choosing between two routes between A and B. A takes 1 hour, B takes 2 hours. What fraction of cars will take route A, B? • Now consider consider two wires, one has a resistance of 1Ω the other 2Ω. How will the current travel? 3.4 Transformer A standard transformer is created by wrapping two coils of wire around a common magnetic (iron) core. The current in one wire causes a magnetic field in the core. If the current/field is changing, it causes a voltage on the other coil. In this way, we can move power from one side of the coil to the other. Voltages and currents (assuming they are sinusoidal) transmit across the transformer according to V2 V1 = N1 N2 and I1 N1 = I2 N2 Which laws are involved? 5 3.5 A DC motor A DC motor works by creating a magnetic field in one direction, and then passing coil of wire with current through that field. A Lorentz force pushes the coil around in one direction. As long as we can switch the direction of the current (using a commutator) every half cycle, the Lorentz force continues to push the wire in the same direction. To build a strong DC motor, you need many coils spaced around the rotor. The following animation below from Wikipedia is useful: http://en.wikipedia.org/wiki/File:Ejs_Open_Source_Direct_Current_Electrical_Motor_Model_Jav 3.5.1 Ohm’s law and Pearl Street Station • Located at 255-257 Pearl Street in Manhattan • Started generating electricity on September 4, 1882, serving an initial load of 400 lamps at 85 customers • By 1884, Pearl Street Station was serving 508 customers with 10,164 lamps. 3.5.2 Example problem Let’s say that there are 100 homes connected to Pearl Street Station, with 1kW of light at each home. Let’s say that the round-trip resistance in the cables is (on average) 0.1 Ω (a very small resistance). Assume that the voltage at the lamps are at 110VDC (the voltage at which Edison’s lamps produced about the same light produced by the gas lamps of the day). 1. How much power is delivered to the lights? Plamps = 100 · 1kW = 100kW 2. How much current is in the cable? I = P/V = 100kW = 909A 110V 3. How much power is lost in the cable? Ploss = I 2 R = 83kW Wow, it took 183 kW to power 100kW to the lights! 4. If we could only increase the voltage and decrease the current, we could save a ton of energy. 6 3.6 3.6.1 Alternating current systems A 1-phase AC generator Consider a magnet rotating through a coil of wire. The magnet produces a changing magnetic field which has flux that is roughly: φ(t) = φmax sin(ωt) This flux is opposite on either end of the wire. By Faraday’s law, the flux produces an electric field according to: v(t) = −N dφ = −N φmax ω cos(ωt) dt By Ohm’s law: i(t) = v(t)/R −N φmax ω = cos(ωt) R In other words, we now have a sinusoidal (AC) generator. Since we can just rotate our reference angle by 180 degrees, we can ignore the negative sign, and just think about the electrical side of this system: v(t) = Vmax cos(ωt) Imax cos(ωt) i(t) = R At this point we have shown that we can produce oscillating currents. In our discussion about transformers, we (hopefully) proved to ourselves that we can use them in combination with transformers to make our system more efficient. 3.6.2 Current in a resistor circuit i(t) = v(t)/R = 7 Vmax cos ωt R 3.6.3 Current in an inductor circuit Let’s start with a sinusoidal voltage with the form: v(t) = Vmax cos(ωt), and find the current in an inductor connected to this source. v(t) = L di(t) = Vmax cos(ωt) dt ˆ Vmax cos ωtdt L Vmax sin ωt = ωL Vmax = cos(ωt − π/2) ωL Note that I ignored the constant-which is irrelevant as long as we integrate over a whole number of cycles. The inductor had the effect of delaying the current by 90 degrees. In phasor form we write this current as Vmax −jπ/2 Vmax I= e = ∠ − 90◦ ωL ωL i(t) = 3.6.4 Current in a capacitor circuit The relationship between current and voltage is: v(t) = Vmax cos(ωt) dv(t) i(t) = C dt = −ωCVmax sin ωt = ωCVmax cos(ωt + π/2) in this case the current was advanced by 90 degrees, relative to the voltage. This is a general property of capacitors, the current tends to build up before the voltage does. 3.6.5 Phase shift An arbitrary voltage and current can be written as: v(t) = Vmax cos(ωt + θV ) i(t) = Imax cos(ωt + θI ) If we consider θ = θV − θI , and θV = 0, we get the common expression for the current through a load, with θ equal to the power factor angle. i(t) = Imax cos(ωt − θ) θ represents the phase shift between the voltage and the current. Positive θ indicate lagging currents. Negative θ indicate leading currents. 8 3.6.6 RMS voltage When we want to measure a signal it is frequently useful to take the average magnitude of the signal. Ideally we would find an average that gave us the same amount of power, when applied to a resistor, as in a DC circuit. In other words, we’d like an average that gives us: P =VI or something similar. The particular average that solves this problem is called the RMS voltage. For a signal x(t), the RMS value (xrms ) is: s ˆ 1 T 2 x (t)dt xrms = T 0 For a sinusoidal voltage signal: s ˆ 1/f 2 sin2 (ωt)dt f Vmax 0 s ˆ 2π/ω ω 2 sin2 (ωt)dt = Vmax 2π 0 Vrms = Since 1 sin2 (u) = (1 − cos 2u) 2 we get: s Vrms = Vmax ω 4π ˆ 2π/ω (1 − cos 2ωt)dt 0 s = = = = 3.6.7 2π/ω ω 1 Vmax t− sin(2ωt) 4π 2ω 0 s ω 2π 1 Vmax − (sin(4π) − sin(0)) 4π ω 2ω r 1 Vmax 2 Vmax √ 2 Instantaneous power p(t) = i(t)v(t) p(t) = (Vmax sin ωt)(Imax sin(ωt − θ) = 9 Vmax Imax (cos θ − cos(2ωt − θ)) 2 = Vrms Irms (cos θ − cos(2ωt − θ)) we can also do this with cosines, which gives the following similar result: p(t) = i(t)v(t) p(t) = (Vmax cos ωt)(Imax cos(ωt − θ) = Vmax Imax (cos θ + cos(2ωt − θ)) 2 = Vrms Irms (cos θ + cos(2ωt − θ)) The derivation of these depends on solving the following: sin(ωt − θ) = sin ωt sin(ωt − θ) = = sin2 ωt = sin ωt cos ωt = sin2 ωt cos θ − sin ωt cos ωt sin θ = p(t) = = = sin ωt sin(ωt − θ) sin ωt cos θ − cos ωt sin θ sin ωt(sin ωt cos θ − cos ωt sin θ) sin2 ωt cos θ − sin ωt cos ωt sin θ 1 (1 − cos 2ωt) 2 1 sin 2ωt 2 1 (cos θ(1 − cos 2ωt) − sin θ sin 2ωt) 2 Vrms Irms (cos θ(1 − cos 2ωt) − sin θ sin 2ωt) Vrms Irms (cos θ − cos θ cos 2ωt − sin θ sin 2ωt) Vrms Irms (cos θ − cos(2ωt − θ)) The last equation is interesting because it allows us to define two quantities P = V I cos θ and Q = V I sin θ. Let’s call the first active (i.e., real) power, and the other reactive power. 3.6.8 Phasors and complex numbers A complex number, like an impedance, can be written in rectangular or polar form: √ −1 X Z = R + jX = |Z|(sin θ + j cos θ) = |Z|ejθZ = R2 + X 2 ej tan R = |Z|∠θZ In rectangular form it is easy to add, subtract complex values. In rectangular form we can multiply: AB = |A||B|∠θA + θB or divide 3.6.9 A |A| = ∠θA − θB B |B| Impedance of a passive component Z= V (jω) I 10 3.6.10 Impedance of a resistor ZR = R + j0 3.6.11 Impedance of a capacitor dvc (t) dt C(V s) 1 V = I jωC 1 0−j ωC 1 − ωC ic (t) = C I = Zc = ZC = XC = 3.6.12 Impedance of an inductor diL (t) dt = L(Is) V jωL = I vL (t) = L V ZL 3.6.13 Series and parallel impedances Two impedances in series can be simply added: Zs = Z1 + Z2 Two impedances in parallel can be combined as is done with parallel resistors: 1 Zp = 1 + Z12 Z1 3.6.14 From time domain complex domain Given a voltage signal V = |V |∠θV we can calculate the phase angle of the current by calculating the phase angle of the impedance: θZ = ∠Z V |V |∠θV |V | = = ∠(θV − θZ ) Z |Z|∠θZ |Z| If we let θV = 0 we get θI = 0 − θZ . If we define θ = θV − θI = −θI , we can convert back to complex domain via: √ |V | 2 i(t) = sin(ωt − θ) |Z| I= 11 3.6.15 Complex power The complex power being injected into a circuit is represented by: S = V I ∗ = P + jQ = |V ||I| cos θ + j|V ||I| sin θ 3.6.16 Active power P = <(S) is known as the active power. Active (sometimes known as average or real) power is the power that actually produces mechanical work. 3.6.17 Reactive power Q = =(S) is known as reactive power. It is a measure of the phase shift between the voltage and current. Because many loads (particularly power supplies and induction motors) naturally shift voltages and currents, reactive power is required to keep power systems stable. 3.6.18 Apparent power p |S| = P 2 + Q2 = |V ||I| is the apparent power. Power equipment is usually rated by its apparent power |S| and voltage |V |. Physically, a component (such as a transformer) is typically limited by the heat it can withstand, which is proportional to |I|2 , and the maximum voltage that the insulation can withstand. Rating equipment by |S| and |V | essentially gives us a limit on |I|. 3.6.19 Power factor The power factor is: PF = P R P = = = cos(θV − θI ) = cos θZ |V ||I| |S| |Z| Usually power factor is refereed to as “leading” or “lagging” indicating whether the current leads (θI > θV ) or lags (θI < θV ) the voltage. • θZ > 0: lagging (most load, particularly motor, circuits are lagging) • θZ < 0: leading (capacitive circuits are leading) The figure below illustrates leading and lagging power. 3.7 Basic intro to an AC generator • Go back to the single-phase generator. • Review the method for producing a rotating magnetic field. • Stick a magnet inside—now we’ve got a three phase motor/generator. 12 • The swing equation governs the rotation of the generator. When the power in and the power out are in balance, the speed of the generator does not change. Pm = Pe (δ) + Dω + M dω dt We’ll talk about the electrical power part of this soon. 3.8 Three-phase In this course we will assume that all three phases are balanced. If so Va = |Van |∠0 Vb = |Van |∠120 Vc = |Van |∠ − 120 The voltage between a conductor and neutral is called the phase voltage—and it is rarely used. Because I’m lazy, I’ll drop the n. If we connect them to resistors (or any other balanced load), the currents will cancel on the return cable. Another (more common) way to measure voltage is to look at the voltage between two of the phases. √ Vab = V˜a ( 3∠30) You can semi-prove this to yourself by drawing the geometry. 3.8.1 Three-phase power The average power going through something (like a load) Pa = |Va ||Ia | cos θ where Va and Ia are the voltage across and the current through the object. The other three average powers are similar. Therefore total power is: P3 = 3|Va ||Ia | cos θ We can also use the relationship between phase (between 1 phase and the neutral) and line (between two different phases/lines) voltages to get √ P3 = 3|Vab ||Ia | cos θ The reactive power is similar Qa = |Va ||Ia | sin θ √ Q3 = 3|Vab ||Ia | sin θ • Using three-phase currents allows us to move more power, with less losses, and only a small amount of additional infrastructure (3 wires and a neutral, rather than 2 and a neutral). 13 4 Power flow analysis Now, we would like to begin to think about power flowing through a network. To do so we need a few preliminaries. 4.1 Transmission line model Before we can think about power flow we need a transmission line model. Below is the model that we will use: which is commonly known as the pi model. 4.2 Power flow Consider a node (“bus” in power systems terminology) f that is connected to node t via a transmission line, which has series resistance rf t and reactance xf t = ωlf t , where ω is the frequency of the sinusoidal current and lf t is the series inductance of the line. We will neglect the shunt charging elements jB/2 in the π model. r and x can be combined to form a complex√impedance zf t = rf t + jxf t , in which (by electrical engineering notational tradition) j = −1. The inverse of this impedance is known as an “admittance,” and is defined as follows: 1/zf t = yf t = gf t + jbf t , where g and b are known, respectively, as the conductance and susceptance of the line. The sinusoidal voltages at nodes f and t will each have an amplitude (V ) and a phase shift (θ, relative to some reference), and can thus be represented with complex numbers Ṽf = Vf ejθf and Ṽt = Vt ejθt . With these definitions, we can define the complex current I˜ and power S̃ flowing out from f to t as: I˜f t = yf t (Ṽf − Ṽt ) S̃f t = Ṽf If∗t = Ṽf (Ṽf∗ (2) − Ṽt∗ )yf∗t (3) where x∗ indicates the complex conjugate of x. With some manipulation of eqs. (2) and (3), we can find the active (P ) and reactive (Q) power flowing from f to t as follows: Pf t = Vf2 gf t − Vf Vt (gf t cos θf t + bf t sin θf t ) (4) Qf t = −Vf2 bf t − Vf Vt (gf t sin θf t − bf t cos θf t ) (5) where θf t = θf − θt is the phase angle difference between f and t. If we assume that the voltage amplitudes Vf and Vt are at their nominal levels, that we have normalized yf t such that this nominal level is 1.0 (common practice), and that the resistance rf t is small (nearly 14 zero) relative to the reactance xf t (a reasonable assumption for bulk power systems), then gf t ∼ = 0, and Pf t becomes: 1 Pf t ∼ sin θf t = −bf t sin θf t = xf t (6) If we assume that θf t is small, then sin θf t ∼ = θf t and we get: 1 θf t Pf t ∼ = xf t (7) If we furthermore assume that Qf t = 0 (not a particularly good assumption), then the current magnitude and the power are equal, |If t | = Pf t , and we can use eq. (7) to roughly simulate power flows in a power system. In order to solve for the flows Pf t in simulation, we put eq. (7) into matrix form as follows. Let A denote the line-to-node incidence matrix with 1 and -1 in each row indicating the endpoints of each line, θ be the vector of voltage phase angles, be a diagonal matrix of line reactances, and Pflow be a vector of active power flows along transmission lines. Then, we can solve for the vector of power flows Pflow given that we know the vector of voltage phase angles θ as shown in the following: A> θ = XPflow Pflow = X−1 A> θ (8) (9) In order to solve for θ, we use information about the sources (generators) and sinks (loads) to build a vector of net injected powers (generation minus load), P. Given P, we can solve the following to find θ: P = APflow = AX−1 A> θ = Bθ (10) The matrix B is known as the bus susceptance matrix, and has the properties of a weighted graph Laplacian matrix describing the network of transmission lines, where the link weights are the susceptances bf t = 1/xf t . 5 5.1 Bonus physics material Some very basic electromagnetic principles At this point, we want to actually generate some power. However, in order to do so we will need some rules for electromagnetics. 5.1.1 Ampère’s circuital law If you have ever built an electromagnet, you are familiar with Ampere’s circuital law. In simple form, ACL says that if you travel a circle around a wire the sum total of the magnetic flux around the wire is proportional to the current. In other words, currents make circular magnetic fields. The stronger the current, the stronger the circular magnetic fields. 15 If you wrap a wire around a nail we can increase the strength of the magnetic field, since each turn adds more magnetic flux, and because iron amplifies magnetic fields by a factor of about 1000. 5.1.2 Faraday’s law of induction Faraday’s law of induction says that changing magnetic fields produce voltages (which, by Ohm’s law, create currents). dΦB E = −N dt This means that all magnetic fields (radio-waves, for examples) create voltages, and thereby currents. This is the reason that we have to turn off our cell phones and laptops during takeoff and landing on an airplane. The initial exchange of data between a phone and a tower when a call is incoming can involve substantial electromagnetic fields (though it is much less with newer phones). In theory this could interrupt communications systems, which are critical during takeoff and landing. One of the interesting implications of Faraday’s law is that a large, slowly changing magnetic field create large currents. A solar flare is one source of a very large, slowly changing magnetic field. 5.1.3 Lorentz force A charge q moving through a wire with velocity v through a magnetic field with flux density B, and with an electric field E, will experience a force. A somewhat more relevant form of Lorentz’ force equation is that of a current traveling through a wire, which is in a magnetic field. F = Il × B where l is the length of the wire, I is the current, and B is the magnetic field. Ignoring direction (since we will work hard to build stuff with right angles), we can more simply say: F = Bli(t) since i will change with time, once we start working with sinusoidal currents. 5.2 Per phase analysis If you have a circuit and you want to do three-phase analysis on it, the easiest way to study it (if all three phases are balanced) is to solve everything for the a-phase circuit, and then obtain the other two phase quantities from the assumption that things are balanced. 16 5.3 Per unit normalization Back in the days when computers didn’t do a good job of handling floating point values that differ by several orders of magnitude, it was helpful to normalize all of the quantities such that 1.0 represented a normal value, in some sense. Each of the quantities in per unit follows the following rule: x xpu = xB where xpu is the per unit (normalized value) and xB is the base value for this quantity. To do this normalization we do the following: 1. Choose a system MVA (or kVA) base (SB ). For transmission systems 100 MVA is a typical value. (a) Having done so a 50 MW power plant is producing 0.5 pu of power. 2. Choose a base voltage (VB ) for each section of the network. For example choose 500kV (line voltage) for the 500kV portion of the network. 3. Find base voltages for other portions of the network, by going through transformers, and using the relationship: V2 V1 = N1 N2 4. Find the current base for each portion of the network using VB IB = SB 5. Find the impedance base for each portion using ZB = V2 VB = B IB SB The other nice thing about using per unit quantities is that they allow us to largely ignore the transformers, as long as the transformers are “normal”. A final note about per unit quantities. If you do per unit analysis on the a-phase of a system, you can quickly translate the result to line-voltage quantities, just by multiplying by the line voltage base: Van = Vpu VB -line Vab = Vpu VB -phase where the line and phase voltage base values differ by 17 √ 3. 5.4 The Ybus matrix In order to study a system with many transmission lines of the sort drawn above, we will need to work in linear algebra mode. While acknowledging that some in this class may not have linear algebra, I’ll outline the ideas anyway. Let I be a complex vector of currents injected/extracted by loads/generators. If Ii = 0 that means that there are no loads/generators at this bus. Let V be a complex vector of voltages at each bus in the system. Let YBU S be a matrix that gives the equivalent of the inverted resistance (conductance) of the system as a whole. Assuming that such a matrix exists, we can do I = YBU S V to get the currents, if we have the voltages, or −1 V = YBU SI to get the voltages if we have the currents. Note that this matrix is called the system admittance matrix (or just the Y-bus matrix). Details on how to build the Ybus are out-of-scope for us, but available online. For now suffice it to say we build the Ybus to represent transmission lines, which have the pi model shown above. If you have the line series impedances (zik for each pair of connected buses) and you neglect the capacitance, then: P • on-diagonal elements are zik • off-diagonal elements are −zik 18