Sub topic 6
Finding v(0) and v'(0) from circuit conditions
A second-order response needs two initial conditions. Whichever damping case applies, the two constants in the solution come from the value of the response at t = 0 and the value of its slope at t = 0. This chapter shows where both numbers come from in a series RLC circuit and how they fix the constants in all three cases.
Prerequisites assumed
- KVL and the v-i relations of R, L and C.
- The continuity rules for capacitor voltage and inductor current.
- The series RLC equation from earlier chapters, with its forced and natural split.
- The three damping cases and their characteristic roots.
The setup
The source steps from some earlier value to Vs at t = 0. The unknown is the capacitor voltage v(t). The equation we are solving is:
LC v'' + RC v' + v = Vs
For t > 0 the solution is the final value plus the natural response:
v(t) = Vs + v_n(t)
Here v_n(t) is the natural response, which decays to zero. It contains two unknown constants. We use the notation 0⁻ for the instant just before the step and 0⁺ for the instant just after.
Condition 1: v(0⁺) comes from continuity
A capacitor's stored energy is ½Cv². The energy cannot jump unless infinite power is available, so the capacitor voltage is continuous:
v(0⁺) = v(0⁻) = V0
Here V0 is the capacitor voltage just before the step. In the common textbook case, the circuit sat at rest before the step, so V0 = 0. If it sat at a previous DC level, find V0 by treating the capacitor as an open circuit in the pre-step DC analysis.
Condition 2: v'(0⁺) comes from the capacitor current
The capacitor relation is i = C dv/dt. The same loop current flows through R, L and C in a series circuit, so:
v'(0⁺) = i(0⁺) / C
The inductor current is continuous, for the same energy reason (½Li²). Therefore:
i(0⁺) = i(0⁻) = I0
and so:
v'(0⁺) = I0 / C
This is the key step. You never differentiate v directly. You read the slope off the inductor current, which is known from before the step.
Where I0 comes from
In a single series loop driven by a DC source, the steady state before the step has no current, because the capacitor blocks DC. So I0 = 0 unless something else changes at t = 0. Typical reasons for a nonzero I0 are:
- A switch that moves the RLC loop from another circuit, where the inductor was carrying current.
- A problem that states an initial current directly.
- A circuit where the inductor sat in a DC path that the switch then breaks.
In the last two cases, solve the pre-switch circuit at DC steady state with the inductor as a short circuit and the capacitor as an open circuit. This gives I0 and V0, and these are your two states at 0⁺.
Initial conditions for the natural part
Since v = Vs + v_n and Vs is constant, the conditions transfer to the natural response:
- v_n(0) = V0 − Vs
- v_n'(0) = v'(0) = I0 / C
The derivative is unchanged because the derivative of a constant is zero. Applying the initial conditions to the whole response without subtracting Vs from the first one is a very common error.
Using the conditions in each damping case
Let ΔV = V0 − Vs and let S0 = I0 / C, the initial slope in V/s. For the first form below, s1 and s2 are the two real roots. For the third, α is the neper frequency and ω_d is the damped frequency.
Overdamped
The form is v = Vs + A1 e^(s1 t) + A2 e^(s2 t). The two conditions give:
- A1 + A2 = ΔV
- s1 A1 + s2 A2 = S0
Solving:
- A1 = (S0 − s2 ΔV) / (s1 − s2)
- A2 = (s1 ΔV − S0) / (s1 − s2)
With V0 = 0 and S0 = 0, these reduce to the coefficients in the Python example from the plan, where A1 = −Vs·s2/(s2 − s1).
Critically damped
The form is v = Vs + (D1 + D2 t) e^(−αt). Differentiating at t = 0 gives D2 − α D1 = S0, so:
- D1 = ΔV
- D2 = S0 + α ΔV
Underdamped
The form is v = Vs + e^(−αt)(B1 cos ωd t + B2 sin ωd t). Then:
- B1 = ΔV
- B2 = (S0 + α ΔV) / ω_d
| Case | Form of natural part | Constants from v_n(0) = ΔV and v_n'(0) = S0 |
|---|---|---|
| Overdamped | A1 e^(s1 t) + A2 e^(s2 t) | A1 = (S0 − s2 ΔV)/(s1 − s2), A2 = (s1 ΔV − S0)/(s1 − s2) |
| Critically damped | (D1 + D2 t) e^(−αt) | D1 = ΔV, D2 = S0 + α ΔV |
| Underdamped | e^(−αt)(B1 cos ω_d t + B2 sin ω_d t) | B1 = ΔV, B2 = (S0 + α ΔV)/ω_d |
Worked example with nonzero initial conditions
A series RLC circuit has R = 20 Ω, L = 1 mH, C = 1 µF. The source steps to Vs = 10 V. Just before the step, the capacitor holds V0 = 2 V and the inductor carries I0 = 50 mA.
- Compute α = R/(2L) = 20 / (2 × 10⁻³) = 10,000 s⁻¹.
- Compute ω0 = 1/√(LC) = 1/√(10⁻⁹) ≈ 31,623 rad/s. Since α < ω0, the response is underdamped.
- Compute ω_d = √(ω0² − α²) = √(10⁹ − 10⁸) = √(9 × 10⁸) = 30,000 rad/s.
- Find the initial conditions: v(0) = 2 V, so ΔV = 2 − 10 = −8 V. The slope is S0 = I0/C = 0.05 / 10⁻⁶ = 50,000 V/s.
- Compute B1 = ΔV = −8.
- Compute B2 = (50,000 + 10,000 × (−8)) / 30,000 = −30,000 / 30,000 = −1.
The result is:
v(t) = 10 + e^(−10,000 t)(−8 cos 30,000 t − sin 30,000 t) volts
As a check, v(0) = 10 − 8 = 2 V. The slope at zero is −α B1 + ω_d B2 = 80,000 − 30,000 = 50,000 V/s, which matches S0.
Checking the conditions in code
The script below builds the underdamped response with general V0 and I0, and then tests both initial conditions. It uses a small forward step to estimate the derivative.
import math
def underdamped_step(R, L, C, Vs, V0, I0):
"""Capacitor voltage for a step Vs at t=0 with initial V0 and I0 (underdamped)."""
alpha = R / (2 * L)
w0 = 1 / math.sqrt(L * C)
wd = math.sqrt(w0**2 - alpha**2)
dV = V0 - Vs
S0 = I0 / C
B1 = dV
B2 = (S0 + alpha * dV) / wd
def v(t):
return Vs + math.exp(-alpha * t) * (B1 * math.cos(wd * t) + B2 * math.sin(wd * t))
return v, B1, B2
v, B1, B2 = underdamped_step(20, 1e-3, 1e-6, 10, 2, 0.05)
h = 1e-10
slope = (v(h) - v(0)) / h
print("B1 =", round(B1, 3), " B2 =", round(B2, 3))
print("v(0) =", round(v(0), 3))
print("v'(0) is about", round(slope, -2), "V/s (target I0/C = 50000)")The output shows B1 = −8.0, B2 = −1.0, v(0) = 2.0, and a slope close to 50,000 V/s.
Current as the unknown instead
Sometimes the unknown is the loop current i(t). The first condition is i(0⁺) = I0. For the second, apply KVL at t = 0⁺:
L di/dt = Vs − R i − v
So:
i'(0⁺) = (Vs − R I0 − V0) / L
This is where the inductor voltage jump shows up. With I0 = 0 and V0 = 0 the slope is Vs/L, so the current starts to rise immediately even though its value is zero.
Edge cases and common errors
- Using v(0⁻) with the wrong sign for the final value. The natural part starts at V0 − Vs, not V0.
- Setting v'(0) = 0 by habit. This holds only when I0 = 0. A nonzero initial inductor current gives a nonzero initial slope.
- Confusing the sign convention of I0. The current i = C dv/dt flows into the capacitor's positive terminal. If I0 is given in the opposite direction, flip its sign before using S0.
- Applying continuity to the wrong variable. A resistor voltage or an inductor voltage can jump. Only vC and iL are safe.
- Switching changes the circuit. If a switch rearranges the circuit at t = 0, the pre-step analysis uses the old circuit and the post-step equation uses the new one.
Exercise
A series RLC circuit has R = 200 Ω, L = 1 mH, C = 1 µF. It is driven by a 10 V step. Before the step, V0 = 0 and I0 = 0. The circuit is overdamped with s1 = −5,359 s⁻¹ and s2 = −194,641 s⁻¹ (rounded). Find A1 and A2 for v(t) = Vs + A1 e^(s1 t) + A2 e^(s2 t).
Show answer
With V0 = 0 and I0 = 0, ΔV = −10 V and S0 = 0. Then A1 = (S0 − s2 ΔV)/(s1 − s2) = (0 − (−194,641)(−10)) / (−5,359 + 194,641) = −1,946,410 / 189,282 ≈ −10.28 V. And A2 = (s1 ΔV − S0)/(s1 − s2) = (−5,359 × −10) / 189,282 = 53,590 / 189,282 ≈ 0.283 V. Check: A1 + A2 ≈ −10.0 V, which equals ΔV, and s1 A1 + s2 A2 ≈ 55,100 − 55,100 ≈ 0.
Exercise
Using the worked example's circuit (R = 20 Ω, L = 1 mH, C = 1 µF, Vs = 10 V) with V0 = 2 V, what initial current I0 would give B2 = 0, so that the natural response is a pure cosine envelope with no sine term?
Show answer
B2 = (S0 + α ΔV)/ω_d = 0 requires S0 = −α ΔV = −10,000 × (−8) = 80,000 V/s. Then I0 = C × S0 = 10⁻⁶ × 80,000 = 0.08 A, or 80 mA.