Construct theta format matrix for input-output models.
Syntax
th = poly2th(A,B)
th = poly2th(A,B,C,D,F,lam,T)
Description
poly2th creates a matrix containing parameters that describe the general multi-input-single-output model structure:

A, B, C, D, and F specify the polynomial coefficients.
For single-input systems, these are all row vectors in the standard MATLAB format:
A = [1 a1 a2 ... ana]
A, C, D, and F all start with 1, while B contains leading zeros to indicate the delays. See "Defining Model Structures" on page 3-29 in the User's Guide.
For multi-input systems, B and F are matrices with one row for each input.
For time series, B and F are entered as empty matrices:
B = []; F = [];
lam is the variance of the white noise sequence
, while T is the sampling interval.
A negative value of T indicates that the model is a continuous-time one. Then the interpretation of the arguments is that
A = [1 2 3 4]
corresponds to the polynomial
in the Laplace variable s, and so on. For continuous-time systems lam indicates the level of the spectral density of the innovations. (A sampled version of the model has the innovations variance lam/T, where T is the sampling interval. The continuous-time model must have a white noise component in its noise description. See "Some Special Topics" on page 3-68 in the User's Guide.
Trailing arguments C, D, F, lam, and T can be omitted, in which case they are taken as 1. (If B=[], then F is taken as [].)
For discrete-time models (T>0), note the following: poly2th strips any trailing zeros from the polynomials when determining the orders. It also strips leading zeros from the B polynomial to determine the delays. Keep this in mind when you use poly2th and th2poly to modify earlier estimates to serve as initial conditions for estimating new structures. See "Some Special Topics" on page 3-68 in the User's Guide.
Examples
To create a system of ARMAX type (the "Åström system"):
A = [1 -1.5 0.7];
B = [0 1 0.5];
C = [1 -1 0.2];
th0 = poly2th(A,B,C);
This gives a system with one delay (nk = 1).
Create the continuous-time model

Sample it with T=0.1 and then simulate it without noise:
B=[0 1;1 3];
F=[1 1 0;1 2 4]
th=poly2th(1,B,1,1,F,1,-1)
thd=thc2thd(th,0.1)
y=idsim([u1 u2],thd);
See Also
idsim, theta
[ Previous | Help Desk | Next ]