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 Capacitors (Refresher) • Capacitors store energy (in the electric field between their plates) • For capacitors we have: qC ( t ) = CvC ( t ) dvC (t ) iC (t ) = C ⋅ 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: dvC (t ) pC (t ) = iC (t )vC (t ) = C vC (t ) dt and the total stored energy in the capacitor is: t t 1 2 WC (t ) = ∫ pC (τ ) ⋅ dτ = ∫ CvC (τ )dvC (τ ) = CvC (t ) 2 −∞ −∞ SM EECE 251, Set 5 4 Inductors (Refresher) • Inductors store energy in their magnetic field. • For inductors, we have diL (t ) vL (t ) = L ⋅ dt t t 1 1 iL (t ) = ∫ vL (τ ) ⋅ dτ or iL (t ) = ∫ vL (τ ) ⋅ dτ + iL (t0 ) L −∞ L t0 SM EECE 251, Set 5 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: diL (t ) pL (t ) = vL (t )iL (t ) = L iL (t ) dt • The total stored energy in an inductor is: 1 2 WL (t ) = ∫ pL (τ ) ⋅ dτ = ∫ LiL (τ )diL (τ ) = LiL (t ) −∞ −∞ 2 t SM t EECE 251, Set 5 6 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 • In the following circuit find the energy that is stored in the inductor and capacitor, when the circuit reaches steady state. SM EECE 251, Set 5 8 Example • 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=∞.. SM EECE 251, Set 5 9 Example • 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=∞. SM EECE 251, Set 5 10 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). • SM A circuit that is characterized by a first-order differential equation is called a first-order circuit. 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 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 Example • Which one of the following circuits is a first-order circuit? SM EECE 251, Set 5 15 Source-Free or Zero-Input First-Order Circuit • 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. SM EECE 251, Set 5 16 Source-Free or Zero-Input First-Order Circuit iR (t ) = −iL (t ) iC (t ) = −iR (t ) vR (t ) vL (t ) L diL (t ) = = iR (t ) = R R R dt L diL (t ) diL (t ) R = −iL (t ) ⇒ = − iL (t ) R dt dt L iR (t ) = SM vR (t ) vC (t ) = R R 1 dvC (t ) vR (t ) dvC (t ) =− ⇒ =− vC (t ) C dt R dt RC 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: 1 dvC (t ) vC (t ) dvC (t ) + =0⇒ =− vC (t ) iC (t ) + iR (t ) = 0 ⇒ C dt R dt RC • Let’s try to solve this differential equation. Because of the simple form of this equation we can re-arrange the term as: dvC (t ) 1 =− dt vC (t ) RC SM EECE 251, Set 5 18 Source-Free First-Order RC Circuit • Before going any further can you tell the units for RC from the equation: 1 dvC (t ) =− dt vC (t ) RC • Now let’s go further! and integrate both sides of the equation from 0 to t: t t dvC (t ' ) 1 = − ∫t '=0 vC (t ' ) ∫t '=0 RC dt ' t t ln vC (t ' ) t '=0 1 =− t' RC t '=0 1 − t vC (t ) 1 RC ln =− t ⇒ vC (t ) = V0 e V0 RC SM EECE 251, Set 5 19 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 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 τ. SM EECE 251, Set 5 20 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 EECE 251, Set 5 21 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: 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τ. SM EECE 251, Set 5 22 Example • Assuming vC(0)=30V, determine vC and vx, and io for t≥0 SM 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 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 • • SM 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 EECE 251, Set 5 25 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 Example • In the following circuit, assuming i(0)=10A, calculate i(t) and ix(t). SM EECE 251, Set 5 27 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 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 EECE 251, Set 5 29 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 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 0, t < 0 r (t ) = ∫ u (t ' )dt ' = tu (t ) = t , t ≥ 0 −∞ t SM EECE 251, Set 5 32 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 − t0 )dt = ∫ f (t0 )δ (t − t0 ) dt = f (t0 ) ∫ δ (t − t0 )dt = f (t0 ) b If t0 is not between a and b: ∫ f (t )δ (t − t0 )dt = a SM EECE 251, Set 5 33 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 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 '= t 0 [ ∫ • t t '= t 0 Therefore: e [ SM ] t d − λt ' − λt ' e x(t ' ) dt ' =e x(t ' ) = e − λt x(t ) − e − λt0 x(t 0 ) t '=t 0 dt ' − λt x(t ) − e ⇒ x(t ) = e • ∫ For the left-hand-side we have: ∫ • ] − λ t0 x(t 0 ) = λ ( t − t0 ) ∫ ∫ x(t 0 ) + t e −λt ' f (t ' )dt ' t '= t0 t e λ (t −t ') f (t ' )dt ' t '=t 0 λ 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). EECE 251, Set 5 35 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 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+ ) + ∫ t e λ (t −t ') Fdt ' t ' =t 0 = e λ (t −t0 ) x(t 0+ ) + Fe λt ∫ = e λ (t −t0 ) x(t 0+ ) + Fe λt −1 λ ( t −t 0 ) x(t 0+ ) − F t e −λt ' dt ' t '=t 0 λ t e − λt ' t '= t0 λt − λt =e e e − e λ F = e λ (t −t0 ) x(t 0+ ) − 1 − e λ (t −t0 ) [ λ SM x(t 0+ ) = x0 EECE 251, Set 5 ] − λ t0 37 DC or Step-Response of First-Order Circuits −1 • For first-order circuits: λ = τ • Therefore: x(t ) = e − ( t − t0 ) τ ( t −t 0 ) − 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 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 − elapsed time time constant + Final value • The initial value can be found using the initial condition of the circuit. SM EECE 251, Set 5 39 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 independent 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 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 −t 0 ) 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 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 EECE 251, Set 5 43 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 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 EECE 251, Set 5 45 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 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 2 vC (t ) R dvC (t ) d 2iL (t ) R diL (t ) 1 1 + + i ( t ) = 0 and + + vC (t ) = 0 L L dt LC L dt LC dt 2 dt 2 SM 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 2 vC (t ) d 2iL (t ) 1 diL (t ) 1 1 dvC (t ) 1 + + i ( t ) = 0 and + + vC (t ) = 0 L 2 2 RC dt LC RC dt LC dt dt SM EECE 251, Set 5 48 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 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: − b ± b 2 − 4c s1 , s2 = 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 EECE 251, Set 5 51 Real and Distinct Roots (Overdamped Response) • If b 2 − 4c > 0 and distinct. the roots of the characteristic equation are real • The general form of the solution to the differential equation is then: x(t ) = where: s t K1e 1 + K2 s t e2 + XF F XF = c x(0 + ) = K1 + K 2 + X F dx(0 + ) = s1K1 + s2 K 2 dt SM EECE 251, Set 5 52 Real and Equal Roots (Critically Damped Response) • If b 2 − 4c = 0 and equal. the roots of the characteristic equation are real • The general form of the solution to the differential equation is then: x(t ) = ( K1 + K 2 where: s t t )e 1 + XF F XF = c x(0 + ) = K1 + X F 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 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 XF = c x(0 + ) = K1 + X F + dx(0 ) = ωn K 2 dt SM F c x(0 + ) = A cosθ + X F XF = or dx(0 + ) = − Aωn sin θ dt EECE 251, Set 5 55 Example • In the following circuit, assume the switch is open for a long time. Find v and i for t >0. SM EECE 251, Set 5 56