/Learn-Fourier-Transform

A good understanding of the Fourier Transform and its coding implementation using Python

Primary LanguageJupyter Notebook

Digital signal processing (DSP) is the computation of mathematical methods used to manipulate signal data [1]. One of the most important tools in digital signal processing is the Discrete Fourier Transform (DFT). It is usually used to produce a signal's frequency-domain (spectral) representation [2].

Understanding Discrete Fourier Transform (DFT) [Code] [Towards Data Science]

In this notebook, we will discuss how DFT works and how to implement it to output the spectrum of the signals. The functions we've built in this notebook are under MIT License and all credits go to the authors of this book. The figures below are the signal we want to analyze its spectrum, which is represented on the right below. Also, we discussed the Inverse Discrete Fourier Transform in the notebook.

Fourier Transform, the Practical Python Implementation [Code] [Towards Data Science]

The Fast Fourier Transform (FFT) is the practical implementation of the Fourier Transform on Digital Signals. FFT is considered one of the top 10 algorithms with the greatest impact on science and engineering in the 20th century [8]. In this notebook, a practical approach to FFT has been discussed as how to use it to represent the frequency domain (spectrum) of the signal data and plot the spectrum using Plotly to give us more interactivity and a better understanding of the features in the spectrum. By the end of this notebook, we'll build a class to analyze the signal. An ECG signal and its spectrum have been provided as a final example.

The figure below is a glimpse of what we will learn in this notebook.

The image below represents an example of using the Fourier class we built in this notebook (An ECG signal and its Frequency Spectrum). The use of the Plotly package allows you to hover over the values of the plot and zoom in/out on the interesting parts so easily.

Acknowledgment:

[1] R. Toulson, R., & Wilmshurst, T. (2012). An Introduction to Digital Signal Processing. Fast and Effective Embedded Systems Design (pp. 219–242). Elsevier. https://doi.org/10.1016/B978-0-08-097768-3.00011-8

[2] T. Giannakopoulos, T., & Pikrakis, A. (2014). Signal Transforms and Filtering Essentials. Introduction to Audio Analysis (pp. 33–57). Elsevier. https://doi.org/10.1016/B978-0-08-099388-1.00003-0

[3] Downey, A. (2016). Sounds and Signals. Think DSP: Digital signal processing in Python (pp. 1-11). (First edition). O’Reilly Media, Inc.

[4] Thakur, B., & Mehra, R. (2016). Discrete Fourier Transform Analysis with Different Window Techniques Algorithm. International Journal of Computer Applications, 975, 8887.

[5] Kong, Q., Siauw, T., & Bayen, A. (2020). Fourier Transform. Python programming and numerical methods: A guide for engineers and scientists (pp. 415-444). Academic Press.

[6] Numpy Documentation, API Reference, Discrete Fourier Transform (numpy.fft). [Accessed at 2/2/2023]

[7] Scipy Documentation, API Reference, Legacy discrete Fourier transform (scipy.fftpack). [Accessed at 2/2/2023]

[8] Dongarra, J., & Sullivan, F. (2000). Guest Editors Introduction to the top 10 algorithms. Computing in Science & Engineering, 2(01), 22-23.

[9] Cooley, J. W., & Tukey, J. W. (1965). An algorithm for the machine calculation of complex Fourier series. Mathematics of computation, 19(90), 297-301.

[10] Scipy Documentation, API Reference, Discrete Fourier Transforms (scipy.fft.fft). [Accessed on 23/2/2023]

[11] Scipy Documentation, API Reference, Discrete Fourier Transforms (scipy.fft.fftfreq). [Accessed on 23/2/2023]

[12] Scipy Documentation, API Reference, Discrete Fourier Transforms (scipy.fft.rfft). [Accessed on 23/2/2023]

[13] Scipy Documentation, API Reference, Discrete Fourier Transforms (scipy.fft.rfftfreq). [Accessed on 23/2/2023]

[14] Scipy Documentation, API Reference, Miscellaneous routines (scipy.misc.electrocardiogram). [Accessed on 23/2/2023]

Keep in touch: LinkedIn.