arx: Estimate ARX Models

Description Usage Arguments Details Value References Examples

Description

Fit an ARX model of the specified order given the input-output data

Usage

1
arx(x, order = c(1, 1, 1), lambda = 0.1, intNoise = FALSE, fixed = NULL)

Arguments

x

an object of class idframe

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=0.1)

intNoise

Logical variable indicating whether to add integrators in the noise channel (Default=FALSE)

fixed

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.

Details

SISO ARX models are of the form

y[k] + a_1 y[k-1] + … + a_{na} y[k-na] = b_{nk} u[k-nk] + … + 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 idpoly object containing the fitted ARX coefficients

fitted.values

the predicted response

residuals

the residuals

input

the input data used

call

the matched call

stats

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

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

1
2
3
4
data(arxsim)
mod_arx <- arx(arxsim,c(1,2,2))
mod_arx
plot(mod_arx) # plot the predicted and actual responses

sysid documentation built on May 2, 2019, 4:18 a.m.

Related to arx in sysid...