Sliding DFT
In digital signal processing, the sliding discrete Fourier transform (sliding DFT or SDFT) is a recursive algorithm for computing a sequence of discrete Fourier transforms on overlapping data windows. Successive windows differ by only one sample, so the transform for the new window can be obtained by updating the transform of the previous window rather than recomputing it from scratch.[1]
The sliding DFT is useful in applications that require a new spectral estimate for every input sample, especially when only a subset of DFT frequency bins are needed. In these cases, the sliding DFT can require fewer computations than repeatedly evaluating a complete DFT or FFT.[1] The sliding DFT's recursive structure is closely related to resonator based DFT methods such as the Goertzel algorithm.[1]
Definition
[edit]Assuming that the hop size between two consecutive DFTs is one sample, then[2]
From this definition above, the DFT can be computed recursively thereafter. For each frequency bin calculated, the recurrence updates the previous DFT value when a new input sample arrives, rather than needing to recompute the transform over the entire data frame. This makes the sliding DFT useful for applications requiring a new spectral estimate for every input sample, particularly when only a subset of the DFT bins is required.[1] In such applications it can require fewer computations than repeatedly applying a FFT, for instance.[1]
Implementation and computational cost
[edit]A single DFT bin of the sliding DFT can be implemented as a comb filter followed by a complex resonator. When calculating multiple frequency bins, the same comb filter can be shared among the resonators for each individual bin.[1] Each new input sample requires one complex multiplication and two real additions.[1]
If all frequency bins are calculated for every new input sample, each successive -point spectrum has computational complexity , compared with for direct evaluation of the DFT and for an FFT.[1] This advantage depends on how frequently a new spectrum is required: if a complete spectrum is required only once every samples, repeatedly updating the sliding DFT eliminates much of its computational advantage. The method is therefore particularly useful when spectra must be produced at closely spaced sample positions or when only selected frequency bins are required.[1]
Because of its recursive nature, finite precision arithmetic can cause numerical errors to accumulate. In the conventional formulation, the complex coefficient in the feedback path corresponds to a pole on the unit circle, so rounding errors in its representation can lead to inaccurate results or instability.[3] Modified forms of the algorithm, such as the modulated sliding DFT, avoid this problem by removing the complex factor from the recursive feedback loop.[3]
However, implementing the window function on a sliding DFT is difficult due to its recursive nature, therefore it is done exclusively in a frequency domain.[4]
One approach to frequency domain windowing is to derive a kernel from the desired time domain window, and to apply that kernel to the output of the SDFT. Since the kernel depends on the window and not on the input signal, this means it can be computed in advance[5]
For some commonly used windows, the resulting frequency domain kernel is sparse. For instance, the Hann and Blackman window kernels are sparse, allowing the windowing operation to be implemented using a short convolution across neighboring DFT bins.[5] Kernels for other windows, such as triangular, Gaussian, and Kaiser windows, contain more nonzero coefficients but can be approximated by discarding small values. This allows windowing to be applied while retaining the sample by sample recurrence of the SDFT.[5]
Sliding windowed infinite Fourier transform
[edit]The sliding windowed infinite Fourier transform (SWIFT) is an infinite impulse response alternative to the finite-window sliding DFT that uses an exponentially decaying window. A related variant, αSWIFT, combines two SWIFT transforms having different exponential decay rates, producing an effective window proportional to
This permits a non-rectangular, asymmetric weighting of past samples while retaining recursive sample-by-sample updates.[6]
References
[edit]- 1 2 3 4 5 6 7 8 9 Jacobsen, Eric; Lyons, Richard (2003). "The sliding DFT". IEEE Signal Processing Magazine. 20 (2): 74–80. doi:10.1109/MSP.2003.1184347.
- ↑ Lazzarini, Victor (2021). Spectral Music Design. Oxford Univ. Press.
- 1 2 Duda, Krzysztof (2010). "Accurate, Guaranteed Stable, Sliding Discrete Fourier Transform". IEEE Signal Processing Magazine. 27 (6): 124–127. doi:10.1109/MSP.2010.938088.
- ↑ Rafii, Zafar (14 November 2018). "Sliding Discrete Fourier Transform with Kernel Windowing". IEEE Signal Processing Magazine. 35 (6): 88. Bibcode:2018ISPM...35f..88R. doi:10.1109/MSP.2018.2855727.
- 1 2 3 Rafii, Zafar (14 November 2018). "Sliding Discrete Fourier Transform with Kernel Windowing". IEEE Signal Processing Magazine. 35 (6): 88–92. Bibcode:2018ISPM...35f..88R. doi:10.1109/MSP.2018.2855727.
- ↑ Grado, Logan L.; Johnson, Matthew D.; Netoff, Theoden I. (September 2017). "Tips & Tricks: The Sliding Windowed Infinite Fourier Transform". IEEE Signal Processing Magazine. Vol. 34, no. 5. Institute of Electrical and Electronics Engineers. pp. 183–188. doi:10.1109/msp.2017.2718039.