Spectral Envelope

How a trapezoidal edge shapes a square wave’s harmonic content.

8bit7 · Bench Instrument

Spectral Envelope

Drag the controls to see how edge speed reshapes the harmonic spectrum.
FUND 100.0 MHz
Frequency100.0 MHz
Duty Cycle50 %
Rise / Fall (tr = tf)1.00 ns
τ5.00 nsT10.00 nsf10 Hzf20 Hz
Time DomainCH1 · Amplitude vs. Time
Three periods of the trapezoidal pulse used to derive the spectrum below.
Frequency DomainHarmonic Envelope · dB vs. log(f)
harmonics (exact)asymptotic envelope0 harmonics plotted (f0 → 0 Hz)
Flat out to f1, −20 dB/decade until f2, then −40 dB/decade beyond — f2 is set entirely by the edge speed.
Harmonicsreal spectral lines — not the f1/f2 knees above
HarmonicFrequencyAmplitude
1×f0 (fundamental)100.0 MHz-4.1 dB
2×f0200.0 MHznull
3×f0300.0 MHz-14.8 dB
4×f0400.0 MHznull
5×f0500.0 MHz-21.8 dB
6×f0600.0 MHznull
1×f0 through 6×f0 — actual harmonic amplitudes from the exact formula above, relative to the flat asymptote. “null” marks a harmonic the sinc product zeroes out (e.g. even harmonics at 50% duty).

Why the spectrum bends where it does

A real digital edge is never a perfect step — it’s a trapezoid with rise time tr and fall time tf. That finite edge speed is what keeps a square wave’s harmonics from extending to infinity. The Fourier series has a closed form:

|Cn| = 2A·τ/T · sinc(nτ/T) · sinc(n·tr/T)

Each sinc term contributes one knee. Pulse width τ sets the first knee (f1); edge time tr sets the second (f2):

f1 = 1 / (π·τ)   — flat → −20 dB/decade
f2 = 1 / (π·tr)   — −20 dB/decade → −40 dB/decade

The amber asymptotic line above is the standard hand-estimation tool from EMI/EMC design work; the green stems are the true harmonic amplitudes, nulls included — see the harmonics table for their exact values.

What f1 actually is (it’s not a harmonic)

f1 is not the fundamental and it isn’t any harmonic either — it’s the frequency where the envelope’s slope bends from flat to −20 dB/decade. No signal energy actually exists there: a periodic waveform only has energy at integer multiples of f0 (1×f0, 2×f0, 3×f0…, exactly the rows in the harmonics table above), and f1 falls between DC and the fundamental rather than on top of either one.

For a 50% duty cycle, f1 = (2/π)·f0 ≈ 0.637·f0 — about 64% of the clock frequency, because it’s set by pulse width τ, not by repetition rate. It exists purely to describe the shape of the bounding curve engineers sketch by hand; f2 plays the same role for the second bend, set by edge time instead of pulse width. Neither one is a place you’d ever measure signal power on a spectrum analyzer.