TExcelTAD
Home › Circuit Theory & Network Analysis › Second-Order Step Response

Second-Order Step Response

A 5 V5\ \text{V} supply rail is switched onto a board through a cable with some inductance, and the bulk capacitor on the board briefly charges to 6.7 V6.7\ \text{V}, well past the rail, before settling. A 5.5 V5.5\ \text{V}-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

+ - Vs 5 V step R 200 Ohm L 10 mH C 100 nF out 6.75 V 5 V 0 tp 4/alpha overshoot 35 % 2 % band vC(t)

For a step of VsV_s applied at t=0t = 0 to the series RLC (capacitor empty, no current), KVL gives

LCd2vCdt2+RCdvCdt+vC=VsLC \frac{d^2 v_C}{dt^2} + RC \frac{d v_C}{dt} + v_C = V_s

The solution is the forced part (the final value, VsV_s, because the capacitor ends open and the inductor shorted) plus the natural part with the same roots as before:

vC(t)=Vs+(natural response with α=R/2L, ω0=1/LC)v_C(t) = V_s + (\text{natural response with } \alpha = R/2L,\ \omega_0 = 1/\sqrt{LC})

The constants come from vC(0+)=0v_C(0^+) = 0 and dvC/dt(0+)=iL(0+)/C=0dv_C/dt(0^+) = i_L(0^+)/C = 0. In the underdamped case (ζ<1\zeta < 1) this gives

vC(t)=Vs[1−e−αt(cos⁡ωdt+αωdsin⁡ωdt)]v_C(t) = V_s \left[ 1 - e^{-\alpha t} \left( \cos \omega_d t + \frac{\alpha}{\omega_d} \sin \omega_d t \right) \right]

Features of the response

feature meaning underdamped formula
peak time tpt_p first maximum π/ωd\pi/\omega_d
percent overshoot how far the peak exceeds the final value 100 e−πζ/1−ζ2100\, e^{-\pi\zeta/\sqrt{1 - \zeta^2}} %
rise time trt_r 10 % to 90 % of the final value no simple formula; roughly 1.8/ω01.8/\omega_0 near ζ=0.5\zeta = 0.5
settling time tst_s stays within a band (2 % here) about 4/α4/\alpha (the envelope's 2 % time)

The overshoot depends on ζ\zeta alone, so it can be inverted: measure the overshoot OSOS (as a fraction) and

ζ=−ln⁡OSπ2+ln⁡2OS\zeta = \frac{-\ln OS}{\sqrt{\pi^2 + \ln^2 OS}}

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: Vs=5 VV_s = 5\ \text{V} step, R=200 ΩR = 200\ \Omega, L=10 mHL = 10\ \text{mH}, C=100 nFC = 100\ \text{nF}, initially at rest.

Find: the peak voltage and time, the overshoot, the 2 % settling time, and the RR that limits overshoot to 5 %.

Solve: from the previous lesson, α=104 s−1\alpha = 10^4\ \text{s}^{-1}, ω0=31 623 rad/s\omega_0 = 31\,623\ \text{rad/s}, ωd=30 000 rad/s\omega_d = 30\,000\ \text{rad/s}, ζ=0.316\zeta = 0.316.

tp=π30 000 rad/s=104.7 μsOS=e−π⋅0.316/1−0.1=e−π/3=0.351vpeak=5 V⋅(1+0.351)=6.75 Vts≈4α=400 μs\begin{aligned} t_p &= \frac{\pi}{30\,000\ \text{rad/s}} = 104.7\ \mu\text{s} \\ OS &= e^{-\pi \cdot 0.316/\sqrt{1 - 0.1}} = e^{-\pi/3} = 0.351 \\ v_\text{peak} &= 5\ \text{V} \cdot (1 + 0.351) = 6.75\ \text{V} \\ t_s &\approx \frac{4}{\alpha} = 400\ \mu\text{s} \end{aligned}

For OS=0.05OS = 0.05: ζ=2.996/9.870+8.974=0.690\zeta = 2.996/\sqrt{9.870 + 8.974} = 0.690, and since ζ=(R/2)C/L\zeta = (R/2)\sqrt{C/L}, R=2ζL/C=2⋅0.690⋅316.2 Ω=436 ΩR = 2\zeta\sqrt{L/C} = 2 \cdot 0.690 \cdot 316.2\ \Omega = 436\ \Omega.

Check: the envelope estimate 4/α4/\alpha is conservative: the exact 2 % settling time, found numerically below, is 354 μs354\ \mu\text{s}, 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 10−910^{-9} coefficients is slow) (the theory); SciPy simulates the transfer function 1/(LCs2+RCs+1)1/(LCs^2 + RCs + 1) (see Transfer Functions, Poles, Zeros and Stability); both must agree.

