System Identification Toolbox    
idmodel

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:

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.

or

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

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.

Analogously

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

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

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.

For a single output model m

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

Adding input channels

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

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