Imagine you have a sound wave that is a mix of two pure tones: one at 5 Hz and another at 20 Hz. What does the Fourier Transform of this signal show?
Think about how Fourier Transform breaks down signals into their basic frequency parts.
The Fourier Transform decomposes a signal into its frequency components. Since the signal is a mix of two pure tones, the transform shows spikes at those exact frequencies.
What is the output magnitude array of the Fourier Transform for a pure sine wave of frequency 1 Hz sampled at 10 Hz for 10 samples?
import numpy as np fs = 10 # sampling frequency f = 1 # sine wave frequency N = 10 # number of samples t = np.arange(N) / fs signal = np.sin(2 * np.pi * f * t) ft = np.fft.fft(signal) magnitude = np.abs(ft) print(magnitude)
Recall that the FFT output is symmetric and the magnitude peaks at the frequency bins corresponding to the sine wave frequency.
The FFT magnitude shows peaks at indices corresponding to the sine wave frequency and its symmetric counterpart. For 1 Hz with 10 samples at 10 Hz sampling, peaks appear at indices 1 and 9 (which is 10-1).
You have a signal composed of a 10 Hz sine wave plus random noise. After applying the Fourier Transform, what would you expect the frequency spectrum to look like?
Think about how noise affects the frequency spectrum and how a sine wave appears in it.
The sine wave produces a clear spike at its frequency (10 Hz). Noise adds random components across frequencies, creating a noisy background but not hiding the main spike.
Given a plot of a Fourier Transform magnitude showing two peaks at 4 Hz and 15 Hz, what can you infer about the original time signal?
Remember that peaks in the Fourier Transform correspond to frequencies present in the signal.
Peaks in the Fourier Transform magnitude indicate the presence of those frequencies in the original signal. Two peaks mean two main frequency components.
Consider this code snippet that tries to find the frequency corresponding to the maximum magnitude in an FFT result. What is the error?
import numpy as np fs = 100 N = 1000 t = np.arange(N) / fs signal = np.sin(2 * np.pi * 5 * t) ft = np.fft.fft(signal) magnitude = np.abs(ft) max_index = np.argmax(magnitude) freq = max_index * fs / N print(freq)
Think about how FFT output is symmetric and how frequency bins correspond to positive and negative frequencies.
The FFT output is symmetric. The maximum magnitude might appear at a mirrored index representing a negative frequency. Without shifting or limiting to positive frequencies, the frequency calculation can be incorrect.
