Chapter 01

Three Representations of a Discrete-Time System

A discrete-time linear system can be written three ways — state space, transfer function, impulse response — and the six conversions between them are not equally honest. Two of them lose information, and what they lose is exactly the modes that observability and reachability tests detect: the hidden, sometimes unstable, states the input/output view cannot see.

Reading: ~27 min Interactive: 1 widgets Source: Polimi MIDA2 2025/26 — Lecture 2 (Ch. 2.1 — the three representations) · Polimi MIDA2 2025/26 — Lecture 3 (Ch. 2.1 — transformations, observability, the Hankel matrix)

01 · Motivation

Why a system has three faces

Module 2 is about identifying a state-space model of a dynamical system from measured data, and then using it — to estimate states you cannot measure, and to control the plant. Before any of that, one piece of bookkeeping: the same system can be written three different ways, and the whole module moves between them constantly.

A discrete-time, linear, time-invariant system takes an input u(t)u(t) and produces an output y(t)y(t). The three descriptions differ in what they choose to talk about:

State space — internal

Names nn internal variables x(t)x(t) and says how each one evolves. Tells you everything: which modes exist, how they are driven, and which ones reach the output.

Transfer function — external

A single rational function W(z)W(z) mapping input to output. Tells you what an experimenter can measure — and nothing about what is happening inside.

Impulse response — experimental

The sequence of numbers the system emits when kicked once. Requires no theory at all: you can collect it in the lab.

The reason this matters — and the reason this chapter comes first — is that the impulse response is the easy thing to measure and the state-space model is the useful thing to own. Chapter 02’s identification algorithm exists precisely to travel that edge. Everything here is the algebra that makes the trip possible, plus one warning about what gets lost along the way.

02 · The trap

The same system, unstable and decaying at once

Q

The most-set trap in the archive

Pole-zero cancellation and hidden modes carry 6 questions worth 32 marks across 6 of the 12 exam sittings in the bank — 8% of every mark on offer. It never appeared before July 2024 and has been set in 6 of the last 8 sittings, which makes it the single fastest-growing topic in the course. The question is always shaped the same way: compute the transfer function, find poles and zeros, assess stability. The trap is that the honest answer disagrees with the obvious one.

Here is the puzzle in its smallest form. Take the second-order system

A two-state system

