DFT Frequency Bin Explorer
Run the DFT Frequency Bin Explorer MicroSim Fullscreen
You can include this MicroSim on your website using the following iframe:
1 2 | |
About This MicroSim
A DFT does not report a continuous spectrum. It reports N numbers, one per bin, and each bin is centered at a specific frequency:
The spacing between those centers is the bin width, \(f_s / N\), and it is also your frequency resolution. Two tones closer together than one bin width land in the same bin and cannot be separated.
That single formula contains the central engineering trade of this whole course:
- More samples (larger N) → narrower bins → finer resolution → more computation.
- Fewer samples → wider bins → coarser resolution → faster.
Nothing else changes it. You cannot get finer resolution from a shorter capture by computing harder.
Two Special Bins
- Bin 0 is the DC bin at 0 Hz. It reports the signal's average value, not an oscillation.
- Bin N/2 is the Nyquist bin, at half the sampling rate — the highest frequency the sampling rate can represent.
Bins above N/2 mirror the ones below for any real-valued input, which is why the readout reports \(N/2 + 1\) unique bins rather than N.
How to Use
- Set N to 16 and read the bin width. Verify by hand: 16,000 / 16 = 1,000 Hz.
- Click individual bins and read their center frequency and covered range.
- Double N to 32. Predict the new bin width before you look, then check.
- Push N to 512. The boxes become too narrow to label — that density is the resolution you paid for. Note the bin width now.
- Now leave N alone and halve the Sampling rate. The bin width halves too. Resolution improved — but what did you give up? (The top half of your frequency range.)
Lesson Plan
Grade Level
Undergraduate (college junior/senior)
Duration
10-12 minutes
Prerequisites
- A DFT converts N samples into N frequency values
- Division and unit reasoning with Hz
Learning Objective
Students will be able to calculate bin width, frequency resolution, and any bin's center frequency from N and the sampling rate, and demonstrate the tradeoff between resolution and bin count.
Activities
- Compute before checking (4 min): For three (N, f_s) pairs supplied by the instructor, students compute bin width by hand, then verify.
- Locate a frequency (4 min): Given a 3,000 Hz tone at N = 32 and f_s = 16,000, students determine which bin it lands in.
- Two ways to improve resolution (4 min): Students find both routes — raise N, or lower f_s — and state the cost of each.
Assessment
Ask: "You need to distinguish two tones 40 Hz apart while sampling at 16 kHz. What is the smallest N that will do it, and how many samples of capture time is that?"
Related Resources
References
- Discrete Fourier transform — the bin definition used here.
- Spectral resolution — resolution as set by observation length.