Hauptinhalt

Model an Inserted Earbud

R2026b
Since R2026b

This example models an earbud inserted into the human ear and analyzes how each component affects the overall frequency response at the ear drum.

The system comprises three main components:

  • A microspeaker that converts the input voltage into acoustic pressure through electromechanical and mechanoacoustic coupling.

  • An earbud enclosure that couples the microspeaker to the ear canal via a sound tube and ear tip, and vents the rear sound to the outside.

  • An ear drum simulator that models the impedance of a human ear drum following the IEC 60318-4 standard.

The microspeaker includes a front cover with holes, a rear cavity, rear vents, and a damping mesh. The earbud adds the earphone cavity, sound holes, a sound tube, an ear tip, and models leakage due to imperfect fit. The ear drum simulator provides a realistic acoustic load representing the human ear up to 10 kHz.

Open the Model

model = "InsertedEarbud";
open_system(model);

The signal path is:

  1. Input voltage drives the microspeaker voice coil.

  2. The microspeaker front radiates through the earbud sound tube and ear tip into the ear canal, terminating at the ear drum simulator.

  3. The microspeaker rear vents into the earbud earphone cavity and exits through sound holes to the outside via a radiation impedance.

Linearize the Model

Extract the frequency response using linearization. The input perturbation is at the chirp signal and the output measurement is the pressure at the drum reference point (DRP).

io(1) = linio(model + "/Chirp Signal", 1, "input");
io(2) = linio(model + "/DRP", 1, "output");

linsys = linearize(model, io);
[mag, ~, wout] = bode(linsys);

Convert to SPL in dB and frequency in Hz.

p_ref = 20e-6;                      % reference pressure in air (Pa)
freq = wout ./ (2*pi);              % convert to Hz
SPL = 20*log10(mag(:) ./ p_ref);    % dB SPL

Plot the baseline frequency response.

fig1 = figure;
semilogx(freq, SPL, 'LineWidth', 1.5);
xlim([20 20e3]);
ylim([50 130]);
xlabel("Frequency (Hz)");
ylabel("SPL (dB re 20 \muPa)");
title("Frequency Response at Ear Drum");
grid on
hold on

Increase Leakage

The leakage models an imperfect seal between the earbud and the ear. It acts as a high-pass filter: when the seal is loose, low-frequency pressure escapes through the gap. Increasing the leakage area by a factor of 10 demonstrates this effect.

set_param(model + "/Earbud", "LeakageVolumeArea", "30e-6");

linsys = linearize(model, io);
[mag, phase, wout] = bode(linsys);
freq = wout ./ (2*pi);
SPL = 20*log10(mag(:) ./ p_ref);
deg = phase(:);

semilogx(freq, SPL, LineWidth= 1.5);

The low-frequency response drops significantly, which matches the real-world experience of losing bass when an earbud loosens from the ear.

Seal the Leakage

Removing leakage entirely simulates a perfectly sealed earbud. This increases the low-frequency response because no pressure can escape.

set_param(model + "/Earbud", "LeakageVolumeArea", "3e-6");
set_param(model + "/Earbud", "IncludeLeakage", "false");

linsys = linearize(model, io);
[mag, ~, wout] = bode(linsys);
freq = wout ./ (2*pi);
SPL = 20*log10(mag(:) ./ p_ref);

semilogx(freq, SPL, LineWidth=1.5);

With a perfect seal, the low-frequency response becomes flat and substantially louder below 1 kHz.

Remove the Front Cover

The microspeaker front cover consists of small holes that add acoustic mass and resistance to the front path. Removing it eliminates this impedance and slightly alters the mid-to-high frequency response.

set_param(model + "/Earbud", "IncludeLeakage", "true");
set_param(model + "/Microspeaker", "frontCov", "false");

linsys = linearize(model, io);
[mag, ~, wout] = bode(linsys);
freq = wout ./ (2*pi);
SPL = 20*log10(mag(:) ./ p_ref);

semilogx(freq, SPL, LineWidth=1.5);

Remove the Sound Tube and Ear Tip

The sound tube and ear tip (pinna coupling) from the acoustic path between the earbud front and the ear canal. Removing them connects the microspeaker front directly to the ear drum, eliminating the tube resonances that shape the high-frequency response.

set_param(model + "/Microspeaker", "frontCov", "true");
set_param(model + "/Earbud", "IncludePinna", "false");

linsys = linearize(model, io);
[mag, ~, wout] = bode(linsys);
freq = wout ./ (2*pi);
SPL = 20*log10(mag(:) ./ p_ref);

semilogx(freq, SPL, LineWidth=1.5);

Restore Model

Restore model to baseline and add legend.

set_param(model + "/Earbud", "IncludePinna", "true");

legend("Baseline", ...
    "Leakage Increased (10x)", ...
    "Leakage Sealed", ...
    "Front Cover Removed", ...
    "Sound Tube Removed", ...
    "Location", "southwest");

Close the model

bdclose(model)

References

  1. Huang, Jin H., Hong-Ching Her, Y. C. Shiah, and Shaw-Jyh Shin. "Electroacoustic simulation and experiment on a miniature loudspeaker for cellular phones." Journal of Applied Physics 103 (2008): 033502.

  2. Huang, Chen-Hung, S. J. Pawar, Zih-Jyun Hong, and Jin H. Huang. "Earbud-type earphone modeling and measurement by head and torso simulator." Applied Acoustics 73, no. 5 (2012): 461-469.

  3. Gazzola, C., V. Zega, A. Corigliano, P. Lotton, and M. Melon. "Lumped-Parameters Equivalent Circuit for Piezoelectric MEMS Speakers Modeling." Proceedings of the 10th Convention of the European Acoustics Association Forum Acusticum 2023 (2024): 6307-14.

See Also

| | | | (Control System Toolbox) | (Simulink Control Design)

Topics