ECE 211 · Circuit Analysis · Interactive Notes

Lecture 10: Setting Up the Second-Order Differential Equation

This page opens Chapter 8. Two energy storage elements turn a resistive network into a second-order differential equation, which requires two initial conditions. The three-step process is presented, and the equation is assembled term by term for three circuits: a switched RLC loop, a two- capacitor network around an ideal op amp, and a network whose three loops yield only two independent equations. The material is reconstructed from the Lecture 10 board notes as interactive figures.

Teal indicates linked content. Hovering over (or tabbing to) a boxed term such as iLi_L highlights the corresponding circuit element; the linkage also operates in the reverse direction, from the circuit to the equations.

§1 · Two storage elements

A second storage element raises the order by one

A circuit that contains two energy storage elements is described by a second-order differential equation. The storage elements may be an inductor and a capacitor together, two inductors, or two capacitors; what matters is that two independent states are present, so that two derivatives are required to close the description.

R L C two inductors two capacitors

Three arrangements of two storage elements. In each case the two elements are neither in series nor in parallel with each other, so neither can be absorbed into the other, and two independent states remain.

For a DC input the equation takes the standard form

d2ydt2+Adydt+By=K\frac{d^2 y}{dt^2} + A\,\frac{dy}{dt} + B\,y = K

in which KK is a constant precisely because the input is a constant. The response y(t)y(t) may be any voltage or any current in the circuit; the choice is made by the question that was asked. Two initial conditions, y(0+)y(0^+) and y(0+)y'(0^+), are required to select one solution out of the family that the equation admits.

The two contributions

The complete response is the sum of the output caused by the input and the output caused by the initial conditions. Both parts are carried by the same differential equation: the input fixes the constant KK on the right-hand side, and the initial conditions fix the two arbitrary constants that the general solution contains.

§2 · The process

Boundary values first, then the equation, then the solution

Three steps produce the response, and they are performed in this order because each one supplies what the next one consumes.

  1. Find the initial conditions y(0+)y(0^+) and y(0+)y'(0^+), and the steady state y()y(\infty). These three numbers are read from three separate circuits, described in the tabs below.
  2. Find the differential equation for t>0t > 0. The equation is assembled from KVL or KCL written on the circuit that exists after the switch has acted.
  3. Solve the differential equation. The characteristic equation and the three damping cases are the subject of Lecture 11.

The circuit before the switch acts has been at rest long enough to reach DC steady state, so the capacitor is replaced by an open circuit and the inductor is replaced by a short circuit. What is sought here is not the answer but the two quantities that cannot change instantaneously:

vC(0)andiL(0)v_C(0^-) \qquad\text{and}\qquad i_L(0^-)

Every other voltage and current in the circuit is free to jump at the instant of switching, and generally does.

Continuity carries the two quantities across the switching instant: vC(0+)=vC(0)v_C(0^+) = v_C(0^-) and iL(0+)=iL(0)i_L(0^+) = i_L(0^-). Those values are placed in the new circuit, and the remaining unknown is the derivative, which is obtained from the element laws

vC=iC(0+)CiL=vL(0+)Lv_C' = \frac{i_C(0^+)}{C} \qquad\qquad i_L' = \frac{v_L(0^+)}{L}

The derivative is therefore found by finding iC(0+)i_C(0^+) or vL(0+)v_L(0^+) in the new circuit, in which the two continuous quantities are already known.

Long after the switch has acted the circuit is again in DC steady state, so the capacitor is again an open circuit and the inductor is again a short circuit. What is sought is vC()v_C(\infty) or iL()i_L(\infty), which serves two purposes: it is one of the three numbers the solution requires, and it is an independent check on the differential equation, because setting every derivative to zero in

y+Ay+By=Ky'' + A y' + B y = K

leaves By()=KB\,y(\infty) = K, that is, y()=K/By(\infty) = K/B.

The two substitutions that make the DC steady-state circuits purely resistive. A capacitor carries no current when its voltage is constant, and an inductor supports no voltage when its current is constant.

§3 · The example: the three boundary values

The switch shorts the 10 Ω resistor at t=0t = 0

The circuit below contains one capacitor and one inductor, so it is second order, and the objective is iL(t)i_L(t). The switch closes at t=0t = 0, which places a short across the 10 Ω resistor and changes the circuit that governs the response. Step 1 of the process is carried out first.

