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 domainLaplace domain
df/dts·F(s) - f(0)
∫f dtF(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

SystemG(s)ParametersResponse
First orderK/(τs + 1)τ = time constant63% in τ, 95% in 3τ
Second orderKωn²/(s² + 2ζωns + ωn²)ζ = damping, ωn = nat. freqSee below
IntegratorK/s���Output ramps
PID controllerKp + Ki/s + Kd·sSee PID Controller

Second-Order Step Response

ζ (damping)Behavior
ζ = 0Undamped — pure oscillation
0 < ζ < 1Underdamped — oscillation with decay
ζ = 1Critically damped — fastest without overshoot
ζ > 1Overdamped — 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

ConfigurationEquivalent
Series: G₁ → G₂G₁(s) · G₂(s)
Parallel: G₁ + G₂G₁(s) + G₂(s)
Negative feedbackG/(1 + G·H)
Positive feedbackG/(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()