{x1(t+1)=x1(t)+u(t)x2(t+1)=12x1(t)+2x2(t)+u(t)y(t)=x1(t)\begin{cases}x_1(t+1)=x_1(t)+u(t)\\ x_2(t+1)=\tfrac12 x_1(t)+2x_2(t)+u(t)\\ y(t)=x_1(t)\end{cases}

Its state matrix is lower-triangular, so its eigenvalues can be read straight off the diagonal: λ1=1\lambda_1=1 and λ2=2\lambda_2=2. The second one sits well outside the unit circle, so the state x2(t)x_2(t) grows without bound. Now compute what an experimenter would see. Working through the transfer function (the machinery is in §04) gives

W(z)=z2(z1)(z2)=1z1.W(z)=\frac{z-2}{(z-1)(z-2)}=\frac{1}{z-1}.

The factor z2z-2 appears in both numerator and denominator and cancels. What is left is a first-order system with a single pole at z=1z=1. The exploding mode has vanished from the description — not from the machine.

×

Cancelling the factor does not remove the mode

Cancellation is an operation on a fraction, not on a system. After cancelling you are looking at a faithful description of the input/output behaviour and an unfaithful description of the plant. The state x2x_2 still diverges; it simply never reaches yy. Any answer of the form “the pole at z=2z=2 cancels, therefore the system is stable” is marked wrong.

The plant — two modes u(t) x₁ — λ = 1 bounded x₂ — λ = 2 diverges ½ y(t) no path to y — unobservable What W(z) can show W(z) = (z−2)/((z−1)(z−2)) = 1/(z−1) unit circle z = 1 z = 2 pole = zero cancel

Order 2 in, order 1 out — and the difference is a whole mode, gone from the description but not from the machine.

Two things are worth noticing before we have the tools to explain them.

First, the orders disagree. The state-space model has order n=2n=2; the transfer function has order 11. A conversion that changes the order has thrown something away.

Second, look at why x2x_2 never reaches the output: y(t)=x1(t)y(t)=x_1(t), and x1x_1‘s equation does not contain x2x_2. There is no path from that state to the output at all. By §07 we will have a rank test that detects this in three lines of arithmetic and a name for the condition — the system is not fully observable. Hold the puzzle; we need the three representations first.

03 · Representation 1

State space — the internal view

The state x(t)x(t) is a vector of nn internal variables. Two equations govern the system: one saying how the state advances, one saying what leaks out of it.

State-space form

{x(t+1)=Fx(t)+Gu(t)(state equation)y(t)=Hx(t)+Du(t)(output equation)\begin{cases}x(t+1)=Fx(t)+Gu(t) & \text{(state equation)}\\ y(t)=Hx(t)+Du(t) & \text{(output equation)}\end{cases}

The integer nn is the order of the system. For a SISO system — single input, single output — the shapes are fixed: FF is n×nn\times n, GG is n×1n\times 1, HH is 1×n1\times n, and DD is a scalar.

F — state matrix

How the state advances on its own, with no input. Its eigenvalues are the system’s modes and decide stability.

G — input matrix

How the input pushes on each state variable. Decides reachability, together with FF.

H — output matrix

Which combination of states is measured. Decides observability, together with FF.

D — direct feedthrough

The part of the output that bypasses the state entirely and arrives in the same instant.

Strictly proper — four ways to say the same thing

When D=0D=0 the system is strictly proper: nothing gets from input to output without spending at least one step inside the state. This single property shows up in all three representations, and recognising it in each saves time in every exam problem:

  • State space: D=0D=0.
  • Transfer function: numerator degree strictly below denominator degree — equivalently at least one step of pure delay, k1k\ge 1.
  • Impulse response: ω(0)=0\omega(0)=0.
  • Behaviourally: the response to a step starts at zero rather than jumping.

Stability lives inside the unit circle

Discrete time changes the stability region, and this is a standing source of errors for students arriving from a continuous-time controls course.

domainmodelasymptotically stable when
continuous timex˙=Ax+Bu,  y=Cx+Du\dot x = Ax+Bu,\; y=Cx+Duevery eigenvalue of AA lies in the left half-plane
discrete timex(t+1)=Fx(t)+Gu(t),  y=Hx(t)+Du(t)x(t+1)=Fx(t)+Gu(t),\; y=Hx(t)+Du(t)every eigenvalue of FF lies inside the unit circle

So the test is on modulus, not on sign: λi(F)<1\lvert \lambda_i(F)\rvert < 1 for all ii. An eigenvalue of 0.9-0.9 is stable (oscillating, decaying); an eigenvalue of 22 is not.

tip

Reading a system off its equations

For x1(t+1)=12x1(t)+2u(t)x_1(t+1)=\tfrac12x_1(t)+2u(t), x2(t+1)=x1(t)+2x2(t)+u(t)x_2(t+1)=x_1(t)+2x_2(t)+u(t), y(t)=14x1(t)+12x2(t)y(t)=\tfrac14x_1(t)+\tfrac12x_2(t):

F=[12012],G=[21],H=[1412],D=0.F=\begin{bmatrix}\tfrac12&0\\1&2\end{bmatrix},\quad G=\begin{bmatrix}2\\1\end{bmatrix},\quad H=\begin{bmatrix}\tfrac14&\tfrac12\end{bmatrix},\quad D=0.

Order n=2n=2, strictly proper, eigenvalues {12,2}\{\tfrac12,\,2\} — and because 22 lies outside the unit circle, unstable.

The representation is not unique

One fact to carry from the start, because it governs everything identification can and cannot recover. Pick any invertible square matrix TT and define a new state x~=Tx\tilde x = Tx. Then

Change of basis

F~=TFT1,G~=TG,H~=HT1,D~=D\tilde F = TFT^{-1},\qquad \tilde G = TG,\qquad \tilde H = HT^{-1},\qquad \tilde D = D

describes exactly the same input/output behaviour. This is a similarity transformation, and there are infinitely many of them. The eigenvalues of FF survive it — similar matrices share a characteristic polynomial — and so does DD; the individual entries of GG and HH do not. We return to the consequences in §08.

04 · Representation 2

Transfer function — the external view

The transfer function describes the system from the outside, as a single rational function of the delay operator. It is what you get if you are allowed to poke the system and watch, but never to open it.

Everything rests on the delay operator zz, defined by its action on a signal:

Delay operator

z1x(t)=x(t1),z+1x(t)=x(t+1).z^{-1}x(t)=x(t-1),\qquad z^{+1}x(t)=x(t+1).

It is a linear operator, so it can be moved through sums and constants freely. Given an input/output difference equation, apply zz to bring every term to the present instant and solve for y(t)y(t).

Worked example From a difference equation to $W(z)$

Start from the difference equation

y(t)=16y(t1)18y(t2)+12u(t1)+14u(t2)y(t)=-\tfrac16y(t-1)-\tfrac18y(t-2)+\tfrac12u(t-1)+\tfrac14u(t-2)

Read it out loud: the present output depends on two past outputs — the recursive part — and on two past inputs. There is no u(t)u(t) term, which already tells you the system is strictly proper.

Rewrite with the delay operator

y(t)=16z1y(t)18z2y(t)+12z1u(t)+14z2u(t)y(t)=-\tfrac16z^{-1}y(t)-\tfrac18z^{-2}y(t)+\tfrac12z^{-1}u(t)+\tfrac14z^{-2}u(t)

Collect and solve

(1+16z1+18z2)y(t)=(12z1+14z2)u(t)\left(1+\tfrac16z^{-1}+\tfrac18z^{-2}\right)y(t)=\left(\tfrac12z^{-1}+\tfrac14z^{-2}\right)u(t)

y(t)=12z1+14z21+16z1+18z2u(t)y(t)=\frac{\tfrac12z^{-1}+\tfrac14z^{-2}}{1+\tfrac16z^{-1}+\tfrac18z^{-2}}\,u(t)

This is the negative-powers form.

Convert to positive powers if needed

Multiply numerator and denominator by z2z^{2}:

W(z)=12z+14z2+16z+18W(z)=\frac{\tfrac12 z+\tfrac14}{z^{2}+\tfrac16z+\tfrac18}

Same system, positive-powers form.

×

Both power conventions are in use, and they want opposite things

Negative powers are natural for long division and for reading off an impulse response; positive powers are what the controllable canonical form (§09) expects, and they are what makes poles and zeros visible as roots. Neither is more correct — but mixing them mid-problem is the most common way to lose marks on an otherwise correct derivation. Decide which form the question wants before you start.

In general,

General transfer function

W(z)=B(z)A(z)zk=b0+b1z1++bpzpa0+a1z1++anznzk,W(z)=\frac{B(z)}{A(z)}z^{-k}=\frac{b_0+b_1z^{-1}+\cdots+b_pz^{-p}}{a_0+a_1z^{-1}+\cdots+a_nz^{-n}}\cdot z^{-k},

where zkz^{-k} is a pure delay between input and output. In this negative-power convention numerator and denominator carry the same order, and the strict-properness condition becomes k1k \ge 1.

Names for the two shapes

Two pieces of digital-filter vocabulary that the course uses without ceremony:

IIR — infinite impulse response

A W(z)W(z) with poles, e.g. W(z)=z1+12z21+13z1W(z)=\dfrac{z^{-1}+\frac12z^{-2}}{1+\frac13z^{-1}}, equivalently y(t)=13y(t1)+u(t1)+12u(t2)y(t)=-\tfrac13y(t-1)+u(t-1)+\tfrac12u(t-2). The recursive y(t1)y(t-1) term gives the filter infinite memory.

FIR — finite impulse response

A W(z)W(z) with no poles, e.g. W(z)=z1+12z2+13z3W(z)=z^{-1}+\tfrac12z^{-2}+\tfrac13z^{-3}, equivalently y(t)=u(t1)+12u(t2)+13u(t3)y(t)=u(t-1)+\tfrac12u(t-2)+\tfrac13u(t-3). No recursive part, so the memory is finite and the impulse response terminates outright: {0,1,12,13,0,0,0,}\{0,\,1,\,\tfrac12,\,\tfrac13,\,0,\,0,\,0,\dots\}.

05 · Representation 3

Impulse response and convolution

The third description needs no algebra at all — only an experiment. Kick the system once and write down what comes out.

The discrete-time impulse is the signal u(0)=1u(0)=1 with u(t)=0u(t)=0 everywhere else. The system’s answer is its impulse response:

Impulse response

I.R.={ω(0),ω(1),ω(2),ω(3),}\text{I.R.}=\{\omega(0),\,\omega(1),\,\omega(2),\,\omega(3),\dots\}

This sequence of numbers is a complete and unique description of the system — nothing about the input/output behaviour is missing from it. Because a strictly proper system cannot respond in the same instant, ω(0)=0\omega(0)=0 exactly when D=0D=0; in general ω(0)=D\omega(0)=D.

The reason one sequence suffices is linearity. Any input is a sum of shifted, scaled impulses, so the output is the same sum of shifted, scaled impulse responses:

Convolution

y(t)=ω(0)u(t)+ω(1)u(t1)+ω(2)u(t2)+=k=0+ω(k)u(tk).y(t)=\omega(0)u(t)+\omega(1)u(t-1)+\omega(2)u(t-2)+\cdots=\sum_{k=0}^{+\infty}\omega(k)\,u(t-k).

This is the convolution of the input with the impulse response, and it is the operational meaning of “the system”.

why

Why identification starts here

Of the three representations, this is the only one you can obtain without knowing any theory: apply a known input, record the output. That is why Chapter 02’s black-box method starts from a measured impulse response and works backwards. The catch — which Chapter 02 spends its whole length on — is that real measurements are noisy and finite, while the formula above wants a clean, infinite sequence.

2023-07-q42023Q04State space to TF and impulse responseeasy3 pts
Consider the state-space (SS) representation of a discrete-time linear time-invariant system. Starting from this representation: a) Find the formula to obtain the Transfer-Function representation. b) Find the formula to obtain the Impulse-Response representation.

