ENع
←Initial conditions
Lesson 22 · Capacitors, inductors and first-order circuits

Switching and initial conditions

14 min11 steps5 questionsIntermediate
About this lesson

When a switch moves, a circuit with capacitors and inductors does not settle at once. Follow one circuit: a 12 V source feeds a capacitor branch and an inductor branch through a soft-start resistor, and a switch shorts that resistor at t = 0. Work out every value just before (0−), just after (0+) and long after (∞) the switch moves, and see which ones may jump. This lesson pulls together "The RC circuit: natural and step response" and "The RL circuit"; the parts themselves come from "Capacitors: current, voltage and stored energy", "Inductors and the magnetic field" and the Hardware lesson "Resistors and capacitors", and Ohm's law and series circuits from "Ohm's law" and "Series and parallel circuits".

You'll learn to

Tick what you feel confident about. These self-checks do not affect your lesson score.

Fig 22 · Interactive
01 / 11

The circuit and its switch

A 12 V source feeds a capacitor branch (R1 and C) and an inductor branch (R2 and L) through a 2 Ω soft-start resistor Rs. Switch S has been open for a long time. At t = 0 it closes and shorts out Rs.

source      Vs = 12 V
soft-start  Rs = 2 Ω   (switch S across it)
C branch    R1 = 4 Ω,  C = 250 µF
L branch    R2 = 4 Ω,  L = 8 mH

