---
title: "Vibration and wall lab: isolators, double walls, impedance tubes and A-weighting"
heading: Choosing an isolator's frequency ratio by bisection, transmission loss of single and double walls by transfer matrices, a material's reflection and absorption from a two-microphone impedance tube, and A-weighted levels from band levels
eyebrow: S16 · Lesson 12 · Vibration and wall lab
xp: 60
---

::: hook
Lessons 1 to 11 gave closed forms for oscillators, waves and walls, each valid in a limit. Measurement and design need the general versions: the isolator that meets a target for any damping, the double wall's whole transmission-loss curve rather than one resonance, the absorption of a sample computed from two microphone signals, and the single A-weighted number a regulation asks for. In this lab you'll write each and check it against the formulas it generalizes.
:::

::: play
- The curve is the normal-incidence transmission loss of two 10 kg/m² panels separated by an air gap, computed by multiplying transfer matrices, against frequency; the dashed curve is one 20 kg/m² panel with the same total mass.
- Below the mass–air–mass resonance the two behave as one; at it, the double wall transmits almost everything; above it, it climbs at 18 dB per octave, far above the single panel.
- A deeper gap moves the resonance down and the gain earlier.
:::

```sim plot
view: graph
x: f = 30..4000 log
y: TL = 0..120
slider: d = 10..200 = 50
plot: 10*log(((2*cos(2*pi*f/343*d*1e-3) - 2*pi*f*20*sin(2*pi*f/343*d*1e-3)/(1.21*343))^2 + (2*pi*f*20*cos(2*pi*f/343*d*1e-3)/(1.21*343) - (2*pi*f)^2*100*sin(2*pi*f/343*d*1e-3)/(1.21*343)^2 + 2*sin(2*pi*f/343*d*1e-3))^2)/4) | samples: 400 | label: double wall, dB
plot: 10*log(1 + (2*pi*f*20/(2*1.21*343))^2) | dashed | label: single 20 kg/m² panel, dB
```

::: predict
## Two 10 kg/m² panels sit 50 mm apart. At 1 kHz, roughly how much more transmission loss do they give than a single 20 kg/m² panel?

- [ ] None: the mass law depends only on total mass
- [ ] About 6 dB
- [x] About 35 dB
- [ ] About 100 dB

::: reveal
The single panel gives $10\log[1 + (\omega m/2\rho c)^2]$ = 43.6 dB at normal incidence. The double wall's transfer-matrix calculation gives 79.1 dB: 35 dB more, because above its 120 Hz resonance the air gap decouples the panels and their losses nearly add. Task 2 computes both.
:::
:::

::: nameit
## What the lab computes

