Sub topic 10
One formula for every first-order transient
This chapter assumes you know KVL and KCL, Thevenin equivalents, and the exponential function. It also assumes you have seen the RC and RL natural and step responses from earlier chapters.
The idea
Every first-order circuit with constant sources has one state variable. That variable is x(t), the capacitor voltage or the inductor current. It obeys the same equation:
dx/dt = (x_f - x) / tau
Its solution is the general formula:
x(t) = xf + (x0 - x_f) e^(-t/tau)
The formula has three inputs:
- x_0 is the initial value at t = 0+, just after the switch moves.
- x_f is the final value as t goes to infinity.
- tau is the time constant, RC or L/R, using the Thevenin resistance seen by the storage element.
Charging, discharging, and decay from a nonzero start all follow this one expression. The natural response is the case xf = 0. The step response from rest is the case x0 = 0.
Finding the three values
- x_0: Use continuity. A capacitor voltage and an inductor current cannot jump. Find them from the circuit before the switch moves, then carry them to t = 0+.
- x_f: Treat the capacitor as an open circuit, or the inductor as a short circuit. Solve the resulting DC circuit.
- tau: Remove the storage element and find the Thevenin resistance Rth across its terminals, with independent sources turned off. Then tau = Rth C or tau = L / R_th.
Worked example
A 12 V source feeds a 4 kΩ resistor in series with a node that connects a 4 kΩ resistor to ground and a 1 µF capacitor to ground. The capacitor starts uncharged, and the source is applied at t = 0.
- x_0 = 0 V, since the capacitor was uncharged.
- xf: with the capacitor open, the two 4 kΩ resistors divide the source, so xf = 6 V.
- Rth: with the source shorted, the two resistors are in parallel, so Rth = 2 kΩ. Then tau = 2 kΩ × 1 µF = 2 ms.
The result is v_C(t) = 6 (1 - e^(-t/2 ms)) V. The capacitor stops at 6 V, not 12 V, because the second resistor takes part of the voltage.
import math
def first_order(x0, xf, tau, t):
return xf + (x0 - xf) * math.exp(-t / tau)
tau = 2e-3
for k in range(6):
t = k * tau
print(f"t = {k} tau: v_C = {first_order(0.0, 6.0, tau, t):.3f} V")Common errors
- Using the resistance of one branch instead of R_th. Always remove the storage element and look back into the circuit.
- Using the pre-switch circuit to find xf or tau. Both come from the circuit after the switch moves. Only x0 comes from before.
- Applying the formula to a non-state quantity. Resistor currents and voltages can jump at t = 0. To find one, solve the circuit at the time of interest using the known x(t). Or apply the formula to that quantity directly, using its own value at 0+ and its own final value.
Exercise
An inductor starts with 2 A flowing. At t = 0 a switch connects it to a circuit where its final current is 5 A and the Thevenin resistance seen by the inductor is 50 Ω. With L = 100 mH, find i_L(t).
Show answer
tau = L / Rth = 0.1 / 50 = 2 ms. Using x0 = 2 A and xf = 5 A, iL(t) = 5 + (2 - 5) e^(-t/2 ms) = 5 - 3 e^(-t/2 ms) A.
Exercise
In the worked example, what is the capacitor voltage at t = 2 ms, one time constant?
Show answer
v_C = 6 (1 - e^(-1)) = 6 × 0.632 ≈ 3.79 V.