Microphone Processing on Cortex-M
November 11. 2015, ARM Techcon, Santa Clara,CA—Cole Li from DSP Concepts presented information on advanced microphone processing on ARM processors. The growing number of devices that include microphones requires better understanding of mike characteristics and how to process their signals.
Mikes are not only in phones and tablets, but are moving into automotive and IoT products. New functions beyond capturing sound include sensors and, with multiple mikes, for beam forming. The growing number and types of applications are calling for use in portable and low-power apps, which is much more complex than for speakers. The emerging apps for microphones a acoustic and ultrasonic sensors require advanced DSP and machine learning techniques as well as low MIPs.
The challenges are in the microphone characteristics. They have poor SNR and must work with a very wide range of input signals. Most of the transducers suffer from near-far placement issues and have difficulty in separating noise and signals. Specific issues with the mikes are in DC offsets, gain mismatches when used in arrays, non-flat frequency response, and limited dynamic range. All of these problems can be processed out of the system with appropriate algorithms and calibration, but noise is still an issue.
In addition to the problems of the mikes, the devices also have to address noise issues like hiss, popping, essing, wind, acoustic echo and feedback, and environmental noise. The noise issues can be addressed by adding noise gates, dynamics processors, wind noise removal, acoustic echo cancellation, and beamforming. The methods to deal with noise and microphone errors call for a lot of data processing.
The good thing about mikes is that they are being used in more applications beyond just capturing sounds, such as for sensors to detect glass breaking or gun shots for security systems, breathing patterns for lung abnormalities, and ultrasonics for localization and tracking. All of these applications require advanced DSP and machine learning techniques as well as low MIPS for use in low power devices.
Among the challenges for the mikes is the relatively variable and low signal-noise ratio. Mikes are specified against either a FS digital level starting with 0 dB, or an SPL acoustic level with 120 dB corresponding to 0 FS. The reference level for a mike is usually 94 dB SPL or -26 dB FS equal to 1 Pa. One problem is that the noise floor is generally about 33 dB SPL, which leaves only 61 dB headroom between a quiet room and the reference level.
Normal conversations at 5 cm see a volume of 66-86 dB SPL leaving a SNR of 33-53 dB. The problem is that normal conversations at 1 m provide a SPL of only 40-60 dB, allowing a SNR of 7-27 dB. It is easy to see that the soft talker just barely gets louder than the background noise in a quiet room. In addition to the SNR issues, the MEMS mikes can have DC offsets, gain mismatch, and non-flat frequency responses. As a result, the mike outputs need significant processing for the best overall response.
In digitizing and processing the signals, the developer also has to consider the dynamic range of the inputs and adjust levels to get more of the signals into a comfortable listening range without increasing the noise levels. Soft speech has peaks near -40 dB, loud speech about -30, and loud music less than -10dB. An automatic gain control that also incorporates a noise gate could provide moderate gain at low levels, a base gain from -50 to -20 dB and start compressing beyond that level to even out the various volumes.
The noise gate can be designed in either the time or frequency domain, with the time domain being a simpler design, but the performance is better for the frequency domain efforts. A frequency domain design would start with segmentation of inputs into frequency bands. After computing the magnitudes of al bands, you apply time constants and split the signals into two bands. Then you apply independent noise gates within each sub-band and return to the time domain.
Another important function is echo cancellation, especially when systems are simultaneously operating with both speakers and mikes. The basic idea is to cancel the speaker inputs to the mike signal chain while allowing everything else through. This processing can be in both frequency and time domains. Total cancellation is not possible due to mismatches in the processing chains, but a good design can achieve very large reductions at the cost of additional processing time and power.
Microphones need a variety of processes to improve sound quality. The different noise and distortion sources require different algorithms for removal, and higher quality sound tends to require more processing which can impact the user experience by running the batteries down faster. The growing applications for acoustic sensors is a driver for the incorporation and use of mikes for more functions and a driver for many IoT and wearable apps.


