Create a model structure parametrized in canonical form.
Syntax
THS = ss2th(TH)
THS = ss2th(TH,orders)
Description
This function converts any model in theta format to a canonically parameterized state-space model, also in theta format. It is useful when a model has been obtained in some way, and you want to use it as an initial model for prediction error estimation using pem.
TH: The given model, which can be any model in theta format.
THS: The resulting model, also in theta format. A canonical parametrization in observer form, based on the pseudo-observability indices orders.
orders: The pseudo-observability indices. A row vector, with as many elements as there are outputs in the model TH. Their sum must be equal to the order of the model TH. See canform for more details. If orders is omitted, a default choice of indices is made.
If the model TH is an output error model (its Kalman gain equal to zero), then so is THS. Also if there is a delay from input to output in TH (corresponding to a state-space representation (3.27) in the Tutorial with D=0) then THS will also have such a structure.
Examples
Make a parametrized state-space model from given matrices A, B, C, D, and K and use it as initial condition for pem estimation:
th1 = ms2th(modstruc(A,B,C,D,K),'d');
thi = ss2th(th1);
th = pem(z,thi);
Let the model obtained from n4sid be used as the initial value for prediction error estimation:
thn = n4sid(z,3);
thp = pem(z,ss2th(thn));
See Also
canform, canstart, ms2th, n4sid
[ Previous | Help Desk | Next ]