---
title: "FFT Spectrum Analyzer Interactive Lab | Sandbox Physics"
description: "Is a small spectral peak a real signal or leakage from a strong neighbour? A finite record spreads a tone into a main peak and sidelobes."
canonical_url: "https://sandboxphysics.com/labs/spectrum-analyzer/"
language: "en"
page_type: "lab"
alternate_languages:
  zh-CN: "https://sandboxphysics.com/zh/labs/spectrum-analyzer/"
last_modified: "2026-10-29"
---

IN14 · A small peak beside a strong tone

# FFT Spectrum Analyzer

**Is a small spectral peak a real signal or leakage from a strong neighbour?** A finite record spreads a tone into a main peak and sidelobes. Tapering its ends reduces distant leakage but widens the main peak. Compare windows and longer observations on saved samples: a weak neighbour may emerge, yet tones inside one unresolved lobe cannot be separated just by adding more plotted points.

Combine two signals and noise, capture ADC codes, then change the time gate and window on the same saved samples. Compare amplitude, spectral density and selected-band power.

> Interactive simulation: open this page in a web browser to change the parameters and run the model.

Model assumptions

This FFT instrument samples a flat voltage channel with gain, offset, a finite ADC range and a clock error. Independent known DC levels calibrate voltage; an ideal thirty-two-second reference and whole-tick counter calibrate the clock. The source and input are voltage signals with prescribed loading; no RF power in watts is inferred. No anti-alias filter is modeled, so samples alone cannot distinguish an alias. Rectangular or periodic Hann windows, zero padding and overlapped power averaging act only on saved ADC data. Line amplitudes use coherent gain and are accurate for isolated bin-centred sinusoids; PSD uses squared-window normalization. Band integration includes signal, leakage and noise; unresolved tones are not separated. The two-dimensional front projection shows physical ports and knobs; cable markers show slowed signal activity, not charge drift or actual clock speed. Spectra and time traces are outside the apparatus.

### The saved voltage record

ADC record 1 · calibrated simulated voltage

$t/\mathrm{s},\qquad x/\mathrm{V}$

The overview preserves each pixel column’s sample minimum and maximum. Drag the gate’s centre to move it or its right handle to change the number of real samples.

### A spectrum from those samples

Saved processing 1 · periodic Hann · single-sided PSD

$f/\mathrm{Hz},\qquad S_V/(\mathrm{V}^2\,\mathrm{Hz}^{-1})$

Calibration and selected ADC samples are valid.

Teal: processed ADC samples. Shading: the saved integration band. Its area includes signal, leakage and noise; overlapping tones are kept together.

Window, normalization, calibration and limits

$n,\qquad w_n$

$\sum_n w_n=512,\quad \sum_nw_n^2=384$

$\Delta f=2.00\,\mathrm{Hz},\quad B_{\mathrm{ENBW}}=3.00\,\mathrm{Hz}$

$\sum_kS_k\Delta f=0.160\,\mathrm{V}^2$

| $n$ | $c_n$ | $t_n/\mathrm{s}$ | $x_n/\mathrm{V}$ |
| --- | --- | --- | --- |

The ADC uses a flat gain and offset before 12- or 16-bit conversion, with inclusive end codes. Separate known minus 0.1, zero and plus 0.1 volt levels fit volts per code and offset. A whole-tick count over an ideal thirty-two-second reference estimates sample rate; its finite count resolution is retained. Calibration does not use the unknown input’s tone frequencies or amplitudes.

Periodic Hann and rectangular windows use their actual finite sums. PSD integrates to window-squared-weighted mean square, which can differ between windows on nonstationary data. Coherent line RMS applies to an isolated bin-centred sinusoid. DC and Nyquist are not doubled. Zero padding leaves that window’s energy and ENBW fixed. Overlapped power averages share samples, so no independent-frame uncertainty is claimed.

At DC and Nyquist, amplitude describes the sampled sequence. An arbitrary continuous sinusoid’s RMS or peak cannot be recovered at Nyquist without its phase.

This is an FFT analyzer, not a swept superheterodyne model. Its declared RBW is window ENBW; first-null main-lobe width and plotted grid spacing are reported separately. The sampler has no anti-alias filter: known out-of-band source settings are a teaching reference, and cannot be inferred uniquely from ADC samples. Voltage loading is prescribed; no watts or dBm are inferred.

