Sinks

FFTScope Block

Frequency spectrum analyser — shows overlaid FFT magnitude of one or more signals

Open FFTScope in BlockWerk →

# FFT Scope

Description

The FFT Scope displays the frequency spectrum of one or more signals using the Fast Fourier Transform (FFT). It is a sink block — it has no output ports and does not affect simulation results.

Connect up to several signal lines to the single Signal input port. All connected signals are analysed simultaneously and displayed as overlaid, color-coded spectra.

Typical uses:

---

Display Modes

Use Display Mode to switch the Y-axis scale:

| Mode | Y-axis | Best for | | ---------------------- | --------------------------- | ------------------------------------------------------------ | | Magnitude (dB) | Logarithmic (dB) | General-purpose; highlights weak peaks alongside strong ones | | Magnitude (linear) | Linear amplitude | Comparing raw amplitude ratios | | Phase (°) | Phase angle, −180° to +180° | Inspecting the phase of each frequency component |

> Tip: In Phase mode, the tooltip still shows the dB magnitude so you can verify that a phase reading comes from a real spectral peak rather than noise.

---

Analysis Modes

| Mode | When it runs | Frequency resolution | | ----------------------------- | -------------------------------------------- | ---------------------------------- | | Window — last N samples | Live (during simulation) and post-simulation | sampleRate / fftSize Hz/bin | | Full record — all samples | Post-simulation only | sampleRate / totalSamples Hz/bin |

Use Full record when your signal contains very low frequencies. For example, if the simulation runs for 100 s at 100 Hz, Full record gives 0.01 Hz resolution compared to 0.098 Hz for a 1024-point window.

The FFT size parameter is hidden in Full record mode because it is not used.

---

Parameters

| Parameter | Default | Description | | ---------------------- | -------------------- | ------------------------------------------------------------------- | | Title | Frequency Spectrum | Label shown in the block header | | Display Mode | Magnitude (dB) | Y-axis scale: dB, linear, or phase | | Analysis Mode | Window | Whether to use a rolling window or the full simulation record | | FFT Window Size | 1024 | Samples per FFT (256 / 512 / 1024 / 2048). Only used in Window mode | | Max Frequency (Hz) | 0 | Upper frequency limit; 0 = auto (Nyquist = sampleRate / 2) |

Advanced Options

These parameters are found under the Advanced tab in the block's properties panel:

| Parameter | Default | Description | | ------------------- | ------- | ----------------------------------------------------------------------------- | | Window Function | Hann | Spectral window applied before the FFT to reduce leakage | | Peak Hold | off | When enabled, a dashed line marks the per-bin maximum seen so far | | Show Legend | on | Show a signal-color legend (only visible when multiple signals are connected) | | Show Grid | on | Draw grid lines on the plot |

---

Window Functions

The window function is multiplied with the time-domain signal before the FFT to reduce spectral leakage — the smearing of energy from a strong peak into neighboring bins.

| Window | Leakage | Main-lobe width | Choose when… | | --------------- | -------- | --------------- | --------------------------------------------------------- | | Hann | Low | Moderate | Default; good balance for most signals | | Hamming | Very low | Slightly wider | Narrow-band sinusoids | | Blackman | Minimal | Wide | Precise amplitude measurement of a single tone | | Rectangular | High | Narrowest | Transient or burst signals where leakage is not a concern |

---

Frequency Resolution

The spacing between adjacent bins (the minimum frequency difference the FFT can distinguish) is:

Δf = sampleRate / fftSize   (Window mode)
Δf = sampleRate / N         (Full record mode, where N = total recorded samples)

Example: At 1 000 Hz sample rate with a 1024-point FFT:

Δf = 1000 / 1024 ≈ 0.98 Hz/bin

To resolve two tones separated by 1 Hz you need at least 1 000 samples.

---

Toolbar

Hover over the block to reveal the toolbar (top-right corner):

| Button | Action | | ------ | -------------------------------------------------------------------------------------------------- | | ⏸ / ▶ | Freeze / Resume — hold the current spectrum while the simulation keeps running | | 🗑 | Clear — erase the spectrum and reset peak hold | | ⤢ | Full-screen analyzer — open an interactive uPlot-based window with zoom/pan and cursor readout |

---

Hover Tooltip

Move the mouse over the plot area to see a crosshair and tooltip:

Both magnitude and phase are always shown regardless of which Display Mode is active.

---

Remarks

Notes