Member-only story

Aqeel Ahmed
4 min readMar 5, 2024

--

Windowing Methods in FFT Signals | Python Example Codes

Welcome Back Everyone…!

In the last tutorial, we talked about the fundamentals of Fourier Transform. Today we will be focusing on the importance of Windowing in FFT signals.

When employing FFT to analyze the frequency components of a signal, it operates under the assumption that the input is a segment of a periodic signal, behaving as if the provided signal section extends infinitely by connecting the last sample to the first. This behavior is rooted in the principles of the Fourier Transform. Therefore, it is advisable to minimize abrupt transitions between the initial and final samples, as sudden changes in the time domain can manifest as a multitude of frequencies, even though the last sample does not physically link back to the first.

To put it simply: if we are doing an FFT of 100 samples, using np.fft.fft(x), we want x[0] and x[99] to be equal or close in value.

To compensate for the cyclic nature of the signal, we employ a technique known as “windowing.” Before applying the FFT, the signal slice undergoes multiplication by a window function, which is essentially any function gradually tapering to zero at both ends. This procedure guarantees that the signal slice commences and concludes at zero, promoting a seamless connection. Popular window functions include Hamming, Hanning, Blackman, and Kaiser. When no windowing is employed, it is referred to as using a “rectangular” window, akin to multiplying by an array of ones.

--

--

Aqeel Ahmed
Aqeel Ahmed

Written by Aqeel Ahmed

PhD (DL & IoT Security). My expertise include Signal Processing, ML, DL, and Cybersecurity. Follow me for easy to understand tutorials in these areas

Responses (2)