06 · The map

The transformation triangle

Three representations means six directed conversions. They are not equally easy, not equally practical, and — the point of this chapter — not equally faithful.

Arrange the three at the corners of a triangle and label each edge in both directions:

lossy not unique lossy 4SID — ch. 02 State space the internal view Transfer function the external view Impulse response what you measure exact dead in practice TF IR IR TF

Both arrows out of state space lose the unobservable modes, which is why the order can drop on the way down and never comes back on the way up.

The same map, with the verdict on each route:

conversionhowverdict
state space \rightarrow transfer functionW(z)=H(zIF)1G+DW(z)=H(zI-F)^{-1}G+Droutine, but lossy — hidden modes disappear
transfer function \rightarrow state spacerealization; pick a canonical formpossible, not unique — infinitely many answers
transfer function \rightarrow impulse responselong division, or a geometric serieseasy and exact
impulse response \rightarrow transfer functionW(z)=t0ω(t)ztW(z)=\sum_{t\ge 0}\omega(t)z^{-t}valid in theory, dead in practice
state space \rightarrow impulse responseω(t)=HFt1G\omega(t)=HF^{\,t-1}G for t>0t>0, ω(0)=D\omega(0)=Droutine, but lossy — same modes lost
impulse response \rightarrow state spacethe 4SID algorithmthe hard one — all of Chapter 02

