SS Notes
Understanding spectrum analysis — frequency content visualization, spectral representations, DFT-based analysis, and practical measurement techniques.
Introduction
Spectrum analysis is the process of examining a signal\'s frequency content — determining what frequencies are present, their amplitudes, and their phases. While a time-domain waveform shows how a signal varies moment by moment, the frequency spectrum reveals the underlying periodic components that compose the signal. This dual perspective is fundamental to signal processing: some phenomena are best understood in time (transient events, pulse timing) while others are best understood in frequency (harmonic distortion, bandwidth utilization, resonance).
Every audio equalizer display, every radio scanner, and every vibration analyzer performs spectrum analysis. The development of the Fast Fourier Transform (FFT) algorithm in 1965 made real-time spectrum analysis computationally practical, revolutionizing fields from telecommunications to medical imaging.
Types of Spectra
Magnitude Spectrum
The magnitude spectrum $|X(j\omega)|$ shows the amplitude of each frequency component: $$|X(j\omega)| = \sqrt{\text{Re}\{X(j\omega)\}^2 + \text{Im}\{X(j\omega)\}^2}$$
This tells you HOW MUCH of each frequency is present in the signal.
Phase Spectrum
The phase spectrum $\angle X(j\omega)$ shows the phase angle of each component: $$\angle X(j\omega) = \arctan\left(\frac{\text{Im}\{X(j\omega)\}}{\text{Re}\{X(j\omega)\}}\right)$$
This tells you the temporal alignment (timing) of each frequency component.
Power Spectrum
The power spectrum $|X(j\omega)|^2$ shows the power distribution across frequencies. For random signals, the power spectral density (PSD) $S_{xx}(\omega)$ characterizes the average power per unit frequency.
One-Sided vs Two-Sided Spectra
For real signals, $|X(j\omega)|$ is symmetric about $\omega = 0$. The one-sided spectrum (showing only positive frequencies with doubled amplitudes) is often used in engineering for clarity.
DFT-Based Spectrum Analysis
In practice, spectrum analysis of sampled signals uses the Discrete Fourier Transform: $$X[k] = \sum_{n=0}^{N-1} x[n] e^{-j2\pi kn/N}, \quad k = 0, 1, \ldots, N-1$$
The frequency resolution is: $\Delta f = f_s / N$
Key relationships:
- Frequency bin $k$ corresponds to frequency $f_k = k \cdot f_s / N$
- Maximum analyzable frequency: $f_s/2$ (Nyquist)
- Frequency resolution improves with longer observation time $T = N/f_s$
The Resolution-Observation Time Tradeoff
$$\Delta f = \frac{1}{T} = \frac{f_s}{N}$$
To resolve two closely-spaced frequency components separated by $\Delta f$, you need at least $T = 1/\Delta f$ seconds of data. This is a fundamental limit — you cannot simultaneously have perfect time resolution and perfect frequency resolution (uncertainty principle).
Windowing in Spectral Analysis
Truncating a signal to finite length is equivalent to multiplying by a rectangular window, which causes spectral leakage (sinc-shaped side lobes). Using shaped windows reduces leakage at the cost of reduced frequency resolution:
| Window | Main Lobe Width | Side Lobe Level | Use Case |
|---|---|---|---|
| Rectangular | Narrowest (best resolution) | -13 dB (worst) | When resolution is critical |
| Hamming | 1.5× wider | -43 dB | General purpose |
| Hanning | 1.5× wider | -32 dB | General purpose |
| Blackman | 2× wider | -58 dB | When leakage must be minimized |
| Kaiser | Adjustable | Adjustable | Flexible tradeoff |
Spectrogram (Time-Frequency Analysis)
The spectrogram shows how the spectrum evolves over time by computing the DFT of successive windowed segments (Short-Time Fourier Transform):
$$\text{STFT}(t, \omega) = \int x(\tau) w(\tau - t) e^{-j\omega\tau} d\tau$$
The spectrogram $|\text{STFT}|^2$ displays time on the x-axis, frequency on the y-axis, and intensity as color/brightness. It is indispensable for analyzing non-stationary signals like speech, music, and biomedical signals.
Practical Measurement Considerations
Aliasing prevention: Always use an anti-aliasing filter before digitizing for spectrum analysis.
Averaging: For noisy signals, average multiple spectral estimates to reduce variance (Welch\'s method).
Zero-padding: Appending zeros before the FFT interpolates the spectrum (smoother appearance) but does NOT improve actual frequency resolution.
Overlap: When computing spectrograms, overlapping successive windows (50-75%) provides smoother time evolution.
Applications
- Audio analysis: Identifying harmonic content, detecting distortion, measuring frequency response
- Vibration monitoring: Detecting machine faults from characteristic frequency signatures
- Communications: Measuring channel bandwidth, identifying interference sources
- Medical imaging: MRI uses frequency-domain data directly to construct images
- Radar: Identifying target velocities from Doppler frequency shifts
Key Takeaways
- Spectrum analysis reveals the frequency content (magnitude and phase) of signals
- DFT/FFT converts time-domain samples to frequency-domain representation
- Frequency resolution = $f_s/N$ = $1/T$ — limited by observation time
- Windowing trades frequency resolution for reduced spectral leakage
- Spectrograms show time-varying frequency content (time-frequency analysis)
- Zero-padding smooths the spectrum but does not improve true resolution
Exam Focus
Revise definitions, diagrams, examples, and short-answer points for Spectrum Analysis.
Interview Use
Prepare one clear explanation, one practical example, and one common mistake for this Signals & Systems topic.
Search Terms
signal-systems, signals & systems, signal, systems, frequency, analysis, spectrum, spectrum analysis
Related Signals & Systems Topics