Note: This page has been translated by MathWorks. Click here to see

To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

High-resolution FFT of a portion of a spectrum

The `dsp.ZoomFFT`

System
object™ computes the fast Fourier Transform (FFT) of a signal over a portion of
frequencies in the Nyquist interval. By setting an appropriate decimation factor
*D*, and sampling rate *Fs*, you can choose the bandwidth
of frequencies to analyze *BW*, where *BW* =
*Fs*/*D*. You can also select a specific range of
frequencies to analyze in the Nyquist interval by choosing the center frequency of the desired
band.

The resolution of a signal is the ratio of *Fs* and the FFT length
(*L*). Using zoom FFT, you can retain the same resolution you would achieve
with a full-size FFT on your original signal by computing a small FFT on a shorter signal. The
shorter signal comes from decimating the original signal. The savings come from being able to
compute a much shorter FFT while achieving the same resolution. For a decimation factor of
*D*, the new sampling rate, *Fsd*, is
*Fs*/*D*, and the new frame size (and FFT length) is
*Ld* = *L*/*D*. The resolution of the
decimated signal is *Fsd*/*Ld* =
*Fs*/*L*. To achieve a higher resolution of the shorter
band, use the original FFT length, *L*, instead of the decimated FFT length,
*Ld*.

To compute the FFT of a portion of the spectrum:

Create the

`dsp.ZoomFFT`

object and set its properties.Call the object with arguments, as if it were a function.

To learn more about how System objects work, see What Are System Objects? (MATLAB).

`zfft = dsp.ZoomFFT`

`zfft = dsp.ZoomFFT(d)`

`zfft = dsp.ZoomFFT(d,Fc)`

`zfft = dsp.ZoomFFT(d,Fc,Fs)`

`zfft = dsp.ZoomFFT(Name,Value)`

creates a zoom FFT
System
object, `zfft`

= dsp.ZoomFFT`zfft`

, that performs an FFT on a portion of the input
signal's frequency range. The object determines the frequency range over which to perform
the FFT using the specified center frequency and decimation factor values.

creates a zoom FFT
object with the DecimationFactor property set to
`zfft`

= dsp.ZoomFFT(d)`d`

.

creates a zoom FFT
object with the DecimationFactor property set to
`zfft`

= dsp.ZoomFFT(d,Fc)`d`

, and the CenterFrequency property set to
`Fc`

.

creates a zoom
FFT object with the DecimationFactor property set to
`zfft`

= dsp.ZoomFFT(d,Fc,Fs)`d`

, the CenterFrequency property set to
`Fc`

, and the SampleRate property set to
`Fs`

.

creates a zoom FFT object with each specified property set to the specified value. Enclose
each property name in single quotes. You can use this syntax with any previous input
argument combinations.`zfft`

= dsp.ZoomFFT(`Name,Value`

)

```
zfft =
dsp.ZoomFFT(2,2e3,48e3,'FFTLength',64);
```

`zfftOut = zfft(input)`

To use an object function, specify the
System
object as the first input argument. For
example, to release system resources of a System
object named `obj`

, use
this syntax:

release(obj)

The zoom FFT algorithm leverages bandpass filtering before computing the FFT of the signal.
The concept of bandpass filtering is that suppose you are interested in the
band [*F1*, *F2*] of the original input
signal, sampled at the rate *Fs* Hz. If you pass this
signal through a complex (one-sided) bandpass filter centered at
*Fc* =
(*F1*+*F2*)/2, with the
bandwidth *BW* = *F2* –
*F1*, and then downsample the signal by a
factor of *D* =
floor(*Fs*/*BW*), the desired
band comes down to the baseband.

If *Fc* cannot be expressed in the form of
*k*×*Fs*/*D*, where
*k* is an integer, then the shifted, decimated spectrum is not centered
at DC. In this case, the center frequency gets translated to *Fd*.

$${F}_{d}={F}_{c}-({F}_{s}/D)\times floor((D\times {F}_{c}+{F}_{s}/2)/{F}_{s})$$

The complex bandpass filter is obtained by first designing a lowpass filter prototype and then multiplying the lowpass coefficients with a complex exponential. This algorithm uses a multirate, multistage FIR filter as the lowpass filter prototype. To obtain the bandpass filter, the coefficients of each stage are frequency shifted. The decimation factor is the cumulative decimation factor of each stage. The complex bandpass filter followed by the decimator are implemented using an efficient polyphase structure. For more details on the design of the complex bandpass filter from the multirate multistage FIR filter prototype, see Zoom FFT and Complex Bandpass Filter Design.

[1] Harris, F.J. *Multirate Signal Processing for Communication
Systems*. Prentice Hall, 2004, pp. 208–209.