Part 6 · Chapter 23

State-Space Representation of Systems

A transfer function tells you what comes out for what goes in and nothing whatever about what is happening inside; the state model replaces that single high-order input–output relation with a first-order vector differential equation whose variables are the system's own internal energy stores, and this chapter shows how to write that model from physics, from a differential equation, or from a transfer function, and how to get the transfer function back out of it.

Control Systems Prof. Mithun Mondal Reading time ≈ 46 min
i What you'll learn
  • The four things a transfer function cannot do, and why each of them matters in practice.
  • The precise definition of state, and how to count the state variables of a physical system.
  • The standard model \(\dot{\mathbf{x}}=A\mathbf{x}+B u,\; y=C\mathbf{x}+Du\) and what each matrix means.
  • How to write \(A,B,C,D\) from circuit and mechanical equations, from a differential equation, and from a transfer function.
  • The three standard forms — controllable, observable and diagonal — and what each is good for.
  • The recovery formula \(T(s)=C(sI-A)^{-1}B+D\), and why \(|sI-A|=0\) is the characteristic equation.
  • Why eigenvalues survive any change of state variables, and what a hidden mode is.
Section 23-1

Where the Transfer Function Stops

Everything in the first five parts of this course has rested on one object: the ratio \(C(s)/R(s)\). It has been remarkably productive. From it came the poles that fix stability (Chapters 10 and 11), the locus that shows how those poles move with gain (Chapter 12), the frequency response that can be measured without ever knowing the model (Chapter 14), and the compensators of Part 5. It is worth pausing to notice how much that one ratio was made to carry — and then to be honest about what it cannot carry at all.

It is defined only for zero initial conditions. The derivation in Chapter 3 dropped every initial-condition term the Laplace transform produced. That is harmless when a system starts at rest, and useless when it does not — a satellite already tumbling, a furnace already hot, a motor already turning.

It sees only the two ends. A transfer function relates one input to one output. It says nothing about the armature current that flows to produce a perfectly acceptable shaft angle, nothing about the internal pressure in a tank whose level is being controlled well. Designs fail on internal variables that the input–output description never mentions.

It can lose modes entirely. When a numerator factor cancels a denominator factor, the corresponding mode disappears from \(C(s)/R(s)\) while remaining perfectly present in the physical system. If that mode happens to be unstable, the transfer function will pronounce a diverging system stable. Section 23-8 shows how this happens and Chapter 25 gives it its proper names.

It scales badly. A plant with three inputs and two outputs needs six transfer functions, and every manipulation becomes bookkeeping. Time-varying and nonlinear systems have no transfer function at all, so the entire classical toolbox simply stops.

The state-space description answers all four. It carries initial conditions naturally, it names every internal variable explicitly, it retains modes that cancel, and it handles many inputs and many outputs with no change of notation whatsoever. It is the language of everything that follows — the solution and the transition matrix in Chapter 24, controllability and observability in Chapter 25, pole placement and observers in Chapter 26, and the optimal and adaptive methods of Chapter 30.

Nothing is being discarded. The state model and the transfer function are two descriptions of the same linear system, and Section 23-7 gives the formula that converts one into the other. What changes is the level of detail: the transfer function is what you get after throwing away everything internal, and once thrown away it cannot be recovered. Start from the state model and you can always retreat to the transfer function; start from the transfer function and you must invent the internal structure yourself.
Section 23-2

State, State Variables and the State Vector

The word "state" has a technical meaning that is worth stating carefully, because the whole subject follows from it.

🔑
Definition
The state of a system at time \(t_0\) is the smallest set of numbers such that, knowing them and knowing the input for all \(t\ge t_0\), the output for all \(t\ge t_0\) is determined.

The members of that set are the state variables. Collected into a column they form the state vector \(\mathbf{x}(t)\in\mathbb{R}^{n}\), and \(n\) — the number of state variables — is the order of the system. The space \(\mathbb{R}^{n}\) is the state space, and the curve traced by \(\mathbf{x}(t)\) in it is the trajectory.

Two words in that definition do the work. Smallest: any redundant variable can be computed from the others and so is not part of the state. Determined: the state is a complete summary of the past. Two systems started from the same state and driven by the same input behave identically thereafter, however different their histories were. This is why the state is sometimes described as the memory of the system: it is exactly what the past has to communicate to the future.

For a physical system the state variables have a concrete identity: they are the variables that describe independently stored energy. A capacitor stores \(\tfrac12 Cv_C^{2}\), an inductor \(\tfrac12 Li_L^{2}\), a moving mass \(\tfrac12 mv^{2}\), a stretched spring \(\tfrac12 kx^{2}\), a thermal mass \(mc\,\theta\). Each independent store contributes one state variable, and the natural choice is the variable in whose square the energy is written.