The problem

Find iL(t)i_L(t) for t>0t > 0. The switch closes at t=0t = 0. The storage elements are the 1/20 F capacitor and the 2/5 H inductor, and the source is the 24 V source.

At t=0t = 0^-: DC steady state

The circuit has been at rest, so the capacitor is an open circuit and the inductor is a short circuit. One loop remains, carrying iLi_L through the 2 Ω and 10 Ω resistors:

2iL+10iL+24=0    12iL=24    iL(0)=2 A\tm{a.r2 a.il}{2\,i_L} + \tm{a.r10 a.il}{10\,i_L} + \tm{a.vs}{24} = 0 \;\Longrightarrow\; 12\,i_L = -24 \;\Longrightarrow\; \boxed{i_L(0^-) = -2\ \text{A}}

The negative sign states that 2 A circulates opposite to the labeled arrow, so 2 A flows downward through the 2 Ω resistor. Ohm's law then gives the capacitor voltage directly, because the capacitor is connected across that resistor:

vC(0)=(2 Ω)(2 A)=4 V\tm{a.vc}{v_C(0^-)} = (2\ \Omega)(2\ \text{A}) = \boxed{4\ \text{V}}

At t=0+t = 0^+: what carries across

Only two quantities are continuous through the switching instant, and both have just been computed:

vC(0+)=vC(0)=4 ViL(0+)=iL(0)=2 A\tm{a.vc}{v_C(0^+)} = v_C(0^-) = 4\ \text{V} \qquad\qquad \tm{a.il}{i_L(0^+)} = i_L(0^-) = -2\ \text{A}

The switch is now closed, so the 10 Ω resistor is shorted and carries no current. Every other quantity in the circuit has jumped.

At t=0+t = 0^+: the derivative

The remaining initial condition is iL(0+)i_L'(0^+), and the element law vL=LiLv_L = L\,i_L' converts it into a voltage. KVL around the right window pane, in which the capacitor voltage is known and the 10 Ω resistor is shorted out, supplies that voltage:

