INTRODUCTION TO MODELING OF SIMPLE ELECTRICAL SYSTEMS Modeling of electrical networks with simple passive elements such as resistors, inductors, and capacitors Modeling of Passive Electrical Elements The basic passive electrical elements: resistors, inductors, and capacitors. Resistors: Ohm's law states that the voltage drop, ππ (π‘), across a resistor π is proportional to the current π(π‘) going through the resistor. ππ (π‘) = π(π‘)π Inductors: The voltage drop, ππΏ (π‘), across an inductor πΏ is proportional to the time rate of change of current π(π‘) going through the inductor. ππ(π‘) ππΏ (π‘) = πΏ ππ‘ Capacitor: The voltage drop, ππΆ (π‘), across a capacitor πΆ is proportional to the integral current π{π‘) going through the capacitor with respect to time. π(π‘) ππΆ (π‘) = ∫ ππ‘ πΆ Modeling of Electrical Networks The classical way of writing equations of electric networks is based on the loop method or the node method, both of which are formulated from the two laws of Kirchhoff, which state: Kirchhoff's current law (node law) states that the algebraic sum of all currents entering and leaving a node is zero. (This law can also be stated as follows: The sum of currents entering a node is equal to the sum of currents leaving the same node.) Kirchhoff's voltage law (loop law) states that at any given instant the algebraic sum of the voltages around any loop in an electrical circuit is zero. (This law can also be stated as follows: The sum of the voltage drops is equal to the sum of the voltage rises around a loop.) A mathematical model of an electrical circuit can be obtained by applying one or both of Kirchhoff's laws to it. Simple Circuits via Mesh Analysis Transfer functions can be obtained using Kirchhoff’s voltage law and summing voltages around loops or meshes. We call this method loop or mesh analysis Example 1 Transfer Function—Single Loop via the Differential Equation Find the transfer function relating the capacitor voltage, VC(s) to the input voltage, V(s) Figure 1 Solution: Summing the voltages around the loop, assuming zero initial conditions, yields the integrodifferential equation for this network as πΏ ππ(π‘) 1 π‘ + π π(π‘) + ∫ π(π‘)ππ‘ = π(π‘) ππ‘ πΆ 0 πππ’ππ‘πππ 1 Changing variables from current to charge using π(π‘) = ππ(π‘)/ππ‘ yields πΏ π2 π(π‘) ππ(π‘) 1 +π + = π(π‘) 2 ππ‘ ππ‘ πΆ πππ’ππ‘πππ 2 From the voltage-charge relationship for a capacitor in Table π(π‘) = πΆππΆ (π‘) πππ’ππ‘πππ 3 Substituting Eq. (3) into Eq. (2) yields π2 ππΆ (π‘) πππΆ (π‘) πΏ + π πΆ + ππΆ (π‘) = π(π‘) 2 ππ‘ ππ‘ Taking the Laplace transform assuming zero initial conditions, rearranging terms, and simplifying yields πΏπΆπ 2 ππΆ (π ) + π πΆπππΆ (π ) + ππΆ (π ) = π(π ) (πΏπΆπ 2 + π πΆπ + 1)ππΆ (π ) = π(π ) Solving for the transfer function, ππΆ (π )/π(π ), we obtain ππΆ (π ) 1 = 2 π(π ) πΏπΆπ + π πΆπ + 1 ππ = 1⁄ πΏπΆ πππππ πππ π€ππ π 1 2 π + πΏ π + πΏπΆ 2nd method solving transfer function Example: using Transfer function impedance. Find the transfer function relating the capacitor voltage, VC(s) to the input voltage, V(s) Figure 2 the concept of impedance simplifies the solution for the transfer function. The Laplace transform of the impedance value of the components, assuming zero initial conditions Solution: π(π ) = πΌπ π(π ) = πΌ(π )[ππ’π ππ ππππππππππ ] 1 ] πΆπ Notice that the circuit of Figure 1 could have been obtained immediately from the circuit of Figure 2 simply by replacing each element with its impedance. We call this altered circuit the transformed circuit. Finally, notice that the transformed circuit leads immediately to Eq. if we add impedances in series as we add resistors in series. Thus, rather than writing the differential equation first and then taking the Laplace transform, we can draw the transformed circuit and obtain the Laplace transform of the differential equation simply by applying Kirchhoff’s voltage law to the transformed circuit π(π ) = πΌ(π ) [πΏπ + π + We summarize the steps as follows: 1. Redraw the original network showing all time variables, such as π£(π‘), π(π‘), and ππΆ (π‘), as Laplace transforms π(π ), πΌ(π ), and ππΆ (π ), respectively. 2. Replace the component values with their impedance values. This replacement is similar to the case of dc circuits, where we represent resistors with their resistance values. 3. We now repeat Example 1 using the transform methods just described and bypass the writing of the differential equation. Transfer Function—Single Loop via Transform Methods Example 2 Find the transfer function relating the capacitor voltage, VC(s) to the input voltage, V(s) Use mesh analysis and transform methods without writing a differential equation. Figure 2 Solution: Writing a mesh equation using the impedances as we would use resistor values in a purely resistive circuit, we obtain π(π ) = πΌ(π )[ππ’π ππ ππππππππππ ] π(π ) = πΌ(π ) [πΏπ + π + Solving for πΌ(π )⁄π(π ) 1 ] πΆπ πΌ(π ) 1 πΆπ = = πππ’ππ‘πππ 1 2 1 π(π ) [πΏπ + π + ] πΏπΆπ + π πΆπ + 1 πΆπ But the voltage across the capacitor, VC(s), is the product of the current and the impedance of the capacitor. 1 ππΆ = πΌ(π ) ππ πΌ(π ) = ππΆ πΆπ πΆπ Solving for the transfer function, ππΆ (π )/π(π ), substitute the value of πΌ(π )ππ‘ πππ’ππ‘πππ 1 and simplify ππΆ πΆπ πΆπ = π(π ) πΏπΆπ 2 + π πΆπ + 1 Dividing both sides by πΆπ ππΆ 1 = 2 π(π ) πΏπΆπ + π πΆπ + 1 πππππ πππ π€ππ Transfer Function—Single Node via Transform Methods 3rd method solving transfer function Example: 3 Use nodal analysis and without writing a differential equation. Find the transfer function relating the capacitor voltage, VC(s) to the input voltage, V(s) Solution: The transfer function can be obtained by summing currents flowing out of the node whose voltage is VC(s) Figure 2. We assume that currents leaving the node are positive and currents entering the node are negative. The currents consist of the current through the capacitor and the current flowing through the series resistor and inductor. Hence, ππ (π ) = πΌπ π = πΏπ + π πΌ(π ) = ππ (π )/π(π ). ππ (π ) = π(π ) − ππΆ (π ) πππ‘πππππ ππ’πππππ‘ π = ππππ£πππ ππ’πππππ‘ 1/πΆπ πΌπ = πΌπΆ ππ (π ) ππΆ (π ) = π(π ) 1⁄πΆπ π(π ) − ππΆ (π ) ππΆ = 1 πΏπ + π ⁄πΆπ ⇒ . ππΆ (π ) ππΆ (π ) − π(π ) + =0 1⁄ πΏπ + π πΆπ ππΆ πΆπ (π ) ππΆ (π ) π(π ) + = 1 πΏπ + π πΏπ + π ⇒ . ππΆ πΆπ ππΆ (π ) − π(π ) + =0 1 πΏπ + π ππ’ππ‘ππππ¦ πππ‘β π πππ 1(πΏπ + π )πππ£ππ ππΆ πΆπ (πΏπ + π ) + ππΆ = π(π ) Solving transfer function ππΆ (π ) 1 = 2 π(π ) πΏπΆπ + π πΆπ + 1 πππππ πππ π€ππ Complex Circuits via Mesh Analysis To solve complex electrical networks—those with multiple loops and nodes—using mesh analysis. Perform the following steps: 1. Replace passive element values with their impedances. 2. Replace all sources and time variables with their Laplace transform. 3. Assume a transform current and a current direction in each mesh. 4. Write Kirchhoff’s voltage law around each mesh. 5. Solve the simultaneous equations for the output. 6. Form the transfer function. Transfer Function—Multiple Loops Example 4 Find the transfer function, I2(s) =V(s) Solution: 1. Replace passive element values with their impedances. 2. Replace all sources and time variables with their Laplace transform. 3. Assume a transform current and a current direction in each mesh. 4. Write Kirchhoff’s voltage law around each mesh. 5. Solve the simultaneous equations for the output. Equation around loop 1 using KVL π(π ) − π 1 πΌ1 (π ) − πΏπ [πΌ1 (π ) − πΌ2 (π )] = 0 Simplifying the gives π(π ) = π 1 πΌ1 (π ) + πΏπ πΌ1 (π ) − πΏπ πΌ2 (π ) πππ’ππ‘πππ 1 Equation around loop 2 using KVL 1 −π 2 πΌ2 (π ) − πΌ2 (π ) − πΏπ [πΌ2 (π ) − πΌ1 (π )] = 0 πΆπ Simplifying and do the same at equation 1 1 π 2 πΌ2 (π ) + πΌ2 (π ) + πΏπ πΌ2 (π ) − πΏπ πΌ1 (π ) = 0 πππ’ππ‘πππ 2 πΆπ . Combining terms, Eqs. (1) and (2) become simultaneous equations. π 1 πΌ1 (π ) + πΏπ πΌ1 (π ) − πΏπ πΌ2 (π ) = π(π ) −πΏπ πΌ1 (π ) + πΌ2 (π ) (πΏπ + π 2 + πππ’ππ‘πππ 1 1 ) = 0 πππ’ππ‘πππ 2 πππ ππ’ππ‘ππππ¦ πππ‘β π ππππ ππ¦ πΆπ πΆπ or −πΏπΆπ 2 πΌ1 (π ) + πΌ2 (π )(πΏπΆπ 2 + π 2 πΆπ + 1) = 0 πππ’ππ‘πππ 2 use Cramer’s rule (or any other method for solving simultaneous equations) to solve πΌ2 (π ) (π + πΏπ ) π(π ) | 1 | −πΏπ 0 (π ) πΌ2 = (π + πΏπ ) −πΏπ | 1 | 2 −πΏπ (πΏπΆπ + π 2 πΆπ + 1) Forming the transfer function, We have succeeded in modeling a physical network as a transfer function: The network modeled as the transfer function, notice a pattern first illustrated ππ’π ππ π π’π ππ πππππππ ππ’π ππ ππππππππππ [ ππππππππππ ] πΌ1 (π ) − [ ] πΌ2 (π ) = [π£πππ‘ππππ ππππ’ππ] ππππππ π‘π π‘βπ ππππ’ππ πππ β 1 πππ β 1 π‘π€π πππ βππ ππ’π ππ π π’π ππ πππππππ ππ’π ππ ππππππππππ (π ) (π ) πΌ − πΌ = [ ] [ ππππππππππ ] 2 [π£πππ‘ππππ ππππ’ππ ] ππππππ π‘π π‘βπ 1 ππππ’ππ πππ β 2 πππ β 2 π‘π€π πππ βππ Complex Circuits via Nodal Analysis the easiest way to find the transfer function is to use nodal analysis rather than mesh analysis. The number of simultaneous differential equations that must be written is equal to the number of nodes whose voltage is unknown. In the previous example we wrote simultaneous mesh equations using Kirchhoff’s voltage law. For multiple nodes we use Kirchhoff’s current law and sum currents flowing from each node. Again, as a convention, currents flowing from the node are assumed to be positive, and currents flowing into the node are assumed to be negative. In order to handle multiple-node electrical networks, we can perform the following steps: 1. Replace passive element values with their admittances. 2. Replace all sources and time variables with their Laplace transform. 3. Replace transformed voltage sources with transformed current sources. 4. Write Kirchhoff’s current law at each node. 5. Solve the simultaneous equations for the output. 6. Form the transfer function Example: Find the transfer function, ππΆ (π ) = π(π ), for the circuit in Figure (b). Use nodal analysis Solution: For this problem, we sum currents at the nodes rather than sum voltages around the meshes. From Figure (b) the sum of currents flowing from the nodes marked ππΏ (π ) and ππΆ (π ) are, respectively, πππ‘πππππ ππ’πππππ‘ = ππππ£πππ ππ’πππππ‘ At node VL π(π ) − ππΏ (π ) ππΏ (π ) ππΏ (π ) + ππΆ (π ) − − =0 π 1 πΏπ π 2 π(π ) ππΏ (π ) ππΏ (π ) − ππΆ (π ) ππΏ (π ) = + + π 1 πΏπ π 2 π 1 ππ’ππ‘ππππ¦ πππ‘β π πππ ππ¦ π 1 π 2 πΏπ π(π )πΏπ 2 π = ππΏ π 1 π 2 (π ) + ππΏ πΏπ 1 π(π ) − ππΆ πΏπ 1 π(π ) + ππΏ πΏπ 2 π(π ) π(π )πΏπ 2 π = ππΏ (π )[πΏπ(π 1 + π 2 ) + π 1 π 2 ] − ππΆ πΏπ 1 π(π ) πππ’ππ‘πππ 1 At Node VC ππΏ (π ) − ππΆ (π ) ππΆ (π ) − =0 1⁄ π 2 πΆπ ππΏ (π ) ππΆ (π ) ππΆ πΆπ(π ) − − =0 π 2 π 2 1 − ππΏ (π ) ππΆ (π ) ππΆ πΆπ(π ) + + = 0 ππ’ππ‘ππππ¦ πππ‘β π πππ ππ¦ π 2 π 2 π 2 1 −ππΏ (π ) + ππΆ (π ) + ππΆ π 2 πΆπ(π ) = 0 −ππΏ (π ) + ππΆ (π )( π 2 πΆπ + 1) = 0 πππ’ππ‘πππ 2 Solving for transfer function using equation 1 and equation 2 by using any method. π(π )πΏπ 2 π = ππΏ (π )[πΏπ(π 1 + π 2 ) + π 1 π 2 ] − ππΆ πΏπ 1 π(π ) πππ’ππ‘πππ 1 −ππΏ (π ) + ππΆ (π )( π 2 πΆπ + 1) = 0 πππ’ππ‘πππ 2 Transfer Function ππΆ (π ) πΏπ = 2 π(π ) πΏπΆπ (π 1 + π 2 ) + (π 1 π 2 πΆ + πΏ)π + π 1 Mesh Equations via Inspection Example: Write, but do not solve, the mesh equations for the network shown πππππ πππ π€ππ Solution: Each of the previous problems has illustrated that the mesh equations and nodal equations have a predictable form. We use that knowledge to solve this three-loop problem. The equation for Mesh 1 will have the following form: ππ’π ππ ππ’π ππ π π’π ππ πππππππ ππ’π ππ ππππππππππ ππππππππππ [ ππππππππππ ] πΌ1 (π ) − ππππππ π‘π πΌ2 (π ) − ππππππ π‘π πΌ3 (π ) = [π£πππ‘ππππ ππππ’ππ] πππ βππ 1 πππ πππ βππ 1 πππ ππππ’ππ πππ β 1 πππ β 1 [ ] [ ] πππ β 2 πππ β 3 Similarly, Meshes 2 and 3, respectively are ππ’π ππ ππ’π ππ ππ’π ππ ππππππππππ ππππππππππ − ππππππ π‘π πΌ1 (π ) + [ ππππππππππ ] πΌ2 (π ) − ππππππ π‘π πΌ3 (π ) πππ βππ 1 πππ πππ βππ 2 πππ ππππ’ππ πππ β 2 [ ] [ ] πππ β 2 πππ β 3 π π’π ππ πππππππ = [π£πππ‘ππππ ππππ’ππ] πππ β 2 ππ’π ππ ππ’π ππ ππ’π ππ ππππππππππ ππππππππππ − ππππππ π‘π πΌ1 (π ) − ππππππ π‘π πΌ2 (π ) + [ ππππππππππ ] πΌ3 (π ) πππ βππ 1 πππ πππ βππ 2 πππ ππππ’ππ πππ β 3 [ ] [ ] πππ β 3 πππ β 3 π π’π ππ πππππππ = [π£πππ‘ππππ ππππ’ππ] πππ β 3 Substituting the values from the three equation +(2π + 2)πΌ1 (π ) − (2π + 1)πΌ2 (π ) − πΌ3 (π ) = π(π ) πππ 1 −(2π + 1)πΌ1 (π ) + ((π + 1)πΌ2 (π ) − 4ππΌ3 (π ) = 0 πππ 2 −πΌ1 (π ) − 4ππΌ2 (π ) − (4π + 1 + 1⁄π)πΌ3 (π ) = 0 πππ 3 which can be solved simultaneously for any desired transfer function, like πΌ3 (π ) πΌ (π ) πΌ (π ) ⁄ , ππ 2 ⁄ , ππ 1 ⁄ π(π ) π(π ) π(π )