mmwave.dsp.ZoomFFT

class mmwave.dsp.ZoomFFT.ZoomFFT(low_freq, high_freq, fs, signal=None)

This class is an implementation of the Zoom Fast Fourier Transform (ZoomFFT).

The zoom FFT (Fast Fourier Transform) is a signal processing technique used to analyse a portion of a spectrum at high resolution. The steps to apply the zoom FFT to this region are as follows:

  1. Frequency translate to shift the frequency range of interest down to near 0 Hz (DC)
  2. Low pass filter to prevent aliasing when subsequently sampled at a lower sample rate
  3. Re-sample at a lower rate
  4. FFT the re-sampled data (Multiple blocks of data are needed to have an FFT of the same length)

The resulting spectrum will now have a much smaller resolution bandwidth, compared to an FFT of non-translated data.

compute_fft()

Computes the Fast Fourier Transform (FFT) of the signal.

Returns:A frequency-shifted, unscaled, FFT of the signal.
Return type:X (np.ndarray)
compute_zoomfft(resample_number=None)

Computes the Zoom Fast Fourier Transform (ZoomFFT) of the signal.

Parameters:resample_number (int) – The number of samples in the resampled signal.
Returns:A frequency-shifted, unscaled, ZoomFFT of the signal. bw_factor (int): Bandwidth factor fftlen (int): Length of the ZoomFFT output Ld (int): for internal use F (int): for internal use
Return type:Xd (np.ndarray)
plot_fft(d=None)

Plots the Fast Fourier Transform (FFT) of the signal.

Parameters:d (int) – Sample spacing (inverse of the sampling rate)
plot_zoomfft(resample_number=None)

Plots the Zoom Fast Fourier Transform (ZoomFFT) of the signal.

Parameters:resample_number (int) – The number of samples in the resampled signal.
set_signal(signal)

Sets given signal as a member variable of the class.

e.g. ZoomFFT.create_signal(generate_sinewave(a, b, c) + generate_sinewave(d, e, f))

Parameters:signal (np.ndarray) – Signal to perform the ZoomFFT on
sinewave(f, length, amplitude=1)

Generates a sine wave which could be used as a part of the signal.

Parameters:
  • f (int) – Frequency of the sine wave
  • length (int) – Number of data points in the sine wave
  • amplitude (int) – Amplitude of the sine wave
Returns:

Generated sine wave with the given parameters.

Return type:

x (np.ndarray)