In short
State space analysis describes a dynamic system by a set of first-order differential equations in internal variables (the states) instead of a single high-order input-output equation. It handles multi-input multi-output, time-varying, nonlinear and initial-condition problems that transfer functions cannot, and it is the mathematical base of modern digital control, drives, robotics and aerospace guidance. In Indian exams it is a guaranteed scoring block: GATE EE/EC asks eigenvalues, state transition matrix, controllability and observability almost every year, and university papers ask state model formation and pole placement. On the job it appears in BHEL/BEL/ISRO/DRDO design work, MATLAB-Simulink model-based design at automotive and EV companies, and in embedded motor-control firmware.
Explained
State, state variables and the standard form
- State: the smallest set of variables whose values at t = t₀, together with the input for t ≥ t₀, completely determine the behaviour for all t ≥ t₀.
- State variables: those variables (x₁, x₂, …, xₙ); state vector x is their n×1 column; state space is the n-dimensional space whose axes are the state variables. A solution traced in it is a trajectory.
- Natural choice of states: energy-storage variables — inductor currents and capacitor voltages in circuits, position and velocity in mechanical systems, temperature in thermal systems.
- Standard continuous-time form (LTI): ẋ = Ax + Bu, y = Cx + Du. For an n-state, m-input, p-output system: A is n×n (system matrix), B is n×m (input matrix), C is p×n (output matrix), D is p×m (feedforward matrix, usually 0 when the output has no direct input path).
- Order n = number of independent energy-storage elements = number of state variables = degree of the characteristic polynomial.
- Classification: linear/nonlinear, time-invariant (A constant)/time-varying (A(t)), SISO/MIMO, continuous/discrete.
- Discrete-time form: x(k+1) = A_d x(k) + B_d u(k), y(k) = C x(k) + D u(k) — the base of digital control (detailed in the digital control note).
Forming the state model
Three routes are examined:
- From the physical system: write element equations (KVL/KCL, Newton's laws), then express the derivative of each energy variable in terms of states and inputs. Example (series RLC, input v, states i and v_C): di/dt = (−R i − v_C + v)/L, dv_C/dt = i/C.
- From a differential equation: for y⁽ⁿ⁾ + a₁y⁽ⁿ⁻¹⁾ + … + aₙ y = b u with no input derivatives, set x₁ = y, x₂ = ẏ, … xₙ = y⁽ⁿ⁻¹⁾ → phase-variable (companion) form: A has 1's on the superdiagonal and −aₙ … −a₁ in the last row, B = [0 … 0 b]ᵀ, C = [1 0 … 0].
- From a transfer function (realisation):
- Series/cascade and parallel decomposition using the factored or partial-fraction form.
- Controllable canonical form (companion, as above) — used for pole placement.
- Observable canonical form — the transpose-dual of the above.
- Diagonal (Jordan) canonical form from partial fractions: distinct poles give a diagonal A with the poles as entries; repeated poles give a Jordan block with 1's above the diagonal.
- Non-uniqueness: state models are not unique. Any non-singular transformation x = Pz gives ż = (P⁻¹AP)z + (P⁻¹B)u, y = (CP)z + Du — a similarity transformation. Eigenvalues, transfer function, controllability and observability (as properties) are invariant; A, B, C are not.
Solving the state equation and the state transition matrix
- Homogeneous solution: x(t) = e^{At} x(0). State transition matrix φ(t) = e^{At} = L⁻¹[(sI − A)⁻¹].
- Properties: φ(0) = I; φ⁻¹(t) = φ(−t); φ(t₁+t₂) = φ(t₁)φ(t₂); [φ(t)]k = φ(kt); φ̇(t) = Aφ(t).
- Complete solution: x(t) = φ(t)x(0) + ∫₀ᵗ φ(t−τ)Bu(τ)dτ — the second term is the convolution/forced part.
- Methods to get e^{At}: (i) Laplace inversion of (sI − A)⁻¹; (ii) Cayley–Hamilton / Sylvester's interpolation; (iii) power series I + At + A²t²/2! + …; (iv) diagonalisation e^{At} = P e^{Λt} P⁻¹ with Λ = diag(λᵢ).
- Cayley–Hamilton theorem: every square matrix satisfies its own characteristic equation; used to reduce An and to compute e^{At} as α₀I + α₁A + … + α_{n−1}A^{n−1}.
- Eigenvalues λ from |λI − A| = 0 are the poles of the system; eigenvectors give the modal matrix P that diagonalises A. Repeated eigenvalues may need a Jordan form.
Transfer function, stability and the loss of hidden modes
- Transfer function from the state model: G(s) = C(sI − A)⁻¹B + D. Its denominator is |sI − A| — the characteristic polynomial.
- Internal (asymptotic) stability: all eigenvalues of A strictly in the left half plane; marginal if simple eigenvalues sit on the jω axis; unstable otherwise. Discrete case: all |λᵢ| < 1.
- A transfer function shows only the controllable and observable part. Pole-zero cancellation hides a mode: a system can be BIBO stable yet internally unstable. This is a favourite interview trap.
- BIBO vs internal stability: they coincide only for a minimal (jointly controllable and observable) realisation.
- Minimal realisation: the realisation of least order; order = number of poles left after removing uncontrollable/unobservable modes.
Controllability and observability
- Controllability: the system is (completely state) controllable if any initial state can be driven to any final state in finite time by an unconstrained input.
- Kalman test: Q_c = [B AB A²B … A^{n−1}B] (n×nm). Controllable ⇔ rank Q_c = n (⇔ |Q_c| ≠ 0 for SISO).
- Observability: the system is observable if x(0) can be determined from measurements of y and u over a finite interval.
- Kalman test: Q_o = [Cᵀ AᵀCᵀ (Aᵀ)²Cᵀ … (Aᵀ)^{n−1}Cᵀ] (n×np). Observable ⇔ rank Q_o = n.
- Gilbert's test (diagonal form only): with A diagonal (distinct eigenvalues), controllable if no row of B is all zeros; observable if no column of C is all zeros. For Jordan blocks, check the last row of each block's B-rows and the first column of each block's C-columns.
- Duality (Kalman): (A, B) controllable ⇔ (Aᵀ, Bᵀ) observable. So an observer design problem converts into a controller design problem.
- A state model in controllable canonical form is always controllable; in observable canonical form always observable.
- Both properties are invariant under similarity transformation; both can be destroyed by pole-zero cancellation in the chosen realisation.
State feedback, pole placement and observers
- State feedback: u = −Kx + r gives ẋ = (A − BK)x + Br. Closed-loop poles are the eigenvalues of (A − BK).
- Pole placement theorem: arbitrary assignment of all n closed-loop poles by state feedback is possible if and only if the system is completely controllable.
- Design steps: (1) check controllability; (2) write the desired characteristic polynomial from the specifications; (3) equate |sI − A + BK| to it and solve for K; or use Ackermann's formula K = [0 … 0 1] Q_c⁻¹ φ_d(A), where φ_d is the desired polynomial evaluated at A.
- Transformation to controllable canonical form makes the comparison trivial because the last row of A carries the coefficients directly.
- Observer (state estimator): x̂̇ = Ax̂ + Bu + L(y − Cx̂). The error e = x − x̂ obeys ė = (A − LC)e; choose L (by duality, a pole-placement problem on Aᵀ, Cᵀ) so that error poles are typically 2–5 times faster than the controller poles. Possible iff the system is observable (detectable, in the weaker form).
- Separation principle: controller gain K and observer gain L can be designed independently; the combined observer-based controller has the union of both pole sets.
- Output feedback (u = −K_y y) cannot in general place all poles — a common misconception.
- Extensions named in syllabi: LQR/optimal control (minimise ∫(xᵀQx + uᵀRu)dt, gain from the algebraic Riccati equation), Kalman filter (observer for noisy systems), stabilisability and detectability, state-space-based MPC.
- Advantages: handles MIMO and time-varying systems, includes initial conditions, numerically well suited to computers, gives internal information. Limitations: needs all states (so sensors or an observer), model-dependent, less physically intuitive than Bode/Nyquist plots, poorer direct handle on robustness margins than frequency-domain methods.
- Practice and standards in India: model-based design in MATLAB/Simulink and Scilab/Xcos is standard at ISRO, DRDO, BEL, L&T, Tata Elxsi and EV drive teams; functional-safety work follows IS/ISO 26262 (automotive) and IEC 61508 for industrial systems; instrument/control hardware follows relevant IS/IEC series. Exact clause-level requirements vary by edition — verify against the current standard before quoting.
Key points
- State - minimum information at t₀ that, with future input, fixes the future response.
- Order n - count of independent energy-storage elements; equals the number of state variables.
- Standard form - ẋ = Ax + Bu, y = Cx + Du; A (n×n), B (n×m), C (p×n), D (p×m).
- Non-uniqueness - infinitely many state models for one system; similarity transformation links them.
- Invariants - eigenvalues, transfer function, controllability and observability survive similarity transformation.
- STM φ(t) = e^{At} - maps initial state to state at t; φ(0) = I, φ⁻¹(t) = φ(−t).
- Complete solution - x(t) = φ(t)x(0) + ∫₀ᵗ φ(t−τ)Bu(τ)dτ.
- Transfer function - G(s) = C(sI − A)⁻¹B + D, denominator |sI − A|.
- Eigenvalues = poles - stability needs all Re(λ) < 0 (continuous) or |λ| < 1 (discrete).
- Cayley–Hamilton - A satisfies |λI − A| = 0; lets e^{At} be written as a polynomial in A of degree n−1.
- Controllability - rank[B AB … A^{n−1}B] = n.
- Observability - rank[Cᵀ AᵀCᵀ … (Aᵀ)^{n−1}Cᵀ] = n.
- Duality - (A, B) controllable ⇔ (Aᵀ, Bᵀ) observable.
- Gilbert's test - diagonal A: no zero row in B → controllable; no zero column in C → observable.
- Pole placement - arbitrary pole assignment by u = −Kx exists iff the system is controllable.
- Ackermann's formula - K = [0 … 0 1]Q_c⁻¹φ_d(A).
- Observer - error dynamics (A − LC); needs observability; made faster than the plant loop.
- Separation principle - K and L designed independently; poles of the combined system are those of (A − BK) and (A − LC).
- Minimal realisation - controllable and observable; only then do BIBO and internal stability agree.
Formulas and examples
Example 1 — State model of a series RLC circuit (R = 2 Ω, L = 1 H, C = 0.5 F), input v(t), output v_C.
- States: x₁ = i (A), x₂ = v_C (V).
- KVL: v = R i + L di/dt + v_C → di/dt = (v − 2i − v_C)/1 = −2x₁ − x₂ + v.
- Capacitor: dv_C/dt = i/C = 2x₁.
- So A = [[−2, −1], [2, 0]], B = [1, 0]ᵀ, C = [0, 1], D = 0.
- Characteristic equation: |sI − A| = (s+2)(s) + 2 = s² + 2s + 2 → poles s = −1 ± j1. Stable, ω_n = √2 ≈ 1.414 rad/s, ζ = 2/(2√2) ≈ 0.707.
- Transfer function: (sI − A)⁻¹B gives V_C(s)/V(s) = 2/(s² + 2s + 2). Check by direct circuit analysis: 1/(LCs² + RCs + 1) = 1/(0.5s² + s + 1) = 2/(s² + 2s + 2). ✔
Example 2 — State transition matrix. A = [[0, 1], [−2, −3]].
- sI − A = [[s, −1], [2, s+3]]; determinant = s(s+3) + 2 = (s+1)(s+2).
- (sI − A)⁻¹ = 1/((s+1)(s+2)) · [[s+3, 1], [−2, s]].
- Partial fractions: (s+3)/((s+1)(s+2)) = 2/(s+1) − 1/(s+2); 1/((s+1)(s+2)) = 1/(s+1) − 1/(s+2); −2/((s+1)(s+2)) = −2/(s+1) + 2/(s+2); s/((s+1)(s+2)) = −1/(s+1) + 2/(s+2).
- φ(t) = [[2e^{−t} − e^{−2t}, e^{−t} − e^{−2t}], [−2e^{−t} + 2e^{−2t}, −e^{−t} + 2e^{−2t}]].
- Check φ(0) = [[1, 0], [0, 1]] ✔. With x(0) = [1, 0]ᵀ and u = 0: x₁(t) = 2e^{−t} − e^{−2t}, which is 1 at t = 0 and decays to 0.
Example 3 — Controllability and observability. A = [[0, 1], [−2, −3]], B = [0, 1]ᵀ, C = [1, 0].
- AB = [[0,1],[−2,−3]][0,1]ᵀ = [1, −3]ᵀ. Q_c = [[0, 1], [1, −3]], |Q_c| = (0)(−3) − (1)(1) = −1 ≠ 0 → controllable.
- Cᵀ = [1, 0]ᵀ; AᵀCᵀ = [[0, −2],[1, −3]][1, 0]ᵀ = [0, 1]ᵀ. Q_o = [[1, 0], [0, 1]], |Q_o| = 1 ≠ 0 → observable.
- Hence the realisation is minimal; G(s) = C(sI−A)⁻¹B = 1/((s+1)(s+2)) — second order, matching n = 2.
Example 4 — Pole placement. Same A and B as Example 3 (controllable canonical form). Required: ζ = 0.7, ω_n = 10 rad/s.
- Desired polynomial: s² + 2ζω_n s + ω_n² = s² + 14s + 100.
- With K = [k₁ k₂]: BK = [[0, 0], [k₁, k₂]]; A − BK = [[0, 1], [−2 − k₁, −3 − k₂]].
- |sI − (A − BK)| = s² + (3 + k₂)s + (2 + k₁).
- Match: 3 + k₂ = 14 → k₂ = 11; 2 + k₁ = 100 → k₁ = 98. So K = [98, 11].
- Observer poles chosen 3× faster (≈ s² + 42s + 900): with L = [l₁, l₂]ᵀ and C = [1,0], A − LC = [[−l₁, 1], [−2 − l₂, −3]] → |sI − A + LC| = s² + (3 + l₁)s + (3l₁ + 2 + l₂). Match: l₁ = 39, l₂ = 900 − 2 − 117 = 781.
Example 5 — Hidden mode (pole-zero cancellation). A = [[1, 0], [0, −2]], B = [0, 1]ᵀ, C = [1, 1], D = 0.
- Eigenvalues: +1 and −2 → internally unstable.
- Diagonal A, so use Gilbert's test: row 1 of B is zero → the mode λ = +1 is uncontrollable.
- G(s) = C(sI−A)⁻¹B = [1 1]·[0, 1/(s+2)]ᵀ = 1/(s+2) — a first-order, BIBO-stable transfer function that hides the unstable mode. Non-minimal realisation.
| Aspect | Transfer-function (classical) | State space (modern) |
|---|---|---|
| Domain | Frequency / s-domain | Time domain, matrix form |
| System type | SISO, LTI only | MIMO, time-varying, extendable to nonlinear |
| Initial conditions | Assumed zero | Included naturally through x(0) |
| Internal information | None (input-output only) | All internal states available |
| Stability test | Routh, root locus, Bode, Nyquist | Eigenvalues of A |
| Design tools | Lead/lag, PID compensation | Pole placement, LQR, observers, Kalman filter |
| Hidden modes | Cancelled and invisible | Exposed by controllability/observability tests |
| Computation | Hand plots feasible | Needs matrix computation (MATLAB, Python, Scilab) |
| Canonical form | A structure | Guaranteed property | Typical use |
|---|---|---|---|
| Controllable (companion) | Coefficients in the last row | Always controllable | Pole placement, Ackermann |
| Observable | Coefficients in the last column | Always observable | Observer design |
| Diagonal (distinct poles) | diag(λ₁ … λₙ) | Modes decoupled | Gilbert's test, modal analysis |
| Jordan (repeated poles) | Jordan blocks with 1's | Shows mode coupling | Repeated-eigenvalue problems |
% MATLAB / Octave check of Examples 3 and 4
A = [0 1; -2 -3]; B = [0; 1]; C = [1 0]; D = 0;
rank(ctrb(A,B)) % 2 -> controllable
rank(obsv(A,C)) % 2 -> observable
K = acker(A, B, roots([1 14 100])) % [98 11]
eig(A - B*K) % -7 +/- 7.14i
sys = ss(A,B,C,D); tf(sys) % 1/(s^2+3s+2)
Where it is used
- Power electronics and EV drives: field-oriented control of induction and PMSM motors uses state models in the d-q frame; sensorless drives estimate rotor position with an observer or extended Kalman filter — work done at Tata Motors, Mahindra Electric, Ather, Ola Electric, Exide/Amara Raja BMS teams.
- Aerospace and defence: ISRO launch-vehicle attitude control, DRDO missile guidance, HAL and BEL avionics all use state-space controllers, Kalman filters and LQR/LQG designs.
- Power system control: BHEL/NTPC turbine-governor and AVR models, state estimation at load dispatch centres (POSOCO/Grid-India) built on weighted-least-squares state estimation of the grid.
- Process industry: model predictive control on refinery and petrochemical units (Reliance, IOCL, BPCL) runs on linear state-space plant models identified from plant data.
- Robotics and automation: manipulator and mobile-robot control, drone flight stacks, balancing robots — standard interview material for roles at Tata Elxsi, KPIT, Bosch, L&T Technology Services.
- Job roles and tools: control systems engineer, model-based design engineer, embedded controls engineer; MATLAB/Simulink, Simulink Coder, Python (control, SciPy), dSPACE/Typhoon hardware-in-loop rigs.
Interview questions
- Q: What is a state variable? A: One of the minimum set of variables whose values at an initial time, together with the input afterwards, determine the system's complete future behaviour; in practice the energy-storage variables.
- Q: Why is the state model of a system not unique? A: Any non-singular transformation of the state vector gives another valid model; only derived quantities like eigenvalues and the transfer function are unique.
- Q: How do you get the transfer function from a state model? A: G(s) = C(sI − A)⁻¹B + D; the characteristic polynomial |sI − A| forms its denominator.
- Q: What does the state transition matrix physically represent? A: e^{At} propagates the state from one instant to another in the absence of input, so x(t) = e^{At}x(0).
- Q: List two properties of e^{At}. A: e^{A·0} = I and (e^{At})⁻¹ = e^{−At}; also e^{A(t₁+t₂)} = e^{At₁}e^{At₂}.
- Q: Can a system be BIBO stable but internally unstable? A: Yes — if an unstable mode is uncontrollable or unobservable it cancels out of the transfer function but still grows inside the system, so the state blows up.
- Q: State the condition for arbitrary pole placement by state feedback. A: The system must be completely state controllable; then K can place all n closed-loop eigenvalues anywhere.
- Q: What is duality and why is it useful? A: (A, B) is controllable exactly when (Aᵀ, Bᵀ) is observable, so an observer design can be solved with the same pole-placement algorithm applied to the transposed system.
- Q: Does state feedback change the zeros of the system? A: No — u = −Kx + r moves only the poles; zeros (from C and B) remain, which is why unstable zeros cannot be fixed by pole placement.
- Q: Why are observer poles chosen faster than the controller poles? A: So the estimation error decays before the control loop acts on it; typically 2–5 times faster, but too fast amplifies measurement noise.
- Q: What is the separation principle? A: For an LTI system, the state-feedback gain and the observer gain can be designed independently, and the resulting closed-loop poles are the union of (A − BK) and (A − LC) eigenvalues.
- Q: How many state variables does a circuit with two capacitors and one inductor need? A: Three, provided all are independent; if two capacitors are in parallel or series-connected without any other element between them, their voltages are dependent and the order drops.
- Q: What changes in state space for a discrete-time system? A: The derivative becomes a difference: x(k+1) = A_d x(k) + B_d u(k), with A_d = e^{AT}, and stability needs all eigenvalues inside the unit circle.
Common mistakes
- Treating the number of elements as the order — dependent capacitors/inductors (parallel C's, series L's) reduce the number of independent states.
- Writing the companion-matrix coefficients in the wrong order or with the wrong sign (the last row is −aₙ, −a_{n−1}, …, −a₁).
- Forgetting the D matrix when the transfer function is not strictly proper (equal numerator and denominator degrees).
- Using diagonalisation (or Sylvester's distinct-eigenvalue formula) for e^{At} without checking repeated eigenvalues, where a Jordan form is needed — the power-series and Laplace routes stay valid.
- Applying Gilbert's zero-row/zero-column test to a non-diagonal A — it is valid only for diagonal or properly handled Jordan forms.
- Concluding stability from the transfer function of a non-minimal realisation, missing a cancelled unstable mode.
- Attempting pole placement without first checking controllability, or assuming output feedback can place all poles.
- Mixing up Q_c and Q_o, or forgetting the transpose in the observability matrix.
Related topics
Control systems basics · Stability: Routh, root locus and Bode · Digital control systems · PID controllers and tuning · Linear algebra: matrices and eigenvalues · Signals and systems (Laplace and z-transforms)