TExcelTAD
Home › Electrical & Electronic Measurements › Triggering, Measurements and FFT Mode

Triggering, Measurements and FFT Mode

A digital scope captures billions of samples a second, but a screen shows one stretch of them. The trigger chooses which stretch, so that a repetitive waveform stands still and a rare event is caught. Once the waveform is captured, the scope measures it (amplitude, frequency, rise time) and can transform it into a spectrum (FFT mode). Each step has settings that change the answer. This lesson covers the trigger system in more depth than EE Foundations, the accuracy of automatic measurements, and how to read a scope's FFT without fooling yourself.

The trigger system

trigger level trigger point pre-trigger (from memory) holdoff: ignore crossings rearmed

An edge trigger fires when the signal crosses the level in the chosen slope. The trigger position places that instant on screen; samples before it (pre-trigger) come from the memory that was filling continuously, so a scope can show what happened before the event. After a trigger the scope is blind for a holdoff time and its own rearm (dead) time.

Setting What it does Use it when
mode Auto triggers by itself if no event arrives finding a signal, DC levels
mode Normal waits for a valid trigger, screen holds the last capture stable display of repetitive or irregular signals
mode Single one capture, then stop one-off events: power-up, a fault
coupling DC / AC trigger path sees the signal with or without its DC AC to trigger a small ripple on a large DC
HF reject, LF reject low- or high-pass filter in the trigger path only noisy edges, mains hum riding on the signal
noise reject (hysteresis) the signal must cross a band, not a line noisy slow edges that trigger twice
holdoff ignore triggers for a set time after each one complex repetitive patterns, bursts: set holdoff just longer than the burst
pulse width, runt, glitch, setup/hold, serial trigger on a qualified event hunting rare faults, protocol frames

A waveform that will not stand still usually has more than one valid trigger point per period (a burst, a pattern, a noisy edge); holdoff or a qualified trigger fixes it. "Jitter" of the whole trace around the trigger point is trigger jitter or real signal jitter; measure it with persistence and statistics.

Automatic measurements and their uncertainty

Scopes measure amplitude parameters (Vpp, Vmax, Vtop/Vbase from a histogram, RMS, mean) and time parameters (frequency, period, rise time, duty cycle, delay) on the captured record, often with statistics over many captures. They are convenient, but limited by:

  • DC vertical gain accuracy, typically ±1\pm 1 to 2 %2\,\% of full scale (illustrative; check the datasheet). On an 8-bit scope at 1 V/div1\ \text{V/div}, a 5 V5\ \text{V} reading is uncertain by roughly 0.1 V0.1\ \text{V} (±1.5 %\pm 1.5\,\% of 88 divisions), far worse than a DMM.
  • Quantisation: one code is about 1/251/25 of a division on an 8-bit scope.
  • Bandwidth: amplitude and rise time of fast signals (previous lesson).
  • Timebase accuracy: a few ppm to tens of ppm; frequency read from a scope is far worse than a counter's because it is computed from few periods (Generators and Counters).
  • Measurement gating and algorithm: whether "Vpp" includes noise spikes, how "top" is found, how many cycles enter "RMS". A partial cycle in the window biases RMS and frequency.

Use the scope to see and to measure time relations; use a DMM, counter or power analyser for the number you report.

FFT mode

The scope's FFT takes NN samples at rate fsf_s and shows N/2N/2 frequency bins from 00 to fs/2f_s/2:

Δf=fsN=1Trecord,fmax=fs2\Delta f = \frac{f_s}{N} = \frac{1}{T_\text{record}}, \qquad f_\text{max} = \frac{f_s}{2}

The resolution is set by the time window, not the sample rate: to separate tones 10 Hz10\ \text{Hz} apart you need at least 0.1 s0.1\ \text{s} of signal (more, with a window). The record is cut out of a continuous signal, so unless it holds a whole number of periods, the tone's energy leaks into neighbouring bins. A window function tapers the ends of the record to reduce leakage, at the cost of a wider peak:

Window Amplitude error for a tone between bins (worst) Leakage far from the tone Use for
rectangular up to −3.9 dB-3.9\ \text{dB} high (sidelobes −13 dB-13\ \text{dB}, falling slowly) transients that fit the record, exactly periodic signals
Hann up to −1.4 dB-1.4\ \text{dB} low general purpose, noise
flat-top about 0.01 dB0.01\ \text{dB} low, but very wide peak accurate amplitudes of tones

The full theory is in Signals and Fourier and Windows. Scopes typically display in dBV (re 1 Vrms1\ \text{V}_\text{rms}) or dBm (re 1 mW1\ \text{mW} into 50 Ω50\ \Omega); know which before comparing with a spectrum analyser.

Worked example: a weak tone next to a strong one

Given: a 1 V1\ \text{V} (peak) tone at 1.05 kHz1.05\ \text{kHz} and a 1 mV1\ \text{mV} (peak, −60 dB-60\ \text{dB}) tone at 3 kHz3\ \text{kHz}, sampled at 100 kSa/s100\ \text{kSa/s} with N=1000N = 1000.

Find: the bin width, and whether each window shows the weak tone.

Solve: Δf=100 kHz/1000=100 Hz\Delta f = 100\ \text{kHz}/1000 = 100\ \text{Hz}, so 1.05 kHz1.05\ \text{kHz} falls exactly between two bins (worst case). The 3 kHz3\ \text{kHz} tone is 19.5 bins from the strong one. A rectangular window's leakage at that distance is about 1/(π×19.5)=0.0161/(\pi \times 19.5) = 0.016, i.e. −36 dB-36\ \text{dB}, which buries a −60 dB-60\ \text{dB} tone. Hann's sidelobes fall as the cube of the distance and leave it visible.

