Classical control design and modern state-space methods speak different mathematical languages. Frequency-domain tools — Bode plots, root locus, PID/lead-lag synthesis — operate on transfer functions, ratios of polynomials in the Laplace variable
A SISO rational transfer function is
Normalising by
The monic denominator maps directly to the companion (controllable canonical) matrix
The output row $C = \begin{bmatrix} \hat{b}_n' & \cdots & \hat{b}_1' \end{bmatrix}$ is formed from the strictly-proper remainder coefficients
The observable canonical form is the algebraic dual of the controllable form:
Both realisations represent the same input-output map and share identical transfer functions.
Given
The Faddeev–Le Verrier algorithm computes the characteristic polynomial
The numerator coefficient for degree
| Operation | Time | Space | Notes |
|---|---|---|---|
ToControllableCanonical |
Direct coefficient placement | ||
ToObservableCanonical |
One transpose after CCF | ||
ToTransferFunction |
|
Memory is std::array on the stack.
Monic normalisation: already monic;
Feed-through split:
Companion matrix:
Observable form:
Round-trip verification via Le Verrier (
-
$M_0 = I$ ;$c_1 = -\tfrac{1}{1}\mathrm{tr}(AM_0) = -\mathrm{tr}(A) = 3$ ; $M_1 = A + 3I = \begin{bmatrix}3 & 1 \ -2 & 0\end{bmatrix}$. - $c_2 = -\tfrac{1}{2}\mathrm{tr}(AM_1) = -\tfrac{1}{2}\mathrm{tr}!\begin{bmatrix}-2 & 0 \ -6 & -2\end{bmatrix} = 2$.
- Numerator coefficients: $CM_1B = [2,1]\begin{bmatrix}1\0\end{bmatrix} = 2$;
$CM_2B = CM_0B = 0$ .
Result:
-
Near-zero leading denominator coefficient: the normalisation step divides by
$a_0$ ; a guard is required to avoid division by zero. - Non-minimal realisation: if numerator and denominator share a common factor (pole-zero cancellation), the realisation is valid but is not minimal — it is either uncontrollable or unobservable. The conversion does not detect or cancel common factors.
-
Le Verrier conditioning: the recursion accumulates floating-point errors in
$O(n^4)$ operations. For large$n$ the recovered transfer function coefficients degrade. Keep system orders to the small values typical on an MCU. -
Proper vs strictly proper: when
$\deg(\text{num}) < \deg(\text{den})$ the feed-through term$D = 0$ and the split step is a no-op. No special branch is required; the leading numerator coefficient being zero makes$D = 0$ automatically.
- Phase-variable form: an alternative state numbering; identical to controllable canonical form up to index reversal.
-
Modal canonical form: diagonalises
$A$ ; numerically sensitive but decouples modes for analysis. - Balanced realisation: minimises the condition number jointly; requires Gramian computation and similarity transformation.
-
Continuous-time vs discrete-time: the companion structure is identical; only the interpretation of
$s$ vs$z$ changes.
- Bridging frequency-domain compensator design to the
LinearTimeInvariantruntime for embedded execution. - Computing frequency response or root locus from a state-space plant model.
- Initialising Kalman filter or LQR designs from a transfer-function spec.
- Verifying a state-space model by recovering and inspecting its transfer function.
LinearTimeInvariant: the target realisation type; canonical forms drop directly into itsStep/Outputinterface.ControllabilityObservability: a canonical realisation is minimal if and only if it is both controllable and observable; use these checks after conversion.FrequencyResponse/RootLocus: classical analyses that accept transfer-function coefficients; feed the recovered transfer function fromToTransferFunctiondirectly.DurandKerner: factors the denominator polynomial into its roots (poles); combine with this converter for pole-zero plots.
- T. Kailath, Linear Systems, Prentice-Hall, 1980 — canonical realisations and the state-space / transfer-function correspondence (Ch. 6).
- C.-T. Chen, Linear System Theory and Design, 4th ed., Oxford University Press, 2013.
- K. J. Åström and R. M. Murray, Feedback Systems, Princeton University Press, 2008, Ch. 9.