MEG 502 · Control Engineering
Our notes
2 min readWhy state space
Transfer functions describe single-input, single-output linear systems with zero initial conditions. State-space models handle many inputs and outputs, initial conditions, and time-varying or non-linear systems, and are the basis of modern control and computer simulation.
State equations
ẋ = Ax + Bu, y = Cx + Du
x is the state vector (the smallest set of variables that, with the input, determines the future), u the input, y the output. A is the system matrix, B input, C output and D feedthrough matrix.
From a differential equation
For ÿ + 3ẏ + 2y = u, choose x₁ = y and x₂ = ẏ:
- ẋ₁ = x₂
- ẋ₂ = −2x₁ − 3x₂ + u
So A = [0 1; −2 −3], B = [0; 1], C = [1 0], D = 0.
Mass-spring-damper
With x₁ = position, x₂ = velocity: A = [0 1; −k/m −b/m], B = [0; 1/m]. With m = 2, b = 8, k = 50: A = [0 1; −25 −4].
From state space to transfer function
G(s) = C(sI − A)⁻¹B + D. The poles are the eigenvalues of A, found from det(sI − A) = 0.
Worked example
For A = [0 1; −2 −3]: det(sI − A) = s(s + 3) + 2 = s² + 3s + 2 = (s + 1)(s + 2). Eigenvalues −1 and −2: stable. G(s) = 1 ÷ (s² + 3s + 2), matching the original equation ✓.
Solution
x(t) = e^(At) x(0) + ∫₀ᵗ e^(A(t − τ)) B u(τ) dτ, where e^(At), the state transition matrix, equals the inverse Laplace transform of (sI − A)⁻¹.
Controllability and observability
- Controllable: the input can move the state from any initial value to any final value in finite time. Test: the controllability matrix [B AB A²B ...] has full rank n.
- Observable: the state can be worked out from the output. Test: [C; CA; CA²; ...] has full rank.
For the example: [B AB] = [0 1; 1 −3]; its determinant is −1 (non-zero): controllable. [C; CA] = [1 0; 0 1]: observable.
State feedback (pole placement) in brief
With u = −Kx + r, the closed loop is ẋ = (A − BK)x + Br. If the system is controllable, K can place the poles anywhere. For the example with K = [k₁ k₂]: characteristic polynomial s² + (3 + k₂)s + (2 + k₁). For poles at −4 ± j4 (s² + 8s + 32): k₂ = 5, k₁ = 30. When some states are not measured, an observer estimates them from y and u.
Exams usually ask
- Write state equations for a system from its differential equation or physical model.
- Find the transfer function and eigenvalues; test controllability and observability.
Common mistake
Getting the signs of the last row of A wrong: they are the negatives of the differential equation's coefficients (divided by the leading coefficient).
Written by the UniHive team in our own words. Spotted a mistake? Tell us on WhatsApp.
Read
-
State-space representation
(opens en.wikipedia.org in a new tab)
Wikipedia, State-space representation, CC BY-SA 4.0 · licence
-
Controllability
(opens en.wikipedia.org in a new tab)
Wikipedia, Controllability, CC BY-SA 4.0 · licence
-
NPTEL: Control Engineering (IIT Madras and IIEST Shibpur, whole course)
12 weeks: modelling, block diagrams, time response, root locus design, frequency-domain design, state-space analysis and design. Video lectures, many hours in all: watch on Wi-Fi where you can.
(opens nptel.ac.in in a new tab)
NPTEL, NPTEL: Control Engineering (IIT Madras and IIEST Shibpur, whole course), CC BY-NC-SA 4.0 · licence
Watch
-
Best pick Introduction to State-Space Equations | State Space, Part 1
14 min · ≈ 63 MB · about ₦35
(opens youtube.com in a new tab)
-
Introduction to State Space Analysis
11 min · ≈ 50 MB · about ₦28
(opens youtube.com in a new tab)
-
Intro to Control - 6.1 State-Space Model Basics
14 min · ≈ 63 MB · about ₦35
(opens youtube.com in a new tab)
-
Introduction to State Space Models
11 min · ≈ 50 MB · about ₦28
(opens youtube.com in a new tab)
-
System Dynamics and Control: Module 27a - Introduction to State-Space Modeling
12 min · ≈ 54 MB · about ₦30
(opens youtube.com in a new tab)
-
State Space Representation of Differential Equations
1 h 9 min · ≈ 311 MB · about ₦175
(opens youtube.com in a new tab)
We link to free material and never copy it. Every link was opened by our team before it went up; video data is a rough guide at 360p.