Algorithm Search⌘K

Problemcore

System identification

Also called identification of dynamical systems, plant identification.

Build a model of a dynamical system from measured inputs and outputs, by choosing a model set and the member that best predicts the data.

Time
O(N d^2 + d^3) worst
Where
N = the number of samples; d = the number of parameters

System identification is the problem of building a mathematical model of a dynamical system from measured data: records of the input uu that drives the system and of the output yy it produces. In the parametric form, the user fixes a model set, for example the ARX models of given orders, and the method picks the member that best explains the data, most often the one with the smallest sum of squared one-step prediction errors. In the nonparametric form, the method estimates a curve such as the frequency response or the impulse response directly. There is no complexity class to state; what is known is which criterion each method minimizes, when the minimizer converges to the true system, and how large its variance is.

In plain words

You have a machine, a motor or a chemical reactor or a building, and you want an equation that tells how its output reacts to its input. You cannot take it apart, but you can push it and watch. So you apply an input signal, record what comes out, and choose an equation from a family of candidates that fits the record best. The family can be simple, such as "the next output is a weighted sum of the last few outputs and inputs", and then fitting is a least squares problem. A richer family also models the noise, and fitting then needs an iterative search. Two things decide the quality. The input must shake the machine in enough different ways, and the family must be rich enough to contain something close to the truth.

Definition

Time is discrete, k=1,2,…,Nk = 1, 2, \ldots, N, with sampling period hh. The data are ZN={u(1),y(1),…,u(N),y(N)}Z^N = \{u(1), y(1), \ldots, u(N), y(N)\}. Write qq for the forward shift, q u(k)=u(k+1)q\, u(k) = u(k+1).

The model set. A model structure is a map from a parameter set D⊂RdD \subset \mathbb{R}^d to pairs of transfer functions,

y(k)=G(q,θ) u(k)+H(q,θ) e(k),θ∈D,y(k) = G(q, \theta)\, u(k) + H(q, \theta)\, e(k), \qquad \theta \in D,

where ee is white noise with variance σ2\sigma^2, HH is monic (H(∞,θ)=1H(\infty, \theta) = 1), and HH and H−1H^{-1} are BIBO stable. The model gives the one-step-ahead predictor

y^(k∣θ)=H−1(q,θ) G(q,θ) u(k)+(1−H−1(q,θ)) y(k),\hat y(k \mid \theta) = H^{-1}(q, \theta)\, G(q, \theta)\, u(k) + \big(1 - H^{-1}(q, \theta)\big)\, y(k),

which uses only data up to time k−1k - 1, and the prediction error ε(k,θ)=y(k)−y^(k∣θ)=H−1(q,θ)(y(k)−G(q,θ)u(k))\varepsilon(k, \theta) = y(k) - \hat y(k \mid \theta) = H^{-1}(q, \theta)\big(y(k) - G(q, \theta) u(k)\big).

The question. Given ZNZ^N and the structure, return

θ^N=arg⁡min⁡θ∈DVN(θ),VN(θ)=1N∑k=1Nε(k,θ)2,\hat\theta_N = \arg\min_{\theta \in D} V_N(\theta), \qquad V_N(\theta) = \frac{1}{N} \sum_{k=1}^{N} \varepsilon(k, \theta)^2,

or, in the nonparametric form, return an estimate G^N(eiω)\hat G_N(e^{i\omega}) of the frequency response on a grid of frequencies ω∈[0,π]\omega \in [0, \pi].

The true system. The analysis assumes that the data come from y=G0(q) u+H0(q) e0y = G_0(q)\, u + H_0(q)\, e_0. The model set contains the system if G(q,θ0)=G0G(q, \theta_0) = G_0 and H(q,θ0)=H0H(q, \theta_0) = H_0 for some θ0∈D\theta_0 \in D. The data are informative for the set if two models of the set that give the same predictions on the data have the same GG and HH; for an open-loop experiment this is a condition on the input, see persistent excitation.

