n4sid - Estimate state-space models using subspace method returning idss object

Syntax

m = n4sid(data)
m = n4sid(data,order,'Property1',Value1,...,'PropertyN',ValueN)

Description

n4sid estimates models in state-space form and returns them as an idss object m. n4sid handles an arbitrary number of input and outputs, including the time-series case (no input). The state-space model is in the innovations form

If data is continuous-time (frequency-domain) data, a corresponding continuous-time state-space model is estimated.

data: An iddata object containing the output-input data. Both time-domain and frequency-domain signals are supported. data can also be a frd or idfrd frequency-response data object.

order: The desired order of the state-space model. If order is entered as a row vector (as in order = [1:10]), preliminary calculations for all the indicated orders are carried out. A plot is then given that shows the relative importance of the dimension of the state vector. More precisely, the singular values of the Hankel matrices of the impulse response for different orders are graphed. You are prompted to select the order, based on this plot. The idea is to choose an order such that the singular values for higher orders are comparatively small. If order = 'best', a model of "best" (default choice) order is computed among the orders 1:10. This is the default choice of order.

Estimating the D Matrix

Whether the D matrix is estimated or not is governed by the property nk, which is further described below. The default is that D is not estimated. By setting the kth entry of nk to 0, the kth column of D (corresponding to the kth input) is estimated. To estimate a full D matrix thus, let nk = zeros(1,nu) as in

m = n4sid(data,order,'nk',[0 .. 0])

This holds for both discrete- and continuous-time models.

Property Name/Property Value Pairs

The list of property name/property value pairs can contain any idss and algorithm properties. See idss and Algorithm Properties.

idss properties that are of particular interest for n4sid are

Algorithm properties that are of special interest are

Algorithm

The algorithm is described in Section 10.6 in Ljung (1999).

Examples

Build a fifth-order model from data with three inputs and two outputs. Try several choices of auxiliary orders. Look at the frequency response of the model.

z = iddata([y1 y2],[ u1 u2 u3]);
m = n4sid(z,5,'n4h',[7:15]','trace','on');
bode(m,'sd',3)

Estimate a continuous-time model, in a canonical form parameterization, focusing on the simulation behavior. Determine the order yourself after seeing the plot of singular values.

m = n4sid(m,[1:10],'foc','sim','ssp','can','ts',0)
bode(m)

Learn More

For definition of state-space models and how to estimate them from input-output data, see Identifying State-Space Models.

For more information about estimating state-space models from time-series data, see Estimating State-Space Time-Series Models.

Other references:

vanOverschee, P., and B. DeMoor, Subspace Identification of Linear Systems: Theory, Implementation, Applications, Kluwer Academic Publishers, 1996.

Verhaegen, M., "Identification of the deterministic part of MIMO state space models," Automatica, Vol. 30, pp. 61-74, 1994.

Larimore, W.E., "Canonical variate analysis in identification, filtering and adaptive control," In Proc. 29th IEEE Conference on Decision and Control, pp. 596-604, Honolulu, 1990.

See Also

Algorithm Properties 
idss 
pem 

  


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