TExcelTAD
Home › Signals, Systems & Digital Filters for Engineers › The Laplace Transform for Systems

The Laplace Transform for Systems

You are handed a datasheet model of a sensor amplifier: "second-order low-pass, gain 10, natural frequency 1 kHz1\ \text{kHz}, damping 0.5". You need four things from it: its step response (does it overshoot?), its frequency response (how much does it boost signals near 700 Hz700\ \text{Hz}?), whether it is stable, and later a digital filter that imitates it. All four follow from one object, the transfer function H(s)H(s). Circuit Theory used the Laplace transform to solve circuits with initial conditions (s-domain analysis, poles and zeros); this lesson uses it the systems way: H(s)H(s) as a complete description of an LTI system, read with SciPy and python-control. The transform itself is summarised in Laplace and Fourier.

The transfer function

For a causal LTI system at rest, the Laplace transform turns convolution y=h∗xy = h * x into multiplication:

Y(s)=H(s) X(s),H(s)=L{h(t)}=∫0∞h(t) e−st dtY(s) = H(s)\,X(s), \qquad H(s) = \mathcal{L}\{h(t)\} = \int_0^\infty h(t)\,e^{-st}\,dt

A system described by a linear ODE with constant coefficients has a rational transfer function, read off by replacing ddt\frac{d}{dt} with ss:

∑kakdkydtk=∑kbkdkxdtk⟹H(s)=bMsM+⋯+b0aNsN+⋯+a0=K ∏(s−zi)∏(s−pi)\sum_k a_k \frac{d^k y}{dt^k} = \sum_k b_k \frac{d^k x}{dt^k} \quad \Longrightarrow \quad H(s) = \frac{b_M s^M + \cdots + b_0}{a_N s^N + \cdots + a_0} = K\,\frac{\prod (s - z_i)}{\prod (s - p_i)}

What each part tells you:

Feature Meaning
poles pip_i (roots of the denominator) the natural modes epite^{p_i t}; stable if and only if every Re⁡(pi)<0\operatorname{Re}(p_i) < 0
zeros ziz_i frequencies the system blocks or shapes (notches, high-pass behaviour)
H(0)H(0) DC gain (final value of the unit-step response, if stable)
H(jω)H(j\omega) the frequency response: set s=jωs = j\omega
pole nearest the jωj\omega axis the dominant mode: slowest decay, governs settling

The standard second-order low-pass is

H(s)=K ωn2s2+2ζωns+ωn2,p1,2=−ζωn±jωn1−ζ2H(s) = \frac{K\,\omega_n^2}{s^2 + 2\zeta\omega_n s + \omega_n^2}, \qquad p_{1,2} = -\zeta\omega_n \pm j\omega_n\sqrt{1 - \zeta^2}

with overshoot e−πζ/1−ζ2e^{-\pi\zeta/\sqrt{1 - \zeta^2}}, a resonant peak at ωr=ωn1−2ζ2\omega_r = \omega_n\sqrt{1 - 2\zeta^2} (for ζ<0.707\zeta < 0.707) of height K/(2ζ1−ζ2)K/(2\zeta\sqrt{1 - \zeta^2}), and at ω=ωn\omega = \omega_n exactly ∣H∣=K/(2ζ)\lvert H \rvert = K/(2\zeta) with a phase of −90∘-90^\circ.

Worked example: the datasheet amplifier

Given: K=10K = 10, fn=1 kHzf_n = 1\ \text{kHz} (ωn=6283 rad/s\omega_n = 6283\ \text{rad/s}), ζ=0.5\zeta = 0.5.

Find: poles, step overshoot, gain and phase at 1 kHz1\ \text{kHz}, the resonant peak.

Solve:

  • Poles: −ζωn±jωn1−ζ2=−3142±j5441 rad/s-\zeta\omega_n \pm j\omega_n\sqrt{1 - \zeta^2} = -3142 \pm j5441\ \text{rad/s}, left half-plane: stable. The decay envelope e−3142te^{-3142 t} has a time constant of 0.318 ms0.318\ \text{ms}.
  • Overshoot: e−π⋅0.5/0.866=16.3 %e^{-\pi \cdot 0.5/0.866} = 16.3\,\%; the step response peaks at 10×1.163=11.6310 \times 1.163 = 11.63 times the input step.
  • At f=fnf = f_n: ∣H∣=10/(2×0.5)=10\lvert H \rvert = 10/(2 \times 0.5) = 10 (20 dB20\ \text{dB}), phase −90∘-90^\circ.
  • Peak: fr=1 kHz×1−0.5=707 Hzf_r = 1\ \text{kHz} \times \sqrt{1 - 0.5} = 707\ \text{Hz}, ∣H∣=10/(2×0.5×0.866)=11.55\lvert H \rvert = 10/(2 \times 0.5 \times 0.866) = 11.55 (21.25 dB21.25\ \text{dB}), 1.25 dB1.25\ \text{dB} above the DC gain.