python · try it yourself
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 5.1 V5.1\ \text{V} (fall=last).

bash · try it yourself
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, 6.7546 V6.7546\ \text{V} at 104.7 μs104.7\ \mu\text{s}, agrees with the closed form to every digit shown. The last falling crossing of 5.1 V5.1\ \text{V}, at 353.6 μs353.6\ \mu\text{s}, is the 2 % settling time Python found: after it the response dips only to 4.92 V4.92\ \text{V}, inside the band.

Guided lab: compare a measured step response with the ODE

Hand calculation. Use L=10 mHL = 10\ \text{mH} and C=100 nFC = 100\ \text{nF} (film). Measure the inductor's winding resistance RLR_L with a DMM. With a 100 Ω100\ \Omega series resistor and the generator's 50 Ω50\ \Omega, Rtotal=150 Ω+RLR_\text{total} = 150\ \Omega + R_L. Predict ζ\zeta, tpt_p and the overshoot from the formulas.

Simulation. Set the same RtotalR_\text{total} in the step view of the lab and in the Python code; note the predicted peak and peak time.

0.002.505.000200 us400 us600 ustvC (V)underdamped, zeta = 0.316peak +35.1 % at 105 usvC(t) after a step of V at t = 0envelopecritical R = 2 sqrt(L/C) = 632 Ohm

At R=200 ΩR = 200\ \Omega the lab shows the 35.09 %35.09\,\% overshoot at 104.7 μs104.7\ \mu\text{s} computed above; slide RR to 436 Ω436\ \Omega and the overshoot drops to about 5 %.

What you would measure. Drive the circuit with a 00 to 5 V5\ \text{V} square wave at 500 Hz500\ \text{Hz} (each half period of 1 ms1\ \text{ms} 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 ζ\zeta from the measured overshoot and compare with the prediction. Typical agreement: peak time within 5 % (set by LL and CC 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 5 kHz5\ \text{kHz} that the DMM does not see. Write up: a table of predicted versus measured tpt_p, OSOS, ζ\zeta and tst_s, 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 1.35×5=6.75 V1.35 \times 5 = 6.75\ \text{V} 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 4/α4/\alpha 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 50 Ω50\ \Omega is part of RR and changes ζ\zeta.
  • Comparing with the wrong initial state. The formula assumes zero initial energy; a previous edge that has not settled changes the response.

Practice

  1. With L=10 mHL = 10\ \text{mH} and C=100 nFC = 100\ \text{nF}, what overshoot does R=100 ΩR = 100\ \Omega give?
  2. A measured step response overshoots by 20 %. Find ζ\zeta.
  3. Why does the overshoot not depend on the step size VsV_s?
Answer
  1. ζ=(100/2)10−7/10−2=0.158\zeta = (100/2)\sqrt{10^{-7}/10^{-2}} = 0.158; OS=e−π⋅0.158/1−0.025=e−0.503=0.605OS = e^{-\pi \cdot 0.158/\sqrt{1 - 0.025}} = e^{-0.503} = 0.605, about 60 %.
  2. ln⁡0.2=−1.609\ln 0.2 = -1.609: ζ=1.609/9.870+2.590=0.456\zeta = 1.609/\sqrt{9.870 + 2.590} = 0.456.
  3. 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…

  1. the step size
  2. the damping ratio ζ\zeta
  3. the natural frequency ω0\omega_0
  4. the capacitor's initial voltage

The peak time of an underdamped response with ωd=20 000 rad/s\omega_d = 20\,000\ \text{rad/s} is about…

  1. 50 μs50\ \mu\text{s}
  2. 157 μs157\ \mu\text{s}
  3. 314 μs314\ \mu\text{s}
  4. 20 ms20\ \text{ms}

To reduce the overshoot of a series RLC step response you should…

  1. decrease RR
  2. increase RR
  3. increase LL only
  4. decrease CC only

A series RLC is critically damped. Its step response…

  1. overshoots by 5 %
  2. does not overshoot
  3. oscillates forever
  4. never reaches the final value