# How to standardize two similar microphones?

I am using two similar microphones for my Active Noise Cancellation project. I need to use the microphone input values in LMS Algorithm,I want to standardize the two microphones, so the iterative adaptation will be precise. The problem is I am getting two different signals for two microphones under similar noise or under with out any noise.
I tried to model the difference in two signals, but it is getting really complicated as it is changing with noise source amplitude and distance from noise source and also there is a DC Offset factor ( or some picked up signal !!?) involved which is making two signals shift from zero position.
How can two microphones values differ of same quality?
1st picture: With sinusoidal standard noise (Amplitude 2, frequency 2kHz, Sampling rate 44.1kHz, number of samples 50)
2nd picture: With out any sound !!
Edit: I have now used a band pass filter, now the wave forms are much smoother. The two new images are response of microphones taken when they are placed right infront of speaker. I could be able to match the phase of two after some work! Now m1=1.656*m2; The 2nd picture (with out any noise) is giving m1=1.317m2; Obviously these values are too random( varying between 1.3-1.6) over the distance. I am trying to find some approximate or appropriate correction factor.

• The first picture shows a phase problem. Also if you are using white noise, if I'm right i guess that the signal won't be the same at one moment or another. Are your mics new or are they second-hand sales? Nov 7, 2015 at 17:07
• @jonhatansmith mics are new but are of cheap quality not omni-directional. mics. I am not using any gaussian noise, simple pure sine wave sound ( amplitude 2, frequency 2kHz, Sampling rate 44.1kHz, number of samples 50) . I recorded this sound using MATLAB and I am using LabVIEW for analysis (NI myRIO 1900 module). Nov 7, 2015 at 19:39
• Thx for the specs. I might not help you fully with your prblm but cheap mics might not be the best way to have accurate results. I think someone already told you that but you cold delay your mics to reduce phase difference this post might help you. Cheers Nov 7, 2015 at 20:32
• Note that your interface, recording software, and settings are likely to be factors here, so you can't assume that the samples that you have on disk reflect only the effects of the two microphones. Even if both mics were magically identical and more magically located in the exact same place pointing the exact same direction., it would be very unlikely to get the same recording from them. Nov 9, 2015 at 14:04
• jonhatansmith Thank you. @ToddWilcox Yeah,I agree.I found the problem is more basic.Even if I place the two microphones touching each other, their centers are around 1cm apart.So, eventually the signal received by the both will differ in magnitude and phase.Now I have used band pass filter and response is much better and also I am getting correction factor between 1.2 and 1.5, again changing with distance and position. There are bunch of other things that I need to consider like frequency response and directionality of microphones and ADC accuracy so on.. Hopefully I will figure it out soon Nov 9, 2015 at 14:51

I've read most of the discussion above and I can point a few flaws. First off, you are not using omnidirectional capsules. This will result in proximity effect (boost in the low end when the source is getting closer). Then, the capsules need to be aligned in some way so you can calculate the delay between them and take it into account. You can find cheap omnidirectional electret capsules easily on eBay. These do not require phantom power and usually come in a very compact form factor.

Then comes the frequency response compensation. Many microphone makers will send you a graph of your mics frequency response. If you ever bought a real analysis microphone, you know that some companies will also provide you with a unique correction curve (usually in a CSV file or similar format) for your microphone.

To create that correction curve yourself, you need a reference speaker, a reference signal and in the best of the worlds a reference microphone. In your case, having a flat microphone is not really the point (even though it could make things easier on the long run) so you just pick the microphone that seem to be the flattest and use it as a reference for the other. If you want I can send you the file BeyerDynamics sent me for one of my analysis mics so you see exactly what is going on. Usually, the file is basically just a list of frequencies and db offsets. In Beyer's case they sample 100 frequency and their db offsets, starting at 50hz, all the way up to 19980hz. Of course, the higher in frequency, the more samples per octave you take.

For your reference signal, use Pink Noise. From the look of your curves I'm not sure what you used because white noise will give you a lot more high end. But at the same time I don't know if you weighted the graph or not. Anyway, you point out that the values are moving because of the noise and that is normal. In analysis softwares you always have an option to do averaging. You take, let's say, 10 or 20 readings of the same thing at different times and create an average curve from all that. It should give you a pretty accurate curve. Want to be more precise? Take more readings to create your average.

When it comes down to applying the compensation curve to your FFT algorythm, I'll leave that to someone else, but you this is how we do the rest in the real world :)

Hope it helps!

• +1 Thanks for your reply. I went for new microphones, turned out to solved the problem without need for any compensation. But it is very interesting to see your point on frequency response. I certainly am interested in learning about it. Would you like to add link to the file here? or shall I provide my E-Mail details? Feb 9, 2017 at 21:29
• Ill post it here as soon as i get a minute! Feb 10, 2017 at 21:27

The best way to do this is to collect an impulse response from both microphones with reference to a third reference microphone and use this to convovolve the output from each capsule with its relevant impulse response. This will standardize the spectral and phase response of both capsules.

Have a look here for an example of doing this with an ambisonic microphone - where all capsules need to be aligned.