Define multivariable state-space canonical form model structures.
Syntax
ms = canform(orders,nu)
ms = canform(orders,nu,dkx)
Description
canform is, like modstruc, a function that defines model parameterizations in state-space form, which are used in ms2th to create model structures in the theta format. The only use of the resulting matrix ms is as an input to ms2th.
The model considered is in state-space form:

The function applies both to the continuous- and discrete-time cases; which one is determined only when the structure is formed with ms2th.
orders: The (pseudo-observability) indices orders define which matrix elements are fixed (to zero or one) and which are left free as parameters. orders is a row vector with as many entries as there are outputs. Element k of
orders describes how many delayed values of the output are required to appropriately predict the k-th component of the output. The sum of the order indices is the order of the system (the dimension of x):
n = sum(orders)
The exact structure is defined in Appendix 4.A of Ljung (1987). Briefly, the A matrix contains p * n parameters, where p is the number of outputs and n is the number of states. The C matrix contains only zeros and ones, while the B matrix is filled with parameters.
nu: The number of inputs.
dkx: The argument dkx determines some additional structure of the matrices of the state-space model to be estimated. It is a row vector with three entries:
dkx = [d, k, x]
The entries refer to the matrices K, D, and the initial state x(0) of the state-space model given above.
k = 1 indicates that the K-matrix in the model (the Kalman Gain) will be fully parameterized, while k = 0 means that this matrix will be fixed to zero. This will give a so-called output error model.
d = 1 indicates that D-matrix in the model (the direct term from input to output) will be fully parametrized, while d = 0 means that this matrix will be fixed to zero. This also implies that there will be a delay of (at least) one sample between the input and the output.
x = 1 indicates that the initial state x(0) will be parameterized, while x = 0 means that the initial state will be fixed to zero.
Default is
dkx = [0, 1, 0]
An alternative to canform is the function canstart. It also provides good initial estimates for the free parameters.
Examples
Write out the state-space matrices for a sixth order system with three outputs and two inputs with NaN denoting free parameters:
ps = [2 1 3];
ms = canform(ps,2);
th = ms2th(ms,'c',ones(1,18+12+18)*NaN);
[A,B,C,D,K] = th2ss(th)
See Also
canstart, fixpar, modstruc, ms2th, unfixpar
References
Ljung (1987), Appendix 4.A.
[ Previous | Help Desk | Next ]