A System Dynamics Approach to Testing Microphone Functionality and Gasket Seals

Background and Motivation

This one hearkens back to some time ago when I was tasked with creating a test methodology for validating 1) microphones were operating correctly in our product, and 2) the seal created with a MEMS microphone, acoustic gasket, hydrophobic mesh, and outer casing. The gasket was to be die cut from Poron Polyurethane gasketing material with dimensions and physical properties dictated by me, and the hydrophobic mesh / acoustic impedence was to be dictated by me, ultimately being a variant of Saatifil Acoustex whose impedance best damped any spikes in the measured frequency response we were seeing.

I will have to make a separate post about this, but one thing the acoustic designer will have to put some thought into, besides damping resonances created by the acoustic pathway, are the creation of a Helmholtz resonator due to the necessity of having a sound inlet, often modeled as a tube, and a resonating cavity. Think of blowing perpendicularly over the top of a 2-liter bottle of pop (or soda as non-midwesterners may try to convince me). A great primer is available from ST here.

The Problem

Now, getting back to the main objective of a test methodology, I was told by one of our acoustics consultants that leaks in a gasket typically pass low frequencies, with smaller leaks passing lower frequencies, and larger leaks passing higher frequencies, but he wasn’t able to explain why other than giving anecdotal evidence. Thinking about it, it seems to make sense that a gasket leak would pass low frequencies but not high ones, but it bothered me there was no mathematical basis for this claim. Someone once tried to hand-wave it by saying that it seemed to make sense that it would act like a capacitor, as I’m sure they were relating to a low pass RC filter, but capacitive reactance is inversely related to frequency, not proportional to it, as is the case with inductive impedance, which is why the capacitor connects to ground in a low pass RC filter; it passes the high frequencies through it to ground, forcing the low frequencies to pass to the output of the filter.

Alright, as an aside I feel compelled to briefly touch base on this, and maybe I’ll expand it to a different post, but here are the mathematical models for impedance for a capacitor and inductor:

\displaystyle Z_{C} = -j \frac{1}{\omega C}
\displaystyle Z_{L} = j\omega L

Where C is capacitance, L is inductance, and j is the square root of -1. As impedance is composed as the sum of resistance (real) and reactance (imaginary), we see the impedance of inductors and capacitors are purely from reactance.

Anyway, didactic diatribes aside, let’s get in to this.

Acoustical Derivation

For the case of simple one dimensional, harmonic motion, we know the displacement of a particle as a function of position, x, and time, t, is given by equation 1, below.

1) \displaystyle \qquad y = y_{m} \sin (kx-\omega t)

Where y_{m} is the displacement magnitude, k is the wave number, and \omega is the waveform angular velocity.

We can also model the one dimensional particle velocity, u, and acoustic pressure, p, with equations 2 and 3 respectively.

2) \displaystyle \qquad u = \frac{\partial y}{\partial t} = -A \omega \cos (kx-\omega t

3) \displaystyle \qquad p = -\kappa \frac{\partial y}{\partial x}= - \kappa A k \cos(kx - \omega t)

Where \kappa is the adiabatic bulk modulus.

Some texts prefer to define the particle velocity as related to increment in infinitesimal working volume, \tau and displacement \xi. For the three dimensional case this becomes:

4) \displaystyle \qquad \tau = V_{0} \; div \; \xi = V_{0} \; \nabla \cdot \xi

Differentiating with respect to time yields:

5) \displaystyle \qquad \frac{\partial \tau}{\partial t} = V_{0} \nabla \cdot q

Where q is the instantaneous particle velocity. In the one dimensional case this reduces to:

6) \displaystyle \qquad \frac{\partial \tau}{\partial t} = V_{0} \frac{\partial u}{\partial x}

Where u is the instantaneous one dimensional particle velocity. This ultimately relates particle velocity as the time rate of change of particle displacement.

7) \displaystyle \qquad u = \frac{\partial \xi_{x}}{\partial x}

Let’s proceed using the more intuitive definition of partial y partial t. If we then consider a one dimensional wave passing through an aperture with area A, the volume flow, U is defined as:

8) \displaystyle \qquad U = \frac{dV}{dt} = A \frac{dy}{dt} = Au

The acoustic impedance, Z, is then defined as the ratio of sound pressure to volume flow, which for this simple one dimensional case ignores reflections, etc.

9) \displaystyle \qquad Z = \frac{p}{U} = \frac{p}{Au} = \frac{z}{A}

Which utilizes changing to specific acoustic impedance, z:

10) \displaystyle \qquad z = \frac{p}{u}

We can also show that the adiabatic bulk modulus, which is the ratio of infinitesimal pressure increase to the resulting relative decrease of the volume, assuming no heat transfer, is:

11) \displaystyle \qquad \kappa = \rho v^2

where \rho is the acoustic medium density, and v is the velocity of sound in an ideal gas, v = \omega \ k.

If we then re-arrange equation 9, and substitute equations 2 and 3 we obtain:

12) \displaystyle \qquad z = \frac{- \kappa y_{m} \cos(kx - \omega t)}{-Ay \omega \cos(kx - \omega t)} = \frac{\kappa k}{A \omega} = \frac{\omega^2 k}{k^2 A \omega} = \frac{\rho \omega}{k A}

where k is the wave number, k = 2 \pi /\lambda.

From equation 12 we can see that as the frequency increases, the area of the aperture must also increase to maintain the same characteristic acoustic resistance. We can therefore conclude that if there are leaks in a MEMS microphone gasket, the smaller the size of the leak, the smaller the frequency is that it will pass.

Testing Apparatus

With the above knowledge, the testing apparatus consisted of a speaker mounted directly in front of the microphone port, one directly behind the mounted microphone and a single board computer to control the processing.

The test itself consists of five frequency sweeps with differing magnitudes to compensate for the large difference between minima and maxima of frequency response of the speakers. Each of the 5 sweeps are played, loaded into memory, windows with a rectangular window (the same as no window), and finally an FFT is used to convert to frequency domain using the pyfftw library so as to accelerate computation over traditional functions that operate on the Cooley-Tukey fast Fourier transform algorithm, such as that include with scipy. Once FFTs are obtained, a savitzky-golay filter is used to smooth the data while attempting to best preserve spectral peaks. The element wise ratio of filtered front speaker FFT to back speaker FFT is then calculated to determine the gasket attenuation. If the attenuation is above a pre-set threshold for all frequencies in each sweep the test is considered a pass. Below are some examples from the different frequency spectra, with red indicating the frequency response calculated from playing through the front speaker, and blue indicating the frequency response calculated from playing through the rear speaker.

Plots

40 to 80 hz frequency band frequency response
40 to 80 hz frequency band attenuation
80 to 140 hz frequency band frequency response
80 to 140 hz frequency band attenuation
140 to 220 hz frequency band frequency response
140 to 220 hz frequency band attenuation
220 to 2200 hz frequency band frequency response
220 to 2200 hz frequency band attenuation
2.2 to 20 khz frequency band frequency response
2.2 to 20 khz frequency band attenuation
example text output to be saved


Sources

http://www.animations.physics.unsw.edu.au/jw/sound-impedance-intensity.htm
and
Acoustics: Sound Fields and Transducers. L. Baranek, T. Mellow.

Leave a Reply

Your email address will not be published. Required fields are marked *