Prediction-Error Models, Order Selection & Residual Validation
ARX, ARMAX, output-error, Box–Jenkins and innovation state-space models differ in how they constrain plant and disturbance dynamics. Prediction-error estimation fits those assumptions; order criteria rank candidates, while independent simulation, prediction and residual tests decide whether the resulting model is adequate for its use.
A black-box model contains two stories: how the measured input drives the output, and how unmeasured disturbances make the output unpredictable. ARX, ARMAX, output-error and Box–Jenkins structures differ mainly in which poles and zeros those two stories are forced to share. Choosing among them is therefore a claim about disturbance physics, not a choice of file format.
Plant, noise and prediction #
Write a discrete-time linear model as
where , is the deterministic input/output dynamics, is a stable monic disturbance filter, and is the innovation: the part of that cannot be predicted from past measured data under the model.
The one-step prediction error is
and the one-step predictor is
The predictor uses past measured output whenever . Changing the noise model therefore changes the criterion used to fit ; it does not merely add a decorative disturbance output after plant estimation.
Prediction-error estimation chooses
with output weighting or innovation covariance . Under a correctly specified innovation distribution and likelihood loss, this is maximum likelihood. Otherwise it is still a defined prediction-error criterion, but not automatically a probabilistic optimum.
One polynomial family, four common structures #
A general SISO polynomial form is
with delay . Different choices set some polynomials to one:
| Structure | Equation | Plant | Noise | Structural consequence |
|---|---|---|---|---|
| ARX | Plant and noise share all poles; linear least-squares regression | |||
| ARMAX | Shared poles, more flexible noise zeros; iterative PEM | |||
| Output-error (OE) | Fits plant simulation with no colored-noise model | |||
| Box–Jenkins (BJ) | Independent rational plant and noise paths; most flexible and parameter-heavy |
The polynomial orders count free lag coefficients; is a pure input delay in samples. Their numerical values are not comparable across structures without the equations: a “second-order ARX” and a “second-order OE” make different noise assumptions.
ARX #
Expanding
expresses as a linear combination of past and . The parameter estimate is ordinary or regularized least squares. This makes ARX fast for scanning delays and orders, and useful when its disturbance structure is plausible or signal-to-noise ratio is high.
Its weakness is the shared : if plant and disturbance have different poles, ARX may increase order to approximate both. Because past noisy outputs are regressors, arbitrary output noise can also bias the plant estimate when the assumed noise path is wrong. A low loss does not repair the structural coupling.
ARMAX #
The moving-average polynomial lets the innovation shape output disturbance beyond . This is useful when disturbance enters through dynamics that plausibly share the plant denominator, such as a load entering near the plant input. Estimation is no longer a simple linear regression because past innovations depend on the unknown parameters; initialization and nonlinear optimization matter.
Output-error #
OE separates plant poles into and assumes . Its prediction error equals the output simulation error for the deterministic plant model. When input is independent of output noise and the plant class is appropriate, OE can target without forcing plant poles to explain colored output disturbance.
But it does not make colored disturbance disappear. Residuals can remain strongly autocorrelated, one-step prediction can be poor, and uncertainty estimates relying on white innovations become misleading. In closed loop, ignoring the disturbance model is especially risky because and disturbance are correlated through feedback.
Box–Jenkins #
BJ gives and independent poles and zeros. It can represent a plant and colored measurement/load disturbance with genuinely different dynamics. The price is a larger, more correlated parameter vector and a nonconvex numerical problem. A flexible BJ model needs more informative data, careful initialization and stronger validation; otherwise it can trade plant dynamics against noise dynamics without a unique physical interpretation.
State-space innovation models #
A multivariable alternative is
Here is the innovation gain that shapes how unpredictable output enters state prediction. It is not the controller feedback gain. This form provides a compact common state for MIMO dynamics and noise and avoids high-order polynomial matrices.
Subspace methods first recover a state sequence or observability subspace from block Hankel matrices, then estimate ; PEM can refine the result. Singular-value gaps are useful order clues, not automatic truth: colored noise, feedback, short records and weakly excited modes blur them. Similarity transformations mean the estimated state coordinates are not unique even when the input/output model is.
What the optimizer is really fitting #
When the true system lies outside the candidate set, PEM converges toward the model minimizing an experiment-weighted prediction error. In open loop, the input spectrum emphasizes frequencies with more excitation, and reweights the mismatch. A model can fit the experiment excellently while being poor at an unexcited control crossover.
Consequences:
- record and plot the input spectrum beside every frequency-domain fit claim;
- choose weighting from the intended decision, but report it because it changes the estimand;
- use several initial parameterizations for nonlinear structures;
- constrain stability or parameter ranges only when the use demands it and disclose the constraint;
- inspect whether different structures converge to compatible within uncertainty.
An optimization message saying “converged” means the numerical stopping conditions were met. It does not prove a global minimum, identifiability, correct order or model adequacy.
Delay and order selection #
Estimate gross delay first from physical timing, cross-correlation, impulse response or phase slope, then scan a plausible discrete delay range. An incorrect forces numerator/denominator coefficients to imitate dead time. Too-small delay leaves input-correlated residuals at missing lags; too-large delay throws away real early response.
For a SISO model with prediction-error variance
and free parameters, common criteria, up to constants shared across candidates, are
and Akaike's final prediction error is approximately
AIC emphasizes expected predictive performance; BIC applies a stronger large-sample complexity penalty; AICc corrects AIC when is not negligible relative to . These formulas assume comparable data, likelihood/error definitions and parameter counting. Estimated initial states, multiple outputs, weighting and effective sample loss from lags affect the exact implementation.
Information criteria rank the candidate list. If every candidate omits a delay, nonlinear regime or disturbance channel, the winner is merely the least bad member of a wrong set. Use the smallest order whose independent validation, residuals and decision-relevant frequency response are adequate; do not select order from one scalar alone.
Simulation and prediction answer different questions #
Free-run simulation generates output from inputs and initial conditions without repeatedly correcting from measured output. It tests whether reproduces accumulated plant dynamics.
One-step prediction uses past measured output through and can track a noisy record well even when the free-running plant model is poor. Longer-horizon prediction moves between these extremes.
For controller design, validate free-run response and frequency response of over the intended band. For forecasting or monitoring, validate the actual prediction horizons. Reporting one-step fit as “model accuracy” without the horizon and response mode is incomplete.
A common normalized fit display is
It can be negative, depends on the tested record and baseline, and hides phase-local or frequency-local failures. Preserve the raw error units and plots.
Residual tests #
For an adequate one-step predictor, residuals should resemble the innovation class assumed by the model.
Whiteness #
For nonzero lag ,
Significant autocorrelation means predictable temporal structure remains: missing poles/zeros, wrong delay, colored disturbance, nonlinearity, drift or preprocessing artifacts. A whiteness test is relative to record length and confidence level; isolated crossings among many lags are expected.
Independence from input #
In an appropriate open-loop experiment,
at causally relevant lags. Correlation means measured input still explains residual output—evidence of missing dynamics, wrong delay or bias. In closed loop, is inherently correlated with output disturbance, so the expected correlation structure and valid test depend on the identification method and external excitation. Do not apply the open-loop interpretation mechanically.
Distribution and operating dependence #
Plot residuals against predicted output, input amplitude, state, time and operating conditions. Heteroscedasticity suggests amplitude-dependent noise or nonlinearity; clusters by mode suggest an omitted switched regime; heavy tails may reflect outliers, jumps or saturation. Gaussianity is required for some interval and likelihood interpretations, but not for the basic demand that predictable structure be absent.
Residual whiteness is necessary for a declared innovation model, not sufficient for physical truth. A high-order black box can whiten one experiment while placing fragile poles and zeros outside the band where data carry information.
Worked structure diagnosis #
Suppose the plant and output disturbance are approximately
The plant poles are and ; the disturbance pole is .
- A low-order ARX must use one polynomial for both, so it cannot exactly represent all three distinct poles. Increasing may improve prediction while adding a pole that belongs to disturbance rather than plant.
- ARMAX adds but still shares poles between and ; it remains structurally mismatched unless a higher shared denominator approximates both paths.
- OE can represent with , but leaves the colored dynamics in residuals.
- BJ can represent with and with independently.
BJ is the structurally correct candidate here, not automatically the best finite-data estimate. With weak noise and short data, OE may estimate the plant more precisely because it spends fewer parameters. The choice is resolved by independent plant-response validation, residual diagnostics and uncertainty—not by naming the most flexible family.
Parameter and response uncertainty #
An estimated covariance matrix describes local uncertainty around under the chosen structure, data and noise assumptions. Strong parameter correlations and a nearly singular information matrix reveal combinations the experiment cannot separate.
Transform parameter uncertainty into the quantities used for decisions:
- frequency-response bands near controller crossover;
- pole/damping and delay uncertainty;
- step/impulse response bands;
- simulation envelopes over initial conditions;
- uncertainty of steady gain and disturbance paths.
A small parameter standard deviation inside a wrong model class is false precision. Compare models across independent runs and operating points; between-run variation often dominates asymptotic covariance from one stationary record.
Validation protocol #
- Reproduce the estimation criterion and verify numerical convergence from multiple starts when needed.
- Compare nonparametric and parametric impulse/frequency responses over the excited band with uncertainty.
- Simulate on independent runs with the initial-state treatment declared.
- Evaluate one-step and decision-relevant multi-step prediction separately.
- Test residual autocorrelation and input correlation with multiple-lag interpretation.
- Check poles, zeros, delays, units and signs against physical constraints without forcing convenient cancellations.
- Repeat across amplitudes and operating points to define the LTI validity envelope.
- For control use, close the loop in simulation with uncertainty, sensor/actuator dynamics, saturation and representative disturbances.
- Publish rejected structures and why they failed; otherwise a single winning fit hides model-selection uncertainty.
The finished artifact is not a coefficient vector. It is a model structure, estimated parameters, disturbance assumptions, uncertainty, validation evidence, data provenance and a clear statement of where the model is not trusted.