arx {sysid} | R Documentation |
Estimate ARX Models
Description
Fit an ARX model of the specified order given the input-output data
Usage
arx(x, order = c(1, 1, 1), lambda = 0.1, intNoise = FALSE, fixed = NULL)
Arguments
x |
an object of class |
order |
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 |
lambda |
Regularization parameter(Default= |
intNoise |
Logical variable indicating whether to add integrators in
the noise channel (Default= |
fixed |
list containing fixed parameters. If supplied, only |
Details
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.
Value
An object of class estpoly
containing the following elements:
sys |
an |
fitted.values |
the predicted response |
residuals |
the residuals |
input |
the input data used |
call |
the matched call |
stats |
A list containing the following fields: |
References
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
Examples
data(arxsim)
mod_arx <- arx(arxsim,c(1,2,2))
mod_arx
plot(mod_arx) # plot the predicted and actual responses