Transfer Functions
A transfer function G(s) = Y(s)/U(s) is the ratio of output to input in the Laplace domain. It converts differential equations into algebraic ones, making it easy to analyze and design linear control systems.
Why It Matters
Transfer functions let you predict system behavior — settling time, overshoot, stability — without simulating. The poles of G(s) tell you if the system is stable, the zeros shape the response, and frequency-domain tools (Bode, Nyquist) give you design handles for tuning controllers.
Laplace Transform Basics
The Laplace transform converts a time-domain function f(t) into an s-domain function F(s):
F(s) = ∫₀^∞ f(t) · e^(-st) dt
Key transforms:
| Time domain | Laplace domain |
|---|---|
df/dt | s·F(s) - f(0) |
∫f dt | F(s)/s |
e^(-at) | 1/(s+a) |
sin(ωt) | ω/(s²+ω²) |
step (u(t)) | 1/s |
δ(t) (impulse) | 1 |
The s variable is complex: s = σ + jω. Setting s = jω gives the frequency response.
Deriving a Transfer Function
Start from a differential equation, assume zero initial conditions, and solve for Y(s)/U(s):
Time domain: m·y'' + c·y' + k·y = u(t) (mass-spring-damper)
Laplace: (ms² + cs + k)·Y(s) = U(s)
Transfer fn: G(s) = Y(s)/U(s) = 1 / (ms² + cs + k)
Poles and Zeros
G(s) = K · (s - z₁)(s - z₂)... / (s - p₁)(s - p₂)...
────── zeros ────── ────── poles ──────
- Poles (roots of denominator): determine stability, speed, and oscillation
- Zeros (roots of numerator): shape the response magnitude
- Gain K: scales the overall output
Pole Location → System Behavior
jω (imaginary)
↑
│ × oscillating × oscillating
│ (unstable) (stable, underdamped)
──────┼──────────────────→ σ (real)
│ × oscillating × oscillating
│ (unstable) (stable, underdamped)
│
LEFT HALF = stable RIGHT HALF = unstable
Real axis poles: × ← fast decay × ← slow decay
far left near origin
Stable iff all poles have negative real part (left half of s-plane).
Common Transfer Functions
| System | G(s) | Parameters | Response |
|---|---|---|---|
| First order | K/(τs + 1) | τ = time constant | 63% in τ, 95% in 3τ |
| Second order | Kωn²/(s² + 2ζωns + ωn²) | ζ = damping, ωn = nat. freq | See below |
| Integrator | K/s | ��� | Output ramps |
| PID controller | Kp + Ki/s + Kd·s | — | See PID Controller |
Second-Order Step Response
| ζ (damping) | Behavior |
|---|---|
| ζ = 0 | Undamped — pure oscillation |
| 0 < ζ < 1 | Underdamped — oscillation with decay |
| ζ = 1 | Critically damped — fastest without overshoot |
| ζ > 1 | Overdamped — slow, no oscillation |
Step response metrics:
- Rise time: time to first reach setpoint (faster with lower ζ, higher ωn)
- Overshoot:
exp(-πζ/√(1-ζ²)) × 100%(e.g., ζ=0.5 → 16% overshoot) - Settling time:
4/(ζ·ωn)to within 2% of final value
Block Diagram Algebra
| Configuration | Equivalent |
|---|---|
Series: G₁ → G₂ | G₁(s) · G₂(s) |
Parallel: G₁ + G₂ | G₁(s) + G₂(s) |
| Negative feedback | G/(1 + G·H) |
| Positive feedback | G/(1 - G·H) |
Python: Step Response
import numpy as np
import matplotlib.pyplot as plt
dt, t_end = 0.01, 5.0
t = np.arange(0, t_end, dt)
# Second-order system: wn=2, zeta=0.3 (underdamped)
wn, zeta = 2.0, 0.3
wd = wn * np.sqrt(1 - zeta**2)
y = 1 - np.exp(-zeta * wn * t) * (np.cos(wd * t) + (zeta / np.sqrt(1 - zeta**2)) * np.sin(wd * t))
plt.plot(t, y, label=f'ζ={zeta}, ωn={wn}')
plt.axhline(y=1, color='r', linestyle='--')
plt.xlabel('Time (s)'); plt.ylabel('Output'); plt.legend(); plt.grid(); plt.show()Related
- Open Loop vs Closed Loop — feedback loop transfer function:
G/(1+GH) - PID Controller — PID as a transfer function:
Kp + Ki/s + Kd·s - Stability Analysis — using poles and Bode plots to check stability
- State Space Representation — matrix form, equivalent for MIMO systems
- Digital Control — z-domain equivalent of transfer functions