Algorithm Search⌘K

Modelcore

ARX model

Also called autoregressive model with exogenous input, equation error model.

A linear model A(q)y = B(q)u + e in which the output is a linear regression on past outputs, past inputs and white noise.

The ARX model is a linear discrete-time model of a system with an input uu and an output yy, written A(q) y(k)=B(q) u(k)+e(k)A(q)\, y(k) = B(q)\, u(k) + e(k) with polynomials AA and BB in the backward shift q−1q^{-1} and white noise ee. It says that the present output is a fixed linear combination of a few past outputs and past inputs, plus a fresh random error. The name means autoregressive with exogenous input: it is the autoregressive model of time-series analysis with a known, measured input added on the right, and it is read as a predictor of the next output rather than as a description of a stationary process. Because the predictor is linear in the coefficients, the coefficients are fitted by ordinary least squares, which makes ARX the first model tried in system identification. Its weak point is the noise model: the disturbance is forced to share the poles of the system, and when the real disturbance does not, the least squares fit is biased.

The machine

Notation. Time is discrete, k∈Zk \in \mathbb{Z}, with sampling period hh. The operator q−1q^{-1} is the backward shift, q−1u(k)=u(k−1)q^{-1} u(k) = u(k - 1). ee is white noise: mean 0, variance σ2\sigma^2, uncorrelated at different times.

Definition. With orders na≥0n_a \ge 0, nb≥1n_b \ge 1 and an input delay nk≥0n_k \ge 0,

A(q)=1+a1q−1+⋯+anaq−na,B(q)=q−nk(b1+b2q−1+⋯+bnbq−nb+1),A(q) = 1 + a_1 q^{-1} + \cdots + a_{n_a} q^{-n_a}, \qquad B(q) = q^{-n_k}\big(b_1 + b_2 q^{-1} + \cdots + b_{n_b} q^{-n_b + 1}\big),

the ARX model is

y(k)+a1y(k−1)+⋯+anay(k−na)=b1u(k−nk)+⋯+bnbu(k−nk−nb+1)+e(k).y(k) + a_1 y(k-1) + \cdots + a_{n_a} y(k - n_a) = b_1 u(k - n_k) + \cdots + b_{n_b} u(k - n_k - n_b + 1) + e(k).

In the general form y=Gu+Hey = G u + H e of system identification it has G(q)=B(q)/A(q)G(q) = B(q)/A(q) and H(q)=1/A(q)H(q) = 1/A(q).

Parameter space. θ=(a1,…,ana,b1,…,bnb)∈Rd\theta = (a_1, \ldots, a_{n_a}, b_1, \ldots, b_{n_b}) \in \mathbb{R}^d with d=na+nbd = n_a + n_b, and σ2>0\sigma^2 > 0. No constraint is needed for the predictor below, but GG is BIBO stable only if AA is Schur, that is, all roots of znaA(z)z^{n_a} A(z) lie inside the unit circle (assuming AA and BB have no common factor).

The predictor. Put the past data in the regressor

φ(k)=(−y(k−1),…,−y(k−na), u(k−nk),…,u(k−nk−nb+1))T.\varphi(k) = \big(-y(k-1), \ldots, -y(k - n_a),\ u(k - n_k), \ldots, u(k - n_k - n_b + 1)\big)^T.

Then the model reads y(k)=φ(k)Tθ+e(k)y(k) = \varphi(k)^T \theta + e(k). Since e(k)e(k) is independent of everything in φ(k)\varphi(k), the best one-step-ahead predictor is

y^(k∣θ)=φ(k)Tθ=B(q) u(k)+(1−A(q)) y(k),\hat y(k \mid \theta) = \varphi(k)^T \theta = B(q)\, u(k) + \big(1 - A(q)\big)\, y(k),

and the prediction error is ε(k,θ)=A(q) y(k)−B(q) u(k)\varepsilon(k, \theta) = A(q)\, y(k) - B(q)\, u(k). Both are finite filters of the data, so the predictor is BIBO stable for every θ\theta, even when AA is not Schur. This is the equation error view: ε\varepsilon is the error in the difference equation, not in the output.

