Estimate the parameters of general linear models.
Syntax
th = pem(z,nn)
th = pem(z,nn,'trace')
[th, iter_info] = pem(z,nn,index,maxiter,tol,lim,...
maxsize,T,'trace')
Description
The function pem handles all model structures, including the general multi-input-single-output structure

and general structures defined by fixpar, mf2th, ms2th, thinit, and
unfixpar. Multivariable ARX structures defined by arx2th are also covered.
The matrix z contains the output-input data z = [y u], where y and u are column vectors (in the multi-variable case u and y contain one column for each input and output).
nn is given either as
nn = [na nb nc nd nf nk]
or as
nn = thi
In the former case, na, nb, nc, nd, and nf are the orders of the model and nk is the delay(s). For multi-input systems, nb, nf, and nk are row vectors giving the orders and delays of each input. (See Section 3 of the Tutorial for exact definitions of the orders).
In the latter case, thi defines a model structure and an initial value for the estimate, given in theta format.
th is returned with the resulting parameter estimates and estimated covariances, stored in theta format.
The optional argument index is a row vector that contains the indices of the parameters that are to be estimated. The others remain fixed to their nominal values. The ordering of the parameters is defined under th2par. The default value of index is that all free parameters are estimated. The optional variables iter_info, lim, maxiter, maxsize, tol, and T are explained under auxvar.
If a last argument `trace' is supplied, information about the progress of the iterative search for the model will be furnished to the MATLAB command window.
For the special cases of single-input models of Output-Error, ARMAX, and Box-Jenkins type, it is more efficient to use oe, armax, and bj.
Examples
Here is an example of a system with three inputs and two outputs. A canonical form state-space model of order 5 is sought.
z = [y1 y2 u1 u2 u3];
thc = canstart(z,5,3)
th = pem(z,thc);
Algorithm
pem uses essentially the same algorithm as armax with modifications to the computation of prediction errors and gradients.
See Also
armax, auxvar, bj, oe, theta
[ Previous | Help Desk | Next ]