arx
Function File: [sys, x0] = arx (dat, n, …)
Function File: [sys, x0] = arx (dat, n, opt, …)
Function File: [sys, x0] = arx (dat, opt, …)
Function File: [sys, x0] = arx (dat, ’na’, na, ’nb’, nb)
Estimate ARX model using QR factorization. $$ A(q) \, y(t) = B(q) \, u(t) \, + \, e(t) $$
Inputs
'key1', value1, 'key2', value2.options. opt.key1 = value1, opt.key2 = value2.Outputs
Option Keys and Values
nkshift, followed by padding the B polynomial with
nk leading zeros. Algorithm
Uses the formulae given in [1] on pages 318-319,
’Solving for the LS Estimate by QR Factorization’.
Uses SLICOT IB01CD
for initial conditions,
Copyright (c) 1996-2025, SLICOT, available under the BSD 3-Clause
(License and Disclaimer).
References
Source Code: arx
T = 1;
N = 30;
G = tf ([1 2 ], [1 -1 1 -0.5], T);
u = 2*rand(N,1) - 1;
e = 0.01*randn (N,1);
y = lsim (G, u) + e;
dat = iddata (y, u, T);
G_I = arx (dat, 3); # filter form (poly in z^(-1), inputs u and e)
G_I = G_I(1,1);
close (clf());
lsim (G, G_I, u);
title ("Simulation of original G and indentified system G_I")