State space realization for a given magnitude Bode plot.
Syntax
[ad,bd,cd,dd,logfit] = fitgain(logd,w)
[ad,bd,cd,dd,logfit] = fitgain(logd,w,n)
[ad,bd,cd,dd,logfit] = fitgain(logd,w,n,wt)
[ad,bd,cd,dd,logfit] = fitgain(logd,w,n,wt,flag)
[ssd,logfit] = fitgain()
Description
fitgain produces a stable and minimum-phase state-space realization of the given magnitude Bode plot logd.
The input variable logd is a vector containing the logarithmic magnitude Bode plot evaluated at frequency vector w.
Optional input variables:
n -- the size of the desired state-space approximant (default = 0)
wt -- a weighting vector contains the weight at each frequency point
flag -- set to "1" to display a Bode plot (default = 1).
fitgain uses the routine invfreqs in Signal Processing Toolbox to fit the continuous magnitude Bode plot. Three steps are involved:
- 1
- Take the power spectrum density of the given magnitude data, i.e.,
.
- 2
- Use the error correction method (routine
invfreqs) to fit the PSD data with a
rational transfer function.
- 3
- Extract the stable and minimum phase part of the realization.
This method is not as numerically stable as fitd.
See Also
fitd, invfreqs, yulewalk
[ Previous | Help Desk | Next ]