EECE251 Circuit Analysis I Lecture Integrated Program Set 5: First-Order and Second-Order Linear Circuits Shahriar Mirabbasi Department of Electrical and Computer Engineering University of British Columbia shahriar@ece.ubc.ca SM EECE 251, Set 5 1 Overview • Passive elements that we have seen so far: resistors, inductors, and capacitors. • We have already seen different methods to analyze circuits containing sources and resistive elements. • Now we want to examine circuits that contain various combinations of two or three different types of these passive elements. • We start with circuits whose passive elements are resistors and one (equivalent) capacitor (RC circuits) or resistors and one (equivalent) inductor (RL circuits) • Similar to circuits whose passive elements are all resistive, one can analyze RC or RL circuits by applying KVL and/or KCL. Is the analysis of RC or RL circuits any different? Note: Some of the figures in this slide set are taken from (R. Decarlo and P.-M. Lin, Linear Circuit Analysis, 2ndEdition, 2001, Oxford University Press) and (C.K. Alexander and M.N.O Sadiku, Fundamentals of Electric Circuits, 4th Edition, 2008, McGraw Hill) SM EECE 251, Set 5 2 1 Capacitors (Refresher) • Capacitors store energy (in the electric field between their plates) • For capacitors we have: qC ( t ) = CvC ( t ) iC (t ) = C ⋅ dvC (t ) dt t t q(t ) 1 1 vC (t ) = = ∫ iC (τ ) ⋅ dτ or vC (t ) = ∫ iC (τ ) ⋅ dτ + vC (t0 ) C C −∞ C t0 SM EECE 251, Set 5 3 Capacitors (Refresher) • As we have seen: – A capacitor acts like an open circuit when connected to a DC voltage source (and after a long time or in steady-state, we will talk more about the steady state soon.) – A capacitor impede the abrupt change of its voltage • The instantaneous power absorbed by the capacitor is: pC (t ) = iC (t )vC (t ) = C dvC (t ) vC (t ) dt and the total stored energy in the capacitor is: t WC (t ) = ∫p C −∞ SM t 1 (τ ) ⋅ dτ = ∫ CvC (τ )dvC (τ ) = CvC2 (t ) 2 −∞ EECE 251, Set 5 4 2 Inductors (Refresher) • Inductors store energy in their magnetic field. • For inductors, we have vL (t ) = L ⋅ diL (t ) dt t t 1 1 iL (t ) = ∫ vL (τ ) ⋅ dτ or iL (t ) = ∫ vL (τ ) ⋅ dτ + iL (t0 ) L −∞ L t0 SM 5 EECE 251, Set 5 Inductors (Refresher) • An inductor acts like a short circuit to DC current (in steady state). • Inductor impede instantaneous changes of its current. • Instantaneous power delivered to the inductor is: p L (t ) = vL (t )iL (t ) = L • diL (t ) iL (t ) dt The total stored energy in an inductor is: t t −∞ −∞ WL (t ) = ∫ pL (τ ) ⋅ dτ = ∫ LiL (τ )diL (τ ) = SM EECE 251, Set 5 1 2 LiL (t ) 2 6 3 Steady-State Response • Loosely speaking, the behaviour of the circuit a long time after an excitation is applied to the circuit is called steady-state response. • For example, if in a circuit a switch is opened (or closed) the response of the circuit to this excitation long time after the switch is opened (or closed) is referred to as steady-state response. • If we only have DC sources in the circuit, at steady state capacitors act like open circuit and inductors act like a short circuit. SM EECE 251, Set 5 7 Example • SM In the following circuit find the energy that is stored in the inductor and capacitor, when the circuit reaches steady state. EECE 251, Set 5 8 4 Example • SM In the following circuit, the switch has been in position A for a long time and then at t=0, the switch moves to position B. Find the energy stored in the capacitor just before the switch moves. Also, what is the energy stored in the capacitor a long time after switch is moved to B, i.e., t=∞.. EECE 251, Set 5 9 Example • SM In the following circuit, the switch has been closed for a long tim and at t=0 the switch is opened. What is the energy stored in the inductor just before the switch is opened? What is the energy stored in the inductor a long time after the switch is opened. i.e., t=∞. EECE 251, Set 5 10 5 First-Order Circuits • Applying KVL and/or KCL to purely resistive circuits results in algebraic equations. • Applying these laws to RC and RL circuits results in differential equations. • In general, differential equations are a bit more difficult to solve compared to algebraic equations! • If there is only one C or just one L in the circuit the resulting differential equation is of the first order (and it is linear). • A circuit that is characterized by a first-order differential equation is called a first-order circuit. SM EECE 251, Set 5 11 What Do We Mean By Equivalent Capacitor? • The equivalent capacitance of series-connected capacitors is the reciprocal of the sum of the reciprocals of the individual capacitances. Why? 1 1 1 1 = + +L+ Ceq C1 C2 Cn • The equivalent capacitance of parallel capacitors is the sum of the individual capacitances. Why? Ceq = C1 + C2 + L + Cn SM EECE 251, Set 5 12 6 What Do We Mean by Equivalent Inductor? • The equivalent inductance of series-connected inductors is the sum of the individual inductances. Why? Leq = L1 + L2 + L + Ln • The equivalent inductance of parallel inductors is the reciprocal of the sum of the reciprocals of the individual inductances. Why? 1 1 1 1 = + +L+ Leq L1 L2 Ln SM EECE 251, Set 5 13 First-Order Circuits • So in an RC circuit if we have more than one capacitor, however, we can combine the capacitors (series and/or parallel combination) and represent them with one equivalent capacitor, we still have a first-order circuit. • The same is true for RL circuits, that is if we can combine all the inductors and represent them with one equivalent circuit then we still have a first-order circuit • In such circuits we can find the Thevenin (or Norton) equivalent circuit seen by the equivalent capacitor (or Inductor) and then solve the circuit. • Let’s start with the circuits that have no source! SM EECE 251, Set 5 14 7 Example • SM Which one of the following circuits is a first-order circuit? EECE 251, Set 5 15 Source-Free or Zero-Input First-Order Circuit • • SM Recall that in general if there is only one (equivalent) inductor or capacitor in the circuit one can model the circuit seen by the inductor or capacitor by its Thevenin equivalent circuit. In the case of source-free circuit (no independent source in the circuit) the Thevenin equivalent circuit will be ………….. a resistor. EECE 251, Set 5 16 8 Source-Free or Zero-Input First-Order Circuit iR (t ) = −iL (t ) iC (t ) = −iR (t ) vR (t ) vL (t ) L diL (t ) = = R R R dt L diL (t ) di (t ) R = −iL (t ) ⇒ L = − iL (t ) R dt dt L vR (t ) vC (t ) = R R dvC (t ) vR (t ) dv (t ) 1 C =− ⇒ C =− vC (t ) dt R dt RC iR (t ) = SM iR (t ) = EECE 251, Set 5 17 Source-Free First-Order RC Circuit • Let’s assume that we know the charge or equivalently the voltage across the capacitor at time 0. That is: vC (0) = V0 • Recall: • Let’s try to solve this differential equation. Because of the simple form of this equation we can re-arrange the term as: iC (t ) + iR (t ) = 0 ⇒ C dvC (t ) vC (t ) dv (t ) 1 + =0⇒ C =− vC (t ) dt R dt RC dvC (t ) 1 =− dt vC (t ) RC SM EECE 251, Set 5 18 9 Source-Free First-Order RC Circuit • Before going any further can you tell the units for RC from the equation: dvC (t ) 1 dt =− vC (t ) RC • Now let’s go further! and integrate both sides of the equation from 0 to t: t t dv (t ' ) 1 ∫t '=0 vCC(t ' ) = −∫t '=0 RC dt ' t ln vC (t ' ) t '=0 = − t 1 t' RC t '= 0 1 ln SM − t vC (t ) 1 =− t ⇒ vC (t ) = V0 e RC V0 RC 19 EECE 251, Set 5 Source-Free First-Order RC Circuit • The voltage response of an source-free first-order RC circuit is an exponential decay from its initial voltage value: vC (t ) V0 vC (t ) = V0 e − 1 t RC 0.368V0 τ = RC • SM 5τ t The time that is required for the response to decay by a factor of 1/e (36.8% or by engineering approximation! 37%) of its initial value is called time constant of the circuit and is typically denoted by τ. EECE 251, Set 5 20 10 Source-Free First-Order RC Circuit • Philosophical question: When there is no source in the circuit, how come we have such a response? What is the response due to? • In general, the response of a source-free circuit which is due to the initial energy stored in the storage elements (in this case C) and not due to external sources is called natural response. • In first order RC (and RL) circuits natural response is a decaying exponential. • To find the natural response of a first-order RC circuit we need two pieces of information: – Initial voltage across the capacitor – The time constant τ=RC SM 21 EECE 251, Set 5 Source-Free First-Order RC Circuit • Time constant of the circuit gives us an indication of how rapidly the response decays, in other words how fast is the response. • Let’s calculate the natural response vC (t ) = V0 e different multiples of the time constant: • SM t vC(t) τ 0.3679V0 2τ 0.1353V0 3τ 0.0498V0 4τ 0.0183V0 5τ 0.0067V0 − 1 t RC for times equal For all practical purposes it is typically assumed that the response reaches its final value after 5τ. EECE 251, Set 5 22 11 Example • SM Assuming vC(0)=30V, determine vC and vx, and io for t≥0 EECE 251, Set 5 23 Source-Free First-Order RC Example • In the following circuit, find the voltage across the capacitor for t≥0. Assume that v(0)=10V. t=1s + v(t) - SM EECE 251, Set 5 24 12 Source-Free First-Order RL Circuit • Let’s assume that we know the initial current in the inductor at time 0. That is: iL (0) = I 0 • After a bit of equation writing! we have: R − t diL (t ) R = − iL (t ) ⇒ iL (t ) = I 0 e L dt L • • What is the time constant of this circuit? To find the natural response of a first-order RL circuit we need two pieces of information: – Initial current through the inductor – The time constant τ=L/R SM 25 EECE 251, Set 5 Source-Free First-Order RL Example • In the following circuit, find the current through the inductor for t≥0. Assume that i(0)=1A. + v v i(t) - SM EECE 251, Set 5 26 13 Example • SM In the following circuit, assuming i(0)=10A, calculate i(t) and ix(t). 27 EECE 251, Set 5 Unit Step Function • Step function is a very useful function to model the signals in the circuits that have switches. • Example: In the following circuit, find the voltage across the resistor R for -∞<t<∞. t=0 + V(t) - SM EECE 251, Set 5 28 14 Unit Step Function • To model abrupt changes in a voltage or current one can use a unit step function. • The unit step function is defined as follows: 1 t ≥ 0 u (t ) = 0 t < 0 • Use the step function to express the voltage across the resistor in the previous example: v(t)= SM 29 EECE 251, Set 5 Unit Step Function Examples • Assuming t0 is a given positive time, plot the following functions: u ( −t ) u (t ) u (t + t 0 ) SM u (t − t 0 ) u (t 0 − t ) EECE 251, Set 5 30 15 Unit Step Function Examples • Write the functions on the previous slide in mathematical terms, e.g., 1 t ≥ 0 u (t ) = 0 t < 0 SM EECE 251, Set 5 31 Singularity Functions • Singularity functions are functions that either are discontinuous or have discontinuous derivatives. • Three widely used singularity functions in circuit analysis are the unit step, the unit impulse, and the unit ramp functions. 0, t<0 du (t ) δ (t ) = = undefined , t = 0 dt 0 t >0 t 0, t < 0 r (t ) = ∫ u (t ' )dt ' = tu (t ) = t , t ≥ 0 −∞ SM EECE 251, Set 5 32 16 Unit Impulse ∞ 0+ −∞ 0− ∫ δ (t ) = ∫ δ (t ) =1 ∞ 0+ 0+ −∞ 0− 0− ∫ f (t )δ (t ) = ∫ f (t )δ (t ) = ∫ f (0)δ (t ) = f (0) • If a≤t0≤b b b b a a a ∫ f (t )δ (t − t 0 )dt = ∫ f (t0 )δ (t − t 0 )dt = f (t0 ) ∫ δ (t − t0 )dt = f (t 0 ) b ∫ f (t )δ (t − t 0 )dt = If t0 is not between a and b: a SM 33 EECE 251, Set 5 Some Mathematical Background • In general, the differential equations that model first-order RC or RL circuits are of the form: dx(t ) = λx(t ) + f (t ), dt x(t 0 ) = x0 valid for t ≥ t 0 , where x(t) is the voltage or current of interest and x0 is the initial condition at time t0. • Let’s briefly review a technique (called integrating factor method) to solve this type of differential equations: dx(t ) dx(t ) = λx(t ) + f (t ) ⇒ − λx(t ) = f (t ) dt dt dx(t ) ⇒ e − λt − λe − λt x(t ) = e − λt f (t ) dt d − λt ⇒ e x(t ) = e −λt f (t ) dt [ SM ] EECE 251, Set 5 34 17 Some Mathematical Background • Integrating both sides from t0 to t, we have: t t d − λt ' e x(t ' ) dt ' = e − λt ' f (t ' ) dt ' t '=t0 dt ' t '=t0 [ ∫ • ∫ t '=t0 Therefore: [ ] t d − λt ' e x(t ' ) dt ' =e −λt ' x(t ' ) = e − λt x(t ) − e − λt0 x(t 0 ) t '=t0 dt ' e − λt x(t ) − e − λt0 x(t 0 ) = ∫ ∫ ⇒ x(t ) = e λ (t −t0 ) x(t 0 ) + • ∫ For the left-hand-side we have: t • ] t e − λt ' f (t ' ) dt ' t '=t0 t e λ (t −t ') f (t ' )dt ' t '=t0 λ is referred to as natural frequency of the circuit! The first term in the above expression is called natural response (due to stored energy) and the second term is called forced response (due to independent sources). SM 35 EECE 251, Set 5 DC or Step-Response of First-Order Circuits • When the DC source of an RC or RL circuit is suddenly applied (for example by turning on a switch), the voltage or current source can be modeled as a step function. • The response of the circuit to such a sudden change (when the excitation is a step function) is therefore called the “step response” of the circuit. • In general the DC or step response of a first-order circuit satisfies a differential equation of the following form (assuming that the step is applied at t = t0): dx(t ) = λx(t ) + Fu (t − t 0 ), dt x(t 0+ ) = x0 Why t 0+? SM EECE 251, Set 5 36 18 DC or Step-Response of First-Order Circuits • • dx(t ) = λx(t ) + F , dt For t ≥ t0 we can rewrite the equation as: Then the solution would be: x(t ) = e λ (t −t0 ) x(t 0+ ) + ∫ x(t 0+ ) = x0 t e λ (t −t ') Fdt ' t '=t0 = e λ (t −t0 ) x(t 0+ ) + Fe λt ∫ = e λ (t −t0 ) x(t 0+ ) + Fe λt −1 t e −λt ' dt ' t '=t0 λ t e − λt ' t '=t0 −λt e λt e −λt − e 0 λ F = e λ (t −t0 ) x(t 0+ ) − 1 − e λ (t −t0 ) = e λ (t −t0 ) x(t 0+ ) − F λ SM [ ] 37 EECE 251, Set 5 DC or Step-Response of First-Order Circuits • • −1 For first-order circuits: λ = τ Therefore: x(t ) = e • − ( t −t0 ) τ ( t −t0 ) − x(t0+ ) + Fτ 1 − e τ Note that: x(∞) = lim x(t ) = Fτ t →∞ • Thus the step response of a first order circuit has the following general form: ( t −t ) [ ] x(t ) = x(t0+ ) − x(∞) e − τ 0 + x (∞) The step response of any voltage or current in a first-order circuit has the above general form. SM EECE 251, Set 5 38 19 DC or Step-Response of First-Order Circuits • For example, in a first-order LR circuit the step response of the current through the inductor is of the form: [ ] iL (t ) = iL (t0+ ) − iL (∞) e − ( t −t0 ) L/ R + i L (∞ ) and in a first-order RC circuit the step response of the voltage across the capacitor is of the form: [ ] vC (t ) = vC (t0+ ) − vC (∞) e • − ( t −t0 ) RC + vC (∞) These equations are very useful! and as we said in general for a step response of any first-order circuit we have: any voltage or current = (Initial value − Final value)e • SM − elapsed time time constant + Final value The initial value can be found using the initial condition of the circuit. 39 EECE 251, Set 5 DC or Step-Response of First-Order Circuits • The complete response can be divided into two portions: Complete Response = Transient Response+ Steady - State Response temporary part due to stored energy permanent part due to independen t sources • The transient response is the circuit’s temporary response that will die out with time. • The steady-state response is the portion of the response that remains after the transient response has died out (behavior of the circuit a long time after the external excitation is applied). SM EECE 251, Set 5 40 20 DC or Step-Response of First-Order Circuits • What are the transient and steady-state portions of the following response: [ ] vC (t ) = vC (t0+ ) − vC (∞) e • − ( t −t0 ) RC + vC (∞) To find the complete response of a first-order circuit we need to find initial value, final value, and time constant of the circuit: – Initial value can be found using the initial condition. – Time constant can be found by finding the Thevenin equivalent resistance seen across the capacitor (or inductor) – How about the final value. SM EECE 251, Set 5 41 DC or Step-Response of First-Order Circuits • Couple of interesting points (tricks) that are only valid for calculating final values of DC step-response: – A capacitor acts like a open circuit long time after the external excitation is applied. Can you intuitively justify this statement? – An inductor acts like a short circuit long time after the external excitation is applied. Why? SM EECE 251, Set 5 42 21 Example • Find v(t) for t>0 in the following circuit. Assume the switch has been open for a long time before it is closed at t=0. t=0s + v(t) 0.5A - SM 43 EECE 251, Set 5 Example • Find i(t) for t>0 in the following circuit. Assume the switch has been open for a long time before it is closed at t=0. t=10s i(t) SM EECE 251, Set 5 0.5A 44 22 Second-Order Linear Circuits • A linear second order circuit is characterized by a linear secondorder differential equation • Second-order circuits in general consist of sources, resistors, and equivalent of two energy storage elements. • Often to solve the resulting second-order differential equations one need to find the initial value of the desired variable (voltage or current) and the initial value of the derivative of the variable. • For finding initial conditions, always start with variables that cannot change abruptly (like what?). • Finding the initial value for the derivatives could be tricky! SM 45 EECE 251, Set 5 Example • In the following circuit the switch has been closed for a long time and it opens at t = 0. Find: di(0 + ) dv(0 + ) i (0 + ), v(0 + ), , and dt dt i + v t=0s SM EECE 251, Set 5 - 46 23 Source-Free RLC Circuits • Develop two second-order differential equation (one in iL and one in vC) for the following circuit. + iL vC - Answer: d 2iL (t ) dt 2 + SM R diL (t ) 1 d 2 vC (t ) R dvC (t ) 1 + iL (t ) = 0 and + + vC (t ) = 0 L dt LC L dt LC dt 2 EECE 251, Set 5 47 Source-Free RLC Circuits • Develop two second-order differential equation (one in iL and one in vC) for the following circuit. + iL vC - Answer: d 2iL (t ) dt SM 2 + 1 diL (t ) 1 d 2vC (t ) 1 dvC (t ) 1 + iL (t ) = 0 and + + vC (t ) = 0 RC dt LC RC dt LC dt 2 EECE 251, Set 5 48 24 Constant Coefficient Second-Order Differential Equation • The general form of the second-order differential equation that results from a second-order circuit with DC sources is of the form: d 2 x(t ) dx(t ) +b + cx(t ) = F 2 dt dt • x(t) can be any voltage or current in the circuit • F represents the dc excitation of the circuit. Without loss of generality and for simplicity let’s assume that the excitation is applied to the circuit at time 0. • The general solution is of the form x(t ) = xn (t ) + X F SM EECE 251, Set 5 49 Constant Coefficient Second-Order Differential Equation • xn(t) is the response to the following equation (typically referred to as homogeneous equation which represents the source-free circuit): d 2 x(t ) dx(t ) +b + cx(t ) = 0 2 dt dt • XF is a constant which represents the steady-state response of the circuit to the dc excitation. We have: XF = F c Why? SM EECE 251, Set 5 50 25 General Solution • To find the solution to our second-order constant coefficient differential equation we first construct the characteristic equation, that is: s 2 + bs + c = 0 • The roots of this characteristic equation are of the form: s1 , s2 = • • − b ± b 2 − 4c 2 Depending on the value of the discriminator of the characteristic equation we have the following three cases. Note: In the textbook the equation is written in the following form: s 2 + 2αs + ω02 = 0 SM 51 EECE 251, Set 5 Real and Distinct Roots (Overdamped Response) • If b 2 − 4c > 0 and distinct. • The general form of the solution to the differential equation is then: the roots of the characteristic equation are real x(t ) = K1e where: s1t + K 2e s2t + XF F c + x(0 ) = K1 + K 2 + X F XF = dx(0 + ) = s1K1 + s2 K 2 dt SM EECE 251, Set 5 52 26 Real and Equal Roots (Critically Damped Response) • If b 2 − 4c = 0 and equal. • The general form of the solution to the differential equation is then: the roots of the characteristic equation are real x(t ) = ( K1 + K 2t )e where: s1t + XF F c + x(0 ) = K1 + X F XF = dx(0 + ) = s1K1 + K 2 dt SM EECE 251, Set 5 53 Complex Roots (Underdamped Response) • • If b − 4c < 0 the roots of the characteristic equation are complex. In fact the roots are complex conjugate of each other and have the form: 2 s1 , s2 = −α ± jωd • The general form of the solution to the differential equation is then: −αt x(t ) = e where: [K1 cos(ωd t ) + K 2 sin(ωd t )]+ X F F c + x(0 ) = K1 + X F XF = dx(0 + ) = −αK1 + ωd K 2 dt SM EECE 251, Set 5 54 27 Complex Roots (Undamped Response) b=0 • If the roots of the characteristic equation are complex. • In fact the roots are purely imaginary and have the form: s1 , s2 = ± jωn • The general form of the solution to the differential equation is then: x(t ) = [K1 cos(ωnt ) + K 2 sin(ωnt )] + X F = A cos(ωnt + θ ) + X F where: F c x(0 + ) = K1 + X F F c x(0 + ) = A cosθ + X F XF = XF = + dx(0 ) = ωn K 2 dt SM or dx(0 + ) = − Aωn sin θ dt EECE 251, Set 5 55 Example • SM In the following circuit, assume the switch is open for a long time. Find v and i for t >0. EECE 251, Set 5 56 28