System Identification Toolbox    
pem

Estimate the parameters of general linear models.

Syntax

Description

pem is the basic estimation command in the toolbox and covers a variety of situations.

data is always an iddata object that contains the input/output data.

With Initial Model

mi is any idmodel object, idarx, idpoly, idss, or idgrey. It could be a result of another estimation routine, or constructed and modified by the constructors (idpoly, idss, idgrey) and set. The properties of mi can also be changed by any property name/property value pairs in pem as indicated in the syntax.

m is then returned as the best fitting model in the model structure defined by mi.The iterative search is initialized at the parameters of the initial/nominal model mi. m will be of the same class as mi.

Black-Box State-Space Models

With m = pem(data,n), where n is a positive integer, or m = pem(data,'nx',n) a state-space model of order n is estimated. The default situation is that it is estimated in a 'Free' parameterization, that can be further modified by the properties 'nk', 'DisturbanceModel', and 'InitialState' (see the reference pages for idss and n4sid). The model is initialized by n4sid, and then further adjusted by optimizing the prediction error fit.

You can choose between several different orders by

and you will then be prompted for the "best" order. By

an automatic choice of order among 1:10 is made.

is short for m = pem(data,'best'). To work with other delays use, e.g. m = pem(data,'best','nk',[0,...0]).

In this case m is returned as an idss model.

Black-Box Multiple-Input-Single-Output Models

The function pem also handles the general multi-input-single-output structure

The orders of this general model are given either as

or with (...'na',na,'nb',nb,...) as shown in the syntax. Here na, nb, nc, nd, and nf are the orders of the model and nk is the delay(s). For multi-input systems, nb, nf, and nk are row vectors giving the orders and delays of each input. (See Polynomial Representation of Transfer Functions in the "Tutorial" chapter for exact definitions of the orders.) When the orders are specified with separate entries, those not given are taken as zero.

In this case m is returned as an idpoly object.

Properties

In all cases the algorithm is affected by the properties (see Algorithm Properties for details):

For black-box state-space models, also 'N4Weight' and 'N4Horizon' will affect the result, since these models are initialized with n4sid estimate. See the reference page for n4sid.

Typical idmodel properties to affect are (see idmodel properties for more details):

Examples

Here is an example of a system with three inputs and two outputs. A canonical form state-space model of order 5 is sought.

Building an ARMAX model for the response to output 2.

Comparing the models (compare automatically matches the channels using the channel names).

Algorithm

pem uses essentially the same algorithm as armax with modifications to the computation of prediction errors and gradients.

See Also

armax, bj, oe, idss, idpoly, idgrey, idmodel, Algorithm Properties, EstimationInfo


  pe plot (iddata)