The Laplace Transform for Systems
You are handed a datasheet model of a sensor amplifier: "second-order low-pass, gain 10, natural frequency , 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 ?), whether it is stable, and later a digital filter that imitates it. All four follow from one object, the transfer function . 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: 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 into multiplication:
A system described by a linear ODE with constant coefficients has a rational transfer function, read off by replacing with :
What each part tells you:
| Feature | Meaning |
|---|---|
| poles (roots of the denominator) | the natural modes ; stable if and only if every |
| zeros | frequencies the system blocks or shapes (notches, high-pass behaviour) |
| DC gain (final value of the unit-step response, if stable) | |
| the frequency response: set | |
| pole nearest the axis | the dominant mode: slowest decay, governs settling |
The standard second-order low-pass is
with overshoot , a resonant peak at (for ) of height , and at exactly with a phase of .
Worked example: the datasheet amplifier
Given: , (), .
Find: poles, step overshoot, gain and phase at , the resonant peak.
Solve:
- Poles: , left half-plane: stable. The decay envelope has a time constant of .
- Overshoot: ; the step response peaks at times the input step.
- At : (), phase .
- Peak: , (), above the DC gain.
Check: with the code below, and in the Bode lab: choose the 2nd-order model, , , , no zero. The readouts show and at . (The lab is built for feedback loops: ignore its crossover and margin readouts here, they answer a control question.)
Slide down to and the peak near grows to about (); slide it to and the peak disappears: the Butterworth response of Analog Prototypes.
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 the gain falls at per decade: at it is , as the printout confirms. The step peaks at .
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 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:
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 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 to a digital filter
The digital filters of this course start from 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 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 , (feedback), (to ground) has and (Active Filters). At : gain (), phase ; the overshoot of a step is .
Simulation. Put , and in the Bode lab and read the gain and phase at ; or change K, fn, zeta in the first program.
What you would measure. Op-amp on a current-limited (or ) supply, 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 : expect about with resistors and capacitors; the gain there should be about . A square wave at 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 times the overshoot factor).
- Calling a system stable because 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
freqrespand python-control use rad/s; divide by .
Practice
- . Give its DC gain, pole, time constant and frequency in hertz.
- A second-order low-pass has . What is its overshoot, and its gain at relative to DC?
- Is stable?
Answer
- ; pole ; ; .
- ; , i.e. .
- No: the poles are in the right half-plane.
Test yourself
A continuous-time LTI system is stable when all its poles
- lie inside the unit circle
- have negative real parts
- are real
- are zeros of the numerator
At , the standard second-order low-pass with gain has
- gain , phase
- gain , phase
- gain , phase
- gain 0
Two blocks and in series have the transfer function
- (convolution in s)
Why can a pole 20 times farther left than a complex pair often be ignored for settling?
- it is unstable
- its mode decays 20 times faster
- it cancels a zero
- it changes the DC gain