Products & Services Solutions Academia Support User Community Company

Learn more about System Identification Toolbox   

idmodel - Superclass for linear models

Description

idmodel is an object that you do not deal with directly. It contains all the common properties of the model objects idarx, idgrey, idpoly, idproc, 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.

m = arx(Data,[2 2 1])

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:

m.a
m.da

See the property list obtained by get(m), as well as the property lists of idgrey, idarx, idpoly, and idss in Functions – Alphabetical List 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, and pzmap. The quality of the model is assessed by commands like compare and resid. When you have Control System Toolbox software installed, you can use view(m) to access various display functions.

To extract state-space matrices, transfer function polynomials, etc., use the commands arxdata, polydata, tfdata, ssdata, and zpkdata.

To compute the frequency response of the model, use the commands idfrd and freqresp.

Creating and Modifying Model Objects

If you want to define a model to use, for example, for simulating data, you need to use the model creator functions:

If you want to estimate a state-space model with a specific internal parameterization, you need to create an idss model or an idgrey model. See the 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

m(outputs,inputs)

Use a colon (:) to denote all channels and an empty matrix ([]) to denote no channels. The channels can be referenced by number or by name. For several names, you must use a cell array, such as

m3 = m('position',{'power','speed'})

or

m3 = m(3,[1 4])

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).

For a single-output model m,

m4 = m(inputs)

selects the corresponding input channels, and for a single-input model,

m5 = m(outputs)

selects the indicated output channels.

Subreferencing is quite useful, for example, when a plot of just some channels is desired.

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

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 is 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

m1 = m('measured') or just m1 = m('m')

Then e is set to 0 and H is removed.

Analogously,

m2 = m('noise') or just m2 = m('n')

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 other transformation and display functions 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,

bode(m('n'))

plots the additive noise spectra according to the model m, while

bode(m)

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.

m3 = noisecnv(m)

This creates a model m3 with all input channels, both measured u and noise sources e, 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 lost. For example, studying the step response from the noise channels does 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.

m4 = noisecnv(m,'Norm')

This creates a model m4 where u and v are treated as measured signals.

For example, the step responses from v to y will now reflect the typical size of the disturbance influence because of the scaling by L. In both 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, behave, as follows, for a model with measured inputs. (fcn is 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(noisecnv(m,'Norm')) returns the properties of the transfer function [G HL} (ny outputs and ny+nu inputs). Analogously,

m1 = m('n');
fcn(noisecnv(m1,'Norm')) 

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

fcn(noisecnv(m,'Norm')) 

returns the properties of HL.

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:

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

m(outputs,inputs)

Use a colon (:) to denote all channels and an empty matrix ([ ]) to denote no channels. The channels can be referenced by number or by name. For several names, you must use a cell array.

m2 = m('y3',{'u1','u4'})
m3 = m(3,[1 4])

For a single output model m,

m4 = m(inputs)

selects the corresponding input channels, and for a single input model,

m5 = m(outputs)

selects the indicated output channels.

The string 'measured' (or any abbreviation like 'm') means the measured input channels.

m4 = m(3,'m')
m('m') is the same as m(:,'m')

Similarly, the string 'noise' (or any abbreviation) refers to the noise input channels. See Noise Channels for more details.

Horizontal Concatenation

Adding input channels,

m = [m1,m2,...,mN]

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

Adding output channels,

m = [m1;m2;... ;mN]

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

Type idhelp idmodel, idprops idmodel, idprops idmodel algorithm.

See Also

Algorithm Properties 
EstimationInfo 
compare 
idarx 
idgrey 
idpoly 
idproc 
idss 
noisecnv 

  


Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS