TExcelTAD
Home › Circuit Theory & Network Analysis › s-Domain Circuit Analysis

s-Domain Circuit Analysis

Two identical RC low-pass stages, each with a 1 ms1\ \text{ms} time constant, are cascaded to filter a sensor signal more steeply. How long does the output take to settle after a step? "Two stages of 1 ms1\ \text{ms}" suggests a few milliseconds, but the second stage loads the first, and the answer is not a simple multiple. With two capacitors the circuit is second order; writing and solving its differential equation by hand is unpleasant. In the s domain it is nodal analysis with two unknowns, followed by partial fractions. This lesson is the full workflow: s-domain models → nodal or mesh equations → transfer function → partial fractions → time response.

The workflow

  1. Draw the circuit for t>0t > 0 in the s domain: RR, sLsL, 1/(sC)1/(sC), sources as transforms, initial-condition sources where energy is stored.
  2. Write nodal (or mesh) equations exactly as for a resistive circuit, with admittances 1/R1/R, sCsC, 1/(sL)1/(sL).
  3. Solve the linear system; the unknowns are rational functions of ss.
  4. With zero initial conditions, the ratio output/input is the transfer function H(s)H(s). The response to an input X(s)X(s) is Y(s)=H(s)X(s)Y(s) = H(s)X(s).
  5. Expand Y(s)Y(s) in partial fractions and invert term by term.

For distinct poles pkp_k, partial fractions take the form

Y(s)=N(s)(s−p1)(s−p2)⋯=∑kKks−pk,Kk=lim⁡s→pk(s−pk)Y(s)⇒y(t)=∑kKkepktY(s) = \frac{N(s)}{(s - p_1)(s - p_2)\cdots} = \sum_k \frac{K_k}{s - p_k}, \qquad K_k = \lim_{s \to p_k} (s - p_k) Y(s) \quad\Rightarrow\quad y(t) = \sum_k K_k e^{p_k t}

The residue KkK_k is found by "covering up" the factor (s−pk)(s - p_k) and evaluating the rest at s=pks = p_k. Complex poles come in conjugate pairs with conjugate residues and combine into a damped sinusoid; repeated poles add terms t eptt\,e^{pt}. The algebra is in Inverse Laplace.

The circuit

+ - Vin(s) 1/s R 1 kOhm 1/(sC1) C1 = 1 uF R 1 kOhm 1/(sC2) C2 = 1 uF Va(s) Vb(s) out zero initial conditions: no extra sources

Worked example: the RC ladder

Given: R=1 kΩR = 1\ \text{k}\Omega, C1=C2=1 μFC_1 = C_2 = 1\ \mu\text{F} (so RC=1 msRC = 1\ \text{ms}), both capacitors empty, a 1 V1\ \text{V} step at the input.

Find: H(s)=Vb/VinH(s) = V_b/V_\text{in}, its poles, vb(t)v_b(t), and vbv_b at 1 ms1\ \text{ms} and 5 ms5\ \text{ms}.

Solve: KCL at a and b, currents leaving:

Va−VinR+sCVa+Va−VbR=0Vb−VaR+sCVb=0  ⇒  Va=(1+sRC)Vb\begin{aligned} \frac{V_a - V_\text{in}}{R} + sC V_a + \frac{V_a - V_b}{R} &= 0 \\ \frac{V_b - V_a}{R} + sC V_b &= 0 \;\Rightarrow\; V_a = (1 + sRC) V_b \end{aligned}

Substitute into the first equation and write τ=RC\tau = RC:

(2+sτ)(1+sτ)Vb−Vb=Vin⇒H(s)=1τ2s2+3τs+1=106s2+3000 s+106(2 + s\tau)(1 + s\tau) V_b - V_b = V_\text{in} \quad\Rightarrow\quad H(s) = \frac{1}{\tau^2 s^2 + 3\tau s + 1} = \frac{10^6}{s^2 + 3000\,s + 10^6}

Poles: s=1000⋅(−3±5)/2s = 1000 \cdot (-3 \pm \sqrt{5})/2, that is p1=−382.0 s−1p_1 = -382.0\ \text{s}^{-1} and p2=−2618.0 s−1p_2 = -2618.0\ \text{s}^{-1}, both real (two RC stages can never ring). For the step, Vb(s)=H(s)/sV_b(s) = H(s)/s and the cover-up rule gives

