---
title: Measuring impulse responses
heading: Measuring a room's or a system's impulse response with maximum-length sequences and exponential sweeps, the signal-to-noise gain they bring, Schroeder's backward integration and reverberation times from T20 and T30, the noise floor's effect, and clarity and definition from the energy's arrival time
eyebrow: S16 · Lesson 34 · Measuring impulse responses
xp: 50
---

::: hook
A balloon pop or a starter pistol shows a room's reverberation, but a measurement engineer wants the whole impulse response, from which reverberation time, clarity, frequency response and echo structure all follow. Clapping is too weak and too uneven; modern systems play long, carefully designed signals through a loudspeaker and recover the impulse response by correlation or deconvolution, gaining tens of decibels over background noise. The analysis that turns that response into numbers has its own subtleties, mostly about the noise that every measurement ends in.
:::

::: play
- The curve is Schroeder's energy decay curve, the backward integral of a measured impulse response's square, for a room with the reverberation time on the slider and a background noise floor some decibels below the response's start.
- With no noise, the curve falls in a straight line at 60 dB per reverberation time. Noise adds energy that the backward integral accumulates, bending the late part of the curve.
- Reading the slope between −5 and −25 dB (T20) stays clear of the noise far longer than reading it to −60 dB would.
:::

```sim plot
view: graph
x: t = 0..3
y: L = -70..0
slider: T = 0.3..2.5 = 1.2
slider: n = -80..-30 = -50
plot: 10*log((T/13.82*(exp(-13.82*t/T) - exp(-13.82*3/T)) + 10^(n/10)*(3 - t))/(T/13.82*(1 - exp(-13.82*3/T)) + 10^(n/10)*3)) | samples: 300 | label: energy decay, dB
plot: -60*t/T | dashed | label: noise-free decay
```

::: predict
## A room's decay is measured with a maximum-length sequence of order 16 at 48 kHz. What's the longest reverberation the measurement can capture without the response wrapping around?

- [ ] About 0.1 s
- [x] About 1.4 s
- [ ] About 10 s
- [ ] There's no limit

::: reveal
The sequence repeats every $2^{16} - 1$ = 65,535 samples, 1.37 s at 48 kHz, and the recovered response is periodic with that period: any energy still arriving after 1.37 s folds back onto the start. The sequence must be longer than the room's decay to well below the noise floor, so concert halls need order 17 or 18.
:::
:::

::: nameit
## Excitation signals

A **maximum-length sequence** (MLS) is a binary pseudorandom sequence of length $L = 2^N - 1$ whose circular autocorrelation is an impulse; cross-correlating the recorded response with it recovers the impulse response, periodic with period L. Its energy spread over L samples gives a signal-to-noise gain of $10\log L$ over a single impulse of the same peak, about 48 dB for N = 16, and averaging K periods adds $10\log K$. It assumes a perfectly linear, time-invariant system; loudspeaker distortion appears as spurious spikes.

An **exponential sine sweep** rises in frequency exponentially over its duration; deconvolving it compresses the response into an impulse, and harmonic distortion products land at negative times, separated cleanly from the linear response. Its energy is concentrated at each frequency in turn, so it tolerates distortion and drift better than an MLS.

## Schroeder's backward integration

The energy remaining in the response after time t,
$$E(t) = \int_t^\infty h^2(\tau)\,d\tau$$
is the ensemble-average decay that a noise burst cut off at t = 0 would give, without averaging many bursts. Its level in decibels, normalized to the start, falls in a straight line for an exponential decay, at 60 dB per reverberation time T.

## Reverberation times and the noise floor

A real response ends in background noise, which the integral accumulates as if it were sound. Fitting the slope between −5 and −25 dB (**T20**) or −5 and −35 dB (**T30**) and extrapolating to 60 dB avoids the noisy tail, provided the peak-to-noise range exceeds about 35 or 45 dB; the integration is also stopped where the response meets the noise.

## Clarity and definition

