### Quadratic Interpolation of Spectral Peaks

In quadratic interpolation of sinusoidal spectrum-analysis peaks, we replace the main lobe of our window transform by a quadratic polynomial, or ``parabola''. This is valid for any practical window transform in a sufficiently small neighborhood about the peak, because the higher order terms in a Taylor series expansion about the peak converge to zero as the peak is approached.Note that, as mentioned in §D.1, the Gaussian window transform magnitude is precisely a parabola on a dB scale. As a result, quadratic spectral peak interpolation is

*exact*under the Gaussian window. Of course, we must somehow remove the infinitely long tails of the Gaussian window in practice, but this does not cause much deviation from a parabola, as shown in Fig.3.36.

Referring to Fig.5.15, the general formula for a parabola may be written as

(6.29) |

The center point gives us our interpolated peak location (in bins), while the amplitude equals the peak amplitude (typically in dB). The curvature depends on the window used and contains no information about the sinusoid. (It may, however, indicate that the peak being interpolated is not a pure sinusoid.) At the three samples nearest the peak, we have

^{6.9}(spectral samples) by

(6.30) |

If denotes the bin number of the largest spectral sample at the peak, then is the interpolated peak location in bins. The final interpolated frequency estimate is then Hz, where denotes the sampling rate and is the FFT size. Using the interpolated peak location, the peak magnitude estimate is

(6.31) |

#### Phase Interpolation at a Peak

Note that only the spectral*magnitude*is used to find in the parabolic interpolation scheme of the previous section. In some applications, a

*phase*interpolation is also desired. In principle, phase interpolation is

*independent*of magnitude interpolation, and any interpolation method can be used. There is usually no reason to expect a ``phase peak'' at a magnitude peak, so simple linear interpolation may be used to interpolate the

*unwrapped*phase samples (given a sufficiently large zero-padding factor). Matlab has an

`unwrap`function for unwrapping phase, and §F.4 provides an Octave-compatible version. If we do expect a phase peak (such as when identifying

*chirps*, as discussed in §10.6), then we may use quadratic interpolation separately on the (unwrapped) phase. Alternatively, the real and imaginary parts can be interpolated separately to yield a complex peak value estimate.

#### Matlab for Parabolic Peak Interpolation

Section §F.2 lists Matlab/Octave code for finding quadratically interpolated peaks in the magnitude spectrum as discussed above. At the heart is the`qint`function, which contains the following:

function [p,y,a] = qint(ym1,y0,yp1) %QINT - quadratic interpolation of three adjacent samples % % [p,y,a] = qint(ym1,y0,yp1) % % returns the extremum location p, height y, and half-curvature a % of a parabolic fit through three points. % Parabola is given by y(x) = a*(x-p)^2+b, % where y(-1)=ym1, y(0)=y0, y(1)=yp1. p = (yp1 - ym1)/(2*(2*y0 - yp1 - ym1)); y = y0 - 0.25*(ym1-yp1)*p; a = 0.5*(ym1 - 2*y0 + yp1);

**Next Section:**

Bias of Parabolic Peak Interpolation

**Previous Section:**

Summary