Check: with the code below, and in the Bode lab: choose the 2nd-order model, K=20 dBK = 20\ \text{dB}, f1=1000 Hzf_1 = 1000\ \text{Hz}, ζ=0.5\zeta = 0.5, no zero. The readouts show ∣L∣=20.00 dB\lvert L \rvert = 20.00\ \text{dB} and ∠L=−90.0∘\angle L = -90.0^\circ at 1 kHz1\ \text{kHz}. (The lab is built for feedback loops: ignore its crossover and margin readouts here, they answer a control question.)

6040200-20-40-60-80|L| (dB)-270-180-90090100m1101001k10k100k1Mf (Hz)phase (deg)PM 18.9 deg|L| exactphase exactasymptotesunity-feedback closed loop: stable

Slide ζ\zeta down to 0.10.1 and the peak near fnf_n grows to about 34 dB34\ \text{dB} (K/(2ζ)=50K/(2\zeta) = 50); slide it to 0.710.71 and the peak disappears: the Butterworth response of Analog Prototypes.

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

K, fn, zeta = 10.0, 1000.0, 0.5
wn = 2 * np.pi * fn
H = signal.TransferFunction([K * wn**2], [1, 2 * zeta * wn, wn**2])
print("poles (rad/s):", np.round(H.poles, 1), "-> stable:", bool(np.all(H.poles.real < 0)))

w = 2 * np.pi * np.array([0.0, 707.1, 1000.0, 10000.0])
_, Hjw = signal.freqresp(H, w)
for f, h in zip(w / (2 * np.pi), Hjw):
    print(f"f = {f:7.1f} Hz: |H| = {abs(h):7.3f} ({20 * np.log10(abs(h)):6.2f} dB), phase {np.degrees(np.angle(h)):7.1f} deg")

t = np.linspace(0, 3e-3, 3001)
_, y = signal.step(H, T=t)
print(f"step: peak {y.max():.3f} at {1e3 * t[np.argmax(y)]:.3f} ms, overshoot {100 * (y.max() / K - 1):.1f} %, final {y[-1]:.3f}")
poles (rad/s): [-3141.6+5441.4j -3141.6-5441.4j] -> stable: True
f =     0.0 Hz: |H| =  10.000 ( 20.00 dB), phase     0.0 deg
f =   707.1 Hz: |H| =  11.547 ( 21.25 dB), phase   -54.7 deg
f =  1000.0 Hz: |H| =  10.000 ( 20.00 dB), phase   -90.0 deg
f = 10000.0 Hz: |H| =   0.100 (-19.96 dB), phase  -174.2 deg
step: peak 11.630 at 0.577 ms, overshoot 16.3 %, final 10.001

Far above fnf_n the gain falls at 40 dB40\ \text{dB} per decade: at 10fn10 f_n it is 20−40=−20 dB20 - 40 = -20\ \text{dB}, as the printout confirms. The step peaks at π/ωd=0.577 ms\pi/\omega_d = 0.577\ \text{ms}.

Cascades, dominant poles and python-control

Transfer functions of blocks in series multiply, which is where the Laplace view pays off. Suppose the amplifier is followed by an RC anti-alias filter with a 10 kHz10\ \text{kHz} corner, and you want to know whether the RC changes the settling. python-control (import control as ct) handles the algebra and reports step metrics directly:

python · try it yourself
import numpy as np
import control as ct

wn = 2 * np.pi * 1000.0
amp = ct.tf([10 * wn**2], [1, wn, wn**2])           # zeta = 0.5: 2 zeta wn = wn
rc = ct.tf([1], [1 / (2 * np.pi * 10e3), 1])          # RC low-pass, fc = 10 kHz
chain = ct.series(amp, rc)
print("chain poles (rad/s):", np.round(ct.poles(chain), 0))
for name, sys in (("amplifier", amp), ("amp + RC", chain)):
    info = ct.step_info(sys, T=np.linspace(0, 5e-3, 50001), SettlingTimeThreshold=0.02)
    print(f"{name:10s}: DC gain {ct.dcgain(sys):.2f}, rise {1e3 * info['RiseTime']:.3f} ms, "
          f"overshoot {info['Overshoot']:.1f} %, 2 % settling {1e3 * info['SettlingTime']:.3f} ms")
print(f"-3 dB bandwidth: amplifier {ct.bandwidth(amp) / (2 * np.pi):.0f} Hz, chain {ct.bandwidth(chain) / (2 * np.pi):.0f} Hz")
chain poles (rad/s): [-62832.   +0.j  -3142.+5441.j  -3142.-5441.j]
amplifier : DC gain 10.00, rise 0.261 ms, overshoot 16.3 %, 2 % settling 1.285 ms
amp + RC  : DC gain 10.00, rise 0.263 ms, overshoot 16.2 %, 2 % settling 1.301 ms
-3 dB bandwidth: amplifier 1271 Hz, chain 1266 Hz