From the same response, the **clarity** $C_{80} = 10\log(E_{0\text{–}80}/E_{80\text{–}\infty})$ compares early to late energy around 80 ms (music), and the **definition** $D_{50} = E_{0\text{–}50}/E_\text{total}$ the fraction in the first 50 ms (speech). For an ideal exponential decay the energy falls as $e^{-13.8t/T}$, so $C_{80} = 10\log(e^{1.105/T} - 1)$.
:::

::: example
## A decay curve falls 30 dB between −5 and −35 dB in 0.75 s. What reverberation time does T30 report, and what peak-to-noise range should the measurement have had?

::: solution
1. **Decay rate.**
   $$\begin{aligned} \text{slope} &= 30\ \text{dB}/0.75\ \text{s} \\ &= 40\ \text{dB/s} \end{aligned}$$
2. **Reverberation time.** The time to fall 60 dB is
   $$60/40 = 1.5\ \text{s}$$
3. **Range needed.** To keep the −35 dB point clear of the noise's bend, the response should start at least about 45 dB above the noise floor.
4. **What provides it.** An MLS of order 16 provides about 48 dB from one period, and averaging four periods adds 6 dB more.

**Answer:** T30 reports 1.5 s, and the measurement needed at least about 45 dB of peak-to-noise range.
:::
:::

::: example
## What clarity $C_{80}$ does an ideal exponential decay give for reverberation times of 1 s and 2 s?

::: solution
1. **Clarity of an exponential decay.**
   $$C_{80} = 10\log(e^{13.82 \times 0.08/T} - 1)$$
2. **T = 1 s.**
   $$\begin{aligned} C_{80} &= 10\log(e^{1.105} - 1) \\ &= +3.1\ \text{dB} \end{aligned}$$
3. **T = 2 s.**
   $$\begin{aligned} C_{80} &= 10\log(e^{0.553} - 1) \\ &= -1.3\ \text{dB} \end{aligned}$$
4. **What halls aim for.** Halls for symphonic music aim for about −2 to +2 dB, enough reverberance without blurring fast passages; speech rooms want more early energy, and real rooms' early reflections shift the figure from the ideal decay's.

**Answer:** +3.1 dB for a 1 s reverberation time and −1.3 dB for 2 s.
:::
:::

::: example
## How many MLS periods must be averaged to raise a measurement's peak-to-noise range from 40 to 50 dB, and how long does that take at order 15 and 48 kHz?

::: solution
1. **Number of periods.** Averaging K periods raises the range by 10 log K, so 10 dB needs
   $$K = 10$$
2. **Length of a period.**
   $$\begin{aligned} 2^{15} - 1 &= 32{,}767\ \text{samples} \\ &= 0.68\ \text{s} \end{aligned}$$
3. **Total time.** Ten periods take 6.8 s, plus one period at the start to let the room reach steady state.
4. **Other ways.** Each step up in sequence order instead doubles the length and gives 3 dB, so averaging and longer sequences trade against each other; in a noisy hall an exponential sweep of the same length usually does better.

**Answer:** ten periods, which take 6.8 s at order 15 and 48 kHz, plus one period to reach steady state.
:::
:::

::: check
kind: parts
given: N = 14 | 16 | 18; f = 44.1 | 48 | 96

## A maximum-length sequence of order {N} is played at {f} kHz.

::: part
answer: (2^N - 1)/(f*1e3)
unit: s
tolerance: 0.5%

### What is its period, the longest decay it can capture without wrap-around?

::: misses
- [any] $(2^N - 1)/f_s$.
:::
:::

::: part
answer: 10*log(2^N - 1)
unit: dB
tolerance: 0.5%

### What signal-to-noise gain does one period give over a single impulse of the same peak?

::: misses
- [20*log(2^N - 1)] Energy grows as L: 10 log L.
- [any] $10\log L$.
:::
:::
:::

::: check
kind: parts
given: a = 15 | 20 | 30; t = 0.2 | 0.5 | 1.2

## A decay curve falls {a} dB, from −5 to {a} + 5 dB below the start, in {t} s.

::: part
answer: 60*t/a
unit: s
tolerance: 0.5%

### What reverberation time does the slope give?

::: misses
- [a*t/60] Extrapolate the slope to 60 dB: 60/(a/t).
- [any] 60 dB divided by the slope.
:::
:::
:::

