Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.
Math 157: Intro to Mathematical Software
UC San Diego, Winter 2018
Fast Fourier Transforms
By: Anastasia Guanio
"4 E YAY"
Goals:
Understand the definition of Fast Fourier Transforms (FFT) (#Students will be able to have a foundation of the topic)
Know practical applications of FFT (#Students will understand why we are learning this/why it is useful)
Be able to apply knowledge of FFT to examples
Collaborators: Nancy Juarez
Sources:
https://betterexplained.com/articles/an-interactive-guide-to-the-fourier-transform/
http://www.cs.cmu.edu/afs/andrew/scs/cs/15-463/2001/pub/www/notes/fourier/fourier.pdf
https://www.mathworks.com/help/matlab/ref/fft.html?requestedDomain=true (Examples)
http://www.askamathematician.com/2012/09/q-what-is-a-fourier-transform-what-is-it-used-for/
https://www.researchgate.net/post/what_are_the_features_of_FFT
Fast Fourier Transform (FTT)
What is FFT?
An algorithm that samples a signal over a period of time (or space) and divides it into its frequency components
Many different FFT algorithms based on a wide range of published theories like simple complex-number arithmetic, group theory, and number theory
FFT is a way to compute the same result more quickly (as opposed to Discrete Fourier Transformation (DFT))
Simply explaining FFT using a metaphor
What does the Fourier Transform do? Given a smoothie, it finds the recipe.
How? Run the smoothie through filters to extract each ingredient.
Why? Recipes are easier to analyze, compare, and modify than the smoothie itself.
How do we get the smoothie back? Blend the ingredients.
Why FFT?
Almost every imaginable signal can be broken down into a combination of simple waves. This fact is the central philosophy behind Fourier transforms
Fourier transforms (FT) take a signal and express it in terms of the frequencies of the waves that make up that signal
Sound is probably the easiest thing to think about when talking about Fourier transforms
Real Life Applications
Sound wave analysis
Image data analysis
Digital image processing
Computer-assisted image processing
Edge detection
Example with Sound Waves
Example with Discrete Cosine Transform
The DCT exhibits the “energy compaction property”, meaning that for many signals only the first few DCT coefficients have significant magnitude. Zeroing out the other coefficients leads to a small reconstruction error, a fact which is exploited in lossy signal compression (e.g. JPEG compression).
The example below shows a signal x and two reconstructions ( and )from the signal’s DCT coefficients. The signal is reconstructed from the first 20 DCT coefficients, is reconstructed from the first 15 DCT coefficients. It can be seen that the relative error of using 20 coefficients is still very small (~0.1%), but provides a five-fold compression rate.
This Worksheet: Exercises
Create plot of sound waves that represent a dolphin squeak
Perform a Fast Fourier Transform (FFT) on a sound file.
Through this problem set, use the Python 3 (Ubuntu Linux) kernel except as specified.
Exercise 1
Perform a Fast Fourier Transform (FFT) on a sound file.
For this example, use the sound files already found in this assignment's folder (titled 'whistle.wav and dolphin.wav').
To experiment with different sound wav files, find more here. (Note: wav files over 24KB are too large to analyze)
Solution:
Exercise 2
Perform a Fast Fourier Transform (FFT) on a sound file.
For this example, use the sound files already found in this assignment's folder (titled 'whistle.wav and dolphin.wav').
To experiment with different sound wav files, find more here. (Note: wav files over 24KB are too large to analyze)
For more information, check out these links:
https://betterexplained.com/articles/an-interactive-guide-to-the-fourier-transform/
http://www.cs.cmu.edu/afs/andrew/scs/cs/15-463/2001/pub/www/notes/fourier/fourier.pdf
http://www.askamathematician.com/2012/09/q-what-is-a-fourier-transform-what-is-it-used-for/
https://www.researchgate.net/post/what_are_the_features_of_FFT
For more examples: