arx
Estimate parameters of ARX, ARIX, AR, or ARI model
Syntax
Description
Estimate AR or ARX Model
estimates the parameters of an ARX or an AR
sys
= arx(tt
,[na nb nk]
)idpoly
model sys
using the data contained in the
variables of timetable tt
. The software uses the first
Nu variables as inputs and the next Ny variables
as outputs, where Nu and Ny are determined from the
dimensions of nb
and na
, respectively.
For AR models, which have no input signals, use sys = arx(tt,na)
.
In this case, the software fits the model using the first Ny
variables.
arx
performs the estimation using a least-squares method and the
polynomial orders specified in [na nb nk]
. The model properties
include covariances (parameter uncertainties) and goodness of fit between the estimated
and measured data.
To select specific input and output channels from tt
, use
name-value syntax to set 'InputName'
and
'OutputName'
to the corresponding timetable variable names.
uses the time-domain input and output signals in the comma-separated matrices
sys
= arx(u
,y
,[na nb nk]
)u
,y
. The software assumes that the data sample
time is 1 second. To change the sample time, set Ts
using name-value
syntax.
uses the time-domain or frequency-domain data in the data object
sys
= arx(data
,[na nb nk]
)data
. Use this syntax especially when you want to estimate a model
using frequency-domain or frequency-response data, or when you want to take advantage of
the additional information, such as data sample time or experiment labeling, that data
objects provide.
Specify Additional Options
specifies additional options using one or more name-value pair arguments. For instance,
using the name-value pair argument sys
= arx(___,Name,Value
)'IntegrateNoise',1
estimates an
ARIX or ARI structure
model, which is useful for systems with nonstationary disturbances. You can use this
syntax with any of the previous input-argument combinations.
Return Estimated Initial Conditions
[
returns the estimated initial conditions as an sys
,ic
] = arx(___)initialCondition
object. Use this syntax if you plan to simulate or predict the model response using the
same estimation input data and then compare the response with the same estimation output
data. Incorporating the initial conditions yields a better match during the first part of
the simulation.
Examples
Input Arguments
Output Arguments
More About
Algorithms
QR factorization solves the overdetermined set of linear equations that constitutes the least-squares estimation problem.
Without regularization, the ARX model parameters vector θ is estimated by solving the normal equation
where J is the regressor matrix and y is the measured output. Therefore,
Using regularization adds the regularization term
where λ and R are the regularization constants. For more information on the regularization
constants, see arxOptions
.
When the regression matrix is larger than the MaxSize
specified in
arxOptions
, the data is segmented and QR factorization is performed iteratively
on the data segments.