ElementEnergy storedNatural state variable
Capacitor \(C\)\(\tfrac12 C v_C^{2}\)Capacitor voltage \(v_C\)
Inductor \(L\)\(\tfrac12 L i_L^{2}\)Inductor current \(i_L\)
Mass \(m\)\(\tfrac12 m v^{2}\)Velocity \(v\)
Spring \(k\)\(\tfrac12 k x^{2}\)Deflection \(x\)
Inertia \(J\)\(\tfrac12 J\omega^{2}\)Angular velocity \(\omega\)
Resistor, dampernone (dissipative)— contributes no state

The word independent is not decoration. Two capacitors in parallel store energy jointly, not separately: their voltages are equal, so they contribute one state variable, not two. A loop consisting only of capacitors and voltage sources, or a node joining only inductors and current sources, similarly removes one degree of freedom. In such cases the count of components exceeds the order of the system, and it is the order that is right.

State variables need not be measurable, and they are not unique. Nothing in the definition requires a state variable to correspond to a sensor, and nothing makes one choice canonical: if \(\mathbf{x}\) is a valid state vector then so is \(P\mathbf{x}\) for any invertible \(P\), as Section 23-8 proves. What is unique is \(n\), and — far more importantly — the eigenvalues of the system, which survive every such relabelling untouched.
Section 23-3

The Standard State Model

Once the state variables are chosen, the physics is written as a rate law for each of them. For a linear time-invariant system every rate is a linear combination of the states and the inputs, and every output is a linear combination of the states and the inputs. Two matrix equations say all of it.

🔑
The state model
\[ \dot{\mathbf{x}}(t)=A\mathbf{x}(t)+B\mathbf{u}(t) \qquad\text{(state equation)} \]\[ \mathbf{y}(t)=C\mathbf{x}(t)+D\mathbf{u}(t) \qquad\text{(output equation)} \]

With \(n\) states, \(m\) inputs and \(p\) outputs: \(A\) is \(n\times n\), \(B\) is \(n\times m\), \(C\) is \(p\times n\) and \(D\) is \(p\times m\). Nothing in the shape of these equations changes when \(m\) or \(p\) grows, which is the whole reason state space handles multivariable systems so easily.

MatrixNameSizeWhat it encodes
\(A\)System or state matrix\(n\times n\)The internal dynamics: how the states drive one another. Its eigenvalues are the system's modes.
\(B\)Input or control matrix\(n\times m\)Where the inputs enter — which states the actuators can push on.
\(C\)Output matrix\(p\times n\)What the sensors see — which combinations of states reach the output.
\(D\)Feedthrough or direct transmission\(p\times m\)The instantaneous path from input to output; zero whenever the transfer function is strictly proper.

An \(n\)th-order scalar differential equation has been traded for \(n\) coupled first-order equations, and the trade is a good one. First-order vector equations have a clean existence-and-uniqueness theory; they integrate numerically with standard routines; they generalise to time-varying coefficients by simply writing \(A(t)\); and, as Chapter 24 will show, they have a solution in closed form that looks exactly like the scalar solution \(x=e^{at}x_0\) with the scalar exponential replaced by a matrix exponential.

The block diagram of the model makes its structure visible. Each state variable is the output of an integrator; \(A\) is the feedback path around the bank of integrators; \(B\) injects the input; \(C\) reads the states out; \(D\) bypasses the dynamics entirely.

u B + + ∫ dt x C + + y A D
The state model: a bank of integrators, wrapped by A, fed by B, read by C, bypassed by D
Section 23-4

State Equations from Physics

When a model of the physical system exists — the differential equations of Chapter 2 — the state equations follow by a fixed procedure. Choose one state variable per independent energy store; write the element law that gives the derivative of each; eliminate every variable that is not a state or an input; assemble.

Take the mass–spring–damper of Chapter 2, \(m\ddot q+b\dot q+kq=f\), with position \(q\) as the output. The spring stores energy in \(q\) and the mass in \(\dot q\), so \(n=2\) and the natural choice is \(x_1=q\), \(x_2=\dot q\). The first rate law is a definition; the second is Newton's law rearranged.

Worked derivation — mechanical system
\[ \dot x_1=x_2, \qquad \dot x_2=\ddot q=\frac{1}{m}\left(f-b\dot q-kq\right)=-\frac{k}{m}x_1-\frac{b}{m}x_2+\frac{1}{m}f \]
\[ \begin{bmatrix}\dot x_1\\ \dot x_2\end{bmatrix}=\begin{bmatrix}0&1\\ -k/m & -b/m\end{bmatrix}\begin{bmatrix}x_1\\ x_2\end{bmatrix}+\begin{bmatrix}0\\ 1/m\end{bmatrix}f, \qquad y=\begin{bmatrix}1&0\end{bmatrix}\mathbf{x} \]