A worked case. Take A(q)=1−1.5q−1+0.7q−2A(q) = 1 - 1.5 q^{-1} + 0.7 q^{-2}, B(q)=q−1+0.5q−2B(q) = q^{-1} + 0.5 q^{-2}, so na=nb=2n_a = n_b = 2 and nk=1n_k = 1. The predictor is y^(k)=1.5 y(k−1)−0.7 y(k−2)+u(k−1)+0.5 u(k−2)\hat y(k) = 1.5\, y(k-1) - 0.7\, y(k-2) + u(k-1) + 0.5\, u(k-2). The roots of z2−1.5z+0.7z^2 - 1.5 z + 0.7 are 0.75±0.3708i0.75 \pm 0.3708 i, with modulus 0.7=0.8367\sqrt{0.7} = 0.8367, so AA is Schur. The static gain is B(1)/A(1)=1.5/0.2=7.5B(1)/A(1) = 1.5/0.2 = 7.5. The impulse response of GG starts g0=0g_0 = 0, g1=1g_1 = 1, g2=2g_2 = 2, g3=2.3g_3 = 2.3, g4=2.05g_4 = 2.05, g5=1.465g_5 = 1.465, each from gj=1.5 gj−1−0.7 gj−2g_j = 1.5\, g_{j-1} - 0.7\, g_{j-2} after the input terms.

What it counts

The model has d+1d + 1 parameters (θ,σ2)(\theta, \sigma^2). The quantities below follow from them; NN is the number of samples and ω∈[0,π]\omega \in [0, \pi] is a frequency in radians per sample.

quantity formula cost
one-step prediction y^(k∣θ)=φ(k)Tθ\hat y(k \mid \theta) = \varphi(k)^T \theta O(d)O(d) per sample
prediction error criterion VN(θ)=1N∑k(y(k)−φ(k)Tθ)2V_N(\theta) = \frac{1}{N} \sum_k \big(y(k) - \varphi(k)^T \theta\big)^2, a quadratic in θ\theta O(Nd)O(N d)
simulated output ys=(B/A) uy_s = (B/A)\, u, by the difference equation without ee O(d)O(d) per sample
frequency response G(eiω)=B(eiω)/A(eiω)G(e^{i\omega}) = B(e^{i\omega})/A(e^{i\omega}) O(d)O(d) per frequency
disturbance spectrum Φv(ω)=σ2/∣A(eiω)∣2\Phi_v(\omega) = \sigma^2 / \lvert A(e^{i\omega}) \rvert^2 O(na)O(n_a) per frequency
static gain B(1)/A(1)B(1)/A(1), when A(1)≠0A(1) \ne 0 O(d)O(d)
impulse response gjg_j from the recursion A(q) g=B(q) δA(q)\, g = B(q)\, \delta O(na)O(n_a) per coefficient
poles and zeros roots of znaA(z)z^{n_a} A(z) and of the polynomial of BB eigenvalues of companion matrices, O(d3)O(d^3)

The disturbance spectrum row shows the limitation of the structure: the noise is shaped by the same 1/A1/A that shapes the response to uu. A plant with a lightly damped pole and white measurement noise does not fit this pattern.

Relation to other models

  • Autoregressive model. With nb=0n_b = 0 the ARX model is an AR(nan_a) model of yy. The time-series view asks for a stationary solution and its autocorrelation. The identification view asks for the predictor of y(k)y(k) from the past of yy and uu, which exists and is BIBO stable for every θ\theta.
  • FIR model. With na=0n_a = 0, y(k)=B(q) u(k)+e(k)y(k) = B(q)\, u(k) + e(k): a finite impulse response with white output noise. FIR models need many coefficients for slow systems, but they never have a bias from the noise model in open loop.
  • ARMAX model. Adds a moving average C(q) e(k)C(q)\, e(k) of the noise, so H=C/AH = C/A. ARX is ARMAX with C=1C = 1.
  • Output error model. Puts white noise on the output instead: y=(B/F) u+ey = (B/F)\, u + e, so H=1H = 1. The model GG can be the same as an ARX model, but the predictor is no longer linear in θ\theta.
  • Box-Jenkins model. y=(B/F) u+(C/D) ey = (B/F)\, u + (C/D)\, e, with separate dynamics for GG and HH. ARX, ARMAX and OE are all special cases.
  • State-space model. Every ARX model has an innovations state-space form of order max⁡(na,nk+nb−1)\max(n_a, n_k + n_b - 1), and the Kalman predictor of that form is exactly φ(k)Tθ\varphi(k)^T \theta.
  • Linear regression. For fixed data the ARX criterion is a linear regression of y(k)y(k) on φ(k)\varphi(k). The regressors are random and correlated with past noise, so the finite-sample results of regression with fixed regressors do not apply as they stand.

