ARX model estimation using instrumental variable method with arbitrary instruments
collapse all in page
Syntax
sys = ivx(tt,[nanb nk],x)
sys = ivx(u,y,[na nb nk],x)
sys = ivx(data,[na nb nk],x)
sys = ivx(___,max_size)
sys = ivx(___,Name,Value)
[sys,ic] = ivx(___)
Description
Estimate ARX Polynomial Model
sys = ivx(tt,[nanb nk],x)
estimates an ARX polynomial model sys
using the time-domain data in the timetable tt
. [na nb nk] specifies the ARX structure orders of the A and B polynomials and the input-to-output delay, expressed in the number of samples. x
specifies the instrument variable matrix.
The software estimates sys
using the instrumental variable method with arbitrary instruments.
An ARX model is represented as:
For more details on the ARX model structure, see arx.
sys = ivx(u,y,[na nb nk],x)
uses the time-domain input and output signals in the comma-separated matrices u
,y
. The software assumes that the data sample time is one second. To change the sample time, set Ts
using name-value syntax.
sys = ivx(data,[na nb nk],x)
uses the time-domain or frequency-domain data in the data object 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.
sys = ivx(___,max_size)
specifies the maximum size of matrices formed during estimation.
You can use this syntax with any of the previous input-argument combinations.
Specify Additional Model Options
sys = ivx(___,Name,Value)
specifies additional options using one or more name-value arguments.
Return Estimated Initial Conditions
[sys,ic] = ivx(___)
returns the estimated initial conditions as an initialCondition object. For more information on ic
, see the ic
argument description.
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.
Input Arguments
collapse all
tt
— Timetable-based estimation data
timetable | cell array of timetables
Timetable-based estimation data, specified as a timetable that uses a regularly spaced time vector. tt
contains variables representing input and output channels.
For multiexperiment data, specify tt
as an Ne-by-1 cell array of timetables, where Ne is the number of experiments. The sample times of all the experiments must match.
To select individual input and output channels to use for estimation, use the InputName and OutputName name-value arguments.
For example, use the following command to select timetable variables "u1"
and "u3"
as inputs and the variables "y2"
and "y4"
as outputs.
sys = ivx(tt,__,'InputName',["u1" "u3"],'OutputName',["y2" "y4"])
For more information about working with estimation data types, see Data Domains and Data Types in System Identification Toolbox.
u
, y
— Matrix-based estimation data
matrices | cell array of matrices
Estimation data, specified for SISO systems as a comma-separated pair of Ns-element numeric column vectors that contain uniformly sampled input and output time-domain signal values. Here, Ns is the number of samples.
For MIMO systems, specify u
,y
as an input/output matrix pair with the following dimensions:
u
— Ns-by-Nu, where Nu is the number of inputsy
— Ns-by-Ny, where Ny is the number of outputs
For multiexperiment data, specify u
,y
as a pair of 1-by-Ne cell arrays, where Ne is the number of experiments. The sample times of all the experiments must match.
For more information about working with estimation data types, see Data Domains and Data Types in System Identification Toolbox.
data
— Estimation data
iddata
object | frd
object | idfrd
object
Estimation data, specified as an iddata, idfrd, or frd (Control System Toolbox) object.
When using frequency-domain data, there must be only one output.
For more information about working with estimation data types, see Data Domains and Data Types in System Identification Toolbox.
[na nb nk]
— ARX polynomial orders and delay
row vector of nonnegative integers | row vector of nonnegative integer matrices
ARX polynomial orders and delay, specified as a row vector of integers or integer matrices.
For SISO models,
[na nb nk]
is a 1-by-3 row vector of nonnegative integers that correspond to the orders of the A(q) and B(q) polynomials and the input-to-output delays, respectively. The polynomial order is equal to the number of coefficients to estimate in that polynomial.For a model with Ny outputs and Nu inputs:
na
is the order of polynomial A(q), specified as an Ny-by-Ny matrix of nonnegative integers.nb
is the order of polynomial B(q) + 1, specified as an Ny-by-Nu matrix of nonnegative integers.nk
is the input-output delay, also known as the transport delay, specified as an Ny-by-Nu matrix of nonnegative integers.
.
For more details on the ARX model structure, see arx.
x
— Instrument variable matrix
matrix | cell array of matrices
Instrument variable matrix that contains the arbitrary instruments for use in the instrumental variable method, specified as a matrix that is the same size as the output data, data.y
. For multi-experiment data, specify x
as a cell array with one entry for each experiment.
The instruments used are analogous to the regression vector, with y
replaced by x
. For more information on choosing instruments, see Picking Instrumental Variables for System Identification.
max_size
— Maximum matrix size
250000 | positive integer
Maximum matrix size for any matrix formed by the algorithm for estimation, specified as a positive integer. Specify max_size
as a reasonably large value.
Name-Value Arguments
Specify optional pairs of arguments as Name1=Value1,...,NameN=ValueN
, where Name
is the argument name and Value
is the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.
Example: InputName=["u1" "u3"]
specifies timetable variables u1
u3
as the input variables. Alternatively, you can use 'InputName',["u1","u3"]
.
InputName
— Input channel names
string | character vector | string array | cell array of character vectors
Input channel names, specified as a string, character vector, string array, or cell array of character vectors.
If you are using a timetable for the data source, the names in InputName
must be a subset of the timetable variables.
Example: sys = ivx(tt,__,'InputName',["u1" "u2"])
selects the variables u1
and u2
as the input channels from the timetable tt
to use for the estimation.
OutputName
— Output channel names
string | character vector | string array | cell array of character vectors
Output channel names, specified as a string, character vector, string array, or cell array of character vectors.
If you are using a timetable for the data source, the names in OutputName
must be a subset of the timetable variables.
Example: sys = ivx(tt,__,'OutputName',["y1" "y3"])
selects the variables y1
and y3
as the output channels from the timetable tt
to use for the estimation.
Output Arguments
collapse all
sys
— Identified polynomial model
idpoly
object
ARX model that fits the estimation data, returned as a discrete-time idpoly object. This model is created using the specified model orders, delays, and estimation options. ivx
does not return any estimated covariance information for sys
.
Information about the estimation results and options used is stored in the Report
property of the model. Report
has the following fields:
Report Field | Description |
---|---|
Status | Summary of the model status, which indicates whether the model was created by construction or obtained by estimation |
Method | Estimation command used |
InitialCondition | Handling of initial conditions during model estimation,returned as one of the following values:
This field is especially useful to viewhow the initial conditions were handled when the |
Fit | Quantitative assessment of the estimation, returned as a structure. See Loss Function and Model Quality Metrics for more information on these quality metrics. The structure has these fields.
|
Parameters | Estimated values of model parameters |
OptionsUsed | Option set used for estimation. If no custom options were configured, this is a set of default options. See arxOptions for more information. |
RandState | State of the random number stream at the start of estimation. Empty, |
DataUsed | Attributes of the data used for estimation, returned as a structure with the following fields.
|
For more information on using Report
, see Estimation Report.
ic
— Initial conditions
initialCondition
object | object array of initialCondition
values
Estimated initial conditions, returned as an initialCondition object or an object array of initialCondition
values.
For a single-experiment data set,
ic
represents, in state-space form, the free response of the transfer function model (A and C matrices) to the estimated initial states (x0).For a multiple-experiment data set with Ne experiments,
ic
is an object array of length Ne that contains one set ofinitialCondition
values for each experiment.
For more information, see initialCondition.
Tips
Use iv4 first for IV estimation to identify ARX polynomial models where the instruments x are chosen automatically. Use
ivx
for nonstandard situations. For example, useivx
when there is feedback present in the data or when instruments other than those used iniv4
need to be tried. You can also useivx
to automatically generate instruments from certain custom defined filters.
References
[1] Ljung, Lennart. System Identification: Theory for the User, 2nd ed. Prentice Hall Information and System Sciences Series. Upper Saddle River, NJ: Prentice Hall PTR, 1999.
Version History
Introduced before R2006a
See Also
arx | arxstruc | idpoly | iv4 | ivar | polyest
Topics
- Picking Instrumental Variables for System Identification
Commande MATLAB
Vous avez cliqué sur un lien qui correspond à cette commande MATLAB:
Pour exécuter la commande, saisissez-la dans la fenêtre de commande de MATLAB. Les navigateurs web ne supportent pas les commandes MATLAB.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- Deutsch
- English
- Français
- United Kingdom (English)
Contact your local office