Electrical systems follow the same pattern with Kirchhoff's laws in place of Newton's. The rule of thumb is to write the inductor law \(L\,di_L/dt=v_L\) and the capacitor law \(C\,dv_C/dt=i_C\), then use the loop and node equations to express \(v_L\) and \(i_C\) in terms of the states and the sources. Example 1 carries this out for the series RLC circuit below.

v(t) R L C i_L = x₁ v_C = x₂ two independent stores → n = 2
One inductor, one capacitor: two energy stores, two state variables
Choose the physical variables when you can. The canonical forms of the next two sections are convenient for algebra, but their state variables are usually mathematical fictions with no physical meaning. A model built on inductor currents and capacitor voltages lets you write down current and voltage limits directly as constraints on \(\mathbf{x}\), which is exactly what a saturation study or a component rating calculation needs.
Section 23-5

Phase Variables and the Controllable Canonical Form

Often no physical model is available and the starting point is a differential equation or a transfer function. There is then no physics to guide the choice of state variables, and the standard trick is to take the output and its successive derivatives. These are the phase variables. Begin with the simplest case, an equation with no derivatives of the input:

From an nth-order equation to n first-order ones
\[ y^{(n)}+a_{n-1}y^{(n-1)}+\cdots+a_1\dot y+a_0y=b_0u \]
\[ x_1=y,\quad x_2=\dot y,\quad \ldots,\quad x_n=y^{(n-1)} \;\Longrightarrow\; \dot x_1=x_2,\ \dot x_2=x_3,\ \ldots \]
\[ \dot x_n=y^{(n)}=-a_0x_1-a_1x_2-\cdots-a_{n-1}x_n+b_0u \]

Only the last equation carries any content; the rest are definitions. Assembled, the matrices take the companion shape: ones on the superdiagonal, the negated coefficients along the bottom row, and the input entering only the last state.

🔑
Controllable canonical form (CCF)
\[ A=\begin{bmatrix}0&1&0&\cdots&0\\0&0&1&\cdots&0\\ \vdots& & &\ddots&\vdots\\ 0&0&0&\cdots&1\\ -a_0&-a_1&-a_2&\cdots&-a_{n-1}\end{bmatrix},\quad B=\begin{bmatrix}0\\0\\ \vdots\\0\\1\end{bmatrix} \]

The characteristic polynomial can be read straight off the bottom row: \(|sI-A|=s^{n}+a_{n-1}s^{n-1}+\cdots+a_1s+a_0\). This is the form used for pole placement in Chapter 26, because a state feedback \(u=-K\mathbf{x}\) simply subtracts \(K\) from that bottom row, giving direct control of every coefficient.

Numerator dynamics need one extra step. If the transfer function is \(Y(s)/U(s)=N(s)/D(s)\) with \(N(s)=b_ms^{m}+\cdots+b_0\) and \(m<n\), introduce an intermediate variable \(Z(s)\) defined by \(D(s)Z(s)=U(s)\). Then \(Y(s)=N(s)Z(s)\), and the phase variables are taken on \(z\) rather than on \(y\):

Handling a numerator
\[ x_1=z,\ x_2=\dot z,\ \ldots,\ x_n=z^{(n-1)} \;\Longrightarrow\; y=b_0z+b_1\dot z+\cdots+b_mz^{(m)}=b_0x_1+b_1x_2+\cdots+b_mx_{m+1} \]
\[ \Rightarrow\quad C=\begin{bmatrix}b_0&b_1&\cdots&b_m&0&\cdots&0\end{bmatrix} \]

The matrices \(A\) and \(B\) are untouched: the denominator alone sets the dynamics, and the numerator appears entirely in \(C\). If \(m=n\), long division first produces a constant that becomes \(D\), leaving a strictly proper remainder to be handled as above. The simulation diagram of this form is a chain of integrators with the coefficients wired back to the input end and the numerator coefficients tapped forward — the state-space cousin of the signal flow graphs of Chapter 5.

CASCADE (PHASE VARIABLES) u 1/s x₃ 1/s x₂ 1/s x₁ = y −a₂ −a₁ −a₀ states in a chain; A is companion
Controllable canonical form: integrators in cascade
PARALLEL (DIAGONAL) u 1/(s−λ₁) r₁ 1/(s−λ₂) r₂ 1/(s−λ₃) r₃ y modes decoupled; A is diagonal
Diagonal form: one independent mode per branch
Section 23-6

