### An FFT-Based Equation-Error Method

The algorithm below minimizes the equation error in the frequency-domain. As a result, it can make use of the FFT for speed. This algorithm is implemented in Matlab's`invfreqz()`function when no iteration-count is specified. (The iteration count gives that many iterations of the Steiglitz-McBride algorithm, thus transforming equation error to output error after a few iterations. There is also a time-domain implementation of the Steiglitz-McBride algorithm called

`stmcb()`in the Matlab Signal Processing Toolbox, which takes the desired impulse response as input.)

Given a desired spectrum at equally spaced frequencies , with a power of , it is desired to find a rational digital filter with zeros and poles, normalized by , such that

*arbitrary*known input is valuable for introducing complex weighting across the frequency grid, and this general form is presented. A detailed derivation appears in [78, Chapter 2], and here only the final algorithm is given: Given spectral output samples and input samples , we minimize

FFT

The scaling by is optional since it has no effect on the solution.
We require three correlation functions involving and ,
*e.g.*, . The solution is then

**Next Section:**

Prony's Method

**Previous Section:**

Stability of Equation Error Designs