::: check
kind: parts
given: T = 0.5 | 1.5 | 3

## An ideal exponential decay has reverberation time {T} s.

::: part
answer: 10*log(exp(13.82*0.08/T) - 1)
unit: dB
tolerance: 0.5%

### What clarity $C_{80}$ does it give?

::: misses
- [10*log(exp(6.91*0.08/T) - 1)] Energy decays as $e^{-13.8t/T}$: 60 dB is a factor of 10⁶ in energy.
- [any] $10\log(e^{1.105/T} - 1)$.
:::
:::

::: part
answer: 1 - exp(-13.82*0.05/T)
tolerance: 0.5%

### What definition $D_{50}$?

::: misses
- [any] $1 - e^{-13.8 \times 0.05/T}$.
:::
:::
:::

::: check
kind: parts
given: R = 30 | 40; G = 45 | 60

## A measurement reaches {R} dB of peak-to-noise range from one period, and needs {G} dB.

::: part
answer: 10^((G - R)/10)
unit: averages
tolerance: 0.5%

### How many periods must be averaged?

::: misses
- [10^((G - R)/20)] Averaging gains 10 log K, not 20 log K.
- [any] $K = 10^{(G - R)/10}$.
:::
:::
:::

::: check
kind: parts
given: T = 0.8 | 2; r = 40 | 50 | 60

## A room with reverberation time {T} s is measured with a peak-to-noise range of {r} dB.

::: part
answer: r/60*T
unit: s
tolerance: 0.5%

### After how long does the response sink into the noise?

::: misses
- [any] The decay reaches −r dB after rT/60.
:::
:::
:::

::: check
kind: choice

## Why is an exponential sine sweep often preferred to a maximum-length sequence for measuring loudspeakers and halls?

- [ ] It's shorter
- [x] After deconvolution, the harmonic distortion a loudspeaker adds appears at negative times, separated from the linear response, whereas with an MLS distortion scatters as spurious spikes through the response
- [ ] It needs no averaging
- [ ] It has a flat spectrum

::: misses
- [1] It's usually as long or longer.
- [3] It can be averaged too; its advantage is separating distortion.
- [4] An exponential sweep has a pink spectrum, falling 3 dB per octave.
:::
:::

::: check
kind: derivation
vars: T = 0.2..5, t = 0..0.2

## A room's ideal energy decay is $e^{-13.8t/T}$.

::: step
answer: -60*t/T

### What level, in dB relative to the start, does the decay curve reach at time t?
:::

::: step
answer: 10*log(exp(13.82*t/T) - 1)

### What is the early-to-late energy ratio, in dB, for a boundary at t?
:::

::: right
Right. At t = 80 ms that ratio is the clarity $C_{80}$.
:::
:::

::: explain
## Why does Schroeder's backward integration give a smooth decay curve from a single impulse response, when one noise-burst decay is always ragged?

::: model
A noise burst cut off abruptly leaves a decay whose fine detail depends on the particular random signal; each repetition looks different, so engineers once averaged many. Schroeder showed that the average of infinitely many such decays equals the energy of the room's impulse response remaining after each moment, the backward integral of its square. Integrating from the end toward the start sums every later reflection, smoothing out the fluctuations without any averaging, so one measured impulse response gives the ensemble-average decay directly.
:::
:::

::: practice
::: check
given: N = 15 | 17; f = 48 | 96
answer: (2^N - 1)/(f*1e3)
unit: s
tolerance: 0.5%

## MLS period: order {N} at {f} kHz?

::: misses
- [any] $(2^N - 1)/f_s$.
:::
:::

::: check
given: a = 20 | 30; t = 0.4 | 0.9
answer: 60*t/a
unit: s
tolerance: 0.5%

## Reverberation time: {a} dB in {t} s?

::: misses
- [any] 60t/a.
:::
:::

::: check
given: T = 0.4 | 0.6 | 0.8 | 1 | 2 | 2.5 | 3
answer: 10*log(exp(13.82*0.08/T) - 1)
unit: dB
tolerance: 0.5%

## C₈₀ for T = {T} s?

::: misses
- [any] $10\log(e^{1.105/T} - 1)$.
:::
:::
:::