- **Isolators**: transmissibility $T(r, \zeta) = \sqrt{1 + (2\zeta r)^2}/\sqrt{(1 - r^2)^2 + (2\zeta r)^2}$, and the frequency ratio that reaches a target T, found by bisection above √2 (for ζ = 0 it's $\sqrt{1 + 1/T}$).
- **Transfer matrices**: a layer maps (pressure, particle velocity) on one face to the other. A limp panel of surface density m is $\begin{bmatrix}1 & j\omega m \\ 0 & 1\end{bmatrix}$ and an air gap of depth d is $\begin{bmatrix}\cos kd & j\rho c\sin kd \\ j\sin kd/\rho c & \cos kd\end{bmatrix}$. Multiplying them gives the whole wall's matrix (A, B, C, D), and with air on both sides the transmission coefficient is $\tau = |2/(A + B/\rho c + C\rho c + D)|^2$.
- **Impedance tube**: with microphones at distances $x_1$ and $x_2 = x_1 - s$ from the sample, the transfer function $H_{12} = p(x_2)/p(x_1)$ gives the reflection coefficient $R = \frac{H_{12} - e^{-jks}}{e^{jks} - H_{12}}e^{2jkx_1}$ and the absorption $1 - |R|^2$ (ISO 10534-2).
- **A-weighting**: $R_A(f) = \frac{12194^2f^4}{(f^2 + 20.6^2)\sqrt{(f^2 + 107.7^2)(f^2 + 737.9^2)}(f^2 + 12194^2)}$ and $A(f) = 20\log R_A + 2.00$ dB; the A-weighted level adds the weighted band levels as powers.
:::

::: check
kind: python

## Write `transmissibility(r, z)` and `ratio_for(T, z)`: the frequency ratio above √2 at which transmissibility falls to T, by bisection.

```python starter
import math

def transmissibility(r, z):
    return 1 / abs(1 - r * r)

def ratio_for(T, z):
    return math.sqrt(1 + 1 / T)
```

```python solution
import math

def transmissibility(r, z):
    return math.sqrt(1 + (2 * z * r) ** 2) / math.sqrt((1 - r * r) ** 2 + (2 * z * r) ** 2)

def ratio_for(T, z):
    lo, hi = math.sqrt(2) + 1e-9, 1e4
    for _ in range(200):
        m = (lo + hi) / 2
        if transmissibility(m, z) > T:
            lo = m
        else:
            hi = m
    return (lo + hi) / 2
```

```python tests
import math
assert abs(ratio_for(0.01, 0.0) - math.sqrt(101)) < 1e-9, "Undamped, 1% needs r = √101 = 10.05."
r = ratio_for(0.01, 0.05)
assert abs(r - 12.777) < 0.001, "With 5% damping it takes r = 12.78."
assert abs(transmissibility(math.sqrt(2), 0.3) - 1) < 1e-12, "At √2 every mount transmits exactly 1."
```

::: right
Right. Damping pushes the required ratio up, so lightly damped mounts are chosen when isolation matters most.
:::
:::

::: check
kind: python

## Write `wall_tl(layers, f)` for a list of ("panel", m) and ("air", d) layers, returning the normal-incidence transmission loss in dB (air: ρ = 1.21 kg/m³, c = 343 m/s).

```python starter
import math

def wall_tl(layers, f):
    m = sum(v for kind, v in layers if kind == "panel")
    return 20 * math.log10(2 * math.pi * f * m / (2 * 1.21 * 343))
```

```python solution
import cmath, math

def wall_tl(layers, f):
    rho, c = 1.21, 343.0
    w = 2 * math.pi * f
    k = w / c
    z = rho * c
    M = [[1, 0], [0, 1]]
    for kind, v in layers:
        if kind == "panel":
            L = [[1, 1j * w * v], [0, 1]]
        else:
            L = [[cmath.cos(k * v), 1j * z * cmath.sin(k * v)], [1j * cmath.sin(k * v) / z, cmath.cos(k * v)]]
        M = [[M[0][0] * L[0][0] + M[0][1] * L[1][0], M[0][0] * L[0][1] + M[0][1] * L[1][1]],
             [M[1][0] * L[0][0] + M[1][1] * L[1][0], M[1][0] * L[0][1] + M[1][1] * L[1][1]]]
    tau = abs(2 / (M[0][0] + M[0][1] / z + M[1][0] * z + M[1][1])) ** 2
    return -10 * math.log10(tau)
```

```python tests
import math
w = 2 * math.pi * 500
assert abs(wall_tl([("panel", 20)], 500) - 10 * math.log10(1 + (w * 20 / (2 * 1.21 * 343)) ** 2)) < 1e-9, "One panel obeys the mass law exactly."
dw = [("panel", 10), ("air", 0.05), ("panel", 10)]
assert abs(wall_tl(dw, 1000) - 79.08) < 0.05 and abs(wall_tl([("panel", 20)], 1000) - 43.60) < 0.05, "At 1 kHz: 79.1 dB against 43.6 dB."
fs = [50 + 0.5 * i for i in range(500)]
dip = min(fs, key=lambda f: wall_tl(dw, f))
assert abs(dip - 120.1) < 1, "The dip sits at the mass–air–mass resonance, 120 Hz."
```

::: right
Right. The same multiplication handles any number of layers, which is how multilayer partitions and glazing are designed.
:::
:::

::: check
kind: python

## Write `tube_reflection(H12, s, x1, k)` returning the complex reflection coefficient, and `absorption(R)`.

```python starter
def tube_reflection(H12, s, x1, k):
    return H12

def absorption(R):
    return 1 - abs(R)
```

```python solution
import cmath

def tube_reflection(H12, s, x1, k):
    HI = cmath.exp(-1j * k * s)
    HR = cmath.exp(1j * k * s)
    return (H12 - HI) / (HR - H12) * cmath.exp(2j * k * x1)

def absorption(R):
    return 1 - abs(R) ** 2
```

```python tests
import cmath, math
k = 2 * math.pi * 500 / 343
R0 = 0.6 * cmath.exp(0.7j)
x1, s = 0.10, 0.03
p = lambda x: cmath.exp(1j * k * x) + R0 * cmath.exp(-1j * k * x)
R = tube_reflection(p(x1 - s) / p(x1), s, x1, k)
assert abs(R - R0) < 1e-12, "It recovers the sample's reflection coefficient exactly."
assert abs(absorption(R) - 0.64) < 1e-12, "|R| = 0.6 absorbs 64%."
```

::: right
Right. Two microphones and one transfer function replace sliding a probe to find standing-wave maxima and minima.
:::
:::

::: check
kind: python

## Write `a_weight(f)` in dB and `dba(bands)` for a list of (center frequency, band level) pairs.

```python starter
def a_weight(f):
    return 0.0

def dba(bands):
    return max(L for f, L in bands)
```

```python solution
import math

def a_weight(f):
    f2 = f * f
    ra = 12194 ** 2 * f2 * f2 / ((f2 + 20.6 ** 2) * math.sqrt((f2 + 107.7 ** 2) * (f2 + 737.9 ** 2)) * (f2 + 12194 ** 2))
    return 20 * math.log10(ra) + 2.00

def dba(bands):
    return 10 * math.log10(sum(10 ** ((L + a_weight(f)) / 10) for f, L in bands))
```

```python tests
assert abs(a_weight(1000)) < 0.01 and abs(a_weight(100) + 19.14) < 0.01 and abs(a_weight(10000) + 2.49) < 0.01, "A-weighting: 0 at 1 kHz, −19.1 at 100 Hz, −2.5 at 10 kHz."
L = dba([(63, 80), (125, 78), (250, 75), (500, 72), (1000, 70), (2000, 66), (4000, 60)])
assert abs(L - 74.78) < 0.05, "A rumbly spectrum: 74.8 dB(A), though its 63 Hz band alone is 80 dB."
```

::: right
Right. A-weighting discounts low frequencies heavily, so machinery rumble counts for less than its unweighted level suggests.
:::
:::

::: explain
## Why does a double wall beat a single wall of the same total mass by so much above its resonance?

::: model
A single wall's loss comes from its mass resisting acceleration, so it grows only 6 dB per doubling of mass or frequency. In a double wall, the first panel's motion drives the air gap, which acts as a soft spring: above the mass–air–mass resonance the spring barely transmits the first panel's small motion to the second, so the second panel sees a much weaker drive than the first did, and each panel's mass law applies nearly separately. Their losses in decibels roughly add, minus a term for the gap's coupling, so the wall gains 18 dB per octave instead of 6, until the gap's own standing waves intervene.
:::
:::