4+vL+24=0    vL(0+)=20 V-\tm{a.vc}{4} + \tm{a.vl}{v_L} + \tm{a.vs}{24} = 0 \;\Longrightarrow\; v_L(0^+) = -20\ \text{V}
vL=LdiLdt=25iL    20=25iL    iL(0+)=50 A/sv_L = L\,\frac{d i_L}{dt} = \tfrac{2}{5}\,i_L' \;\Longrightarrow\; -20 = \tfrac{2}{5}\,i_L' \;\Longrightarrow\; \boxed{i_L'(0^+) = -50\ \text{A/s}}

At t=t = \infty: DC steady state again

The capacitor is an open circuit and the inductor is a short circuit once more, but the switch is now closed, so the 10 Ω resistor no longer appears. The 24 V source drives the 2 Ω resistor alone:

2iL+24=0    iL()=12 A\tm{a.r2 a.il}{2\,i_L} + \tm{a.vs}{24} = 0 \;\Longrightarrow\; \boxed{i_L(\infty) = -12\ \text{A}}

The three numbers required by the solution are therefore 2-2 A, 50-50 A/s, and 12-12 A. The shorted 10 Ω resistor is what separates the final value from the initial value.

§4 · The example: the differential equation

Two unknowns, two equations, one substitution

Step 2 assembles the differential equation on the circuit that exists for t>0t > 0. Two unknowns are chosen, and for a circuit with one capacitor and one inductor the natural pair is vCv_C and iLi_L. Two equations are then written in those unknowns, and one is substituted into the other until a single equation in a single variable remains.

The choice of unknowns

The pair of unknowns is vCv_C and iLi_L for an RLC circuit, vC1v_{C1} and vC2v_{C2} for two capacitors, and iL1i_{L1} and iL2i_{L2} for two inductors. In every case the states are the quantities that cannot jump, and the element laws iC=CvCi_C = C\,v_C' and vL=LiLv_L = L\,i_L' are what introduce the derivatives.

The element laws

The passive sign convention is applied to both storage elements, with the labeled current entering the terminal marked positive:

iC=CvC=120vCvL=LiL=25iL\tm{b.c b.ic}{i_C = C\,v_C' = \tfrac{1}{20}\,v_C'} \qquad\qquad \tm{b.l b.vl}{v_L = L\,i_L' = \tfrac{2}{5}\,i_L'}

These two relations are the only place derivatives enter, and they are what raise a resistive network to a differential equation.

Branch currents with the fewest unknowns

The capacitor branch carries iCi_C and the inductor branch carries iLi_L. KCL at the top node then fixes the left branch, which must carry iL+iCi_L + i_C upward through the 2 Ω resistor. No third symbol is introduced.

KVL around the left window pane

2(iL+iC)+vC=0    2iL+110vC+vC=0(1)\tm{b.r2 b.isum}{2\,(i_L + i_C)} + \tm{b.vc}{v_C} = 0 \;\Longrightarrow\; 2\,i_L + \tfrac{1}{10}\,v_C' + v_C = 0 \tag{1}

The capacitor current has been replaced by 120vC\tfrac{1}{20} v_C', so equation (1) contains only the two chosen unknowns and one derivative.

KVL around the right window pane

vC+25iL+24=0    vC=25iL+24(2)-\tm{b.vc}{v_C} + \tm{b.vl}{\tfrac{2}{5}\,i_L'} + \tm{b.vs}{24} = 0 \;\Longrightarrow\; v_C = \tfrac{2}{5}\,i_L' + 24 \tag{2}

Equation (2) is solved for vCv_C on sight, which makes it the one to substitute. Its derivative is required as well, and the constant differentiates away:

vC=25iLv_C' = \tfrac{2}{5}\,i_L''

Substitute (2) into (1)

2iL+110[25iL]+25iL+24=0    125iL+25iL+2iL=242\,i_L + \tfrac{1}{10}\left[\tfrac{2}{5}\,i_L''\right] + \tfrac{2}{5}\,i_L' + 24 = 0 \;\Longrightarrow\; \tfrac{1}{25}\,i_L'' + \tfrac{2}{5}\,i_L' + 2\,i_L = -24

Multiplying by 25 clears the fractions and normalizes the leading coefficient, which is the form the solution procedure expects:

iL+10iL+50iL=600\boxed{i_L'' + 10\,i_L' + 50\,i_L = -600}

Check the equation against the steady state

At t=t = \infty every derivative vanishes, so the equation collapses to 50iL()=60050\,i_L(\infty) = -600, that is, iL()=12i_L(\infty) = -12 A. This agrees with the value obtained from the DC steady-state circuit in section 3, which confirms both the equation and the boundary value. A disagreement here indicates a sign error, and it is far cheaper to find it now than after the equation has been solved.

§5 · The response that follows

Three numbers and one equation determine iL(t)i_L(t)

The board notes stop at the differential equation, and Lecture 11 develops the solution procedure in full. The result for this circuit is recorded here so that the three boundary values may be seen doing their work. The characteristic equation is

s2+10s+50=0    s=5±j5s^2 + 10\,s + 50 = 0 \;\Longrightarrow\; s = -5 \pm j5

so the roots are complex and the response is underdamped: a decaying oscillation superposed on the final value. With iL()=12i_L(\infty) = -12 A as the particular solution,

iL(t)=12+e5t(B1cos5t+B2sin5t)i_L(t) = -12 + e^{-5t}\left(B_1 \cos 5t + B_2 \sin 5t\right)

and the two initial conditions fix the two constants: iL(0+)=2i_L(0^+) = -2 A gives B1=10B_1 = 10, and iL(0+)=50i_L'(0^+) = -50 A/s gives B2=0B_2 = 0. Therefore

iL(t)=12+10e5tcos5t  A,t>0\boxed{i_L(t) = -12 + 10\,e^{-5t}\cos 5t \ \ \text{A}, \qquad t > 0}

The response starts at −2 A with a slope of −50 A/s, overshoots below the final value, and settles at −12 A. The slider walks a marker along the curve.

iL(0.20 s) = −12 + 10e−5t cos 5t = −10.01 A

Verification of the two constants

Substituting t=0t = 0 into the solution gives 12+10=2-12 + 10 = -2 A, which matches iL(0+)i_L(0^+). Differentiating gives

iL(t)=50e5t(cos5t+sin5t)i_L'(t) = -50\,e^{-5t}\left(\cos 5t + \sin 5t\right)

and substituting t=0t = 0 gives 50-50 A/s, which matches iL(0+)i_L'(0^+). As tt \to \infty the exponential vanishes and iL12i_L \to -12 A, which matches the DC steady-state circuit. All three boundary values are reproduced.

Damping at a glance

Writing the characteristic equation as s2+2αs+ω02=0s^2 + 2\alpha s + \omega_0^2 = 0 gives α=5\alpha = 5 s⁻¹ and ω0=507.07\omega_0 = \sqrt{50} \approx 7.07 rad/s, so the damping ratio is ζ=α/ω00.707\zeta = \alpha/\omega_0 \approx 0.707. A damping ratio below unity is the underdamped case, which is why the curve overshoots. The three cases and their solution templates are treated in Lecture 11.

§6 · Two capacitors and an ideal op amp

The same process without a single inductor

The circuit below contains no inductor, yet it is second order, because it contains two capacitors that are neither in series nor in parallel. The objective is the differential equation for the output voltage vov_o. The element law i=Cdv/dti = C\,dv/dt is applied to each capacitor, and the op amp supplies two constraints rather than an equation.

What the ideal op amp contributes

Two properties of the ideal op amp are used, and neither of them is an equation to be solved. No current enters either input terminal, and the two input terminals are held at the same voltage. The output is tied back to the inverting input, so the amplifier acts as a follower and the node above the lower capacitor and the output node both carry vov_o.

Marking the two nodes with the same symbol is what makes the left node voltage vov2v_o - v_2: the capacitor voltage v2v_2 is measured from the output rail down to that node.

The two capacitor currents

Under the passive sign convention the current in each capacitor enters the terminal marked positive:

i1=110v2i2=110vo\tm{c.c1 c.i1}{i_1 = \tfrac{1}{10}\,v_2'} \qquad\qquad \tm{c.c2 c.i2}{i_2 = \tfrac{1}{10}\,v_o'}

The current i1i_1 therefore flows into the left node, and i2i_2 flows out of the lower node into the reference.

KCL at the lower node

No current enters the op amp input, so the only branches at this node are the 2 Ω resistor, the 2 A source, and the lower capacitor:

vo(vov2)22+110vo=0\tm{c.r2}{\frac{v_o - (v_o - v_2)}{2}} - \tm{c.cs}{2} + \tm{c.c2 c.i2}{\tfrac{1}{10}\,v_o'} = 0

The output voltage cancels in the first term, and the equation is solved for v2v_2:

v222+110vo=0    v2=415vo(1)\frac{v_2}{2} - 2 + \tfrac{1}{10}\,v_o' = 0 \;\Longrightarrow\; v_2 = 4 - \tfrac{1}{5}\,v_o' \tag{1}

KCL at the left node

Four branches meet at the node marked vov2v_o - v_2: the 10 Ω resistor to the source, the upper capacitor, the 2 Ω resistor, and the 2 A source. The capacitor current enters the node, so it is subtracted from the currents that leave:

(vov2)1010110v2+(vov2)vo2+2=0\tm{c.r10}{\frac{(v_o - v_2) - 10}{10}} - \tm{c.c1 c.i1}{\tfrac{1}{10}\,v_2'} + \tm{c.r2}{\frac{(v_o - v_2) - v_o}{2}} + \tm{c.cs}{2} = 0

Multiplying through by 10 and collecting terms gives

vo6v2v2=10(2)v_o - 6\,v_2 - v_2' = -10 \tag{2}

Substitute (1) into (2)

Equation (1) supplies both v2v_2 and, after differentiation, v2=15vov_2' = -\tfrac{1}{5} v_o'':

vo6[415vo][15vo]=10v_o - 6\left[4 - \tfrac{1}{5}\,v_o'\right] - \left[-\tfrac{1}{5}\,v_o''\right] = -10
15vo+65vo+vo=14    vo+6vo+5vo=70\tfrac{1}{5}\,v_o'' + \tfrac{6}{5}\,v_o' + v_o = 14 \;\Longrightarrow\; \boxed{v_o'' + 6\,v_o' + 5\,v_o = 70}

Check against the DC steady state

Setting the derivatives to zero gives 5vo()=705\,v_o(\infty) = 70, that is, vo()=14v_o(\infty) = 14 V. The same value is obtained independently from the DC circuit, in which both capacitors are open. No capacitor current flows, so the 2 A source must pass entirely through the 2 Ω resistor, and the 10 Ω resistor carries no current at all:

vov2=10 Vvo=(vov2)+(2 A)(2 Ω)=14 V v_o - v_2 = 10\ \text{V} \qquad v_o = (v_o - v_2) + (2\ \text{A})(2\ \Omega) = 14\ \text{V} \ \checkmark

The roots of s2+6s+5=0s^2 + 6s + 5 = 0 are s=1s = -1 and s=5s = -5, which are real and distinct, so this response is overdamped and does not oscillate.

§7 · Three loops, two independent equations

Writing more equations than the circuit contains

The circuit below has three window panes to write KVL around, but only two of the three equations are independent, because the third is the sum of the other two. Two independent equations are exactly what a second-order circuit requires, and the pair that is easiest to substitute should be selected. The source is left symbolic as VsV_s, which costs nothing and makes the structure of the result visible.

The unknowns and the element laws

The states are the capacitor voltage vCv_C and the inductor current iLi_L, and the element laws introduce the derivatives:

iC=110vCvL=12iL\tm{d.c d.ic}{i_C = \tfrac{1}{10}\,v_C'} \qquad\qquad \tm{d.l d.vl}{v_L = \tfrac{1}{2}\,i_L'}

Branch currents

The 5 Ω resistor and the inductor are in series with each other, so both carry iLi_L. The capacitor carries iCi_C, and KCL at the node between them assigns iLiCi_L - i_C to the 4 Ω resistor. One symbol per state covers every branch.

Three loops, two of them independent

bottom:Vs+5iL+vC+12iL=0(1)\text{bottom:}\quad -\tm{d.vs}{V_s} + \tm{d.r5 d.il}{5\,i_L} + \tm{d.vc}{v_C} + \tm{d.vl}{\tfrac{1}{2}\,i_L'} = 0 \tag{1}
top:4[iL110vC]vC=0(2)\text{top:}\quad \tm{d.r4 d.i4}{4\left[i_L - \tfrac{1}{10}\,v_C'\right]} - \tm{d.vc}{v_C} = 0 \tag{2}
outer:Vs+5iL+4[iL110vC]+12iL=0(3)\text{outer:}\quad -\tm{d.vs}{V_s} + \tm{d.r5 d.il}{5\,i_L} + \tm{d.r4 d.i4}{4\left[i_L - \tfrac{1}{10}\,v_C'\right]} + \tm{d.vl}{\tfrac{1}{2}\,i_L'} = 0 \tag{3}

Adding (1) and (2) produces (3) exactly, so the outer loop carries no new information. Equations (1) and (2) are kept.

Solve (1) for vCv_C and differentiate

Equation (1) is already solved for vCv_C by inspection, which is why it is the one to eliminate:

vC=Vs5iL12iLvC=5iL12iLv_C = V_s - 5\,i_L - \tfrac{1}{2}\,i_L' \qquad\Longrightarrow\qquad v_C' = -5\,i_L' - \tfrac{1}{2}\,i_L''

The source is a constant, so it contributes nothing to the derivative. A time-varying source would contribute a term here, which is exactly how a forcing function reaches the right-hand side.

Substitute into (2)

4iL410[5iL12iL][Vs5iL12iL]=04\,i_L - \tfrac{4}{10}\left[-5\,i_L' - \tfrac{1}{2}\,i_L''\right] - \left[V_s - 5\,i_L - \tfrac{1}{2}\,i_L'\right] = 0
15iL+52iL+9iL=Vs    iL+12.5iL+45iL=5Vs\tfrac{1}{5}\,i_L'' + \tfrac{5}{2}\,i_L' + 9\,i_L = V_s \;\Longrightarrow\; \boxed{i_L'' + 12.5\,i_L' + 45\,i_L = 5\,V_s}

Check against the DC steady state

Setting the derivatives to zero gives 45iL()=5Vs45\,i_L(\infty) = 5 V_s, that is, iL()=Vs/9i_L(\infty) = V_s/9. The DC circuit confirms it: the capacitor is open and the inductor is a short, so the source drives the 5 Ω and 4 Ω resistors in series and delivers Vs/(5+4)V_s/(5 + 4). ✓

The roots of s2+12.5s+45=0s^2 + 12.5\,s + 45 = 0 are s=6.25±j2.44s = -6.25 \pm j2.44, so this response is underdamped, though only just: the damping ratio is ζ=6.25/450.93\zeta = 6.25/\sqrt{45} \approx 0.93.

§8 · Your turn

Practice: two inductors and a switch

This circuit contains no capacitor and two inductors, so the process applies unchanged with i1i_1 and i2i_2 as the states. The switch closes at t=0t = 0, having been open long enough that both inductor currents are zero. The problem should be attempted on paper before the hints are opened, in order.

Find the three boundary values i1(0+)i_1(0^+), i1(0+)i_1'(0^+), and i1()i_1(\infty), and the differential equation governing i1i_1, the current in L1L_1.

Hint 1: The boundary values

Before the switch closes, no source is connected, so i1(0)=i2(0)=0i_1(0^-) = i_2(0^-) = 0, and inductor currents are continuous: i1(0+)=i2(0+)=0i_1(0^+) = i_2(0^+) = 0. For the derivative, apply i1=vL1(0+)/L1i_1' = v_{L1}(0^+)/L_1, and note that with both currents zero at t=0+t = 0^+ there is no drop across either resistor. Long afterwards both inductors are short circuits, which places node a at the reference and puts the whole source current through L1L_1.

Hint 2: The plan

Take the node voltage at a as vav_a. It equals L1i1=i1L_1 i_1' = i_1' because L1L_1 connects that node to the reference. Two equations follow: KVL around the source loop, and KVL around the loop formed by L1L_1, the 2 Ω resistor, and L2L_2. Eliminate i2i_2 between them.

Hint 3: The two equations
12=1(i1+i2)+i1i1=2i2+i212 = \tm{pr.r1}{1 \cdot (i_1 + i_2)} + \tm{pr.l1}{i_1'} \qquad\qquad \tm{pr.l1}{i_1'} = \tm{pr.r2}{2\,i_2} + \tm{pr.l2}{i_2'}

The first equation gives i2=12i1i1i_2 = 12 - i_1 - i_1', and differentiating it gives i2=i1i1i_2' = -i_1' - i_1''. Both are substituted into the second equation.

Solution

The boundary values are read from the three circuits:

i1(0+)=0i1(0+)=va(0+)L1=12(1)(0)1=12 A/si1()=121=12 Ai_1(0^+) = 0 \qquad i_1'(0^+) = \frac{v_a(0^+)}{L_1} = \frac{12 - (1)(0)}{1} = 12\ \text{A/s} \qquad i_1(\infty) = \frac{12}{1} = 12\ \text{A}

Substituting i2=12i1i1i_2 = 12 - i_1 - i_1' and i2=i1i1i_2' = -i_1' - i_1'' into i1=2i2+i2i_1' = 2 i_2 + i_2' gives

i1=2(12i1i1)i1i1    i1+4i1+2i1=24i_1' = 2\left(12 - i_1 - i_1'\right) - i_1' - i_1'' \;\Longrightarrow\; \boxed{i_1'' + 4\,i_1' + 2\,i_1 = 24}

The steady-state check passes: 2i1()=242\,i_1(\infty) = 24 gives i1()=12i_1(\infty) = 12 A, which agrees with the DC circuit, in which L1L_1 short-circuits node a so that i2=0i_2 = 0 and the 1 Ω resistor carries the entire 12 A.

The roots of s2+4s+2=0s^2 + 4s + 2 = 0 are s=2±2s = -2 \pm \sqrt{2}, which are real and distinct, so the response is overdamped. Carrying the solution through, which is the subject of Lecture 11, yields

i1(t)=12(6+32)e(22)t(632)e(2+2)t  Ai_1(t) = 12 - \left(6 + 3\sqrt{2}\right) e^{-(2 - \sqrt{2})t} - \left(6 - 3\sqrt{2}\right) e^{-(2 + \sqrt{2})t}\ \ \text{A}

and this expression reproduces i1(0)=0i_1(0) = 0, i1(0)=12i_1'(0) = 12 A/s, and i1()=12i_1(\infty) = 12 A. ✓