Three of these deserve a closer look.

State space to transfer function

Apply zz to the state equation and solve for xx:

SS to TF

zx(t)=Fx(t)+Gu(t)    (zIF)x(t)=Gu(t)    x(t)=(zIF)1Gu(t),zx(t)=Fx(t)+Gu(t)\;\Rightarrow\;(zI-F)x(t)=Gu(t)\;\Rightarrow\;x(t)=(zI-F)^{-1}Gu(t),

then substitute into the output equation:

W(z)=H(zIF)1G+D.W(z)=H(zI-F)^{-1}G+D.

Because (zIF)1=adj(zIF)/det(zIF)(zI-F)^{-1}=\operatorname{adj}(zI-F)/\det(zI-F), the denominator of W(z)W(z) is the characteristic polynomial of FFthe poles of W(z)W(z) are the eigenvalues of FF, unless a numerator factor cancels one, which is exactly the trap of §02.

tip

A shortcut worth knowing: manipulate the equations directly

Inverting (zIF)(zI-F) by hand is tedious beyond 2×22\times 2. When the equations are sparse you can often skip it. Take §02’s system: applying zz to the first state equation gives zx1x1=uzx_1-x_1=u, so x1(t)=1z1u(t)x_1(t)=\frac{1}{z-1}u(t) directly. The second equation is simply not neededx2x_2 does not appear in y(t)=x1(t)y(t)=x_1(t) — and so

W(z)=1z1W(z)=\frac{1}{z-1}

falls out in two lines, with no matrix inverse and no cancellation to spot. The order mismatch is even more visible this way: an entire state equation went unused, which is what “this mode does not reach the output” means operationally.

State space to impulse response

Run the system from rest with an impulse and watch the state march:

SS to IR

