Sub topic 10
One formula for every first-order transient
This chapter assumes you can write KVL and KCL equations, reduce resistor networks, find a Thevenin equivalent, and recognize the solution of a first-order linear differential equation. Earlier chapters derived the RC and RL natural and step responses. Here those results are merged into one formula that covers every first-order transient with a constant source.
Why the separate results collapse into one
The RC step response and the RL step response look alike:
- RC: v_C(t) = V(1 − e^(−t/τ)), starting at 0 and heading to V.
- RC natural response: v_C(t) = V₀ e^(−t/τ), starting at V₀ and heading to 0.
- RL step response: i_L(t) = (V/R)(1 − e^(−t/τ)), starting at 0 and heading to V/R.
Each curve starts at an initial value, ends at a final value, and moves between them exponentially. The only thing that changes between cases is which two numbers you plug in. The time constant sets how fast the move happens.
Any first-order circuit with constant sources, after the Thevenin reduction described below, obeys
dx/dt = (x_∞ − x)/τ
where x is the capacitor voltage or inductor current, x_∞ is the value x would settle at, and τ is the time constant. The ODE says the rate of change is proportional to the distance left to travel.
Deriving the general formula
Rearrange the equation and integrate from t = 0 (where x = x₀) to t:
dx/(x − x_∞) = −dt/τ
ln((x(t) − x∞)/(x₀ − x∞)) = −t/τ
Exponentiating and solving for x(t) gives the general solution:
Setting x₀ = 0 gives the step response. Setting x_∞ = 0 gives the natural response. Any other pair of numbers gives a transient from one nonzero state to another, with no new derivation.
The formula has two parts. The term x∞ is the forced (steady-state) part. The term (x₀ − x∞)e^(−t/τ) is the transient part, which dies out.
The three-number recipe
You need three numbers, and each comes from a different circuit.
- Initial value x₀. Use the state just before the switch moves. The capacitor voltage and inductor current cannot jump, so x(0⁺) = x(0⁻). In the circuit before the switch event at t = 0⁻, the circuit has been at rest for a long time. Treat a capacitor as an open circuit and an inductor as a short circuit, then solve the DC circuit for vC or iL.
- Final value x_∞. Use the circuit after the switch event, again with the capacitor open and the inductor shorted, as if t → ∞. Solve the DC circuit for vC or iL. This works only if the circuit settles, which holds when R_eq is positive.
- Time constant τ. Use the circuit after the switch event. Turn off all independent sources (voltage sources become shorts, current sources become opens), remove the storage element, and find the resistance Req seen at its terminals. Then τ = Req·C for a capacitor or τ = L/R_eq for an inductor.
Worked example: nonzero start and nonzero finish
A 12 V source feeds a node through R₁ = 2 kΩ. The node connects to the capacitor C = 10 µF and to ground through R₂ = 4 kΩ. Before t = 0, a switch in series with R₂ is open, so the capacitor has charged all the way to 12 V. At t = 0 the switch closes.
Initial value. With the switch open and the circuit settled, no current flows through R₁, so vC(0⁻) = 12 V. Continuity gives vC(0⁺) = 12 V.
Final value. With the switch closed and the capacitor open, R₁ and R₂ form a divider:
v_C(∞) = 12 × 4k/(2k + 4k) = 8 V
Time constant. With the source off (shorted), the capacitor sees R₁ and R₂ in parallel:
R_eq = (2k × 4k)/(2k + 4k) = 1.333 kΩ
τ = R_eq·C = 1.333 kΩ × 10 µF = 13.33 ms
Result.
v_C(t) = 8 + (12 − 8) e^(−t/13.33 ms) = 8 + 4e^(−t/13.33 ms) V
The capacitor falls from 12 V to 8 V. Neither the natural response formula (which decays to 0) nor the step response formula (which starts at 0) applies directly, but the general formula handles it.
The following program checks the result against the formula at multiples of τ.
import math
def transient(x0, x_inf, tau, t):
"""General first-order response for t >= 0."""
return x_inf + (x0 - x_inf) * math.exp(-t / tau)
R1, R2, C = 2e3, 4e3, 10e-6
V = 12.0
x0 = V # switch open, capacitor fully charged
x_inf = V * R2 / (R1 + R2) # switch closed, DC divider
r_eq = R1 * R2 / (R1 + R2) # source off, R1 parallel R2
tau = r_eq * C
print(f"tau = {tau * 1000:.2f} ms")
for k in range(6):
t = k * tau
print(f"t = {k} tau: v_C = {transient(x0, x_inf, tau, t):.3f} V")After one τ the voltage has covered 63.2% of the 4 V drop, so it reads 8 + 4(0.368) = 9.47 V. After 5τ it is within 0.03 V of 8 V.
Applying the formula to an inductor
For an inductor, the final value is found by shorting the inductor. Suppose a 10 V source with R₁ = 5 Ω is in series with an inductor L = 20 mH, and a resistor R₂ = 20 Ω is in parallel with the inductor through a switch that closes at t = 0. Before the switch closes, the inductor current settles at iL(0⁻) = 10/5 = 2 A. After the switch closes, the ideal inductor shorts R₂ at DC, so iL(∞) = 2 A also, and nothing changes in the inductor current. This illustrates a common trap: a switch change does not guarantee a transient in the variable you care about. Always compute x₀ and x_∞ before assuming something happens.
A more useful case uses Thevenin reduction. If the circuit after the switch is a source V and R₁ in series with a node, with R₂ from that node to the inductor, and R₃ across the inductor, find the Thevenin equivalent seen by the inductor (Vth, Rth). Then iL(∞) = Vth/Rth when R₃ is zero, or more generally the DC current through the shorted inductor, and τ = L/Rth. This reduction is what makes "R_eq" well defined for any resistive network.
Other variables: voltages and currents elsewhere
The formula applies directly to the state variable, vC or iL. Other voltages and currents are not continuous, so they usually jump at the switch event. Two ways to get them:
- Re-derive with the same formula. Any voltage or current in the circuit has the form y(t) = y∞ + (y(0⁺) − y∞)e^(−t/τ), with the same τ. You need y(0⁺), which you get from the circuit at t = 0⁺ with the capacitor replaced by a voltage source of value vC(0⁺) or the inductor by a current source of value iL(0⁺). You need y_∞ from the DC circuit.
- Compute from the state variable. Once v_C(t) is known, find other quantities with Ohm's law, KVL, and KCL at each time.
The same τ applies to every quantity in the circuit. Only the starting and ending values differ.
| Quantity | Continuous at switching? | How to get the initial value |
|---|---|---|
| Capacitor voltage v_C | Yes | Value just before the switch |
| Inductor current i_L | Yes | Value just before the switch |
| Resistor voltage or current | No | Solve the t = 0⁺ circuit using the sources replacing storage elements |
| Capacitor current | No | KCL at t = 0⁺ |
| Inductor voltage | No | KVL at t = 0⁺ |
Common errors
- Using the wrong circuit for x_∞. The final value comes from the post-switch circuit, not the pre-switch one.
- Forgetting to turn off sources for R_eq. A Thevenin resistance is found with independent sources set to zero. Dependent sources stay in, and then you need a test source.
- Mixing up RC and RL. For RC, τ = Req·C, so larger R slows the transient. For RL, τ = L/Req, so larger R speeds it up.
- Applying the formula to a variable that jumps. Use x₀ = x(0⁺) of that variable, not the pre-switch value.
- Skipping the limits check. At t = 0 the formula must return x₀, and for large t it must approach x_∞. If it does not, you made an algebra error.
Time to reach a threshold
The formula can be inverted. If you need the time at which x reaches a target value xT between x₀ and x∞:
t = τ ln((x₀ − x∞)/(xT − x_∞))
For the worked example, the time for v_C to reach 9 V is t = 13.33 ms × ln(4/1) = 13.33 ms × 1.386 = 18.5 ms. This is the basis of RC timers: a comparator fires when the capacitor crosses a threshold, and the delay is set by τ.
If xT lies outside the range between x₀ and x∞, the argument of the logarithm is negative or less than one in magnitude and there is no solution: the signal never reaches that value.
Limits of the formula
- It requires constant sources between switching events. For sinusoidal or time-varying sources, the forced part is no longer a constant x_∞.
- It requires a single storage element, or several that can be combined into one equivalent (capacitors in parallel, inductors in series). A circuit with one capacitor and one inductor is second order.
- It requires Req > 0 so the transient decays. With a dependent source, Req can be negative and the response then grows exponentially.
Exercise
A 6 V source, a 3 kΩ resistor R₁, and a 47 µF capacitor are in series with a switch. The capacitor holds 2 V when the switch closes at t = 0. Write vC(t) and find the time at which vC reaches 5 V.
Show answer
x₀ = 2 V, x∞ = 6 V, τ = R₁C = 3 kΩ × 47 µF = 141 ms. So vC(t) = 6 − 4e^(−t/141 ms) V. For 5 V: t = τ ln((2 − 6)/(5 − 6)) = 141 ms × ln 4 = 141 ms × 1.386 = 195 ms.
Exercise
An inductor L = 50 mH carries 0.5 A. At t = 0 a switch moves so that the inductor is now in series with a 25 Ω resistor and a 5 V source that drives current in the same direction. Find i_L(t).
Show answer
x₀ = 0.5 A (continuity). x∞ = 5/25 = 0.2 A. τ = L/R = 50 mH/25 Ω = 2 ms. So iL(t) = 0.2 + (0.5 − 0.2)e^(−t/2 ms) = 0.2 + 0.3e^(−t/2 ms) A.