Check: the program confirms it:

python · try it yourself
import numpy as np
from scipy.signal import windows

fs, N = 100e3, 1000                        # 100 kSa/s, 1000 points: bin width 100 Hz
t = np.arange(N) / fs
x = 1.0 * np.sin(2 * np.pi * 1050 * t) + 0.001 * np.sin(2 * np.pi * 3000 * t)   # 1 V at 1.05 kHz, 1 mV at 3 kHz
f = np.fft.rfftfreq(N, 1 / fs)

for name, w in (("rectangular", np.ones(N)), ("Hann", windows.hann(N, sym=False)),
                ("flat-top", windows.flattop(N, sym=False))):
    X = np.abs(np.fft.rfft(x * w)) * 2 / np.sum(w)      # amplitude spectrum, volts peak
    k1 = np.argmax(X)
    k3 = int(round(3000 / (fs / N)))
    floor = np.median(X[k3 - 8:k3 - 3])                  # leakage level a few bins below 3 kHz
    print(f"{name:12s}: peak {X[k1]:.4f} V at {f[k1]:6.0f} Hz ({20 * np.log10(X[k1]):+6.2f} dB re 1 Vpk), "
          f"3 kHz bin {20 * np.log10(X[k3]):6.1f} dB, leakage near it {20 * np.log10(floor):6.1f} dB")
print(f"bin width (frequency resolution) = fs/N = {fs / N:.0f} Hz, span 0..{fs / 2 / 1000:.0f} kHz")
rectangular : peak 0.6521 V at   1000 Hz ( -3.71 dB re 1 Vpk), 3 kHz bin  -41.4 dB, leakage near it  -36.8 dB
Hann        : peak 0.8489 V at   1100 Hz ( -1.42 dB re 1 Vpk), 3 kHz bin  -60.0 dB, leakage near it  -78.2 dB
flat-top    : peak 0.9989 V at   1100 Hz ( -0.01 dB re 1 Vpk), 3 kHz bin  -60.0 dB, leakage near it -106.7 dB
bin width (frequency resolution) = fs/N = 100 Hz, span 0..50 kHz

The rectangular window shows the big tone 3.7 dB3.7\ \text{dB} low and the 3 kHz3\ \text{kHz} bin 19 dB19\ \text{dB} too high (leakage); Hann shows the weak tone correctly at −60 dB-60\ \text{dB} but the strong one 1.4 dB1.4\ \text{dB} low; flat-top gets both amplitudes right.

Guided lab: harmonics of a square wave in FFT mode

Hand calculation. A square wave of amplitude AA has odd harmonics of amplitude 4A/(nπ)4A/(n\pi): relative to the fundamental, −9.5 dB-9.5\ \text{dB} at the 3rd, −14.0 dB-14.0\ \text{dB} at the 5th, −16.9 dB-16.9\ \text{dB} at the 7th.

Simulation. Change x in the program to np.sign(np.sin(2 * np.pi * 1000 * t)) and read the harmonics with each window.

What you would measure. Feed a 1 kHz1\ \text{kHz}, 2 Vpp2\ \text{V}_\text{pp} square wave from a generator into the scope, choose 1 ms/div1\ \text{ms/div} (a 10 ms10\ \text{ms} record, 100 Hz100\ \text{Hz} resolution) and FFT mode with a Hann window, then flat-top. Expect peaks at 1,3,5,7 kHz1, 3, 5, 7\ \text{kHz} at about 0,−9.5,−14,−17 dB0, -9.5, -14, -17\ \text{dB} relative to the fundamental within ±1 dB\pm 1\ \text{dB} (flat-top), small even harmonics from the generator's duty-cycle error, and a noise floor set by the 8-bit ADC (often 5050 to 70 dB70\ \text{dB} below full scale).

Hazards and safe setup. Generator levels only.

Pitfalls

  • Normal trigger mode on a signal that never crosses the level: a blank screen that looks like "no signal".
  • Using AC trigger coupling and wondering why a slow DC step does not trigger.
  • Reporting scope amplitude measurements to four digits.
  • Reading an FFT amplitude with the rectangular window, or the resolution as fs/2f_s/2.

Practice

  1. A scope FFT uses fs=1 MSa/sf_s = 1\ \text{MSa/s} and 100 000 points. What is the bin width and the span?
  2. A burst of 5 pulses repeats every 1 ms1\ \text{ms}; the trace jitters because each pulse can trigger. What holdoff do you set if the burst lasts 40 μs40\ \mu\text{s}?
Answer
  1. Δf=10 Hz\Delta f = 10\ \text{Hz}, span 00 to 500 kHz500\ \text{kHz}.
  2. More than 40 μs40\ \mu\text{s} and less than the time to the next burst, e.g. 100 μs100\ \mu\text{s}: the first pulse of each burst then always triggers.

Test yourself

The frequency resolution of a scope's FFT is set by

  1. the sample rate alone
  2. the record duration, Δf=1/Trecord\Delta f = 1/T_\text{record}
  3. the vertical scale
  4. the window only

Which window gives the most accurate amplitude for a single tone?

  1. rectangular
  2. Hann
  3. flat-top
  4. none; windows only change frequency

Holdoff is useful when

  1. the signal has no edges
  2. a repetitive pattern contains several valid trigger points per period
  3. the scope bandwidth is too low
  4. measuring DC

Single trigger mode is used to

  1. average many captures
  2. capture a one-off event such as a power-up transient
  3. increase bandwidth
  4. measure DC accurately