K0=H(0)=1K1=106p1(p1−p2)=106(−382.0)(2236.1)=−1.1708K2=106p2(p2−p1)=106(−2618.0)(−2236.1)=+0.1708\begin{aligned} K_0 &= H(0) = 1 \\ K_1 &= \frac{10^6}{p_1 (p_1 - p_2)} = \frac{10^6}{(-382.0)(2236.1)} = -1.1708 \\ K_2 &= \frac{10^6}{p_2 (p_2 - p_1)} = \frac{10^6}{(-2618.0)(-2236.1)} = +0.1708 \end{aligned}
vb(t)=1−1.1708 e−382.0 t+0.1708 e−2618.0 t Vv_b(t) = 1 - 1.1708\, e^{-382.0\, t} + 0.1708\, e^{-2618.0\, t}\ \text{V}

so vb(1 ms)=0.213 Vv_b(1\ \text{ms}) = 0.213\ \text{V} and vb(5 ms)=0.827 Vv_b(5\ \text{ms}) = 0.827\ \text{V}.

Check: vb(0)=1−1.1708+0.1708=0v_b(0) = 1 - 1.1708 + 0.1708 = 0, as it must be with empty capacitors; the residues sum to zero. The slow pole has a time constant 1/382=2.62 ms1/382 = 2.62\ \text{ms}, not 1 ms1\ \text{ms}: loading makes the cascade much slower than one stage. Two buffered stages would have a double pole at −1000 s−1-1000\ \text{s}^{-1} and the step response 1−(1+t/τ)e−t/τ1 - (1 + t/\tau)e^{-t/\tau}, which gives 0.960 V0.960\ \text{V} at 5 ms5\ \text{ms} instead of 0.827 V0.827\ \text{V}. Buffers between filter stages exist for this reason.

In Python: nodal equations in s, solved symbolically

python · try it yourself
import numpy as np
import sympy as sp
from scipy import signal

s = sp.symbols("s")
R, C = 1000, sp.Rational(1, 10**6)
Va, Vb, Vin = sp.symbols("V_a V_b V_in")
eqs = [sp.Eq((Va - Vin)/R + s*C*Va + (Va - Vb)/R, 0),
       sp.Eq((Vb - Va)/R + s*C*Vb, 0)]
sol = sp.solve(eqs, [Va, Vb])
H = sp.factor(sp.simplify(sol[Vb] / Vin))
print("H(s) =", H)

num, den = sp.fraction(H)
poles = sorted(sp.solve(den, s), key=lambda p: -float(p))
print("poles (1/s):", [round(float(p), 2) for p in poles])

F = H / s                                    # 1 V step
residues = {}
for p in [sp.Integer(0)] + poles:
    residues[float(p)] = float(sp.limit((s - p) * F, s, p))
    print(f"residue at s = {float(p):9.2f}: {residues[float(p)]:+.5f}")

vb = lambda t: sum(K * np.exp(p * t) for p, K in residues.items())
for t in [0.0, 1e-3, 2.618e-3, 5e-3, 10e-3]:
    print(f"vb({t*1e3:5.3f} ms) = {float(vb(t)):.4f} V")

n = [float(c) for c in sp.Poly(num, s).all_coeffs()]
d = [float(c) for c in sp.Poly(den, s).all_coeffs()]
ts = np.linspace(0, 10e-3, 1001)
_, y = signal.step(signal.lti(n, d), T=ts)
print("partial fractions and scipy.signal.step agree:", bool(np.max(np.abs(y - vb(ts))) < 1e-9))
H(s) = 1000000/(s**2 + 3000*s + 1000000)
poles (1/s): [-381.97, -2618.03]
residue at s =      0.00: +1.00000
residue at s =   -381.97: -1.17082
residue at s =  -2618.03: +0.17082
vb(0.000 ms) = 0.0000 V
vb(1.000 ms) = 0.2134 V
vb(2.618 ms) = 0.5695 V
vb(5.000 ms) = 0.8266 V
vb(10.000 ms) = 0.9743 V
partial fractions and scipy.signal.step agree: True

sp.solve handled the two simultaneous equations; for larger circuits build the admittance matrix Y(s)Y(s) and use sp.Matrix.LUsolve, exactly like the MNA matrices with sCsC and 1/(sL)1/(sL) in the entries.

Interactive: the ladder's step response

0.00.51.0051015t (ms)VV(a)V(b)at t = 15.00 msV(in)1.00 VV(a)998 mVV(b)996 mVI(V1)-2.35 uAI(R1)2.35 uAI(C1)898 nAI(R2)1.45 uAI(C2)1.45 uA

