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.
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 and produces an output . The three descriptions differ in what they choose to talk about:
State space — internal
Names internal variables 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 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
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
Its state matrix is lower-triangular, so its eigenvalues can be read straight off the diagonal: and . The second one sits well outside the unit circle, so the state grows without bound. Now compute what an experimenter would see. Working through the transfer function (the machinery is in §04) gives
The factor appears in both numerator and denominator and cancels. What is left is a first-order system with a single pole at . 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 still diverges; it simply never reaches . Any answer of the form “the pole at cancels, therefore the system is stable” is marked wrong.
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 ; the transfer function has order . A conversion that changes the order has thrown something away.
Second, look at why never reaches the output: , and ‘s equation does not contain . 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 is a vector of internal variables. Two equations govern the system: one saying how the state advances, one saying what leaks out of it.
The integer is the order of the system. For a SISO system — single input, single output — the shapes are fixed: is , is , is , and 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 .
- H — output matrix
Which combination of states is measured. Decides observability, together with .
- 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 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: .
- Transfer function: numerator degree strictly below denominator degree — equivalently at least one step of pure delay, .
- Impulse response: .
- 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.
| domain | model | asymptotically stable when |
|---|---|---|
| continuous time | every eigenvalue of lies in the left half-plane | |
| discrete time | every eigenvalue of lies inside the unit circle |
So the test is on modulus, not on sign: for all . An eigenvalue of is stable (oscillating, decaying); an eigenvalue of is not.
Reading a system off its equations
For , , :
Order , strictly proper, eigenvalues — and because 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 and define a new state . Then
describes exactly the same input/output behaviour. This is a similarity transformation, and there are infinitely many of them. The eigenvalues of survive it — similar matrices share a characteristic polynomial — and so does ; the individual entries of and 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 , defined by its action on a signal:
It is a linear operator, so it can be moved through sums and constants freely. Given an input/output difference equation, apply to bring every term to the present instant and solve for .
Start from the difference equation
Read it out loud: the present output depends on two past outputs — the recursive part — and on two past inputs. There is no term, which already tells you the system is strictly proper.
Rewrite with the delay operator
Collect and solve
This is the negative-powers form.
Convert to positive powers if needed
Multiply numerator and denominator by :
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,
where 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 .
Names for the two shapes
Two pieces of digital-filter vocabulary that the course uses without ceremony:
IIR — infinite impulse response
A with poles, e.g. , equivalently . The recursive term gives the filter infinite memory.
FIR — finite impulse response
A with no poles, e.g. , equivalently . No recursive part, so the memory is finite and the impulse response terminates outright: .
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 with everywhere else. The system’s answer is its impulse response:
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, exactly when ; in general .
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:
This is the convolution of the input with the impulse response, and it is the operational meaning of “the system”.
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.
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:
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:
| conversion | how | verdict |
|---|---|---|
| state space transfer function | routine, but lossy — hidden modes disappear | |
| transfer function state space | realization; pick a canonical form | possible, not unique — infinitely many answers |
| transfer function impulse response | long division, or a geometric series | easy and exact |
| impulse response transfer function | valid in theory, dead in practice | |
| state space impulse response | for , | routine, but lossy — same modes lost |
| impulse response state space | the 4SID algorithm | the hard one — all of Chapter 02 |
Three of these deserve a closer look.
State space to transfer function
Apply to the state equation and solve for :
then substitute into the output equation:
Because , the denominator of is the characteristic polynomial of — the poles of are the eigenvalues of , unless a numerator factor cancels one, which is exactly the trap of §02.
A shortcut worth knowing: manipulate the equations directly
Inverting by hand is tedious beyond . When the equations are sparse you can often skip it. Take §02’s system: applying to the first state equation gives , so directly. The second equation is simply not needed — does not appear in — and so
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:
The exponent is $t-1$, not $t$
Writing 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 times by the time sample 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 as a series in and read the coefficients off, because means the coefficient of is . There are two ways to get the expansion, and the second is much faster when it applies.
Put the transfer function in negative powers
Dividing through by is what makes the series expansion possible — the denominator must start with a .
Route A — long division
Divide the numerator by the denominator as polynomials in :
Always correct, always available, and slow.
Route B — recognise a geometric series
The denominator has the shape with ratio :
Multiplying by the leading 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
confirms the system is strictly proper, and the geometric decay by per step is the single pole at 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:
Correct, elegant, and unusable. It needs all infinitely many values of , 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 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:
A system is fully reachable — the input can drive the state anywhere — if and only if the reachability matrix has full rank:
Notice which matrices each test uses. Observability depends only on and — it is a property of the state-to-output path. Reachability depends only on and — 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 states you must build all block rows. Rank deficiency often appears only in the last one — a observability matrix whose first two rows are independent can still be rank 2. Do not go further either: by Cayley–Hamilton, is a linear combination of , so any extra row is redundant and adds nothing.
One coupling term decides it
Take , , . Then
Not observable — the whole second column is zero, so leaves no trace in ever. Now add a single coupling term to the equation:
Fully observable. One arrow in the block diagram was the difference. The mirror-image example — moving the input from to and watching drop rank — makes the same point for reachability.
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.
| reachable | not reachable | |
|---|---|---|
| observable | R / O — the only one on the input→output path | NR / O |
| not observable | R / NO | NR / NO |
The input/output description 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: with ‘s equation free of . That is a column of zeros in — the system is not fully observable, lives in the R/NO block, and the factor 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 reveals, not about what 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.
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 is any quadruple satisfying . Realizations are never unique: §03’s similarity transformation manufactures another one from any invertible , so there are infinitely many. What every realization of a given shares is the transfer function itself, the poles (eigenvalues of ), and . The individual entries of , and are shared by none of them.
A realization is minimal when its order equals the degree of after every pole-zero cancellation has been taken. The link back to §07 is exact and worth memorising:
Minimality theorem
A realization is minimal if and only if it is both reachable and observable. Any unreachable or unobservable mode is invisible in 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 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 , they will generally not equal the “true” matrices of the plant, even with perfect noise-free data. They will be some for an unknown — 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 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 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.
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 .
For a strictly proper transfer function with a monic denominator,
the controllable canonical realization is
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 carries information, and it holds the denominator coefficients negated and reversed. injects the input into that last state alone, which is what makes the form reachable by construction. holds the numerator coefficients, ordered from the constant term upwards.
Three ways this goes wrong under exam pressure
- Not splitting off first. The form above requires strict properness. If has equal numerator and denominator degrees, divide first: write with strictly proper, build the canonical form from , and carry across unchanged.
- Sign errors in the last row. The row is . A denominator has , so the last row is — not .
- Reversing . Its entries run from the constant term upwards, , mirroring the last row of .
A third-order case
For — numerator degree , denominator degree and monic, so strictly proper with :
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 is
Three details that are all worth marks: it starts at , not ; it is square, ; and its last entry is . Each anti-diagonal is constant, which is what “Hankel” means.
Now substitute from §06 and the matrix factorises:
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 and each have rank at most , 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 into two factors of the right shape is a candidate , and from those the matrices , and 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 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 . 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 (internal), transfer function (external), impulse response (experimental). Discrete-time stability is — modulus, not sign.
- Strictly proper has four faces: ⇔ ⇔ pure delay ⇔ numerator degree below denominator degree.
- The formulas: and for , with . The exponent is .
- 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: and ; build exactly 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.
- — 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 from including the feedthrough; build and 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.