System Identification Toolbox | ![]() ![]() |
Package all common model properties.
Description
idmodel
is an object that the user does not deal with directly. It contains all the common properties of the model objects idarx
, idgrey
, idpoly
, and idss
, which are returned by the different estimation routines.
Basic Use
If you just estimate models from data, the model objects should be transparent. All parametric estimation routines return idmodel
results.
The model m
contains all relevant information. Just typing m
will give a brief account of the model. present(m)
also gives information about the uncertainties of the estimated parameters. get(m)
gives a complete list of model properties.
Most of the interesting properties can be directly accessed by subreferencing.
See the property list obtained by get(m),
as well as the property lists of idgrey
, idarx
, idpoly
, and idss
in the "Command Reference" for more details on this. See also idprops
.
The characteristics of the model m
can be directly examined and displayed by commands like impulse
, step
, bode
, nyquist
, pzmap
. The quality of the model is assessed by commands like compare
, and resid
. If you have the Control System Toolbox, just typing view(m)
gives access to various display functions.
To extract state-space matrices, transfer function polynomials, etc., use the commands
and by idfrd and freqresp, the frequency response of the model can be computed.
Creating and Modifying Model Objects
If you want to define a model to use, e.g., for simulating data, you need to use the model creator functions:
idarx
, for multivariable arx models
idgrey
, for user-defined greybox state-space models
idpoly
, for single output polynomial models
idss
, for
state-space models
Also, if you want to estimate a state-space model with a specific internal parameterization, you need to create an idss
model or a idgrey
model. See the respective reference pages for these functions.
Dealing with Input and Output Channels
For multivariable models, you construct submodels containing a subset of inputs and outputs by simple subreferencing. The outputs and input channels can be referenced according to
Use colon (:) to denote all channels and the empty matrix ([ ]) to denote no channels. The channels can be referenced by number or by name. For several names, a cell array must be used.
Thus m3
is the model obtained from m
by looking at the transfer functions from input numbers 1 and 4 (with input names '
power' and 'speed') to output number 3
(with name position
).
will select the corresponding input channels, and for a single input model
will select the indicated output channels.
Subreferencing is quite useful; e.g., when a plot of just some channels is desired.
The Noise Channels
The estimated models have two kinds of input channels: the measured inputs u and the noise inputs e. For a general linear model m
, we have
![]() |
(4-1) |
where u
is the nu-dimensional vector of measured input channels and e
is the ny-dimensional vector of noise channels. The covariance matrix of e
is given by the property 'NoiseVariance'
. Occasionally this matrix will be written in factored form
This means that e
can be written as
where is white noise with identity covariance matrix (independent noise sources with unit variances).
If m
is a time series (nu = 0), G is empty and the model is given by
For the model m
, the restriction to the transfer function matrix G is obtained by
Then e
is set to 0
and H
is removed.
creates a time-series model m2
from m
by ignoring the measured input. That is, m2
describes the signal He.
For a system with measured inputs, bode
, step
, and many other transformation and display functions just deal with the transfer function matrix G. To obtain or graph the properties of the disturbance model H, it is therefore important to make the transformations m('n
').
For example,
will plot the additive noise spectra according to the model m
, while
just plots the frequency responses of G.
To study the noise contributions in more detail, it is useful to convert the noise channels to measured channels, using the command noisecnv:
This creates a model m3
with all input channels, both measured u
and noise sources e
, being treated as measured signals,. That is, m3
is a model from u
and e
to y
, describing the transfer functions G and H. The information about the variance of the innovations e
is then lost. For example, studying the step response from the noise channels, will then not take into consideration how large the noise contributions actually are.
To include that information, e
should first be normalized , so that
becomes white noise with an identity covariance matrix.
This will create a model m4
with u
and
treated as measured signals.
For example, the step responses from v to y will now also reflect the typical size of the disturbance influence, due to the scaling by L. In both these cases, the previous noise sources, that have become regular inputs will automatically get input names that are related to the corresponding output. The unnormalized noise sources e have names like 'e@ynam1'
(noise e
at output channel ynam1
), while the normalized sources v
are called 'v@ynam1'
.
Retrieving Transfer Functions
The functions that retrieve transfer function properties, ssdata
, tfdata
, and zpkdata
will thus work as follows for a model ( 4-1) with measured inputs: (fcn
is any of ssdata
, tfdata
, or zpkdata
.)
fcn(m)
returns the properties of G (ny outputs and nu inputs)
fcn(m('n'))
returns the properties of the transfer function H (ny outputs and ny inputs)
fcn(noisec nv(m,'Norm'))
returns the properties of the transfer function [G HL} (ny outputs and ny+nu inputs). Analogously
returns the properties of the transfer function HL (ny outputs and ny inputs).
If m
is a time series model, fcn(m)
returns the properties of H, while
Note that the estimated covariance matrix NoiseVariance
itself is uncertain. This means that the uncertainty information about H is different from that of HL.
idmodel Properties
In the list below, ny
is the number of output channels, and nu
is the number of input channels:
Name
:
An optional name for the data set. An arbitrary string.
OutputName, InputName
: Cell arrays of length ny
-by-1 and nu
-by-1 containing the names of the output and input channels. For estimated models, these are inherited from the data. If not specified, they will be given default names: {'y1
',
'y2
',...}
and {'u1
',
'u2
',...}
.
OutputUnit
, InputUnit
: Cell arrays of length ny
-by-1 and nu
-by-1 containing the units of the output and input channels. Inherited from data for estimated models.
TimeUnit
: The unit for the sampling interval.
Ts
: Sampling interval. A non-negative scalar. Ts = 0
denotes a continuous-time model. Note that changing just Ts
will not recompute the model parameters. Use c2d
and d2c
for recomputing the model to other sampling intervals.
ParameterVector
: The vector of adjustable parameters in the model structure. Initial/nominal values or estimated values, depending on the status of the model. A column vector.
PName
:
The names of the parameters. A cell array of the length of the parameter vector. If not specified, it will contain empty strings. See also setpname
.
CovarianceMatrix
: The estimated covariance matrix of the parameter vector. For a nonestimated model this is the empty matrix. For state-space models in the 'Free
'
parameterization the covariance matrix is also the empty matrix, since the individual matrix elements are not identifiable then. Instead, in this case, the covariance information is hidden (in the hidden property 'Utility
') and retrieved by the relevant functions when necessary. Setting CovarianceMatrix
to 'None
' will inhibit calculation of covariance and uncertainty information. This may save substantial time for certain models. See No Covariance in the "Tutorial".
NoiseVariance
: The covariance matrix of the noise source e. An ny
-by-ny
matrix.
InputDelay
: A vector of size nu
-by-1, containing the input delay from each input channel. For a continuous-time model (Ts = 0
) the delay is measured in TimeUnit
, while for discrete-time models (Ts > 0)
the delay is measured as the number of samples. Note the difference between InputDelay
and nk
(which is a property of idarx
, idss
, and idpoly
). 'Nk
' is a model structure property that tells the model structure to include such an input delay. In that case, the corresponding state-space matrices and polynomials will explicitly contain Nk
input delays. The property InputDelay
, on the other hand, is an information that in addition to the model as defined, the inputs should be shifted by the given amount. InputDelay
is used by sim
and the estimation routines to shift the input data. When computing frequency responses, the InputDelay is also respected. Note that InputDelay
can be both positive and negative.
Algorithm
: See the reference page for Algorithm Properties
.
EstimationInfo
: See the reference page for EstimationInfo
.
Notes
: An arbitrary field to store extra information and notes about the object.
UserData
: An arbitrary field for any possible use.
Note All properties can be set or retrieved either by these commands or by subscripts. Autofill applies to all properties and values, and is case insensitive. |
For a complete list of property values, use get(m)
. To see possible value assignments, use set(m)
.
Subreferencing
The outputs and input channels can be referenced according to
Use colon (:) to denote all channels and the empty matrix ([ ]) to denote no channels. The channels can be referenced by number or by name. For several names, a cell array must be used.
will select the corresponding input channels, and for a single input model
will select the indicated output channels.
The string 'measured
' (or any abbreviation like 'm'
) means the measured input channels.
Similarily the string 'noise
' (or any abbreviation) refers to the noise input channels. See above under The Noise Channels for more details.
Horizontal Concatenation
creates an idmodel
object m
, consisting of all the input channels in m1,... mN
. The output channels of mk
must be the same.
Vertical Concatenation
creates an idmodel
object m consisting of all the output channels in m1
, m2
, ..mN
. The input channels of mk
must all be the same.
Online Help Functions
See idhelp idprops idmodel, help idmodel/subsref, help idmodel/subsasgn, help idmodel/horzcat,
and help idmodel/vertcat.
See Also
noisecnv
, nkshift
, plot (iddata)
, size
![]() | idinput | idmodred | ![]() |