EA3: Systems Dynamics Electrical Systems VIII. SYSTEMS DYNAMICS – Electrical Domain Let us now delve into some simple electrical systems. Once again, we will adopt a systems approach here and infer a lot about the behavior of electrical systems by analogy with their counterparts in the mechanics domain. VIII.1 Electrical Systems Basics VIII.1.1 Dynamic Variables: The physical entities of interest in the electrical domain are charge, current, and voltage. While a complete physical understanding of these concepts must be deferred to another course (PhysA35-2, or other courses on electromagnetism), I will attempt to briefly highlight some of the essential concepts here. Charge: The building blocks of matter (elementary particles) have a property associated with them called electric charge, symbolically denoted by q. At one level of understanding, charge can be thought of as an analog of another property of elementary particles -- mass.† Matter is discrete (quantized) and therefore the mass of any measured amount of matter must be some multiple of the masses of all the elementary particles making up that amount of matter. When we are concerned with things at the atomic scale, it makes sense to consider the unit of mass to be the mass of an electron at rest: me. The mass of a proton is 1836.15me, and that of a neutron is 1836.68me. However, when large amounts of matter are under consideration, it is simpler to consider matter as being continuous and to use a better known (and larger) unit of mass, the kilogram. (Note: 1me = 9.11x10-31kg.) This is what we have been doing all along. Analogous to mass, charges in nature are also quantized; that is, they occur only in discrete multiples of the elementary charge, which is denoted by e. However, unlike mass, charges come in two types: positive or negative. The charge of an electron is labeled negative and the charge of a proton is labeled positive. Some elementary particles such as the neutron are neutral with no charge. Once again, when large amounts of charges are considered, it makes sense to ignore the fact that they come only in discrete multiples, and to use a larger unit of charge, the Coulomb (C). The charge of an electron is –e; the charge of a proton is +e, where e=1.60x10-19C. In nature, positive and negative charges are found in great abundance, but they are almost always perfectly † This is not the primary analogy that we will use in this course. But it is important to realize that different analogies can be drawn between different physical entities depending on the context. The purpose of an analogy (or ‘similarity’ to use the standard terminology) is to leverage our understanding of one aspect of nature to another area where we observe similar phenomena. Sridhar Krishnaswamy 1 EA3: Systems Dynamics Electrical Systems balanced against each other so that the net charge of any macro-object is usually zero. Of course, we (or nature) can at times do something to disturb this charge balance, and that is when interesting things happen! There are a couple of parallels between charge and mass. (a) Charges are conserved (just like mass is conserved, …well at least ‘mass-energy’). (b) Between two charged bodies that are held stationary, there is an electrostatic force exerted by each on the other which is given by Coulomb’s law: F= 1 4 o q1q2 2 . r r r { (8.1) unit vector where qi are the charges of the two particles, r is the vectorial distance between them, and -12 2 2 o = 8.85x10 C /N.m is called the permittivity constant. Note how Coulomb’s law is similar to Newton’s law of gravitational attraction between two bodies. The electrostatic force and the gravitational force vary as the inverse square of the distance between the two bodies, they are both proportional to the product of charges or masses respectively of the two bodies, and they act along the radial line joining the two particles. There is one noteworthy difference however: the electrostatic force can be attractive (for unlike charges) or repulsive (for like charges). Gravitational force, on the other hand, is always attractive since there are no negative masses in nature. For a complete physical understanding of electromagnetic phenomena, one needs to continue along these lines to define the electric field E, from which one can infer quantities such as the electric potential and so on. Then as one considers charges that are allowed to move, one would be led to the concepts of electric current. The phenomena of magnetism would then have to be considered as one delves into time-varying currents et cetera. The whole edifice of electromagnetic theory will then gradually fall into place. That, however, is a story for another time and place (Phys A35-2 and elsewhere), and you should listen to that story very, very carefully, as it is one of the most fascinating success stories in scientific understanding of nature. Here however, we need to take the analogy route, and we will see that we can go quite far in understanding (and designing) electrical systems using this approach. The analogy that I will draw upon here is the one between electric charge and mechanical displacement (or angle of twist, for rotational systems). You will see how this works shortly. Sridhar Krishnaswamy 2 EA3: Systems Dynamics Electrical Systems Current: Current is a quantity defined to characterize the flow of electric charges through any part of our electrical system (such as in wires or other elements of this domain). Current is defined as the rate of flow of charge across any cross-section: dq (8.2) i= . dt The unit of current is the ampere (or amp, A) which is the flow of one Coulomb of charge in unit time. Current is a flow variable because it characterizes the flow of something (charges). The mechanical analog of current is velocity in the translational mechanics domain, or angular velocity in the rotational domain. Voltage: Now what causes charges to flow, ie what causes a current in our system? That would be some kind of an “effort” variable, which is characterized by the electric potential or voltage. Voltage is analogous to force in the translational mechanics domain (or torque in the rotational domain). It turns out that positive charges would like to flow from a point of higher potential to one that is lower. It is thus the potential difference (or voltage difference) between two points which is important. It is usual to prescribe the voltage at various points in an electrical circuit with respect to some common ground, which all of us agree would be our reference level. (We have done something similar to this when we looked into gravitational potential energy, as you should recall.) The unit of voltage is the volt (V). The symbol for the potential difference between any two points is also V. If there is a potential difference V between two points in an electrical circuit, then if possible an electric current will ensue. The direction of current flow will be taken to be from the point of higher potential to the point of lower potential.* When we plug in an electrical device (say a computer) to a wall outlet and switch it on, we make it possible for a current to flow from the point of higher potential (the “hot” line of our wall outlet) through the components that make up our device to the point of low potential (the “ground” line of our wall outlet). * That is, we assume that the charges that flow are positive charges, even though in most conductors it is electrons that flow (in the opposite direction). With a few exceptions, a flow of positive charges in one direction is equivalent to the flow of negative charges in the opposite direction as far as the overall system behavior is concerned. Sridhar Krishnaswamy 3 EA3: Systems Dynamics Electrical Systems Let us now collect the dynamic variables of the electrical domain: Dynamic Variable Charge Symbol (units) q (C) Current i (A) Voltage V (V) Mechanical Analogs Displacement Angle of twist Velocity Angular velocity Force Torque Type flow flow effort Power: Since charges exert forces on each other, work is done in moving electric charges from one location to another. The resulting rate of work or power through any circuit element can by analogy be expressed as: Power = (force analog)*(velocity analog) P = Vi (8.3) The unit of power is the Watt (which is the same as joule/sec). Similar to the energy storing or power-dissipating behavior of mechanical elements, there are electrical circuit elements that can store energy or dissipate it. VIII.1.2 Circuit Elements: When the two ends of an electrical component are somehow put at different potentials, an electrical current ensues. Alternately, if there is an electrical current flow ‘i’ through an electrical element, then there must be a potential drop ‘V’ across the two ends of the element. What makes electrical systems interesting is that different elements exhibit different q vs V or i vs V behavior. Capacitors: The energy-storing element, which is the electrical analog to a spring element, is the capacitor. The defining property of a capacitor element is that it relates the voltage across it to the charge across it. VC = 1 q C C (8.4) where C is the capacitance of the capacitor. Capacitance is measured in farads (more typically in micro- or pico-farads). Note the parallel between a spring, which relates a Sridhar Krishnaswamy 4 EA3: Systems Dynamics Electrical Systems force to the relative displacement (stretch). Unfortunately, capacitance is defined somewhat differently from the spring constant (recall: fsp = K rsp), and therefore the analog of the spring constant K is 1/C. The symbol for a capacitor is: C + i Figure 8.1: Capacitor element Physically, a capacitor is made of two conductive plates separated by an insulating dielectric such as air. Sometimes, the two conducting plates are rolled into sheets with a flexible dielectric sheet of mylar between them. Here are a couple of real life capacitors: Figure 8.2: Some capacitors (courtesy EA3 hyperbook) When a potential difference is applied across a capacitor, negative charges accumulate on one side of the plate, exactly balanced by a positive charge distribution on the other. Work is done by whatever exerts the potential difference in moving these electric charges around. Where does this work go? Is it dissipated? No, because if we remove the externally applied potential difference across the capacitor, it is possible to get these charges to move back yielding energy back . Actually, an electric field is set up Sridhar Krishnaswamy 5 EA3: Systems Dynamics Electrical Systems between the two plates because of the charge distribution on them, and it is in this electric field that a capacitor stores energy analogous to a spring storing energy. What is the energy stored in a capacitor? For a linear spring, the potential energy stored was one-half spring constant times the square of the stretch. By analogy, the energy stored in a capacitor is: analogy: potential energy stored = (one-half) (spring-constant ) (stretch) 2 1 2 q 2C C 1 = CVC2 2 ΦC = (8.5) (Note: K ßà1/C) Resistors: The energy-dissipating element of the electrical domain is the resistor, analogous to the damper. The defining characteristic of the resistor is that the voltage across it is proportional to the current (or rate of charge flow) through it: VR = R dqR = RiR dt (8.6) where the proportionality constant R is the called the resistance of the element. The unit of resistance is the Ohm (Ω). Note that the analog of resistance R is the damping coefficient CD (Do not confuse this with capacitance C. We really do need a lot more symbols to avoid repetition, but then I will have to draw upon not only Latin and Greek but also Chinese or Hindi! Let us stick with re-using symbols; the domain should make it clear what we are referring to.) The symbol for a resistor element is: R + i Figure 8.3: Resistor element Physically, a resistor is a piece of carbon or some other low conductive material which offers resistance to the flow of charges. Here are a few real life resistors. Sridhar Krishnaswamy 6 EA3: Systems Dynamics Electrical Systems Figure 8.4: Some resistors (courtesy EA3 hyperbook) The work done in moving electric charges through a resistive element is not stored, but is lost as heat. The power dissipated through a resistor is given by analogy to be: analogy: Power dissipated in damper =(damping coefficient)(velocity) 2 P = Ri 2 (8.7) Quite a bit of heat can be generated by current flow through a resistor. Inductors: The electrical analog to the mechanical inertial elements (masses and rotary inertias) is the inductor. The defining property of an inductor is that it relates the voltage across it to the rate of change of current: VL = L diL dt (8.8) where L is called the inductance (measured in henrys) of the inductor. Note the mechanical analog where the force acting on an inertial element was related to the mass times the rate of change of velocity. Note that when there is a steady current through an inductor, the potential drop across it is zero. The inductor only plays a role in trying to “oppose” any change in current, much like mechanical inertia that “resists” change in velocity of a body. Sridhar Krishnaswamy 7 EA3: Systems Dynamics Electrical Systems The symbol for an inductor is: L - + i Figure 8.5: An inductor element Physically, an inductor is just a loop of a conducting wire looped typically over a ferromagnetic core. Figure 8.6: Some inductors (courtesy EA3 hyperbook) The reason why an inductor acts like an electrical inertia has to do with the fact that changing currents induce a varying magnetic field and vice versa. Analogous to mechanical inertial elements, inductors store “kinetic” energy (actually this energy is stored in the magnetic field created). analogy: kinetic energy = one-half mass time velocity squared ΦL = 1 2 Li 2 L Sridhar Krishnaswamy (8.9) 8 EA3: Systems Dynamics Electrical Systems Miscellaneous things you will see in electrical circuits: Complex electrical circuits are made up of several elements. We have seen three of these thus far, and they are all passive devices in that they do not contain energy sources inside them. Really interesting electronic devices have, in addition to the passive elements listed above, signal sources (such as batteries) as well as active devices such as amplifiers. Also, most electrical circuits are complex networks of circuit elements. In order to analyze such circuits, it is essential to isolate parts of the circuit (think of it as the equivalent of a free-body diagram in mechanics, even though this analogy does not really hold well) and to analyze each of the parts separately. Often, we will assume that these parts are buffered from each other in that the presence of other parts will not significantly draw current from or otherwise alter the behavior of the part under consideration. For instance, here is a simple tuning circuit that enables your radio to receive a radio station: ground Figure 8.7: A tuning circuit (courtesy EA3 hyperbook) There are a few new symbols here that you might not be familiar with. Ground: Figure 8.8: Symbol for the voltage reference level known as ground. This is the symbol for “ground” and what it means is that other voltage levels specified in the circuit are with reference to this point in the circuit (ground is taken to be at zero voltage). The points marked Vin and Vout therefore mean that the voltages at these points in the ciruit are Vin and Vout with respect to the point marked ground. Buffers: As mentioned, chunks of electrical circuits are usually analyzed in isolation. There is something more fundamental here than just convenience of analysis. Turns out chunks of electrical circuits are designed to accept an input signal, process it in some fashion, and then pass on an output signal to another part of the circuit for further Sridhar Krishnaswamy 9 EA3: Systems Dynamics Electrical Systems processing. You can think of chunks of circuits as meta-elements . Just like resistor, capacitor and inductor elements can be thought of as taking an input (voltage difference across them) and producing an output (current or charge), so too these meta-elements take an input signal and produce an output signal. In the above, the radio signal that is received by the tuning circuit may be passed on to another circuit which amplifies it prior to in turn passing on the amplified signal to a speaker. In order to make this whole thing work though, the presence of another meta-element circuit should not change the performance of the circuit part under consideration. That is the resistors and capacitors etc of the amplifier circuit should not change the tuning frequency selected by the tuning circuit. While in reality it is never going to be possible to obtain perfect isolation of the various meta-elements, we will assume that various meta-elements are so isolated or buffered, and we will use a symbol like this to denote the buffering. Figure 8.9: A buffer Buffers are complicated things, but for our purposes, this level of understanding would do. The buffer at the input should be understood to mean that no matter what is to the left of our tuning circuit, the voltage at the input to this tuning circuit will be Vin. That is, we have a voltage source at this point in the circuit. Similarly, no matter what is connected to the right of our tuning circuit, it will not affect the current through and the voltages at any point in our circuit. Switches and batteries: Let us now look at another circuit which contains a couple of more symbols that may not be familiar. Figure 8.10: An LC-oscillator circuit Sridhar Krishnaswamy 10 EA3: Systems Dynamics Electrical Systems Switch: This just completes a circuit when turned on, and interrupts a circuit when it is left open. The symbol for a switch is: Figure 8.11: A switch Batteries: A common voltage source is a battery which is represented as: + Vb Figure 8.12: A battery A battery is an active device which actually produces electrical energy by converting it from chemical, for instance. Batteries keep the potential of one of their two terminals (denoted by a long line) at a higher level than the other. In the circuit above, when the switch is closed, a current will flow from the battery terminal marked ‘+’ through the capacitor and inductor elements down into the battery terminal marked ‘-‘. Through each passive circuit element, there will be voltage drop in the direction of the current arrow shown. However, note that inside the battery itself, the current flow will actually be from the low potential point to a higher potential point! Now, how does this happen? Something must be doing work to get the charges to move against their natural desire. That something is the chemical reaction taking place inside and this is why a battery is an active device. Voltage buses: Here is another electrical circuit fragment: Figure 8.13: A circuit with a voltage bus (courtesy EA3 hyperbook) Sridhar Krishnaswamy 11 EA3: Systems Dynamics Electrical Systems This circuit has two horizontal wires one connected to the ground, and the other marked +12volts. Such wires which do not contain any circuit elements along it, but has circuit elements hanging off it are called voltage buses. Just remember that every point on a voltage bus is at the same potential (here: zero for the ground and +12V for the top wire). Measuring Instruments: How do we measure the voltage across or the current through a circuit element? There are devices called voltmeters and ammeters that do precisely this. You stick a voltmeter across two points in a circuit, and it will read out the potential difference between these points. Similarly, you stick an ammeter into any wire in the circuit (snip the wire and insert the ammeter), it will read the current through that wire. It is important to realize that when we connect such devices into a circuit, they may affect the circuit behavior by, say, drawing current from the circuit itself, or by providing additional resistance to current flow. We shall assume that all these observer instruments are all somehow buffered, and that they do not impact the system performance at all. That is, when connected to a circuit these instruments measure the values that would be obtained in the circuit without these instruments connected. VIII.1.3 Dynamic Rules: Now that we have all the dynamic variables of the electrical domain in place, and we have looked at a small but significant cross-section of the electrical circuit elements available, we are almost ready to analyze the behavior of complex electrical circuits. In order to do so, however, we need some laws or rules of dynamics that are analogous to Newton’s laws that related the effort and flow variables in the mechanics domain. The ultimate laws of electrodynamics are what are called Maxwell’s equations, but we really cannot go there in this course. Rather, we shall state two rules (that are actually consequences of Maxwell’s laws) that must be obeyed by the effort and flow variables of the electrical domain. These are: Kirchhoff’s Current Law - junction rule: The net current flowing into any circuit junction (or node which are points where two or more circuit elements are connected) must be equal to the net current flowing out of it. ∑i in = ∑ iout This rule actually follows from conservation of charge. Sridhar Krishnaswamy 12 EA3: Systems Dynamics Electrical Systems Kirchhoff’s Voltage Law - loop rule The sum of the voltage drops across all the elements in any closed loop of a circuit is zero. Equivalently, the potential difference between any two points in a circuit is equal to the sum of the voltage drops across all the elements along any circuit path connecting these two points. When considering voltage drops across circuit elements in a loop, let us agree to always go around loops clockwise. VIII.2 Analysis of simple circuits: A simple RC-circuit: Consider the circuit shown: Fig. 8.14: Charging a capacitor Suppose the switch is closed at time t=0. What charges, currents, and voltage drops develop through or across the various elements in this circuit? Step 1: Annotate the circuit: This involves picking directions for the current flow. In this case, it is a simple matter because we know that the current must flow from the positive terminal of the battery through the circuit and down into the negative terminal. When there are many elements connected to a junction or node in the circuit, we will have some leeway to pick the currents in parts of the circuit. All we have to do is be consistent that current flows from higher to lower potential points in a circuit. If the potentials are obvious (as in this case because of the battery), then we might as well start off right. If not, just choose some direction and assume that as the current flows through every element in the direction chosen, there must be a potential drop of the farther end with respect to the near end. The Sridhar Krishnaswamy 13 EA3: Systems Dynamics Electrical Systems algebra will then dictate if we have chosen correctly (if we get negative currents it simply means that the current direction is actually reverse of what we assumed.) Once the directions of the current have been picked, label all the voltage drops across the various elements making sure that the points of higher and lower potential are marked consistent with the current direction. I will use ‘+’ and ‘-‘ signs to indicate this. Note that this simply means that the ‘+’ side is at a higher voltage than the ‘-‘ side, and does not mean that these are positive and negative voltages with respect to ‘ground’. For example, for the direction of the current chosen here, the top of the resistor must be at a higher potential than the bottom, and the right side of the capacitor must be at a higher potential than the left. Step 2: Apply Kirchhoff’s current and voltage rules: Kirchhoff’s current rule (KCL): In this particular example, we have only one current (since there are no junctions where multiple circuit elements are connected), and therefore KCL simply tells us that: (i) iR = iC = i Kirchhoff’s voltage rule (KVL): There is only one loop here. Let us sum all the potential differences across all the elements traversing clockwise through this loop. (ii) VR + VC − VB = 0 Now, why is there a minus sign in front of the voltage associated with the battery? Remember that batteries are active devices, and that inside a battery current flows from a point of lower potential to one that is higher. Here, I was summing the voltage drops across each element, and I found that when I traverse a battery from its negative to positive terminal, the voltage drop is –VB, that is the potential does not drop, but increases. Another way to look at this is to apply Kirchhoff’s Voltage Law between the two points given by the positive and negative terminals of the battery. I know that these two points are kept at a potential difference of VB by the battery. Therefore, according to KVL, if I connect these two points by now traversing through the circuit containing the resistor and the capacitor, I must find that the potential drops across the resistor and the capacitor must be equal to VB. That is, VR + VC = VB , which is exactly the same equation as before. You can decide which way you want to handle KVL (traversing a whole circuit and summing up the potentials, or picking two points in a circuit with known potential difference, and then traversing any other circuit path connecting these two points). Sridhar Krishnaswamy 14 EA3: Systems Dynamics Electrical Systems Step 3: Invoke the constitutive relations of the various elements: Here, for the resistor: (iii) VR = RiR and for the capacitor: 1 (iv) VC = qC C Step 4: Do lots of algebra to get the state equations Here is where we pull together all the equations we have obtained for the system. We should first decide what dynamic variables we are going to focus on. Analogous to mechanical systems, we will pick dynamic variables associated with energy storing (capacitor) and inertial (inductor) elements to focus on, and swap out dynamic variables associated with dissipative elements (resistors) Here we only have the capacitor to worry about then, and analogous to what we did for mechanical systems, we should pick the corresponding flow variable (charge). Turns out that folks dealing with electrical systems prefer to choose the corresponding effort variable (voltage) for a capacitor. Note that it is a simple matter to go from voltage to charge using (iv) the constitutive relation for a capacitor. So our state variable vector is just: X = {VC } , (not much of a vector, but we are just testing the waters here) Now, we should try to get an expression for the time rate of change of the voltage drop across the capacitor: ( iv) (i) (iii ) (ii ) } 1 dVC } 1 dqC 1 } 1 } 1 = = iC = i R = VR = {V − V } dt C dt C C RC RC B C We are happy with this last step because we now have only the state variables and circuit parameters as well as the known voltage source (the battery) on the right side. Therefore the state equation here is just: dVC 1 1 + VC = V dt RC RC B (†) This is an equation that you have almost seen before. It is clearly an Euler type differential equation (with constant coefficients). If the right side had been equal to zero (with no voltage source), you know the solution to this equation is just an exponential decay: Sridhar Krishnaswamy 15 EA3: Systems Dynamics Electrical Systems VC no −source = Ae−t / RC where A is some constant to be determined from initial conditions. However, since we now have something on the right side, we need to add a correction term to the above solution, and the correction term is obvious here. It is just: VC source = VB The complete solution is therefore: VC (t) = Ae− t / RC + VB Make sure that you test this by substituting the above result back into the DE(†). To obtain the constant A, we use the initial condition that VC(t=0)=0 at the time the switch is closed. Therefore, VC (t) = VB {1− e −t / RC } We can readily calculate the charge across the capacitor through: qC (t) = CVC (t) = CVB {1 − e −t / RC } And the current through the capacitor (in fact, in this case this is the current through every element of our circuit) is: i(t) = iC (t) = dqC VB −t / RC = e dt R This last behavior is familiar to us from the ant problem of Pset 3 and from the springdamper mechanical system. As we turn the switch on, the current just starts at a value of 1 VB/R and subsequently decays to zero exponentially with a time constant t* = . RC Sridhar Krishnaswamy 16 EA3: Systems Dynamics Electrical Systems The behavior of the voltage and charges across the capacitor is not familiar to us yet, and so let us plot these (for the case: R=2Ω, C=10F, and VB=9V): Voltage across the capacitor 10 5 0 0 0.2 0.4 0.6 0.8 1 1.2 1.4 Charge across the capacitor 0 0.2 0.4 0.6 0.8 1 Current 1.2 0 0.2 0.4 0.6 0.8 1 Time 1.2 1.6 1.8 2 1.4 1.6 1.8 2 1.4 1.6 1.8 2 100 50 0 6 4 2 0 The behavior of the voltage across the capacitor is now clear. It eventually reaches a “steady state” value of VB , but it gets there exponentially slowly starting from zero voltage. Similarly, at the time the switch is turned on, there is no charge across the capacitor, but a steady-state charge distribution of CVB accumulates exponentially slowly with time. Actually, as you can see from the plots, for all practical purposes, within five time constants, the steady-state values are almost reached (to what percent of the final values?) The physical explanation for this behavior is as follows. When the circuit is closed by the switch being turned on, because of the potential difference provided by the battery, an electric current begins to flow through the components and a charge begins to accumulate across the capacitor. The process slows down as the capacitor gets charged resulting in a decreasing current till eventually (exponentially) there is no more current in the circuit, and we have a battery and a charged capacitor (with a potential difference balancing that of the battery). Energy considerations: As the capacitor gets charged its stored energy increases gradually: 2 1 1 Φ C = CVC2 = CVB2 {1− e − t / RC } 2 2 Sridhar Krishnaswamy 17 EA3: Systems Dynamics Electrical Systems In the process, power is also dissipated in the resistor: VB2 −2t / RC PR = Ri = e R 2 R You have to integrate the power (remember power is the rate of work done) to calculate the total work done in the process of current flowing through the resistor. ∞ WR = ∫ PR (t)dt = ? 0 which you can work out on your own. {What do you find?} Note that the energy stored in the capacitor and the energy dissipated in the resistor both come from the battery. It is the energy dissipated by resistors that causes our batteries (except apparently the ones used by the Energizer bunny) to run out of juice. Sridhar Krishnaswamy 18