Observable and Diagonal Forms

The controllable form is one of infinitely many valid state models for a given transfer function, and two others are used constantly enough to be worth memorising.

The observable canonical form is the exact dual of the controllable one. Take the same transfer function, transpose \(A\), and swap the roles of \(B\) and \(C\):

The duality
\[ A_{o}=A_{c}^{\mathsf T}, \qquad B_{o}=C_{c}^{\mathsf T}, \qquad C_{o}=B_{c}^{\mathsf T}, \qquad D_{o}=D_{c} \]
\[ A_{o}=\begin{bmatrix}0&0&\cdots&0&-a_0\\ 1&0&\cdots&0&-a_1\\ 0&1&\cdots&0&-a_2\\ \vdots& &\ddots& &\vdots\\ 0&0&\cdots&1&-a_{n-1}\end{bmatrix},\qquad C_{o}=\begin{bmatrix}0&\cdots&0&1\end{bmatrix} \]

That this transposition leaves the transfer function unchanged is easy to prove: a \(1\times1\) matrix equals its own transpose, so \(T(s)=C(sI-A)^{-1}B=\left[C(sI-A)^{-1}B\right]^{\mathsf T}=B^{\mathsf T}(sI-A^{\mathsf T})^{-1}C^{\mathsf T}\), which is precisely the observable form. The name comes from Chapter 25: this arrangement makes the states maximally visible from the output, just as the controllable form makes them maximally reachable from the input.

The diagonal or modal form is the most illuminating of the three. Expand the transfer function in partial fractions. If the poles \(\lambda_1,\ldots,\lambda_n\) are distinct,

Diagonal form from partial fractions
\[ T(s)=\sum_{i=1}^{n}\frac{r_i}{s-\lambda_i} \;\Longrightarrow\; A=\begin{bmatrix}\lambda_1& & \\ &\ddots& \\ & &\lambda_n\end{bmatrix},\quad B=\begin{bmatrix}1\\ \vdots\\ 1\end{bmatrix},\quad C=\begin{bmatrix}r_1&\cdots&r_n\end{bmatrix} \]

Here the state equations decouple completely: \(\dot x_i=\lambda_ix_i+u\), one independent first-order system per mode. Nothing in the model couples the modes to one another; they merely add at the output. This makes the diagonal form the natural place to see stability (every \(\lambda_i\) must have a negative real part), and the natural place to see whether a mode can be influenced at all — if a row of \(B\) is zero the corresponding mode cannot be driven, and if a column of \(C\) is zero it cannot be seen.

Repeated poles spoil the diagonalisation. A pole of multiplicity \(k\) contributes a \(k\times k\) Jordan block, diagonal with the repeated eigenvalue and carrying ones on the superdiagonal, and the corresponding modes are coupled in a chain — which is the state-space fingerprint of the \(te^{\lambda t}\) terms that repeated poles produce in the time response.

FormShape of \(A\)Built fromUsed for
Controllable (phase variable)Companion, coefficients on the bottom rowDenominator coefficients directlyPole placement by state feedback (Chapter 26)
ObservableTransposed companion, coefficients in the last columnThe same coefficientsObserver design (Chapter 26)
Diagonal / JordanDiagonal, or Jordan blocksPartial-fraction expansionModal analysis, decoupling, controllability and observability tests (Chapter 25)
PhysicalNo special structureCircuit or free-body equationsComponent ratings, saturation limits, meaningful initial conditions
Section 23-7

Back to the Transfer Function

Given \(A,B,C,D\), the transfer function follows in three lines. Laplace-transform the state equation, taking zero initial conditions since that is the transfer function's defining assumption:

Derivation
\[ s\mathbf{X}(s)=A\mathbf{X}(s)+B\mathbf{U}(s) \;\Longrightarrow\; (sI-A)\mathbf{X}(s)=B\mathbf{U}(s) \;\Longrightarrow\; \mathbf{X}(s)=(sI-A)^{-1}B\,\mathbf{U}(s) \]
\[ \mathbf{Y}(s)=C\mathbf{X}(s)+D\mathbf{U}(s)=\left[C(sI-A)^{-1}B+D\right]\mathbf{U}(s) \]
🔑
The transfer function of a state model
\[ T(s)=C(sI-A)^{-1}B+D=\frac{C\,\mathrm{adj}(sI-A)\,B+D\,|sI-A|}{|sI-A|} \]

The matrix \(sI-A\) must be inverted, and its inverse is the adjugate over the determinant. That determinant appears as the denominator of every entry, so \(|sI-A|\) is the characteristic polynomial of the system and \(|sI-A|=0\) is its characteristic equation. For a multivariable system the same formula returns a \(p\times m\) matrix of transfer functions, all sharing that one denominator.

