DEM AudioLinFIR Documentation
LinFIR

Exponential Sine Sweep


On this page

LinFIR measures impulse responses with an exponential sine sweep (ESS), after Angelo Farina. This page explains the sweep itself: how the impulse response and the harmonic distortion come out of it, and how LinFIR shapes it to protect the drivers. The settings are described in Sweep Measurements.


The Exponential Sine Sweep

The sweep's frequency rises exponentially with time, so that it spends the same time on each octave:

  • Frequency distribution: Equal energy per octave
  • Low-frequency emphasis: More time spent at low frequencies
  • Deconvolution: Analytical inverse filter applied to extract impulse response

Harmonic Distortion

The exponential sweep provides natural time separation of harmonic distortion products:

  • Deterministic harmonic positions: All harmonic distortion products (H2, H3, H4) appear at predictable time positions in the deconvolved impulse response
  • Time separation formula: Δt(Hₙ) = (T/ln(f₂/f₁)) × ln(n)
    • H2 (2nd harmonic) appears at: Δt × ln(2) ≈ 0.693 Δt before the main peak
    • H3 (3rd harmonic) appears at: Δt × ln(3) ≈ 1.099 Δt before the main peak
    • H4 (4th harmonic) appears at: Δt × ln(4) ≈ 1.386 Δt before the main peak

End Frequency and Harmonics

When you lower the End Frequency, the played sweep stops early, but the inverse (deconvolution) filter is still built over the full range up to Nyquist, at the same sweep rate. The n-th harmonic of a fundamental f sits at n·f — above the End Frequency — and a filter limited to the End Frequency would cut it off there. Extending the filter keeps every harmonic at full bandwidth. Because the sweep rate is unchanged, the harmonic time offsets Δt(Hₙ) are identical; only the main peak lands later, by the amount the filter was extended, and LinFIR compensates for that automatically. The THD curves themselves stop at the highest fundamental frequency that was actually swept.


Deconvolution

After recording the sweep response LinFIR automatically:

  1. Compute the inverse sweep signal
  2. Convolve recorded response with inverse sweep
  3. Extract impulse response from convolution result
  4. Apply microphone calibration (if loaded)
  5. Validate quality (clipping and level check)

Shaping the Sweep

A sweep that started or stopped abruptly would excite the driver with a click and leave Gibbs oscillations in the measurement: ripples near the band edges that are not acoustic, but the mathematical trace of the abrupt start or end. They can mask the real behaviour of the speaker. LinFIR shapes the sweep to avoid them, and to protect the driver below the band measured.

The Start Frequency High-Pass

A 4th-order Butterworth high-pass filter with cutoff frequency fc = Start Frequency is continuously applied across the entire sweep for deterministic driver protection:

Filter characteristics:

  • Cutoff frequency (fc): Set by the Start Frequency parameter
  • Attenuation at fc: -3 dB (Butterworth characteristic)
  • Roll-off: -24 dB/octave below cutoff (4th order)
  • Pre-ringing: Minimal (Butterworth provides best balance)

Why Butterworth?

  • Provides deterministic, frequency-independent protection slope
  • Minimal pre-ringing compared to steeper filters
  • Smooth passband without ripple
  • Predictable behavior for all driver types

Protection Mechanism:

  • Exponentially reduces energy below the cutoff frequency
  • Protects tweeters from low-frequency voltage (thermal damage)
  • Limits woofer excursion at sub-bass frequencies (mechanical damage)
  • Applied in the frequency domain, for continuous, artifact-free protection
  • Left out when the Start Frequency is below 10 Hz, where it would change nothing

Fades at Both Ends

LinFIR combines the Butterworth filter with sin² fades at both ends of the sweep, on a logarithmic frequency axis:

Low end: Butterworth + fade-in

  • The sweep starts two octaves below the Start Frequency (Start Frequency / 4), at zero amplitude
  • A sin² fade-in brings it to full amplitude at the Start Frequency, combined with the Butterworth high-pass, which keeps protecting the driver at −24 dB/octave below it
  • The sweep starts from silence, without a click, and the high-pass has room to roll off before it

High end: fade-out

  • The sweep is at full amplitude up to the End Frequency, with no filter: the response is flat right up to it
  • A sin² fade-out then runs to min(Nyquist, End Frequency × 2), and the sweep excites nothing above
  • With End Frequency on Auto, the fade-out runs from 1/48 octave to 1/96 octave below Nyquist, which keeps the most bandwidth for the harmonic distortion analysis

Why Is the Top Not Symmetric With the Bottom?

The Start Frequency has two full octaves of fade-in headroom below it (start_freq / 4), always available because there is no hard limit near DC, which lets its 4th-order Butterworth roll-off develop smoothly.

The End Frequency gets only one octave (× 2, clamped to Nyquist), for two reasons:

  1. Nyquist is a hard wall. End × 4 would be above Nyquist for any End above a quarter of it; even × 2 is clamped once End is past half of Nyquist. A larger margin would simply be clamped away.
  2. High-frequency pre-ringing is far less harmful — a brief artefact spanning a couple of samples, versus the millisecond-long low-end smear a sharp bass cutoff produces. One octave of sin² fade-out is plenty on top.

At the Auto (maximum) position the × 2 margin is fully clamped, so the sweep is byte-identical to the automatic behaviour of earlier versions.

What the Shaping Gives

Driver Safety:

  • Deterministic -24 dB/octave roll-off below Start Frequency
  • Continuous protection without sudden energy changes
  • Suitable for all driver types with appropriate frequency selection

Clean Impulse Responses:

  • Well-defined peaks without oscillations
  • Minimal pre-ringing and post-ringing
  • Accurate representation of system behavior

Optimized for Distortion Analysis:

  • The top of the sweep chosen to keep the harmonic distortion analysis as wide as possible
  • Better signal-to-noise ratio for harmonic distortion detection

No Configuration Required:

  • Works optimally for all measurement scenarios
  • Eliminates need for user windowing decisions
  • Consistent, predictable behavior