The RC's pole at −62 832 rad/s-62\,832\ \text{rad/s} is 20 times farther from the axis than the amplifier's pair, so it barely changes the response: the complex pair is dominant. This is the usual engineering shortcut: poles more than about 5 to 10 times farther left than the dominant ones can often be ignored for settling, but not for phase at high frequencies.

From H(s)H(s) to a digital filter

The digital filters of this course start from H(s)H(s) in two ways: an existing analog response is imitated (scipy.signal.cont2discrete with the zero-order hold, as in Difference Equations), or a standard analog prototype is designed and mapped with the bilinear transform. Both rely on the pole mapping z=esTz = e^{sT} that the z-transform lesson makes exact.

Guided lab: measure a second-order active filter

Hand calculation. A unity-gain Sallen–Key low-pass with R1=R2=10 kΩR_1 = R_2 = 10\ \text{k}\Omega, C1=22 nFC_1 = 22\ \text{nF} (feedback), C2=10 nFC_2 = 10\ \text{nF} (to ground) has fn=1/(2πRC1C2)=1073 Hzf_n = 1/(2\pi R\sqrt{C_1 C_2}) = 1073\ \text{Hz} and ζ=C2/C1=0.674\zeta = \sqrt{C_2/C_1} = 0.674 (Active Filters). At fnf_n: gain 1/(2ζ)=0.7421/(2\zeta) = 0.742 (−2.6 dB-2.6\ \text{dB}), phase −90∘-90^\circ; the overshoot of a step is 5.7 %5.7\,\%.

Simulation. Put K=0 dBK = 0\ \text{dB}, f1=1073 Hzf_1 = 1073\ \text{Hz} and ζ=0.67\zeta = 0.67 in the Bode lab and read the gain and phase at 1 kHz1\ \text{kHz}; or change K, fn, zeta in the first program.

What you would measure. Op-amp on a current-limited ±5 V\pm 5\ \text{V} (or ±12 V\pm 12\ \text{V}) supply, 1 V1\ \text{V} peak sine from a generator, two-channel scope. Sweep 100 Hz to 10 kHz and record gain and phase. Find the frequency where the phase is −90∘-90^\circ: expect about 1.07 kHz±5 %1.07\ \text{kHz} \pm 5\,\% with 1 %1\,\% resistors and 5 %5\,\% capacitors; the gain there should be about 0.740.74. A square wave at 100 Hz100\ \text{Hz} shows the small overshoot.

Hazards and safe setup. Low-voltage, current-limited supply only; connect supplies before the signal; keep the input within the op-amp's input range.

Pitfalls

  • Reading the step response's peak as the steady-state gain (it is KK times the overshoot factor).
  • Calling a system stable because H(0)H(0) is finite: check the poles.
  • Dropping a "small" pole that sits near the crossover of a feedback loop: harmless for settling, harmful for phase margin.
  • Mixing rad/s and Hz: SciPy's freqresp and python-control use rad/s; divide by 2π2\pi.

Practice

  1. H(s)=100s+50H(s) = \frac{100}{s + 50}. Give its DC gain, pole, time constant and −3 dB-3\ \text{dB} frequency in hertz.
  2. A second-order low-pass has ζ=0.2\zeta = 0.2. What is its overshoot, and its gain at fnf_n relative to DC?
  3. Is H(s)=1s2−s+4H(s) = \frac{1}{s^2 - s + 4} stable?
Answer
  1. H(0)=2H(0) = 2; pole −50 rad/s-50\ \text{rad/s}; τ=20 ms\tau = 20\ \text{ms}; fc=50/(2π)=7.96 Hzf_c = 50/(2\pi) = 7.96\ \text{Hz}.
  2. e−π⋅0.2/0.96=52.7 %e^{-\pi \cdot 0.2/\sqrt{0.96}} = 52.7\,\%; 1/(2ζ)=2.51/(2\zeta) = 2.5, i.e. +7.96 dB+7.96\ \text{dB}.
  3. No: the poles 0.5±j1.940.5 \pm j1.94 are in the right half-plane.

Test yourself

A continuous-time LTI system is stable when all its poles

  1. lie inside the unit circle
  2. have negative real parts
  3. are real
  4. are zeros of the numerator

At ω=ωn\omega = \omega_n, the standard second-order low-pass with gain KK has

  1. gain KK, phase 00
  2. gain K/(2ζ)K/(2\zeta), phase −90∘-90^\circ
  3. gain K/2K/\sqrt{2}, phase −45∘-45^\circ
  4. gain 0

Two blocks H1(s)H_1(s) and H2(s)H_2(s) in series have the transfer function

  1. H1+H2H_1 + H_2
  2. H1H2H_1 H_2
  3. H1/(1+H1H2)H_1/(1 + H_1 H_2)
  4. H1∗H2H_1 * H_2 (convolution in s)

Why can a pole 20 times farther left than a complex pair often be ignored for settling?

  1. it is unstable
  2. its mode decays 20 times faster
  3. it cancels a zero
  4. it changes the DC gain