Simulating a Microphone - What You Need to Know

Figure 1. A Brüel and Kjær 4134 condenser microphone undergoing coupled simulations. The coupled simulations include a thermal viscous model, membrane mechanics and electrostatics. (Image courtesy of COMSOL.)

There's more to microphone simulations than you would think, but fortunately for microphone designers, there exists specialized computer-aided engineering (CAE) software just for it.

Acoustic systems are the epitome of multiphysics. One condenser (capacitor) microphone (mic) encompasses the use of computational acoustics (including thermoviscous effects), mechanics, and electronics all within a very small package.

In fact, when a microphone’s system becomes small enough, as is the case with condenser mics, the physics involved become even more complicated. This is because, at a small enough geometric scale, the losses occurring in the so-called acoustic boundary layers present at the walls (the geometry interferes with the air) cannot be neglected. This becomes especially prevalent during resonance. To model condenser microphones properly, these energy losses need to be considered. This is achieved using the equations of thermoviscous acoustics; in some ways these equations lie somewhere between classical acoustics (Helmholtz equation) and computational fluid dynamics (CFD).

“When most engineers study acoustics they don’t include the thin layer at the wall,” explained Mads J. Herring Jensen, technical product manager at COMSOL.“Normally in room acoustics and loud speakers, all these effects can be completely disregarded. But, for microphones or other small systems like mobile devices, you need the correct simulations to predict the response of the system.”

Defining the Condenser Microphone System

Learning the mechanics behind condenser microphones makes one wonder if MacGyver invented them.

The condenser microphone system contains a membrane and backplate that make up a capacitor. The membrane, or diaphragm, vibrates in response to the pressure differentials caused by sound waves. This vibration is then picked up as change in capacitance, which creates an electrical signal.

Figure 2. Setting up the thermoviscous acoustic model within a condenser microphone geometry. (Image courtesy of COMSOL.)

“The acoustic signal comes from the outside world and then that vibrates the diaphragm. The movements of the diaphragm, and thus the electric signal, are a measure of the sound pressure level of the incident acoustic signal. The relationship between the incident pressure and the electric signal is microphone sensitivity, an important parameter in microphone design. The movement of the diaphragm is influenced by the acoustic behavior inside of the microphone,” explained Jensen.

He added, “In the old days, when you designed these microphones, you were working with lumped equivalent circuit models. You would model each part of the microphone separately. This has a lot of restrictions with respect to precision. This is especially true for complex geometries where these representations are no longer valid. Then, you need to go to the FEA.”

Defining the system takes knowledge of acoustics, mechanics and electronics. To control and define the system correctly, you need to also take into consideration the geometry of the microphone and how it will affect the losses in the thermoviscous boundary layer that weaken and interfere with the signal.

“The mathematics behind the thermoviscous boundary is nasty,” noted Valerio Marra, marketing director at COMSOL. “We coded it so that people don’t worry about it. Before, it was crazy for customers to do this and make the model converge.”

Tips for Simulating the Thermoviscous Boundary Layer for Condenser Microphones

Just like any multiphysics problem, the best course of action is to model each physics separately. Going through the model one physics at a time will help to check the simulation for errors.

For COMSOL users, Jensen suggests they use the membrane interface to model the diaphragm and the thermoviscous acoustic physics interface within the microphone’s chamber. As for the microphone’s electronics, that should be left to the electrostatics interface.

Once all the boundary conditions are set up and each physics is working you can then use the built in multiphysics coupling within COMSOL to complete the model.

“This is easy to set up, just define the boundary conditions as being coupled and the software does it. This becomes a fully two-way multiphysics system,” said Jensen. “Coupling of partial differential equations is a key feature of COMSOL.”

Engineers should note that all of the multiphysics simulations involved in the thermoviscous model can make the simulation very computationally expensive. To limit the amount of time your high-performance computing (HPC) system is crunching numbers, limit the thermal viscous model type to thin regions where it is valid. Simplified models, like a pressure acoustic simulation, can be used in the bulk to speed things up. However, COMSOL now has dedicated solvers that can handle these large models, as well.

Figure 3. Viscous and thermal boundary lager thickness based on a sound signal’s frequency. The boundary layer is inversely proportional to the square root of the frequency. (Image courtesy of COMSOL).

Engineers should also ensure they have enough elements to properly define the boundary layer region but not so many that it bogs down the solution time once again. This will require some tight control of meshing parameters.

Jensen suggests using a frequency sweep to determine the parameter that defines the boundary layer thickness.

As seen in Figure 3, “The thermal viscous boundary layer is about 0.2 mm at 100Hz and is inversely proportional to the square root of the frequency,” said Jensen. This relationship can be used to limit the thickness of the boundary layer in the mesh.

For instance, if the user defines a set number of mesh elements for the boundary layer, then they will not see a large influx of elements within the mesh.

“You will lose some time with each parameter sweep as you will need to remesh the model with every parameter change,” said Jensen. “However, the more optimized mesh should save time in the long run.”

Figure 4. Though the thickness of the boundary layer changes the number of elements remains the same. This will ensure the model remains accurate but doesn’t create a runaway mesh density. Engineers don’t live forever and computations need to end. Color in the image represents the root mean square velocity of a wavelength in an infinite circular duct of a diameter of 2mm [0.08 inch]. (Image courtesy of COMSOL.)

A final tip to speed up these simulations is to use a Narrow Region Acoustics model. Due to accuracy issues, this is only advised for engineers working during the early development stages of a microphone’s design.

However, Jensen explains that the Narrow Region Acoustics model’s ability to homogenize the fluid model and “smear” the boundary layer meshes over the whole fluid domain is useful and for early development estimations.

Build Your Own Simulation App for Microphone Design

Figure 5. This simulation couples a thermal viscous acoustic model with an exterior pressure acoustics model. The thermal acoustic model simulates the acoustics in the small domain between the diaphragm and back plate. The pressure acoustics models the pressure field in the exterior domain. (Image courtesy of COMSOL.)

Once you have your condenser microphone’s interior simulated, the next logical step is to link the simulation into the bulk. This will scale up the model and offer more information about the design.

Jensen notes that the pressure acoustics model can be used to model the bulk environment around the mic. Coupling this acoustic model to your thermal viscous acoustic model can then help engineers determine the mic’s sensitivity.

The information created by this larger scale simulation can be helpful to more than just design engineers. For instance, sound technicians can use it when setting up the audio in a sound studio.

“You can make an app for design and include all the complexity of the mic so that app users can determine the sensitivity curve and internal workings of the device,” said Jensen. “You can also have the app set up ways to mount the mic, say, flush on a table or hanging from a boom. These can affect the special sensitivity.”

This tool can also be helpful to microphone resellers so they can guarantee their customers that they will receive the correct equipment to do the job.

These apps can go a long way in pushing a customer’s and reseller’s user experience. 

To learn more about microphone design and thermoviscous acoustics, read COMSOL NEWS’ special edition on Acoustics.


COMSOL has sponsored ENGINEERING.com to write this article. All opinions are mine, except where quoted or stated otherwise. —Shawn Wasserman