S open for a long time, closes at t = 0.
Question: what is every voltage and
current just before, just after, and
long after the switch moves?
Loading figure…
or ← →
Read the lesson step by step
  1. The circuit and its switch

    A 12 V source feeds a capacitor branch (R1 and C) and an inductor branch (R2 and L) through a 2 Ω soft-start resistor Rs. Switch S has been open for a long time. At t = 0 it closes and shorts out Rs.

    source      Vs = 12 V
    soft-start  Rs = 2 Ω   (switch S across it)
    C branch    R1 = 4 Ω,  C = 250 µF
    L branch    R2 = 4 Ω,  L = 8 mH
    
    S open for a long time, closes at t = 0.
    Question: what is every voltage and
    current just before, just after, and
    long after the switch moves?
  2. Long before: DC steady state

    After a long time nothing changes any more, so every derivative is zero. A capacitor's current is i = C·dv/dt = 0: it acts as an open circuit. An inductor's voltage is v = L·di/dt = 0: it acts as a short circuit.

    DC steady state (nothing changing):
    
    capacitor   iC = C · dvC/dt = 0  ->  open circuit
    inductor    vL = L · diL/dt = 0  ->  short circuit
    
    The same is true long after the switch
    moves (t -> ∞).
  3. Solve just before: t = 0−

    Just before the switch moves (t = 0−), C is open and L is a short. One loop carries iL = 12 / (2 + 4) = 2 A, so node a sits at 8 V. R1 carries nothing, so vC = 8 V too.

    t = 0−   (S open, C open, L short)
    
    iL(0−) = Vs / (Rs + R2) = 12 / (2 + 4) = 2 A
    va(0−) = Vs − Rs·iL = 12 − 2 × 2 = 8 V
    iC(0−) = 0  ->  no drop on R1
    vC(0−) = va(0−) = 8 V
    vL(0−) = 0
    
    stored  wC = ½·C·vC² = 8 mJ
            wL = ½·L·iL² = 16 mJ
  4. What cannot jump

    A step in vC would need infinite current, since i = C·dv/dt, and a step in iL would need infinite voltage. Stored energy, ½Cv² and ½Li², cannot change in zero time. So vC(0+) = 8 V and iL(0+) = 2 A.

    continuity (any circuit with finite
    sources):
    
    vC(0+) = vC(0−) = 8 V
    iL(0+) = iL(0−) = 2 A
    
    why: iC = C·dvC/dt and vL = L·diL/dt.
    A jump means an infinite derivative,
    so infinite current or voltage.
    Energy ½Cv², ½Li² would change in
    zero time: infinite power.
  5. t = 0: the switch closes

    At t = 0 the switch closes and shorts Rs. Node a jumps from 8 V straight to 12 V. Node voltages and resistor currents are free to jump; only vC and iL must carry on smoothly.

    S closes at t = 0, shorting Rs.
    
    va(0−) = 8 V  ->  va(0+) = 12 V   (jumps)
    iRs(0−) = 2 A ->  iRs(0+) = 0     (both ends at 12 V)
    
    Resistor voltages and currents may
    jump: v = R·i holds at every instant.
  6. The circuit at t = 0+

    For the instant t = 0+, replace the capacitor by a 8 V source and the inductor by a 2 A source. What is left is a resistive circuit, which Ohm's law and Kirchhoff's laws solve directly.

    at t = 0+ only:
    
    capacitor  ->  voltage source vC(0+) = 8 V
    inductor   ->  current source iL(0+) = 2 A
    
    (an uncharged capacitor would be a
     short, a zero-current inductor an open)
    
    Then solve an ordinary resistive circuit.
  7. What does jump

    R1 now drops 12 − 8 = 4 V, so iC(0+) = 4 / 4 = 1 A, up from 0. R2 drops 4 × 2 = 8 V, so the inductor sees vL(0+) = 12 − 8 = 4 V, up from 0.

    t = 0+   (va = 12 V)
    
    iC(0+) = (va − vC) / R1 = (12 − 8) / 4 = 1 A
             was 0 at 0−: jumps
    vL(0+) = va − R2·iL = 12 − 4 × 2 = 4 V
             was 0 at 0−: jumps
    
    Capacitor current and inductor voltage
    are allowed to jump.
  8. Check with KCL at node a

    Current into node a must equal current out. Rs carries 0 A, because both its ends are at 12 V. The switch brings iS = 1 + 2 = 3 A, which splits into 1 A for the capacitor and 2 A for the inductor.

    KCL at node a, t = 0+:
    
    in:   iS + iRs = 3 + 0 = 3 A
    out:  iC + iL  = 1 + 2 = 3 A
    
    in − out = 0  ✓
    
    KVL check, C branch:
    12 − 4 (R1) − 8 (C) = 0  ✓
    KVL check, L branch:
    12 − 8 (R2) − 4 (L) = 0  ✓
  9. The starting slopes

    The jumps set the slopes. dvC/dt(0+) = iC/C = 1 / 250 µF = 4000 V/s, or 4 V per ms. diL/dt(0+) = vL/L = 4 / 8 mH = 500 A/s. The dashed tangents show where each curve starts heading.

    dvC/dt(0+) = iC(0+) / C
               = 1 A / 250 µF = 4000 V/s
               = 4 V/ms
    diL/dt(0+) = vL(0+) / L
               = 4 V / 8 mH = 500 A/s
               = 0.5 A/ms
    
    Follow a tangent: it reaches the final
    value after exactly one time constant.
  10. Long after: t → ∞

    After a long time it is DC again: C open, L short. No current flows in R1, so vC(∞) = 12 V. The inductor current is iL(∞) = 12 / 4 = 3 A, and vL(∞) = 0.

    t -> ∞   (S closed, C open, L short)
    
    iC(∞) = 0     vC(∞) = va = 12 V
    vL(∞) = 0     iL(∞) = Vs / R2 = 3 A
    iS(∞) = 3 A
    
    stored  wC = 18 mJ   wL = 36 mJ
  11. Three numbers draw the curve

    Each quantity moves from its 0+ value to its ∞ value: x(t) = x(∞) + [x(0+) − x(∞)]·e^(−t/τ). Here τC = R1·C = 1 ms and τL = L/R2 = 2 ms. After about five time constants the change is over.

    x(t) = x(∞) + [x(0+) − x(∞)] · e^(−t/τ)
    
    τC = R1·C = 4 × 250 µF = 1 ms
    τL = L/R2 = 8 mH / 4 = 2 ms
    
    vC(t) = 12 − 4·e^(−t/1 ms)  V
    iC(t) = 1·e^(−t/1 ms)  A
    iL(t) = 3 − 1·e^(−t/2 ms)  A
    vL(t) = 4·e^(−t/2 ms)  V
    
    after 5τ: within 0.7 % of the end.

Quiz Unlocks after the last step.