Variants

  • Choice of structure. ARX, ARMAX, output error and Box-Jenkins models are the common linear black-box sets. State-space models of a given order are the set for subspace identification. A grey-box model has parameters with a physical meaning, for example a mass or a resistance.
  • Parametric or nonparametric. A nonparametric estimate is a curve: the empirical transfer function estimate in frequency, or a long FIR model in time, possibly regularized as in kernel-based identification.
  • Open or closed loop. In closed-loop identification the input depends on past outputs through a controller, which changes which models can be told apart and which methods remain consistent.
  • Batch or recursive. The batch problem uses the whole record. The recursive problem updates the estimate at each sample, as the RLS algorithm does for ARX models; this is the core of adaptive control.
  • Order selection. The orders are part of the question: choose them by a criterion such as the Akaike information criterion or by cross-validation on fresh data.
  • Experiment design. Choose the input, within limits on its amplitude or power, to make the estimate as accurate as possible; a PRBS is the classic choice.

Examples

  1. A first-order ARX fit. With the six samples u=(1,1,−1,1,−1,−1)u = (1, 1, -1, 1, -1, -1) and y=(0,1,1.4,−0.2,0.9,−0.6)y = (0, 1, 1.4, -0.2, 0.9, -0.6), the model y(k)+a y(k−1)=b u(k−1)+e(k)y(k) + a\, y(k-1) = b\, u(k-1) + e(k) has the least squares estimate a^=−163/336≈−0.4851\hat a = -163/336 \approx -0.4851 and b^=5407/5600≈0.9655\hat b = 5407/5600 \approx 0.9655. The computation is on the page least-squares identification of ARX models.
  2. An input that is too poor. For y(k)+a y(k−1)=b1u(k−1)+b2u(k−2)y(k) + a\, y(k-1) = b_1 u(k-1) + b_2 u(k-2) and the constant input u≡1u \equiv 1, the data depend on b1b_1 and b2b_2 only through b1+b2b_1 + b_2. Every pair with the same sum predicts the data equally well, so the minimizer of VNV_N is not unique. A constant is persistently exciting of order 1 only, and this model needs order 2 in uu.
  3. Feedback without an external signal. For y(k)+a y(k−1)=b u(k−1)+e(k)y(k) + a\, y(k-1) = b\, u(k-1) + e(k) under the controller u(k)=−c y(k)u(k) = -c\, y(k), the output obeys y(k)+(a+bc) y(k−1)=e(k)y(k) + (a + bc)\, y(k-1) = e(k). All pairs (a,b)(a, b) with the same a+bca + bc give the same predictor, so the open-loop system cannot be recovered. With a=−0.8a = -0.8, b=1b = 1 and c=0.5c = 0.5 the data show only a+bc=−0.3a + bc = -0.3. An added reference signal removes the ambiguity.

Known algorithms

AlgorithmTimeSpacePropertiesCode
Dynamic mode decompositionO(q M min(q, M) + q M r + r^4) worstO(q M) extradeterministicexactnot iterativeoffline1 language
Empirical transfer function estimateO(N log N + N M) worstO(N) extradeterministicnot exactofflineiterative1 language
Instrumental variable identificationO(N d^2 + d^3) worstO(N + d^2) extradeterministicexactofflineiterative1 language
Kernel-based system identificationO(N d^2 + G d^3) worstO(N d + d^2) extradeterministicexactnot iterativeoffline1 language
Least-squares identification of ARX modelsO(N d^2 + d^3) worstO(d^2) extradeterministicexactofflineiterative1 language
MOESPO(N i^2 (m + p)^2 + i^3 p^3 + N n^3 m + N p (n m + p m + n)^2) worstO(N i (m + p)) extradeterministicexactnot iterativeoffline1 language
N4SIDO(N i^2 (m + p)^2 + i^3 (m + p)^3) worstO(N i (m + p)) extradeterministicexactnot iterativeoffline1 language
Prediction error methodO(I (N d^2 + d^3)) worstO(N d + d^2) extradeterministicnot exactofflineiterative1 language
Process reaction curve methodO(n) worstO(n) extradeterministicnot exactofflineiterative1 language
Sparse identification of nonlinear dynamicsO(n M p^3) worstO(M p) extradeterministicexactiterativeoffline1 language

Bounds

