Fit an ARX model of the specified order given the input-output data
arx(x, order = c(1, 1, 1), lambda = 0.1, intNoise = FALSE, fixed = NULL)An object of class estpoly containing the following elements:
an idpoly object containing the
fitted ARX coefficients
the predicted response
the residuals
the input data used
the matched call
A list containing the following fields:
vcov - the covariance matrix of the fitted coefficients
sigma - the standard deviation of the innovations
df - the residual degrees of freedom
an object of class idframe
Specification of the orders: the three integer components (na,nb,nk) are the order of polynolnomial A, (order of polynomial B + 1) and the input-output delay
Regularization parameter(Default=0.1)
Logical variable indicating whether to add integrators in
the noise channel (Default=FALSE)
list containing fixed parameters. If supplied, only NA entries
will be varied. Specified as a list of two vectors, each containing the parameters
of polynomials A and B respectively.
SISO ARX models are of the form
$$
y[k] + a_1 y[k-1] + \ldots + a_{na} y[k-na] = b_{nk} u[k-nk] +
\ldots + b_{nk+nb} u[k-nk-nb] + e[k]
$$
The function estimates the coefficients using linear least squares (with
regularization).
The data is expected to have no offsets or trends. They can be removed
using the detrend function.
To estimate finite impulse response(FIR) models, specify the first
order to be zero.
Arun K. Tangirala (2015), Principles of System Identification: Theory and Practice, CRC Press, Boca Raton. Section 21.6.1
Lennart Ljung (1999), System Identification: Theory for the User, 2nd Edition, Prentice Hall, New York. Section 10.1
data(arxsim)
mod_arx <- arx(arxsim,c(1,2,2))
mod_arx
plot(mod_arx) # plot the predicted and actual responses
Run the code above in your browser using DataLab