Compute zeros, poles, and static gains of a theta format model.
Syntax
[zepo,k] = th2zp(th)
[zepo,k] = th2zp(th,ku,ky,thresh)
Description
For any model described in theta format by th, the poles and zeros and static gains, along with their standard deviations are computed. The poles and zeros are stored in coded form in the matrix zepo, while the static gains are returned in k.
The best way to display the information in zepo is to plot it using zpplot. The information can also be retrieved with getzp.
The first row of k contains the integer (jy-1)*1000+ju, where jy is the output number and ju is the input number for the gain in question. The second row of k contains the corresponding gains, and the third row the standard deviation of the gain in question.
Note: The gain here is the static gain, i.e., the steady state gain from a step in input number ju to output number jy. It is thus the same for a discrete-time and a continuous-time representation of the same model. This is different from the routines ss2zp and zp2ss in the Signal Processing Toolbox, which use the transfer function gain, i.e., the coefficient of the highest power in the numerator.
Row vectors ku and ky contain the indices of the inputs and outputs, respectively, for which the zeros, poles and gains are to be computed. In this context, the noise e(t) is counted as inputs with negative numbers. That is, noise source number ju (the ju-th component of e(t) is counted as input number ju. The value 0 in the vector ku is the default for "all noise sources." The default values of ku and ky are all inputs and all outputs (no noise inputs).
The optional argument thresh is a threshold for the computation of the zeros. Zeros at infinity may, due to the numerical procedure, end up as large, finite values. To avoid this, any zero whose absolute value is larger than thresh is regarded to be at infinity. The default value of thresh is 100000.
The procedure handles both models in continuous and discrete time.
For the general discrete-time multi-input, single-output model

the zeros are the roots of
(with z replacing the forward shift operator q), and the poles are the roots of
. The static gain is
k =B(1)/(A(1)F(1)).
For models that are internally represented in state-space form, the poles are the eigenvalues of the system matrix. The zeros are the zeros of the corresponding transfer function. These zeros may thus differ from the transmission zeros associated with the multivariable system. To find the trans-mission zeros, first use th2ss and then apply tzero from the Control System Toolbox.
Note that you cannot rely on information about zeros and poles at the origin and at infinity. (This is a somewhat confusing issue anyway.)
zepo is returned in a format that allows easy plotting with zpplot. (Then zeros and poles at the origin and at infinity are ignored.) The routine zpform is useful when comparing different models.
The alternative routine zp has the same syntax as th2zp but does not compute standard deviations. This can be a useful alternative, when the standard deviations are not of interest, and computation time for th2zp is long. Moreover, zp uses ss2zp from the Signal Processing Toolbox, which may give better numerical accuracy in difficult cases.
Note: Although zp computes zeros and poles for all combinations of noise sources and outputs, present in the indices ky, ku, the command th2zp only gives information about poles and zeros from noise source number ju to output number ju (if ku contains the number -ju).
Algorithm
The standard deviations are computed using Gauss's approximation formula, using the parameter covariance matrix contained in th. When the transfer function depends on the parameters in a complicated way, numerical differentiation is applied. The step sizes for the differentiation are determined in the M-file nuderst.
Note that Gauss's approximation formula gives infinite variance to poles and zeros that are exactly repeated.
Examples
The statement
zpplot(th2zp(th))
plots, but does not store, the poles and zeros.
To compare the zeros and poles of second and third order ARX models (input-output dynamics only), use
th2 = arx(z,[2 2 1]);
th3 = arx(z,[3 3 1]);
zp2 = th2zp(th2);
zp3 = th2zp(th3);
zpplot(zpform(zp2,zp3))
See Also
getzp, theta, zepo, zpform, zpplot
[ Previous | Help Desk | Next ]