Two consequences deserve attention. First, the roots of \(|sI-A|=0\) are by definition the eigenvalues of \(A\), so the poles of a system are the eigenvalues of its state matrix. Everything Chapters 10 and 11 said about pole locations transfers verbatim: the system is stable if and only if every eigenvalue of \(A\) lies in the open left half-plane.

Second, the poles of \(T(s)\) are a subset of the eigenvalues of \(A\), not necessarily all of them. If a factor of \(C\,\mathrm{adj}(sI-A)\,B\) cancels a factor of \(|sI-A|\), that eigenvalue vanishes from the transfer function while remaining an eigenvalue of \(A\) and a genuine mode of the system. This is the "lost mode" promised in Section 23-1, and it is examined next.

Keeping the initial conditions instead of discarding them gives \(\mathbf{X}(s)=(sI-A)^{-1}\left[\mathbf{x}(0)+B\mathbf{U}(s)\right]\), in which the same matrix \((sI-A)^{-1}\) propagates both the stored energy and the applied input. Its inverse transform is the state transition matrix, and it is the entire subject of Chapter 24.

Section 23-8

Eigenvalues, Similarity and What Is Really Invariant

Section 23-2 claimed that the state vector is not unique. Make that precise. Let \(P\) be any invertible \(n\times n\) matrix and define a new state vector by \(\mathbf{x}=P\mathbf{z}\). Substituting into the model gives a model of exactly the same form in the new variables:

Similarity transformation
\[ P\dot{\mathbf{z}}=AP\mathbf{z}+Bu \;\Longrightarrow\; \dot{\mathbf{z}}=\underbrace{P^{-1}AP}_{\bar A}\mathbf{z}+\underbrace{P^{-1}B}_{\bar B}u, \qquad y=\underbrace{CP}_{\bar C}\mathbf{z}+Du \]

The two models describe the same system in different coordinates. What survives the change? The determinant of a product is the product of the determinants, so

Invariance of the characteristic polynomial
\[ |sI-\bar A|=|sP^{-1}P-P^{-1}AP|=|P^{-1}(sI-A)P|=|P^{-1}|\,|sI-A|\,|P|=|sI-A| \]

The eigenvalues are therefore untouched by any relabelling of the states, and so is the transfer function, since \(\bar C(sI-\bar A)^{-1}\bar B=CP\,P^{-1}(sI-A)^{-1}P\,P^{-1}B=C(sI-A)^{-1}B\). What changes is only the interpretation of the individual numbers in \(\mathbf{x}\). The matrices are coordinates; the eigenvalues are physics.

The most useful choice of \(P\) is the modal matrix, whose columns are the eigenvectors of \(A\). If the eigenvalues are distinct the eigenvectors are independent, \(P\) is invertible, and \(P^{-1}AP\) is diagonal with the eigenvalues on it — the diagonal form of Section 23-6, reached by transformation instead of by partial fractions. Work it through on a small example.

Worked derivation — diagonalising a companion matrix
\[ A=\begin{bmatrix}0&1\\-2&-3\end{bmatrix}: \quad |sI-A|=s(s+3)+2=(s+1)(s+2) \;\Rightarrow\; \lambda_1=-1,\ \lambda_2=-2 \]
\[ (A-\lambda_1I)\mathbf{v}_1=\begin{bmatrix}1&1\\-2&-2\end{bmatrix}\mathbf{v}_1=\mathbf{0}\Rightarrow \mathbf{v}_1=\begin{bmatrix}1\\-1\end{bmatrix}, \qquad \mathbf{v}_2=\begin{bmatrix}1\\-2\end{bmatrix} \]
\[ P=\begin{bmatrix}1&1\\-1&-2\end{bmatrix},\quad P^{-1}=\begin{bmatrix}2&1\\-1&-1\end{bmatrix},\quad P^{-1}AP=\begin{bmatrix}-1&0\\0&-2\end{bmatrix} \]

With \(B=[0\;\;1]^{\mathsf T}\) and \(C=[1\;\;0]\) the transformed model has \(\bar B=P^{-1}B=[1\;\;{-1}]^{\mathsf T}\) and \(\bar C=CP=[1\;\;1]\), and the transfer function computed in the new coordinates is \(\dfrac{1}{s+1}-\dfrac{1}{s+2}=\dfrac{1}{(s+1)(s+2)}\) — the same as before, as it must be.

Now the hidden-mode question. Consider the model

A mode the transfer function cannot see
\[ A=\begin{bmatrix}-1&0\\0&-2\end{bmatrix},\quad B=\begin{bmatrix}1\\0\end{bmatrix},\quad C=\begin{bmatrix}1&1\end{bmatrix} \;\Longrightarrow\; T(s)=\frac{1}{s+1} \]

