Fourier Transform Lab — Student Edition Workbook: Labs, Examples, and Reports
Introduction
This workbook is a compact, hands-on guide designed for undergraduate and early graduate students to learn the fundamentals and applications of the Fourier transform in a laboratory setting. It balances conceptual explanations, practical experiments, worked examples, and report templates so students can move from theory to practice quickly and confidently.
Learning objectives
- Understand time- and frequency-domain representations of signals.
- Apply continuous and discrete Fourier transforms (FT, DFT, FFT) to real signals.
- Design and run lab experiments that demonstrate spectral analysis, filtering, and aliasing.
- Interpret spectra, estimate signal parameters (frequency, amplitude, phase), and report results clearly.
Required tools and software
- Signals: function generator or recorded wave files (sinusoids, square, sawtooth, chirps).
- Acquisition: oscilloscope or data acquisition (DAQ) device with sampling control.
- Software: Python (NumPy, SciPy, Matplotlib) or MATLAB with FFT functions.
- Optional: audio interface and microphones for acoustic experiments.
Lab 1 — Sinusoids and the Continuous Fourier Transform
Objective: Verify that pure sinusoids produce delta-like frequency components.
Procedure:
- Generate a 1 kHz sine wave, sample at 48 kHz, record 0.1 s.
- Compute the DFT using FFT and plot magnitude spectrum (linear and dB).
- Window the time record (rectangular vs. Hanning) and compare spectral leakage.
Worked example: show code to generate, window, compute FFT, and annotate peaks (include sample output plots).
Expected observations: sharp spectral peaks at ±1 kHz; reduced sidelobes with Hanning window.
Lab 2 — Periodic Waveforms and Harmonic Content
Objective: Analyze harmonic structure of square and sawtooth waves.
Procedure:
- Generate square and sawtooth waves at 500 Hz.
- Use sufficiently long record to resolve harmonics; compute and plot spectrum.
- Measure harmonic amplitudes and compare to theoretical 1/n (square) or 1/n (sawtooth with sign).
Analysis tips: use log-frequency plots to visualize many harmonics; fit amplitudes to expected decay.
Lab 3 — Sampling, Aliasing, and Anti-Aliasing Filters
Objective: Demonstrate sampling effects and necessity of anti-aliasing.
Procedure:
- Create a signal containing components at 3 kHz and 20 kHz.
- Sample at 8 kHz and observe aliased 20 kHz component folding into baseband.
- Repeat with an analog low-pass filter before sampling and show alias suppression.
Report checklist: compute aliased frequencies by folding formula; show before/after spectra.
Lab 4 — Windowing, Resolution, and Zero-Padding
Objective: Trade-offs between spectral resolution and leakage.
Procedure:
- Create two close sinusoids at 1000 Hz and 1020 Hz.
- Vary record length and window type; compute FFT with and without zero-padding.
- Determine minimum record length required to resolve both tones.
Key result: resolution ≈ 1/Tobs; zero-padding interpolates the spectrum but does not increase true resolution.
Lab 5 — Short-Time Fourier Transform (STFT) and Spectrograms
Objective: Analyze nonstationary signals.
Procedure:
- Generate a chirp from 200 Hz to 4 kHz over 1 s.
- Compute spectrograms with different window sizes and overlaps.
- Discuss time–frequency trade-off and choose parameters for best readability.
Practical note: prefer logarithmic frequency axis for audio-range signals.
Example reports and grading rubric
Include a sample lab report structure:
- Title, date, partners
- Objective (one paragraph)
- Equipment and settings (table)
- Procedure (numbered steps)
- Results (figures with captions)
- Analysis (computations, error estimates)
- Conclusion (1–3 bullets)
Grading rubric (total 100 points): Data & plots 40; Analysis & interpretation 30; Report clarity 20; Reproducibility (code attached) 10.
Common pitfalls and troubleshooting
- Insufficient sampling rate or record length.
- Not using windowing, causing misleading leakage.
- Forgetting to remove DC offset before spectral analysis.
- Misinterpreting dB plots—remember reference level.
Further projects and extensions
- Real-world signals: speech formant analysis, musical instrument spectra.
- Filter design and implementation (FIR/IIR) and their spectral effects.
- Cross-spectral density and coherence between channels.
Appendix: Sample Python snippet (FFT and plotting)
python
import numpy as np import matplotlib.pyplot as plt fs = 48000 t = np.arange(0, 0.1, 1/fs) x = np.sin(2np.pi1000t) w = np.hanning(len(x)) X = np.fft.rfft(xw) f = np.fft.rfftfreq(len(x), 1/fs) plt.semilogy(f, np.abs(X)) plt.xlabel(‘Frequency (Hz)’) plt.ylabel(‘Magnitude’) plt.title(‘Magnitude Spectrum’) plt.show()
Closing
This workbook gives a concise, experiment-driven path to mastering Fourier analysis in the lab, from basic sinusoids to time–frequency methods, with reproducible examples and clear report guidance.
Leave a Reply