Second-Order Step Response
A supply rail is switched onto a board through a cable with some inductance, and the bulk capacitor on the board briefly charges to , well past the rail, before settling. A -rated part on that rail may not survive the switch-on. The culprit is a series RLC circuit's step response: the natural response of the previous lesson plus a new final value. This lesson finds the response, names its features (overshoot, peak time, rise time, settling time), and compares a simulated transient with the differential-equation solution, the last of the roadmap's circuit lab projects.
From natural to step response
For a step of applied at to the series RLC (capacitor empty, no current), KVL gives
The solution is the forced part (the final value, , because the capacitor ends open and the inductor shorted) plus the natural part with the same roots as before:
The constants come from and . In the underdamped case () this gives
Features of the response
| feature | meaning | underdamped formula |
|---|---|---|
| peak time | first maximum | |
| percent overshoot | how far the peak exceeds the final value | % |
| rise time | 10 % to 90 % of the final value | no simple formula; roughly near |
| settling time | stays within a band (2 % here) | about (the envelope's 2 % time) |
The overshoot depends on alone, so it can be inverted: measure the overshoot (as a fraction) and
These are the same quantities control engineers specify for a closed loop; Control Systems uses them heavily.
Worked example: the rail at switch-on
Given: step, , , , initially at rest.
Find: the peak voltage and time, the overshoot, the 2 % settling time, and the that limits overshoot to 5 %.
Solve: from the previous lesson, , , , .
For : , and since , .
Check: the envelope estimate is conservative: the exact 2 % settling time, found numerically below, is , because the response happens to be near a zero crossing of the oscillation when the envelope reaches 2 %. A damping resistor costs energy and a slower edge; in real supplies it is often a lossy capacitor (an electrolytic's ESR) rather than a resistor in series with the rail.
In Python: the ODE solved symbolically, then checked numerically
SymPy solves the differential equation exactly, after scaling time so the numbers stay small (exact rational arithmetic with coefficients is slow) (the theory); SciPy simulates the transfer function (see Transfer Functions, Poles, Zeros and Stability); both must agree.
import numpy as np
import sympy as sp
from scipy import signal
# time in units of 100 us (u = t / 100 us): LC s^2 + RC s + 1 becomes 0.1 s^2 + 0.2 s + 1,
# so the ODE is v'' + 2 v' + 10 v = 50 with roots -1 +- 3j (that is -10^4 +- j 3*10^4 per second)
u = sp.symbols("u", nonnegative=True)
v = sp.Function("v")
ode = sp.Eq(v(u).diff(u, 2) + 2*v(u).diff(u) + 10*v(u), 50)
sol = sp.dsolve(ode, v(u), ics={v(0): 0, v(u).diff(u).subs(u, 0): 0})
expr = sp.expand(sp.simplify(sol.rhs))
print("v_C(u) =", expr, " with u = t / (100 us)")
g = sp.lambdify(u, expr, "numpy")
f = lambda tt: g(tt / 1e-4)
ts = np.linspace(0, 1e-3, 100001)
vs = f(ts)
k = int(np.argmax(vs))
print(f"peak {float(vs[k]):.4f} V at {ts[k]*1e6:.1f} us, overshoot {(float(vs[k])/5 - 1)*100:.2f} %")
outside = np.nonzero(np.abs(vs - 5) > 0.1)[0]
print(f"2 % settling time: {ts[outside[-1] + 1]*1e6:.1f} us")
t10, t90 = ts[np.argmax(vs >= 0.5)], ts[np.argmax(vs >= 4.5)]
print(f"10-90 % rise time: {(t90 - t10)*1e6:.1f} us")
sys = signal.lti([5.0], [1e-9, 2e-5, 1.0]) # Vs / (LC s^2 + RC s + 1)
_, y = signal.step(sys, T=ts)
print(f"SciPy step and SymPy agree within 1 uV: {bool(np.max(np.abs(y - vs)) < 1e-6)}")
z = -np.log(0.05) / np.sqrt(np.pi**2 + np.log(0.05)**2)
print(f"for 5 % overshoot: zeta = {z:.3f}, R = {2*z*np.sqrt(1e-2/1e-7):.0f} ohm")v_C(u) = 5 - 5*exp(-u)*sin(3*u)/3 - 5*exp(-u)*cos(3*u) with u = t / (100 us)
peak 6.7546 V at 104.7 us, overshoot 35.09 %
2 % settling time: 353.6 us
10-90 % rise time: 42.5 us
SciPy step and SymPy agree within 1 uV: True
for 5 % overshoot: zeta = 0.690, R = 436 ohm
Cross-check with SPICE
ngspice measures the peak with meas … max (it also reports the time of the maximum, at=) and the 2 % settling time as the last falling crossing of (fall=last).
cat > rlc.cir <<'EOF'
* Series RLC step: 5 V, 200 ohm, 10 mH, 100 nF
V1 in 0 PULSE(0 5 0 1n 1n 10 20)
R1 in a 200
L1 a out 10m
C1 out 0 100n
.control
tran 0.1u 1m
meas tran vpk max v(out)
meas tran tlast when v(out)=5.1 fall=last
.endc
.end
EOF
ngspice -b rlc.cir 2>&1 | grep -E '^(vpk|tlast)' | awk '{$1=$1; print}'vpk = 6.754600e+00 at= 1.046771e-04
tlast = 3.535997e-04
The peak, at , agrees with the closed form to every digit shown. The last falling crossing of , at , is the 2 % settling time Python found: after it the response dips only to , inside the band.
Guided lab: compare a measured step response with the ODE
Hand calculation. Use and (film). Measure the inductor's winding resistance with a DMM. With a series resistor and the generator's , . Predict , and the overshoot from the formulas.
Simulation. Set the same in the step view of the lab and in the Python code; note the predicted peak and peak time.
At the lab shows the overshoot at computed above; slide to and the overshoot drops to about 5 %.
What you would measure. Drive the circuit with a to square wave at (each half period of is long enough to settle). Scope the capacitor voltage, trigger on the rising edge, and read the peak voltage and peak time with cursors. Compute from the measured overshoot and compare with the prediction. Typical agreement: peak time within 5 % (set by and tolerances), overshoot within a few percentage points; the overshoot is usually smaller than predicted because the inductor's core loss and skin effect add resistance at that the DMM does not see. Write up: a table of predicted versus measured , , and , the overlay plot of measurement and ODE solution, and a sentence on each discrepancy.
Hazards and safe setup. Signal-generator levels only; the overshoot puts up to about on the capacitor here, and up to twice the step with very little damping, so choose parts rated well above twice the drive. Never switch a bench supply directly into an LC filter at its rated voltage limit.
Pitfalls
- Expecting a step to settle at once. Underdamped circuits overshoot; a rail can briefly exceed its nominal value by tens of percent.
- Using as an exact settling time. It is an envelope estimate; the true value can be shorter.
- Forgetting the source's resistance. A function generator's is part of and changes .
- Comparing with the wrong initial state. The formula assumes zero initial energy; a previous edge that has not settled changes the response.
Practice
- With and , what overshoot does give?
- A measured step response overshoots by 20 %. Find .
- Why does the overshoot not depend on the step size ?
Answer
- ; , about 60 %.
- : .
- The circuit is linear: doubling the step doubles every voltage, so the ratio of peak to final value stays the same.
Test yourself
The overshoot of an underdamped second-order step response depends only on…
- the step size
- the damping ratio
- the natural frequency
- the capacitor's initial voltage
The peak time of an underdamped response with is about…
To reduce the overshoot of a series RLC step response you should…
- decrease
- increase
- increase only
- decrease only
A series RLC is critically damped. Its step response…
- overshoots by 5 %
- does not overshoot
- oscillates forever
- never reaches the final value