The system is second order and has eigenvalues \(-1\) and \(-2\), yet its transfer function is first order. The second row of \(B\) is zero, so the input cannot reach \(x_2\) at all: whatever \(x_2\) does, it does on its own, decaying from its initial value with no possibility of being influenced. The transfer function, which assumes zero initial conditions and describes only the input–output path, has no reason to mention it — so it does not. Reverse the situation by zeroing a column of \(C\) and the mode becomes invisible to the sensor instead. Both cases are what Chapter 25 will call loss of controllability and loss of observability, and both are why the order of a state model can exceed the order of its transfer function.

The stakes are not academic. Suppose the hidden eigenvalue had been \(+2\) instead of \(-2\). The transfer function would still read \(1/(s+1)\), and every classical test in this book — Routh, root locus, Nyquist — applied to that transfer function would certify a stable system, while the real hardware diverged exponentially. Only a model that keeps the internal structure can catch this, which is the strongest single argument for learning state space at all.
Section 23-9

Worked Examples

1 Series RLC circuit

Problem. For the series RLC circuit of Section 23-4 with \(R=3\,\Omega\), \(L=1\) H and \(C=0.5\) F, driven by \(v(t)\), take the capacitor voltage as the output. Write the state model and recover the transfer function.

Solution. One inductor and one capacitor give \(n=2\); choose \(x_1=i_L\) and \(x_2=v_C\). Kirchhoff's voltage law around the loop and the capacitor law give the two rates:

Working — the physics
\[ L\frac{di_L}{dt}=v-Ri_L-v_C \;\Rightarrow\; \dot x_1=-\frac{R}{L}x_1-\frac{1}{L}x_2+\frac{1}{L}v, \qquad C\frac{dv_C}{dt}=i_L \;\Rightarrow\; \dot x_2=\frac{1}{C}x_1 \]
\[ A=\begin{bmatrix}-3&-1\\ 2&0\end{bmatrix},\quad B=\begin{bmatrix}1\\0\end{bmatrix},\quad C=\begin{bmatrix}0&1\end{bmatrix},\quad D=0 \]

Now apply \(T(s)=C(sI-A)^{-1}B\):

Working — the transfer function
\[ sI-A=\begin{bmatrix}s+3&1\\-2&s\end{bmatrix}, \qquad |sI-A|=s(s+3)+2=s^{2}+3s+2 \]
\[ (sI-A)^{-1}=\frac{1}{s^{2}+3s+2}\begin{bmatrix}s&-1\\ 2&s+3\end{bmatrix}, \qquad (sI-A)^{-1}B=\frac{1}{s^{2}+3s+2}\begin{bmatrix}s\\ 2\end{bmatrix} \]
\[ T(s)=\begin{bmatrix}0&1\end{bmatrix}\frac{1}{s^{2}+3s+2}\begin{bmatrix}s\\2\end{bmatrix}=\frac{2}{s^{2}+3s+2}=\frac{1/LC}{s^{2}+(R/L)s+1/LC} \]

The classical result of Chapter 2 falls out, and the eigenvalues \(-1\) and \(-2\) are the circuit's two natural modes.

2 Mass–spring–damper, and a coincidence worth noticing

Problem. A mass \(m=1\) kg on a spring \(k=2\) N/m with damping \(b=3\) N·s/m is driven by a force \(f\); the output is the displacement. Write the state model and its transfer function.

Solution. Using the general result derived in Section 23-4 with \(x_1=q\), \(x_2=\dot q\):

Working
\[ A=\begin{bmatrix}0&1\\ -2&-3\end{bmatrix},\quad B=\begin{bmatrix}0\\1\end{bmatrix},\quad C=\begin{bmatrix}1&0\end{bmatrix},\quad D=0 \]
\[ (sI-A)^{-1}B=\frac{1}{s^{2}+3s+2}\begin{bmatrix}s+3&1\\-2&s\end{bmatrix}\begin{bmatrix}0\\1\end{bmatrix}=\frac{1}{s^{2}+3s+2}\begin{bmatrix}1\\ s\end{bmatrix} \;\Rightarrow\; T(s)=\frac{1}{s^{2}+3s+2} \]

This mechanical system and the circuit of Example 1 have the same characteristic polynomial and therefore the same modes, but their \(A\) matrices are different and their state variables mean entirely different things — currents and voltages in one case, position and velocity in the other. They are related by a similarity transformation, and the analogy of Chapter 2 between force–voltage and force–current systems is exactly the statement that such a \(P\) exists.

3 Phase variables from a differential equation

