Control Systems Engineering and PID Controller Design
Control Systems, Signals, and Loop Architectures
A system transforms an input u(t) into an output y(t). It can be classified as continuous or discrete, linear or nonlinear, and time-invariant or time-variant.
- Signals: Can be continuous or discrete, periodic or aperiodic, deterministic or random, and energy or power signals.
- Open loop: Operates without feedback; the control action does not depend on the output. This is simple but sensitive to disturbances and parameter changes.
- Closed loop: Utilizes feedback by comparing a reference r with the output y to determine the error e = r − y. This provides better accuracy and disturbance rejection.
Main elements: Reference, comparator (error), controller, actuator, plant/process, sensor, feedback path, and disturbance/noise.
Requirements: Stability, small steady-state error, fast response (rise/settling time), low overshoot, good disturbance rejection, and robustness.
Linear Models and System Response Analysis
A Linear Time-Invariant (LTI) system obeys the principle of superposition and possesses constant parameters. The input-output model can be expressed as a differential equation: an y(n) + … + a0 y = bm u(m) + … + b0 u.
- Test signals: Impulse δ(t), step 1(t), ramp, and sine; these are used to identify system behavior.
- Impulse response h(t): The output in response to δ(t); it fully describes an LTI system.
- Step response: The output in response to a unit step; it illustrates speed, overshoot, and steady-state behavior.
- Transfer function: Defined as G(s) = Y(s) / U(s) under zero initial conditions.
The transition between the time domain and the operator domain (s-domain) simplifies differential equations into algebraic equations.
Fourier and Laplace Transform Applications
The Fourier series represents periodic signals as a sum of harmonics (sines and cosines), while the Fourier integral/transform represents aperiodic signals as a continuous spectrum.
The Laplace transform generalizes Fourier analysis and is highly effective for analyzing systems, Ordinary Differential Equations (ODEs), transients, and stability: F(s) = ∫ f(t)e−st dt.
- Key theorems: Linearity, time shift, frequency shift, differentiation, integration, and convolution.
- Inverse transforms: Used to return the signal to the time domain (Inverse Fourier / Inverse Laplace).
Laplace transforms are essential for deriving transfer functions, analyzing poles and zeros, and solving control loops.
Dynamic Elements in Time and S-Domain
- Zero-order element: Defined by gain K, where G(s) = K. The step response jumps immediately to K.
- First-order element: G(s) = K / (Ts + 1). The step response rises exponentially, where T determines the speed.
- Second-order element: G(s) = Kωn² / (s² + 2ζωns + ωn²). Here, ζ controls overshoot/oscillation and ωn controls speed.
- Ideal integrator: G(s) = K / s. A step input results in a ramp output; it removes steady-state error but may cause stability issues.
- First-order integrator (real): K / (s(Ts + 1)), which is more realistic than the ideal version.
- Ideal derivative: G(s) = Ks. This boosts high frequencies but is sensitive to noise.
- Real derivative: Ks / (Ts + 1), which limits high-frequency amplification.
Frequency Response and Stability Plots
Frequency response illustrates the output relative to a sinusoidal input by evaluating the transfer function at s = jω → G(jω). It is represented by magnitude |G(jω)| and phase ∠G(jω).
- Bode plot: Displays magnitude (dB) and phase versus log ω; it is convenient for system design.
- Nyquist plot: A complex curve of G(jω) in the complex plane used to determine stability.
Typical shapes:
- Gain K: Flat magnitude, 0° phase.
- 1st order: −20 dB/dec after 1/T, phase approaches −90°.
- Integrator 1/s: Constant −20 dB/dec slope, −90° phase.
- Derivative s: Constant +20 dB/dec slope, +90° phase (real derivatives flatten at high frequencies).
Stability Definitions and Performance Margins
A stable system returns to equilibrium after a disturbance. For Bounded-Input Bounded-Output (BIBO) stability, every bounded input must produce a bounded output. In continuous systems, stability depends on the closed-loop poles, which must reside in the left half-plane.
- Nyquist criterion: Checks the encirclement of the −1 point by the open-loop L(jω) to infer closed-loop stability.
- Bode stability: Utilizes gain margin and phase margin.
- Gain margin: The amount the gain can increase before instability occurs (measured at −180° phase).
- Phase margin: The additional phase lag allowed before instability (measured at 0 dB crossover).
Higher margins indicate a more robust system, though often at the cost of a slower response.
Closed-Loop Transfer Functions and PID Roles
In a closed loop with controller C(s) and plant G(s), the open loop is L(s) = C(s)G(s).
- Closed-loop transfer: T(s) = L(s) / (1 + L(s)).
- Error transfer: E(s) = 1 / (1 + L(s)).
- Type number: The number of integrators (poles at 0) in the open loop. A higher type number results in smaller steady-state errors for step and ramp inputs.
Role of PID terms:
- P (Proportional): Increases speed but high values cause overshoot or instability.
- I (Integral): Eliminates steady-state error but slows the system and can increase overshoot.
- D (Derivative): Adds damping and reduces overshoot but amplifies high-frequency noise.
PID Controller Tuning and Parameter Effects
- P: C(s) = Kp. Simple speed increase, but steady-state error remains.
- PI: C(s) = Kp(1 + 1 / (Ti s)). Removes steady-state error but may increase overshoot.
- PD: C(s) = Kp(1 + Td s). Improves damping and reduces overshoot; however, it is noise-sensitive.
- PID: C(s) = Kp(1 + 1 / (Ti s) + Td s). Combines all benefits: fast response, zero steady-state error, and better damping.
Tuning methods: Ziegler-Nichols, trial-and-error, frequency-domain tuning (phase margin), and relay auto-tuning.
Sampling Theory and the Z-Transform
Sampling converts a continuous signal into a discrete sequence: x[k] = x(kT). Physical sampling uses a sample-and-hold mechanism.
- Shannon Theorem: The sampling frequency must be fs > 2 * fmax to avoid aliasing (the Nyquist rate).
- Z-transform: X(z) = Σ x[k] z−k. It is the discrete equivalent of the Laplace transform.
- Properties: Linearity and time shifting (multiplication by z−n).
- Stability: For discrete systems, poles must be located inside the unit circle in the z-plane.
Discrete PID Implementation and Digital Control
To implement a PID controller digitally, the integral and derivative terms must be discretized (e.g., using Euler or Tustin methods).
- Position algorithm: Outputs u[k] directly from error terms; it can be sensitive to integral windup.
- Velocity (incremental) algorithm: Computes the change Δu[k]. This is numerically more stable and suitable for actuators.
- Digital closed loop: Consists of a sampler, digital controller, D/A converter, hold (usually Zero-Order Hold or ZOH), and the plant.
The sampling time T significantly affects performance: a T that is too large leads to instability, while a T that is too small increases the computational load and noise sensitivity.
