The method behind ADM
How one exponential sweep gives ADM the impulse response of every harmonic distortion order, and what limits how fast it can update.
Why a single THD number is not enough
Total Harmonic Distortion is the traditional way to quantify non-linearity. It is measured with a pure tone at one frequency and one level, and it collapses everything into one number. That hides a lot:
- It depends on frequency and level. An amplifier can show 0.001 % at 1 kHz and 1 % at 50 Hz. Describing it fully would take an exhaustive series of measurements.
- It discards the spectral picture. Two devices with the same THD can have very different harmonic profiles: one dominated by the 2nd harmonic, which is musically benign, the other by the 7th, which is highly dissonant.
- It says nothing about the order-by-order behaviour of the system. The impulse response associated with each order of non-linearity is what explains the physics behind the distortion.
ADM measures the thing THD summarizes: the frequency response of each harmonic distortion order across the whole audio band.
The device model
ADM treats the device under test as a non-linear system with an input and an output . Each order of non-linearity has its own impulse response , and the captured signal is
Here is the ordinary linear impulse response, and describe how the device generates the 2nd, 3rd, … harmonics. The goal of the measurement is to recover all of them from a single capture.
One sweep separates the orders in time
The excitation is an exponential sine sweep that moves from to in seconds. Its instantaneous frequency is
When this sweep passes through a non-linear device, the -th harmonic it generates behaves like a copy of the sweep that started earlier. After deconvolution with the sweep’s inverse filter, the energy of every order collapses into its own impulse response, and these responses sit at fixed, predictable distances before the linear response:
Because those positions are known in advance, ADM can place a time window around each one and cut the responses apart. Taking the FFT of each window gives the frequency response of that harmonic order.
For a 0.5 s sweep from 20 Hz to 20 kHz the expected positions are:
| Order | Distance before | Position in the deconvolved signal |
|---|---|---|
| (linear) | 0 ms | 500.0 ms |
| 50.2 ms | 449.8 ms | |
| 79.5 ms | 420.5 ms | |
| 100.3 ms | 399.7 ms | |
| 116.5 ms | 383.5 ms | |
| 129.7 ms | 370.3 ms |
The gap between neighbouring orders shrinks as the order grows, so higher harmonics get smaller and smaller windows.
The residual for higher orders
ADM keeps individual responses for the linear response and orders 2 to 5. For everything above, the windows would become too small to be useful, so ADM extracts one extra segment, called , which runs from the start of the deconvolved signal up to the midpoint between the expected positions of the 5th and 6th orders. It holds the 6th order and every higher order that remains within the record, added together.
This residual is not the 6th harmonic alone. It is best read as an aggregate indicator of high-order distortion: in a nearly linear device it stays near the noise floor, and when high-order distortion is present its level rises.
Two ways to build the sweep
ADM can generate the sweep in two ways, which differ in how they treat phase and bandwidth.
| Farina ESS | Novák SSS | |
|---|---|---|
| Starting phase | Needs a correction | Naturally zero, when is an integer |
| Ending phase | Arbitrary; the sweep is cut at a zero crossing | Zero, when is a multiple of |
| Inverse filter | In time: reversal plus an envelope | Analytical, in the frequency domain |
| Harmonic bandwidth | Limited to for every order | Extended to , up to Nyquist |
| Phase of the harmonics | Approximate | Exact and independent of the input |
| FFTs in deconvolution | 2 (signal and filter) | 1 (signal only) |
In the synchronized method the sweep rate is rounded so that the phase of the -th harmonic matches the phase of the sweep, shifted in time. ADM adjusts the duration automatically when this method is selected.
Why the curves can update live
ADM plays the sweep in a loop and records at the same time. Each complete record is handed to a processing thread that deconvolves it, extracts the windows and computes the spectra, while the audio thread keeps running without waiting for it. The result is drawn as soon as it is ready, so the curves follow the device as you change it.
The limit on speed is not the computer. It is the physics of the method.
Sweep length against spectral detail
The window of each harmonic can only be as long as the distance to its neighbours, and that distance is proportional to . A shorter sweep therefore means fewer samples per window and a coarser frequency resolution. For the 2nd-order window, with a sweep from 20 Hz to 20 kHz at 48 kHz:
| Sweep duration | Window length | Window duration | Frequency scale |
|---|---|---|---|
| 10 s | ≈ 28 170 samples | ≈ 587 ms | ≈ 1.7 Hz |
| 2 s | ≈ 5 632 | ≈ 117 ms | ≈ 8.5 Hz |
| 1 s | ≈ 2 814 | ≈ 58.6 ms | ≈ 17 Hz |
| 0.5 s | ≈ 1 406 | ≈ 29.3 ms | ≈ 34 Hz |
| 0.1 s | ≈ 278 | ≈ 5.8 ms | ≈ 172 Hz |
| 0.01 s | ≈ 24 | ≈ 0.5 ms | ≈ 2 kHz |
These are best-case values: windows for higher orders are smaller still, and the longest rows go beyond ADM’s own 5 s limit; they are shown for reference. This is the fundamental trade-off between how fast you want the plot to refresh and how much spectral detail you need. Around half a second is a good compromise for watching a device respond as you adjust it, and longer sweeps give finer detail when you want to examine a curve closely.
Using short sweeps to detect devices that adapt
The sweep methods assume the device behaves the same way for the whole duration of the sweep. A compressor with long attack and release times, a tube amplifier whose bias drifts as it warms up, or an automatic gain control will not satisfy that assumption: the change of state ends up recorded as if it were a fixed property of the device.
Because ADM lets you set the sweep duration anywhere from 1 ms to 5 s, you can use that to your advantage. If the curves change noticeably when you shorten the sweep, the device is adapting over time, and a longer measurement is averaging that drift into the result.
References
- A. Farina, “Simultaneous Measurement of Impulse Response and Distortion with a Swept-Sine Technique,” AES 108th Convention, Paris (2000).
- A. Farina, “Advancements in Impulse Response Measurements by Sine Sweeps,” AES 122nd Convention, Vienna (2007).
- A. Novák, P. Lotton and L. Simon, “Synchronized Swept-Sine: Theory, Application, and Implementation,” Journal of the Audio Engineering Society, 63(10) (2015).
- R. Cabot, “Perception of Nonlinear Distortion,” Proceedings of the AES 2nd International Conference (1984).