Problem. Put \(\dddot y+6\ddot y+11\dot y+6y=6u\) into state-space form and find its modes.

Solution. There are no derivatives of \(u\), so the phase variables are the output and its first two derivatives: \(x_1=y\), \(x_2=\dot y\), \(x_3=\ddot y\). The first two state equations are definitions and the third is the differential equation rearranged for \(\dddot y\):

Working
\[ A=\begin{bmatrix}0&1&0\\ 0&0&1\\ -6&-11&-6\end{bmatrix},\quad B=\begin{bmatrix}0\\0\\6\end{bmatrix},\quad C=\begin{bmatrix}1&0&0\end{bmatrix},\quad D=0 \]
\[ |sI-A|=s^{3}+6s^{2}+11s+6=(s+1)(s+2)(s+3) \]

The characteristic polynomial is read directly off the bottom row of \(A\), with no determinant to expand — the practical advantage of the companion form. The modes are \(e^{-t}\), \(e^{-2t}\) and \(e^{-3t}\), and the transfer function is \(6/[(s+1)(s+2)(s+3)]\).

4 Two canonical forms of one transfer function

Problem. Write both the controllable and the observable canonical forms of \(T(s)=\dfrac{2s+1}{s^{2}+3s+2}\), and verify each.

Solution. Here \(a_0=2\), \(a_1=3\), \(b_0=1\), \(b_1=2\). The controllable form puts the denominator coefficients in the bottom row of \(A\) and the numerator coefficients in \(C\):

Working — controllable form
\[ A_c=\begin{bmatrix}0&1\\ -2&-3\end{bmatrix},\ B_c=\begin{bmatrix}0\\1\end{bmatrix},\ C_c=\begin{bmatrix}1&2\end{bmatrix} \;\Rightarrow\; T=\begin{bmatrix}1&2\end{bmatrix}\frac{1}{\Delta}\begin{bmatrix}1\\ s\end{bmatrix}=\frac{1+2s}{s^{2}+3s+2} \]

The observable form is the transpose-dual, \(A_o=A_c^{\mathsf T}\), \(B_o=C_c^{\mathsf T}\), \(C_o=B_c^{\mathsf T}\):

Working — observable form
\[ A_o=\begin{bmatrix}0&-2\\ 1&-3\end{bmatrix},\ B_o=\begin{bmatrix}1\\2\end{bmatrix},\ C_o=\begin{bmatrix}0&1\end{bmatrix} \]
\[ (sI-A_o)^{-1}B_o=\frac{1}{\Delta}\begin{bmatrix}s+3&-2\\ 1&s\end{bmatrix}\begin{bmatrix}1\\2\end{bmatrix}=\frac{1}{\Delta}\begin{bmatrix}s-1\\ 1+2s\end{bmatrix} \;\Rightarrow\; T=\frac{2s+1}{s^{2}+3s+2} \]

Two different \(A\), \(B\) and \(C\); one transfer function; the same eigenvalues \(-1\) and \(-2\). Both are legitimate state models of the same system, and neither is more correct than the other.

5 Diagonal form by partial fractions

Problem. Find a diagonal state model of \(T(s)=\dfrac{s+3}{(s+1)(s+2)}\).

Solution. Expand in partial fractions using the cover-up rule:

Working
\[ r_1=\left.\frac{s+3}{s+2}\right|_{s=-1}=\frac{2}{1}=2, \qquad r_2=\left.\frac{s+3}{s+1}\right|_{s=-2}=\frac{1}{-1}=-1 \]
\[ T(s)=\frac{2}{s+1}-\frac{1}{s+2} \;\Longrightarrow\; A=\begin{bmatrix}-1&0\\ 0&-2\end{bmatrix},\ B=\begin{bmatrix}1\\1\end{bmatrix},\ C=\begin{bmatrix}2&-1\end{bmatrix},\ D=0 \]

Check the recovery formula: \((sI-A)^{-1}B=\left[\tfrac{1}{s+1}\;\;\tfrac{1}{s+2}\right]^{\mathsf T}\), so \(T=\tfrac{2}{s+1}-\tfrac{1}{s+2}\), which recombines to \((s+3)/[(s+1)(s+2)]\). Both entries of \(B\) are non-zero and both entries of \(C\) are non-zero, so both modes are driven by the input and both are visible at the output — no hidden modes here.

6 From a state model to the transfer function

Problem. A system has \(A=\begin{bmatrix}-2&1\\ 0&-3\end{bmatrix}\), \(B=\begin{bmatrix}1\\1\end{bmatrix}\), \(C=\begin{bmatrix}1&0\end{bmatrix}\), \(D=0\). Find its eigenvalues and its transfer function.

