System Identification Toolbox
  Go to function:
    Search    Help Desk 
ms2th    Examples   See Also

Package standard state-space parameterizations into the theta model format.

Syntax

th = ms2th(ms)
th = ms2th(ms,cd,parval,lambda,T)

Description

The function returns th as a model structure in the theta format for further use in estimating, simulating, and analyzing models. The argument ms defines which parameters are fixed and which ones you need to estimate. It is typically formed by modstruc or canform.

The argument cd indicates whether the state-space matrices in ms refer to a continuous-time model (cd = 'c') or a discrete-time model (cd = 'd').
cd = 'd' is the default.

For a continuous-time model there are two options for how to sample it, as it is fitted to observed sample data (in pem): By selecting cd = `czoh' (continuous, zero order hold) the input is assumed to be piecewise constant over the sampling interval. By selecting cd = `cfoh' (continuous, first order hold), the input is supposed to be piecewise linear between the samples. This means that the continuous-time input u(t) is obtained by linear interpolation between the sampled values. Use cd = `czoh' (which is the default for continuous-time models) if the system has been controlled using a piece-wise constant input. Use cd = 'cfoh' if the input has been a continuous function during the data acquisition.

The row vector parval contains the nominal values of the free parameters (those that correspond to NaN in ms). These nominal values are used as initial estimates when the parameters in th are identified with pem. They are also used whenever the model th is simulated or analyzed. The default value of parval is all zeros.

The numbering of the parameters in parval (as well as in all other contexts in which the model parameters are listed) is as follows. The matrix A is first scanned, row by row, for free parameters, then the matrix B is scanned, again row by row, and then C, D, K, and X0 each of them row by row. The order in which the free parameters are found by this scanning defines the ordering in parval.

Note that setting all initial estimates equal to zero is not a good starting point for the iterative search for parameter estimates in pem, since this case often corresponds to a nonobservable/noncontrollable model. It is better to give more realistic values of parval or to randomize them using thinit.

The argument lambda gives the covariance matrix of the innovation for the sampling interval indicated in T. The default value of lambda is the unit matrix.

T denotes the sampling interval of the data, for which the model is going to be estimated (and the sampling interval that is used when the model is used for simulation and prediction). Give T a positive value even if the underlying model is defined to be continuous time.

Examples

Define a continuous-time model structure corresponding to


with initial values

and estimate the free parameters:

See Also

canform, fixpar, modstruc, pem, thinit, unfixpar

[ Previous | Help Desk | Next ]