At t=5 mst = 5\ \text{ms} the lab's V(b)V(b) reads about 0.827 V0.827\ \text{V}. Raise R2R_2 towards 100 kΩ100\ \text{k}\Omega: the second stage loads the first less and less, node a behaves like a single RC stage again, and V(b)V(b) becomes much slower (its own τ\tau is now 100 ms100\ \text{ms}).

Guided lab: measure the loading effect

Hand calculation. Predict vbv_b at 11, 2.62.6 and 5 ms5\ \text{ms} for the ladder (above), then for the same two stages separated by a unity-gain buffer: vb=1−(1+t/τ)e−t/τv_b = 1 - (1 + t/\tau)e^{-t/\tau}, giving 0.2640.264, 0.7330.733 and 0.960 V0.960\ \text{V}.

Simulation. The netlist lab for the ladder; for the buffered case add a voltage-controlled voltage source with gain 1 between the stages (E1 x 0 a 0 1 and connect R2 to x).

What you would measure. Drive the ladder with a 00 to 1 V1\ \text{V} square wave at 20 Hz20\ \text{Hz} (half period 25 ms25\ \text{ms}, enough to settle). Scope node b and read the voltage at the three times with cursors. Expect the ladder values within about 5 to 10 % (capacitor tolerance dominates). The buffered version needs an op-amp follower, the subject of Analog Electronics; its curve is visibly faster.

Hazards and safe setup. Signal levels only. Use film capacitors, or electrolytics with + towards the source if the square wave never goes negative.

Pitfalls

  • Mixing ss-domain and time-domain quantities in one equation: Va(s)V_a(s) with vb(t)v_b(t) is a common slip.
  • Forgetting the input's transform. The step response is H(s)/sH(s)/s, not H(s)H(s); H(s)H(s) itself inverts to the impulse response.
  • Cancelling poles and zeros that do not quite cancel. Rounded coefficients can leave a near pole-zero pair that matters; keep exact arithmetic or check numerically.
  • Assuming cascaded stages multiply. H1H2H_1 H_2 only holds when the second stage does not load the first.

Practice

  1. For the ladder, what is H(jω)H(j\omega) at ω=1000 rad/s\omega = 1000\ \text{rad/s}? (Use s=jωs = j\omega.)
  2. Find the impulse response h(t)h(t) of the ladder from the poles.
  3. A series RL with R=100 ΩR = 100\ \Omega, L=0.1 HL = 0.1\ \text{H} is driven by VinV_\text{in}. Find H(s)=VR/VinH(s) = V_R/V_\text{in} and its pole.
Answer
  1. H=1/(1−1+j3)=1/(3j)=−j/3H = 1/(1 - 1 + j3) = 1/(3j) = -j/3: magnitude 0.3330.333, phase −90∘-90^\circ.
  2. H(s)=106/((s−p1)(s−p2))H(s) = 10^6/((s - p_1)(s - p_2)), residues 106/(p1−p2)=447.210^6/(p_1 - p_2) = 447.2 and −447.2-447.2: h(t)=447.2 (e−382.0t−e−2618.0t) s−1h(t) = 447.2\,(e^{-382.0t} - e^{-2618.0t})\ \text{s}^{-1}.
  3. H(s)=R/(R+sL)=1000/(s+1000)H(s) = R/(R + sL) = 1000/(s + 1000), one pole at −1000 s−1-1000\ \text{s}^{-1} (τ=L/R=1 ms\tau = L/R = 1\ \text{ms}).

Test yourself

With zero initial conditions, the transfer function H(s)H(s) is…

  1. the output divided by the input, both transformed
  2. the impulse response in the time domain
  3. the input divided by the output
  4. the circuit's impedance at DC

The residue of Y(s)=6/((s+1)(s+3))Y(s) = 6/((s + 1)(s + 3)) at s=−1s = -1 is…

  1. 66
  2. 33
  3. −3-3
  4. 22

Two identical RC stages connected directly have a slowest time constant of 2.62 RC2.62\,RC. Why is it longer than RCRC?

  1. the second stage loads the first
  2. capacitors in series add
  3. the source resistance doubles
  4. it is a measurement error

A step response is found from H(s)H(s) by inverting…

  1. H(s)H(s)
  2. sH(s)s H(s)
  3. H(s)/sH(s)/s
  4. 1/H(s)1/H(s)