Solution. The matrix is upper triangular, so its eigenvalues are its diagonal entries, \(-2\) and \(-3\); the system is stable. For the transfer function:

Working
\[ sI-A=\begin{bmatrix}s+2&-1\\ 0&s+3\end{bmatrix},\qquad |sI-A|=(s+2)(s+3) \]
\[ (sI-A)^{-1}=\frac{1}{(s+2)(s+3)}\begin{bmatrix}s+3&1\\ 0&s+2\end{bmatrix},\qquad (sI-A)^{-1}B=\frac{1}{(s+2)(s+3)}\begin{bmatrix}s+4\\ s+2\end{bmatrix} \]
\[ T(s)=\begin{bmatrix}1&0\end{bmatrix}(sI-A)^{-1}B=\frac{s+4}{(s+2)(s+3)}=\frac{s+4}{s^{2}+5s+6} \]

No cancellation occurs, so the transfer function is second order like the state model, and its poles are exactly the eigenvalues of \(A\). Had the numerator come out as \(s+3\), the mode at \(-3\) would have vanished from \(T(s)\) while remaining in the system — the situation of Section 23-8.

Review

Chapter Summary

Why state space

Handles initial conditions, internal variables, cancelled modes and multivariable plants — none of which a transfer function can.

What state means

The smallest set of numbers that, with the future input, determines the future output. One per independent energy store.

The model

\(\dot{\mathbf{x}}=A\mathbf{x}+Bu\), \(y=C\mathbf{x}+Du\): \(A\) the dynamics, \(B\) the actuators, \(C\) the sensors, \(D\) the direct path.

Controllable form

Companion \(A\) with \(-a_i\) along the bottom row, \(B=[0\cdots0\;1]^{\mathsf T}\), numerator coefficients in \(C\).

Observable and diagonal

The observable form is the transpose-dual; the diagonal form comes from partial fractions and decouples the modes.

Recovery formula

\(T(s)=C(sI-A)^{-1}B+D\), with \(|sI-A|\) as the characteristic polynomial.

Eigenvalues are the physics

\(|sI-\bar A|=|sI-A|\) under any similarity transform: the coordinates change, the modes never do.

Hidden modes

Poles of \(T(s)\) are a subset of the eigenvalues of \(A\); a cancelled unstable mode is invisible to every classical test.

Practice

Practice Problems

State the choice of state variables explicitly in every case, and check each answer by computing \(C(sI-A)^{-1}B+D\) and comparing with the transfer function you started from or expected.

  1. A parallel RLC circuit is driven by a current source, with the capacitor voltage as output. Choose state variables, write \(A\), \(B\), \(C\), \(D\), and identify the two modes.
  2. Put \(\ddot y+5\dot y+6y=4u\) into controllable canonical form and find its eigenvalues.
  3. Find the controllable canonical form of \(T(s)=\dfrac{3s+2}{s^{3}+4s^{2}+5s+2}\), then write the observable form by duality.
  4. Find a diagonal state model of \(T(s)=\dfrac{4}{(s+1)(s+3)}\), and state which entries of \(B\) and \(C\) would have to vanish for a mode to become hidden.
  5. For \(A=\begin{bmatrix}0&1\\ -6&-5\end{bmatrix}\), \(B=\begin{bmatrix}0\\1\end{bmatrix}\), \(C=\begin{bmatrix}2&1\end{bmatrix}\), \(D=0\), compute \(T(s)\) and confirm that its poles are the eigenvalues of \(A\).
  6. Diagonalise the \(A\) matrix of Problem 5 using its eigenvectors, transform \(B\) and \(C\) accordingly, and verify that \(T(s)\) is unchanged.
  7. A system has \(A=\begin{bmatrix}-4&0\\ 0&1\end{bmatrix}\), \(B=\begin{bmatrix}2\\0\end{bmatrix}\), \(C=\begin{bmatrix}1&3\end{bmatrix}\). Compute \(T(s)\), then explain in one paragraph why applying the Routh criterion to \(T(s)\) would give a dangerously wrong verdict.
  8. A field-controlled DC motor drives an inertia through a shaft, with field current, shaft speed and shaft angle as candidate variables. Argue from energy storage how many state variables the model needs, choose them, and write the structure of \(A\) and \(B\) symbolically.
Tip: when a problem gives you a transfer function and asks for "the" state model, remember that there is no such thing — there are infinitely many, all related by similarity transformations, and the question is really asking which form serves the purpose at hand. Take the controllable form when the next step is state feedback, the observable form when it is an observer, the diagonal form when you want to see the modes separately, and physical variables whenever the physical system is available, because only those carry units, limits and meaningful initial conditions.