x(1)=G,x(2)=FG,x(3)=F2G, ω(t)={Dt=0HFt1Gt>0x(1)=G,\quad x(2)=FG,\quad x(3)=F^{2}G,\ \dots\quad\Longrightarrow\quad \omega(t)=\begin{cases}D & t=0\\ HF^{\,t-1}G & t>0\end{cases}

×

The exponent is $t-1$, not $t$

Writing ω(t)=HFtG\omega(t)=HF^{\,t}G is the classic slip. One step of the state recursion is consumed just getting the impulse into the state, so the state has only advanced t1t-1 times by the time sample tt leaves the output. Every downstream object in this course — the Hankel matrix, the 4SID algorithm — inherits this off-by-one, so fix it here.

Transfer function to impulse response

This edge is pure arithmetic: expand W(z)W(z) as a series in z1z^{-1} and read the coefficients off, because W(z)=tω(t)ztW(z)=\sum_t \omega(t)z^{-t} means the coefficient of ztz^{-t} is ω(t)\omega(t). There are two ways to get the expansion, and the second is much faster when it applies.

Worked example Two routes to the impulse response of $W(z)=\frac{1}{z-\frac12}$

Put the transfer function in negative powers

W(z)=1z12=z1112z1W(z)=\frac{1}{z-\tfrac12}=\frac{z^{-1}}{1-\tfrac12z^{-1}}

Dividing through by zz is what makes the series expansion possible — the denominator must start with a 11.

Route A — long division

Divide the numerator by the denominator as polynomials in z1z^{-1}:

W(z)=0z0+1z1+12z2+14z3+18z4+116z5+W(z)=0\cdot z^{0}+1\,z^{-1}+\tfrac12z^{-2}+\tfrac14z^{-3}+\tfrac18z^{-4}+\tfrac1{16}z^{-5}+\cdots

Always correct, always available, and slow.

Route B — recognise a geometric series

The denominator has the shape 11a=k0ak\dfrac{1}{1-a}=\sum_{k\ge0}a^{k} with ratio a=12z1a=\tfrac12z^{-1}:

1112z1=k=0+(12z1)k=1+12z1+14z2+\frac{1}{1-\tfrac12z^{-1}}=\sum_{k=0}^{+\infty}\left(\tfrac12z^{-1}\right)^{k}=1+\tfrac12z^{-1}+\tfrac14z^{-2}+\cdots

Multiplying by the leading z1z^{-1} shifts everything one place and gives the same coefficients in one line. Whenever the denominator is first-order, use this.

Read off the impulse response

I.R.={0,  1,  12,  14,  18,  116,  132,}\text{I.R.}=\left\{0,\;1,\;\tfrac12,\;\tfrac14,\;\tfrac18,\;\tfrac1{16},\;\tfrac1{32},\dots\right\}

ω(0)=0\omega(0)=0 confirms the system is strictly proper, and the geometric decay by 12\tfrac12 per step is the single pole at z=12z=\tfrac12 showing itself in the time domain.

Impulse response to transfer function — the dead edge

Formally, the transfer function of a system is the Z-transform of one particular signal, its impulse response:

Z-transform of a signal

Z(s(t))=t=0+s(t)ztW(z)=t=0+ω(t)zt.\mathcal{Z}\big(s(t)\big)=\sum_{t=0}^{+\infty}s(t)\,z^{-t}\qquad\Longrightarrow\qquad W(z)=\sum_{t=0}^{+\infty}\omega(t)\,z^{-t}.

Correct, elegant, and unusable. It needs all infinitely many values of ω\omega, and it needs them noise-free. A real experiment gives you finitely many noisy ones. That failure is precisely what creates the demand for 4SID: the practical route from a measured impulse response back to a model does not run through W(z)W(z) at all.

You convert a 4th-order state-space model to its transfer function and find that W(z) has only 3 poles. What happened?

07 · What you can see

Observability, reachability, and the Kalman decomposition

Two rank tests decide whether the internal and external descriptions agree. Between them, they explain every cancellation, every order mismatch, and every hidden mode in this course.

The two tests

A system is fully observable — the state can be reconstructed by watching the output — if and only if the observability matrix has full rank:

Observability

O=[HHFHF2HFn1],rank(O)=n.\mathcal{O}=\begin{bmatrix}H\\HF\\HF^{2}\\ \vdots\\ HF^{\,n-1}\end{bmatrix},\qquad \operatorname{rank}(\mathcal{O})=n.

A system is fully reachable — the input can drive the state anywhere — if and only if the reachability matrix has full rank:

Reachability

R=[GFGF2GFn1G],rank(R)=n.\mathcal{R}=\begin{bmatrix}G & FG & F^{2}G & \cdots & F^{\,n-1}G\end{bmatrix},\qquad \operatorname{rank}(\mathcal{R})=n.

Notice which matrices each test uses. Observability depends only on FF and HH — it is a property of the state-to-output path. Reachability depends only on FF and GG — a property of the input-to-state path. They are duals, and a system can fail either one independently.

×

Stop at $F^{\,n-1}$, and do not stop early

Two symmetric errors. Do not stop early: with nn states you must build all nn block rows. Rank deficiency often appears only in the last one — a 3×33\times 3 observability matrix whose first two rows are independent can still be rank 2. Do not go further either: by Cayley–Hamilton, FnF^n is a linear combination of I,F,,Fn1I,F,\dots,F^{n-1}, so any extra row is redundant and adds nothing.

tip

One coupling term decides it

Take x1(t+1)=12x1(t)+u(t)x_1(t+1)=\tfrac12x_1(t)+u(t), x2(t+1)=13x2(t)x_2(t+1)=\tfrac13x_2(t), y(t)=14x1(t)y(t)=\tfrac14x_1(t). Then

F=[120013],H=[140]    O=[140180],rank=1<2.F=\begin{bmatrix}\tfrac12&0\\0&\tfrac13\end{bmatrix},\quad H=\begin{bmatrix}\tfrac14&0\end{bmatrix}\;\Rightarrow\;\mathcal{O}=\begin{bmatrix}\tfrac14&0\\ \tfrac18&0\end{bmatrix},\quad \operatorname{rank}=1<2.

Not observable — the whole second column is zero, so x2x_2 leaves no trace in yy ever. Now add a single coupling term +16x2(t)+\tfrac16x_2(t) to the x1x_1 equation:

F=[1216013]    O=[14018124],rank=2=n.F=\begin{bmatrix}\tfrac12&\tfrac16\\0&\tfrac13\end{bmatrix}\;\Rightarrow\;\mathcal{O}=\begin{bmatrix}\tfrac14&0\\ \tfrac18&\tfrac1{24}\end{bmatrix},\quad \operatorname{rank}=2=n.

Fully observable. One arrow in the block diagram was the difference. The mirror-image example — moving the input from x1x_1 to x2x_2 and watching R\mathcal R drop rank — makes the same point for reachability.

2024-07-q1c2024Q01Observability and reachabilityeasy3 pts
Given the following matrices: $$F=\begin{bmatrix}9/2&-2&0\\1&0&0\\0&1&0\end{bmatrix},\quad H=\begin{bmatrix}0&-3/4&3\end{bmatrix},\quad G=\begin{bmatrix}2\\0\\0\end{bmatrix},\quad D=1$$ Check the observability of the system.

Why the input/output view is lossy

The two tests partition the state space. This is the Kalman decomposition: every state-space system splits into four subsystems.

reachablenot reachable
observableR / O — the only one on the input→output pathNR / O
not observableR / NONR / NO

The input/output description uW(z)yu\to W(z)\to y can only ever describe the R/O subsystem. The other three are structurally invisible from the outside: a not-reachable mode is never excited, a not-observable mode never surfaces, and their states go on evolving regardless.

The trap of §02, resolved

Return to the opening puzzle: y(t)=x1(t)y(t)=x_1(t) with x1x_1‘s equation free of x2x_2. That is a column of zeros in O\mathcal O — the system is not fully observable, x2x_2 lives in the R/NO block, and the factor z2z-2 cancels. The order drops from 2 to 1 because exactly one state direction fell out of the observable subsystem.

And the mode is still unstable. The cancellation is a statement about what yy reveals, not about what xx does. This is why the exam asks for reachability and observability before it asks about stability — the first answer determines how you must read the second.

2025-09-q1a2025Q01Pole-zero cancellation and hidden modesmedium6 pts
Given the system described by the following equations: $$\begin{cases}x_1(t+1)=-2x_1(t)-2x_2(t)+\tfrac23u(t)\\ x_2(t+1)=5x_1(t)+\tfrac92x_2(t)-\tfrac13u(t)\\ y(t)=2x_1(t)+x_2(t)+u(t)\end{cases}$$ a. Discuss reachability and observability of the system. b. Compute the transfer function from $u(t)$ to $y(t)$. c. Identify poles and zeros of the system. Assess the system's stability.

08 · Non-uniqueness

Infinitely many realizations, one transfer function

Going from state space to transfer function is a formula. Going back is a choice — and the consequences of that asymmetry reach all the way into what identification can recover.

A realization of a transfer function W(z)W(z) is any quadruple {F,G,H,D}\{F,G,H,D\} satisfying H(zIF)1G+D=W(z)H(zI-F)^{-1}G+D=W(z). Realizations are never unique: §03’s similarity transformation manufactures another one from any invertible TT, so there are infinitely many. What every realization of a given W(z)W(z) shares is the transfer function itself, the poles (eigenvalues of FF), and DD. The individual entries of FF, GG and HH are shared by none of them.

A realization is minimal when its order equals the degree of W(z)W(z) after every pole-zero cancellation has been taken. The link back to §07 is exact and worth memorising:

key

Minimality theorem

A realization is minimal if and only if it is both reachable and observable. Any unreachable or unobservable mode is invisible in W(z)W(z) and can be deleted without changing the input/output behaviour at all — so a non-minimal realization is one carrying passengers.

Deep dive What this costs identification

Since W(z)W(z) sees only the reachable-and-observable subsystem, an identification method working from input/output data can never recover more than a minimal realization — and cannot recover the original basis at all.

Concretely, when Chapter 02’s 4SID algorithm returns matrices {F^,G^,H^}\{\hat F,\hat G,\hat H\}, they will generally not equal the “true” matrices of the plant, even with perfect noise-free data. They will be some {TFT1,TG,HT1}\{TFT^{-1},TG,HT^{-1}\} for an unknown TT — a different basis for the same system. This is not an algorithmic weakness to be engineered away; it is a hard information limit of black-box identification.

Two consequences you can act on:

  • Never compare identified matrices entry-by-entry against true ones. Compare the invariants: eigenvalues, transfer function, impulse response.
  • A physical state means nothing after identification. If you need x2x_2 to be “the motor temperature”, black-box identification cannot give you that — you need the gray-box route of Chapter 07, which fixes the basis by construction.
×

A stable $W(z)$ does not imply a stable realization

This is the §02 trap wearing its other face. Build a realization from a W(z)W(z) that still has an uncancelled pole-zero pair and you get a non-minimal model whose hidden mode may be unstable while the input/output response stays perfectly well behaved. Cancel common factors before realizing, and check the rank tests afterwards.

2024-06-q52024Q05Realization non-uniquenessmedium3 pts
Explain and discuss the "realization" of a transfer function into a state-space representation.

09 · A named basis

The controllable canonical form

Infinitely many realizations is unhelpful when you need to write one down. The controllable canonical form fixes the basis by convention, so the answer can be read straight off the coefficients of W(z)W(z).

For a strictly proper transfer function with a monic denominator,

Starting form

W(z)=b1zn1+b2zn2++bnzn+a1zn1+a2zn2++an,W(z)=\frac{b_1z^{n-1}+b_2z^{n-2}+\cdots+b_n}{z^{n}+a_1z^{n-1}+a_2z^{n-2}+\cdots+a_n},

the controllable canonical realization is

Controllable canonical form

F=[010101anan1a1],G=[0001],H=[bnbn1b1],D=0.F=\begin{bmatrix}0&1& & &\\ &0&1& &\\ & &\ddots&\ddots&\\ & & &0&1\\ -a_n&-a_{n-1}&\cdots& &-a_1\end{bmatrix},\quad G=\begin{bmatrix}0\\0\\ \vdots\\0\\1\end{bmatrix},\quad H=\begin{bmatrix}b_n&b_{n-1}&\cdots&b_1\end{bmatrix},\quad D=0.

The structure is worth reading rather than memorising. The superdiagonal of ones simply shifts the state along — each state variable is the previous one delayed. Only the last row of FF carries information, and it holds the denominator coefficients negated and reversed. GG injects the input into that last state alone, which is what makes the form reachable by construction. HH holds the numerator coefficients, ordered from the constant term upwards.

×

Three ways this goes wrong under exam pressure

  • Not splitting off DD first. The form above requires strict properness. If W(z)W(z) has equal numerator and denominator degrees, divide first: write W(z)=W~(z)+DW(z)=\tilde W(z)+D with W~\tilde W strictly proper, build the canonical form from W~\tilde W, and carry DD across unchanged.
  • Sign errors in the last row. The row is [an    a1][-a_n\;\cdots\;-a_1]. A denominator z22z1z^2-2z-1 has a1=2,  a2=1a_1=-2,\;a_2=-1, so the last row is [1    2][1\;\;2]not [1    2][-1\;\;-2].
  • Reversing HH. Its entries run from the constant term upwards, [bn    b1][b_n\;\cdots\;b_1], mirroring the last row of FF.
tip

A third-order case

For W(z)=2z2+12z+14z3+14z2+13z+15W(z)=\dfrac{2z^{2}+\tfrac12z+\tfrac14}{z^{3}+\tfrac14z^{2}+\tfrac13z+\tfrac15} — numerator degree 22, denominator degree 33 and monic, so strictly proper with n=3n=3:

F=[010001151314],G=[001],H=[14122],D=0.F=\begin{bmatrix}0&1&0\\0&0&1\\-\tfrac15&-\tfrac13&-\tfrac14\end{bmatrix},\quad G=\begin{bmatrix}0\\0\\1\end{bmatrix},\quad H=\begin{bmatrix}\tfrac14&\tfrac12&2\end{bmatrix},\quad D=0.

2026-06-q1a2026Q01Controllable canonical formeasy5 pts
Given the system $$\begin{cases}x_1(t+1)=-x_1(t)-x_2(t)\\ x_2(t+1)=2x_1(t)+3x_2(t)+2u(t)\\ y(t)=-2x_1(t)-x_2(t)+u(t)\end{cases}$$ a. Compute the transfer function of the system. b. Write a state-space realization using the controllable canonical form.

10 · Bridge

The Hankel matrix — and why Chapter 02 exists

One object remains, and it is the hinge between this chapter and the next: a matrix built entirely out of measured numbers that nonetheless knows the system’s order.

Given an impulse response, the Hankel matrix of order nn is

Hankel matrix

Hn=[ω(1)ω(2)ω(n)ω(2)ω(3)ω(n+1)ω(n)ω(n+1)ω(2n1)].\mathcal{H}_n=\begin{bmatrix}\omega(1)&\omega(2)&\cdots&\omega(n)\\ \omega(2)&\omega(3)&\cdots&\omega(n+1)\\ \vdots& & &\vdots\\ \omega(n)&\omega(n+1)&\cdots&\omega(2n-1)\end{bmatrix}.

Three details that are all worth marks: it starts at ω(1)\omega(1), not ω(0)\omega(0); it is square, n×nn\times n; and its last entry is ω(2n1)\omega(2n-1). Each anti-diagonal is constant, which is what “Hankel” means.

Now substitute ω(t)=HFt1G\omega(t)=HF^{\,t-1}G from §06 and the matrix factorises:

The key identity

Hn=[HHFHFn1][GFGFn1G]=OR.\mathcal{H}_n=\begin{bmatrix}H\\HF\\ \vdots\\HF^{\,n-1}\end{bmatrix}\begin{bmatrix}G&FG&\cdots&F^{\,n-1}G\end{bmatrix}=\mathcal{O}\cdot\mathcal{R}.

key

Why this identity carries the whole next chapter

A matrix built purely from measured output samples equals the observability matrix times the reachability matrix — two objects defined purely from the unknown internal model. Two consequences follow immediately.

First, since O\mathcal O and R\mathcal R each have rank at most nn, rankHn\operatorname{rank}\mathcal H_n cannot exceed the system order — so the rank of a matrix of data reveals the order of a system nobody has opened.

Second, any factorisation of Hn\mathcal H_n into two factors of the right shape is a candidate (O,R)(\mathcal O,\mathcal R), and from those the matrices FF, GG and HH can be extracted. That is the 4SID algorithm in one sentence.

Two assumptions are hiding in that sketch, and Chapter 02 spends its length on them: the impulse response must be measured noise-free, and it is inevitably truncated at some finite NN rather than run to infinity. Relax the first and the rank test stops giving integers; relax the second and you must choose how large to build H\mathcal H. Both are where the marks are.

The method that does this is called subspace-based state-space system identification, or 4SID — n4sid in the MATLAB System Identification Toolbox, which the exam expects you to be able to name and call. That is the whole of the next chapter.

Load-bearing ideas

  • Three representations: state space {F,G,H,D}\{F,G,H,D\} (internal), transfer function W(z)W(z) (external), impulse response {ω(t)}\{\omega(t)\} (experimental). Discrete-time stability is λi(F)<1\lvert \lambda_i(F)\rvert < 1modulus, not sign.
  • Strictly proper has four faces: D=0D=0ω(0)=0\omega(0)=0 ⇔ pure delay k1k\ge1 ⇔ numerator degree below denominator degree.
  • The formulas: W(z)=H(zIF)1G+DW(z)=H(zI-F)^{-1}G+D and ω(t)=HFt1G\omega(t)=HF^{\,t-1}G for t>0t>0, with ω(0)=D\omega(0)=D. The exponent is t1t-1.
  • Two routes are lossy (SS→TF and SS→IR) and one is practically dead (IR→TF). What they lose is the not-reachable and not-observable subsystems — the Kalman decomposition says only R/O survives to the outside world.
  • Rank tests: O=[H;HF;;HFn1]\mathcal O=[H;HF;\dots;HF^{n-1}] and R=[G  FG    Fn1G]\mathcal R=[G\;FG\;\cdots\;F^{n-1}G]; build exactly nn blocks, no more and no fewer.
  • Realizations are infinite in number; a minimal one exists iff the model is reachable and observable. Identification can never recover the basis, only the invariants.
  • Hn=OR\mathcal H_n=\mathcal O\mathcal R — measured data on the left, unknown model on the right. This is the door into Chapter 02.

Exam radar. This chapter is graded in all 12 sittings in the archive (13 questions as the primary topic, 4 more as support, 16% of all marks). Before the exam, be able to do these cold: compute W(z)W(z) from {F,G,H,D}\{F,G,H,D\} including the feedthrough; build O\mathcal O and R\mathcal R and read a rank deficiency; and — above all — answer “assess the system’s stability” correctly when a pole cancels, which is §02 and §07 and is set in 6 of the last 8 papers.