114 CHAPTER 3. FUNCTIONAL DESCRIPTION OF Xµ
creating weights from data and simple system identification.
Xµ provides two user callable functions for fitting SISO transfer functions to data. The
first is mkphase calculates the phase corresponding to a minimum-phase stable system
from magnitude data. This uses the complex cepstrum method described by Oppenheim
and Schafer [80, p. 501] to generate the desired frequency response. The syntax of the
function is given below.
cdata = mkphase(magdata)
The complex cepstrum method is used to generate the complex valued frequency
response,cdata, of a SISO minimum-phase system with magnitude response magdata.
The Xµ function fitsys fits a dynamic system to frequency domain data. The syntax is
illustrated below.
sys = fitsys(data,npoles,nzeros,weight)
The number of poles and zeros in the system, sys, can be independently specified by the
arguments npoles and nzeros. When called from musynfit these are always identical
as an invertible system is required. This may not be appropriate for other applications
of fitsys. For logscale frequency data a weight of 1/s is strongly recommended as this
tends to balance the effects of high and low frequencies in the fit. In musynfit a1/s
weight is automatically applied and multiplies any other user specified weight.
Chebyshev polynomials are used as basis functions for both the numerator and
denominator polynomials. For further information see the work by Adcock [81]. The
fitsys function is similar to the Xmath function tfid. The algorithm in fitsys has
been fine-tuned for D-scale fitting and usually outperforms tfid in this application.
We will now look at a simple design example using D-K iteration. The plant is a double
integrator with an output perturbation. For more physically meaningful examples refer
to Chapter 4.
# The nominal plant is a double integrator.
# A multiplicative perturbation weight reflects
# increased uncertainty at high frequencies