Known results in the model

  • Least squares is the exact minimizer (theorem). VNV_N is a convex quadratic in θ\theta, so its minimizers are the solutions of the normal equations (∑kφφT)θ=∑kφ y\big(\sum_k \varphi \varphi^T\big) \theta = \sum_k \varphi\, y. They are unique when the matrix is nonsingular. See least-squares identification of ARX models, which also works the six-sample example θ^=(−0.4851,0.9655)\hat\theta = (-0.4851, 0.9655).
  • Consistency (theorem). If the data come from an ARX system of the same orders with white ee, AA Schur, AA and BB coprime, and an open-loop input that is quasi-stationary, independent of ee and persistently exciting of order na+nbn_a + n_b, then the least squares estimate converges to the true θ\theta with probability 1 (Ljung 1999, Chapters 8 and 13).
  • Bias under colored noise (theorem and measurement). If the true equation error is not white, then φ(k)\varphi(k) is correlated with it through the past outputs, and the least squares limit differs from the true θ\theta. For the worked case with the noise (1−q−1+0.2q−2) e(1 - q^{-1} + 0.2 q^{-2})\, e, a white ±1\pm 1 input and N=50000N = 50000, least squares gave (−1.2286,0.4547,0.9965,0.7650)(-1.2286, 0.4547, 0.9965, 0.7650) against the true (−1.5,0.7,1,0.5)(-1.5, 0.7, 1, 0.5). Instrumental variable identification removes this bias without changing the model.
  • Covariance (theorem). Under the conditions of the consistency result, N(θ^N−θ0)\sqrt{N}(\hat\theta_N - \theta_0) is asymptotically normal with covariance σ2(E φφT)−1\sigma^2 \big(\mathbb{E}\, \varphi \varphi^T\big)^{-1} (Ljung 1999, Chapter 9). For Gaussian ee this is the Cramér-Rao bound, so least squares is asymptotically efficient for ARX data.
  • High orders approximate any linear system (theorem). If the true system is y=G0u+H0ey = G_0 u + H_0 e with BIBO stable G0G_0, H0H_0 and H0−1H_0^{-1}, an ARX model of order nn estimated by least squares gives consistent estimates of G0G_0 and of the noise spectrum when n→∞n \to \infty slowly enough with NN (Ljung and Wahlberg 1992). This is why a long ARX fit is a common first step before a low-order model.
  • Recursive form. Because the predictor is linear in θ\theta, the RLS algorithm updates the least squares estimate at each sample in O(d2)O(d^2) operations, the basis of the self-tuning regulator.

References

  1. Lennart Ljung, System Identification: Theory for the User, second edition, Prentice Hall, 1999, Chapter 4 (the family of transfer-function models, with ARX as the equation error structure), Chapter 7 (least squares for linear regressions) and Chapter 13 (informative experiments)
  2. Torsten Söderström and Petre Stoica, System Identification, Prentice Hall, 1989, the chapters on linear regression and on model parametrizations
  3. Karl Johan Åström and Pieter Eykhoff, System identification: a survey, Automatica 7(2), 123-162, 1971, the least squares method for difference equation models and its bias under correlated residuals
  4. Lennart Ljung and Bo Wahlberg, Asymptotic properties of the least-squares method for estimating transfer functions and disturbance spectra, Advances in Applied Probability 24(2), 412-440, 1992, the consistency of high-order ARX estimates of the transfer function and the disturbance spectrum when the order grows with the number of data

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)
WritingW4 complete
  • a review of the text: no review record reviews/2SM5P8/text.yaml