- [Tektronix · FFT Applications for TDS Oscilloscopes · pp. 15–23](https://download.tek.com/document/55W_8815_2.pdf)
- [NI · LabVIEW Analysis Concepts 370192C-01 · pp. 4-22–4-29, 5-23–5-24](https://download.ni.com/support/manuals/370192c.pdf)
- [Keysight 89600 VSA · Resolution Bandwidth · 2026 Update 2.0](https://helpfiles.keysight.com/csg/89600B/Webhelp/Subsystems/gui/content/rbw_about_rbw.htm)

Physics tutorial

## A finite recording changes a spectral peak

**Background** The digitizer stores voltages at equally spaced clock ticks. An FFT represents a finite section by a set of repeating oscillations; the cut and its window affect every peak.

**Why it matters** A small peak can be another signal or a sidelobe of a strong one. A narrower plotted grid alone cannot decide between them.

Start with the essentials

- **Focus question**: What changes when the same ADC samples are given a different window?
- **One-sentence intuition**: The window trades sidelobe suppression for a wider main lobe; normalization must match the quantity being measured.

### Core mathematical model

#### Window the saved voltages

$$
F_k=\sum_{n=0}^{N-1}w_n x_n e^{-2\pi i kn/N_{\!F}}
$$

Calibrated instantaneous voltages are multiplied by the stored weights. Extra zero samples change the Fourier grid without extending the observation.

#### Density and line amplitude use different sums

$$
S_k=\frac{D_k|F_k|^2}{f_s\sum_n w_n^2},\qquad A_{k,\mathrm{RMS}}=\frac{\sqrt{D_k}|F_k|}{\sum_n w_n}
$$

The one-sided factor is two at positive interior bins and one at DC and Nyquist. Density is in squared volts per hertz. The RMS line amplitude applies to an isolated bin-centred sinusoid; it is not total power in a bin.

#### Noise bandwidth differs from grid spacing

$$
B_{\mathrm{ENBW}}=f_s\frac{\sum_n w_n^2}{(\sum_n w_n)^2},\qquad \Delta f_{\mathrm{grid}}=\frac{f_s}{N_F}
$$

The periodic Hann window has a noise bandwidth of one and a half unpadded bins. Zero padding reduces plotted spacing but leaves the window’s noise bandwidth unchanged. This FFT instrument uses ENBW as its declared RBW; a swept superheterodyne analyzer commonly uses an IF filter’s three-decibel width.

#### Integrate density once

$$
\sum_k S_k\Delta f_{\mathrm{grid}}=\frac{\sum_n w_n^2 x_n^2}{\sum_n w_n^2}
$$

This is the window-weighted mean square, averaged across the chosen segments. It already includes density normalization; do not divide by noise bandwidth again. A selected band also includes leakage and noise.

### Common difficulties

#### A band area is not a hidden tone label

**Typical misconception** Integrating near a small peak reveals exactly the power of the second source.

**Better mental model** That band includes all signal, leakage and noise within its saved bins. When lobes overlap, this instrument reports their combined contribution.

### Run the experiment

1. 01

   #### Keep the samples and change the window

   Use Reveal a weak neighbour, then switch between Hann and rectangular windows.

   **What to observe:** The distant sidelobes fall with Hann, but the main peak grows wider. Both views use the same ADC record.

2. 02

   #### Lengthen the real observation

   Drag the analyzer time-gate knob or the right edge of the gate below the apparatus.

   **What to observe:** More actual samples narrow both the bin interval and the window response. Increasing only zero padding changes the plotted grid.

3. 03

   #### Save a processing choice

   Save the processing result, then change the window or average count and export both.

   **What to observe:** The raw codes and earlier processing settings stay fixed. Overlapped segments share samples and are not independent repetitions.

Physical conclusion

Keep the raw samples, observation time and window when reporting a spectrum or selected-band integral.

## Related experiments and articles

How physics instruments measure · Reading path

### How physics instruments measure

Articles on this path that use this experiment, followed by the other experiments they suggest.

1. [Article **Where a small peak in a spectrum can come from**](https://sandboxphysics.com/stories/instruments/spectrum-analyzer/)

Fields & matter · Starter path

## From a field to an electron microscope

Map an electric field and steer a charged particle. Then find the electron's wavelength and use electron beams to see a crystal and a surface.

[Start here → **Make an Electric Field Visible** Move the probe around a dipole and check that the field always points downhill on the potential landscape. Observe · 8 min](https://sandboxphysics.com/labs/electric-field/)

1. [1 Make an Electric Field Visible](https://sandboxphysics.com/labs/electric-field/)
2. [2 A Charge Bending through Fields](https://sandboxphysics.com/labs/charged-particle/)
3. [3 Electron Wavelength & Voltage](https://sandboxphysics.com/labs/electron-wavelength/)
4. [4 Electron Diffraction & Reciprocal Space](https://sandboxphysics.com/labs/electron-diffraction/)
5. [5 TEM Bright Field, Dark Field & SAED](https://sandboxphysics.com/labs/tem-mode-selector/)
6. [6 SEM Secondary-Electron Topography](https://sandboxphysics.com/labs/sem-topography/)

[View the full path →](https://sandboxphysics.com/topics/fields-and-matter/#starter-path)