There is no exact complexity result, because the output is an estimate, not an exact answer. The bound O(Nd2+d3)O(N d^2 + d^3) in the header holds for model sets in which the predictor is linear in θ\theta, such as ARX and FIR; for other sets the cost depends on the number of iterations of the search. The known results are about what each criterion converges to and how fast its error falls. All operation counts are in the real RAM.

  • Cost of the linear case. For a structure in which y^(k∣θ)\hat y(k \mid \theta) is linear in θ\theta, forming the normal equations costs O(Nd2)O(N d^2) and solving them O(d3)O(d^3). Reading the data is a lower bound of Ω(N)\Omega(N).
  • Convergence (theorem). If the data are quasi-stationary and the predictors are uniformly BIBO stable over a compact DD, then θ^N\hat\theta_N converges with probability 1 to the set of minimizers of Vˉ(θ)=lim⁡N→∞E VN(θ)\bar V(\theta) = \lim_{N \to \infty} \mathbb{E}\, V_N(\theta) (Ljung 1978; Ljung 1999, Chapter 8). The true system need not be in the model set: the limit is the best approximation in the sense of Vˉ\bar V.
  • Consistency (theorem). If the model set contains the true system, the data are informative and the parametrization is identifiable at θ0\theta_0, then θ0\theta_0 is the unique minimizer of Vˉ\bar V, so θ^N→θ0\hat\theta_N \to \theta_0 with probability 1 (Ljung 1999, Chapter 8).
  • Variance (theorem). Under the same conditions, N(θ^N−θ0)\sqrt{N}(\hat\theta_N - \theta_0) is asymptotically normal with covariance P=σ2(E ψψT)−1P = \sigma^2 \big(\mathbb{E}\, \psi \psi^T\big)^{-1}, where ψ=−∂ε/∂θ\psi = -\partial \varepsilon / \partial \theta at θ0\theta_0 (Ljung 1999, Chapter 9). For Gaussian ee this equals the Cramér-Rao bound, so no unbiased estimator does better asymptotically.
  • Nonconvexity. For ARX and FIR structures VNV_N is a convex quadratic. For ARMAX, output error and Box-Jenkins structures it is not convex, and a local search can stop at a local minimum.

Reductions

  • ARX to linear least squares. The ARX predictor is φ(k)Tθ\varphi(k)^T \theta with a regressor φ(k)\varphi(k) of past outputs and inputs, so the problem is an instance of the least squares problem, with O(Nd)O(N d) work to build the regressors.
  • Prediction errors to maximum likelihood. If ee is Gaussian with known variance and the effect of initial conditions is ignored, minimizing VNV_N gives the maximum likelihood estimate of θ\theta.
  • Closed loop to open loop. The indirect method identifies the map from the reference to the output, an open-loop problem, and then solves for the plant with the known controller.
  • Order to model selection. Choosing the orders is a model selection problem, solved by fitting each candidate order and comparing a penalized cost.

Applications

  • Models for controller design: step tests for PID tuning, and step-response or ARX models for model predictive control in the process industry.
  • Fault detection: a change in the identified parameters signals a change in the plant.
  • Adaptive control and the self-tuning regulator, which identify the plant online and redesign the controller at each step.
  • Vibration and modal analysis of structures, and acoustic echo paths.
  • Time-series models with exogenous inputs in econometrics, in the tradition of Box and Jenkins.

References

  1. Lennart Ljung, System Identification: Theory for the User, second edition, Prentice Hall, 1999, Chapter 1 (the identification loop), Chapter 4 (models of linear time-invariant systems), Chapter 7 (parameter estimation methods), Chapter 8 (convergence and consistency) and Chapter 9 (asymptotic distribution of parameter estimates)
  2. Torsten Söderström and Petre Stoica, System Identification, Prentice Hall, 1989, the chapters on linear regression, prediction error methods and instrumental variable methods
  3. Karl Johan Åström and Pieter Eykhoff, System identification: a survey, Automatica 7(2), 123-162, 1971, the whole paper (least squares, maximum likelihood and instrumental variables as they stood in 1971)
  4. Lennart Ljung, Convergence analysis of parametric identification methods, IEEE Transactions on Automatic Control 23(5), 770-783, 1978, the convergence of prediction error estimates to the minimizers of the limit criterion, without the assumption that the true system is in the model set

Where this leads

About this page

The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.

LadderLevelWhat the next level needs
Human proofH0 no proof
  • add a proof in proofs/ (06.5)
LeanL0 no Lean part
  • name a Lean module in the lean field (07)
VisualV0 none
  • add viz/scene.ts or a figure (10)
WritingW2 basic
  • a contract.yaml