System Identification › Subspace Identification
World Models HandbookAll chapters System Identification › Subspace IdentificationOne section · Sections in this chapter6 / 11 ↓
Reading tools Definitions & inline links
Choose your expertise level to adjust how many terms are explained. Beginners see more tooltips, experts see fewer to maintain reading flow. Hover over underlined terms for instant definitions.
Article links
Make inline references clickable
Subspace methods occupy a sweet spot: they are noniterative (no nonlinear optimization), work directly from input-output data, and return state-space matrices in a similarity-transform sense. The importance of "noniterative" is easy to undersell. PEM-style search needs initialization, can stagnate in poor local minima, and offers no certificate that another restart would not find something better; a direct linear-algebraic route runs in one deterministic pass, making it attractive for large industrial problems and for bootstrapping the initialization that iterative methods still require. Their intellectual root is realization theory: Ho and Kalman's 1966 realization algorithm showed that if you know a system's impulse response exactly, the dynamics follow from linear algebra on a Hankel matrix, with no search involved. Realization theory answered a foundational question: given input-output behavior, does an internal state-space description exist, how big can it be, and is it unique? The answers, existence for any realizable response, minimality equivalent to simultaneous controllability and observability, uniqueness only up to similarity transform, match the identifiability discussion above exactly.
The core construction is worth seeing in detail because it demystifies what "learning dynamics" can mean when done geometrically. Rather than searching for parameters that make predictions match, subspace methods exploit rigid internal structure that the data matrix must exhibit if the underlying system is linear, and read the dynamics off that structure like pulling a fingerprint off a surface.
- Estimate (or, in simulation, compute) the first strictly proper Markov parameters in the shifted sequence , , for an -by- block Hankel matrix. Here denotes the response one state transition after the impulse. In the unshifted impulse-response convention used earlier, the lag-zero term is the direct feedthrough (zero for a strictly proper system), and is the lag-one term. Naming the shift explicitly keeps the two conventions consistent. Everything that follows derives from the repetitive multiplication structure baked into this formula.
- Arrange them into the Hankel matrix , whose entry is :
Because each block factorizes through , the Hankel matrix has rank at most : each entry can be written as , splitting cleanly into a left factor determined only by the row index and a right factor determined only by the column index . Stacking the left factors row-wise gives the extended observability matrix (blocks , ), and stacking the right factors column-wise gives the controllability matrix (blocks , ), so : however many rows and columns the table has, its rank cannot exceed the inner dimension . This is the central insight. An arbitrarily large table of response numbers carries only independent dimensions, arranged as a product of an observability object times a controllability object; the dimension of the hidden state is literally visible as the rank deficiency of an ordinary matrix. All of the dynamics live in a low-rank bilinear factorization of this data matrix. 3. Compute the truncated SVD, . The rank- truncation both discovers the system order (singular value profile) and hands you balanced factors: acts as an extended observability matrix, as its controllability counterpart, with the shift structure , where means with its bottom block row discarded and means with its top block row discarded; multiplication by advances every power, turning into . Note the double duty performed here: order detection and factor extraction come from a single decomposition, with no separate hypothesis-testing machinery needed for the former. 4. Recover by solving the overdetermined shift invariance: drop the last block row of and the first to get , then ; read from the first block column of and from the first block row of . The pseudoinverse is appropriate precisely because is tall and overdetermined: many rows of shifted observability data vote on the single that best explains their agreement, which is also what confers noise robustness on this step. The word balanced refers to the particular similarity transform chosen by the SVD, one that scales states equally by controllability and observability, numerically desirable and otherwise arbitrary, another reminder that coordinates are conventions. 5. Handle noise. Real data contain measurement noise, so stochastic subspace variants separate input effects and noise before the SVD. Classic MOESP formulations use LQ/QR factorizations and orthogonal projections relative to the future-input subspace, while N4SID is commonly expressed through oblique projections of future outputs onto past data along future inputs. Both replace raw, tap-wise impulse-response estimates with structured projections of stacked measured windows; the conceptual skeleton remains unchanged. Persistently exciting inputs are essential because the projected Hankel matrices must retain the rank needed to reveal the system order.
Given the exact shifted Markov sequence of a minimal -dimensional linear system, an -by- block Hankel matrix with enough block depth to expose rank reveals the order through its singular values. With the additional shifted rows needed for the invariance equation, the SVD construction recovers a realization that matches the supplied response. Any two minimal realizations doing so differ by an invertible similarity transform.
Let us verify the recipe numerically, pretending the impulse response came from clean measurement.
## Pretend-measure the shifted Markov sequence of the true SISO system.
## An r-by-c Hankel matrix consumes r+c-1 consecutive parameters.
r = c = 8
n_markov = r + c - 1
controllability = np.column_stack([B_true, A_true @ B_true])
observability = np.vstack([C_true, C_true @ A_true])
assert np.linalg.matrix_rank(controllability) == 2
assert np.linalg.matrix_rank(observability) == 2
markov = []
for k in range(n_markov):
markov.append(C_true @ (np.linalg.matrix_power(A_true, k) @ B_true))
G = np.concatenate(markov).ravel() # shape (n_markov,)
## Build Hankel matrix with r rows and c columns
H = np.array([[G[i + j] for j in range(c)] for i in range(r)])
## Truncated SVD -> balanced factors, system order from the spectrum
U_h, sv, Vt_h = np.linalg.svd(H)
n_hat = np.sum(sv > sv.max() * 1e-8)
sig_sqrt = np.diag(np.sqrt(sv[:n_hat]))
O_bal = U_h[:, :n_hat] @ sig_sqrt # estimated extended observability stack
C_bal = sig_sqrt @ Vt_h[:n_hat] # matched controllability stack
O_current, O_next = O_bal[:-1], O_bal[1:]
A_sub, *_ = np.linalg.lstsq(O_current, O_next, rcond=None)
B_sub = C_bal[:, 0]
C_sub = O_bal[0]
assert O_current.shape == O_next.shape == (r - 1, n_hat)
assert B_sub.shape == (n_hat,) and C_sub.shape == (n_hat,)
eig_sub = np.sort_complex(np.linalg.eigvals(A_sub))
sv_profile = sv.copy()Singular values of H: [2.2339 0.7635 0. 0. 0. 0. 0. 0. ] Detected order n = 2 Recovered eigenvalues: [0.825-0.2165j 0.825+0.2165j] True eigenvalues: [0.825-0.2165j 0.825+0.2165j]
Compare the recovered eigenvalues with the true ones from earlier: identical to numerical precision. Also glance at the singular-value printout: with exact data, two singular values carry all the energy and the rest sit at machine zero, confirming the rank-two structure asserted by the factorization argument before any code ran. The dynamics were read off a rank-two factorization of a response table, with no gradient descent anywhere. The row slicing above is valid because this example has one output; a multi-output implementation must remove whole output-sized block rows, and similarly read whole input/output blocks for and . Historically, realization ideas fed directly into ERA for aerospace modal testing and later into broader subspace-identification methods; process-industry practice also drew heavily on prediction-error methods rather than on Ho-Kalman alone.
The order-detection step of the recipe deserves its own picture: the singular-value spectrum of the Hankel matrix should show a sharp cliff at the true system order.

Relatedly, eigenvalue problems on structured data matrices are reappearing inside modern research on learning Koopman operators and linear encodings of nonlinear systems, topics we take up when discussing architectures in Part V. The lineage is direct: lift a nonlinear system into coordinates where it acts linearly, and suddenly Ho-Kalman-style algebra replaces iterative optimization, trading expressive power for the same geometric cleanliness enjoyed here.