2
$\begingroup$

I want to determine the frequency response (magnitude, phase) of a microphone. I have another "good" reference microphone whose frequency response I know.

I understand that I can use a good speaker and measure the two mics simultaneously using white noise. Regarding the magnitude response, I can estimate the power-spectral densities by a method of averaged periodograms. Next, I can find the magnitude response of the device under test by subtracting the power spectral densities in logarithmic scaling and adding the known magnitude response of the reference microphone.

  1. Averaging over periodograms seems necessary to control the variance of the periodogram estimator. But what about the phase response? Does a similar inconsistency exist for the angle of the fft also?

  1. If I use an exponential sine sweep $x(t) \propto \sin(\omega_0 e^{a t} t)$, how do I obtain the frequency response? Do I average over the entire measurement time or do I do no averaging at all?

Edit: I did not explicitly state but implied that I perform the measurements in an anechoic room.

$\endgroup$
  • 1
    $\begingroup$ you also need to consider that the room you test in has a response as well. $\endgroup$ – Stanley Pawlukiewicz Jul 27 at 1:32
  • $\begingroup$ Could you simply generate n sine waves at n different frequencies and measure the phase and gain (attenuation) ? The old HP 35665A Dynamic signal analyzer had different modes to measure the frequency response (impulse, chirp, swept sine) and I always found that swept sine was the most precise. keysight.com/en/pd-1000001333%3Aepsg%3Apro-pn-35665A/… $\endgroup$ – Ben Jul 27 at 3:27
0
$\begingroup$

Say $\mathbf{h}_1$ and $\mathbf{h}_2$ are the impulse response coefficients of mic1 and mic2, respectively, where $\mathbf{h}_1$ is known. Let $\mathbf{x}$ represent the input signal. Then, we can write the output of mic1 as

\begin{align} \mathbf{b} = \mathbf{X} \mathbf{h}_1 \end{align} where $\mathbf{X}$ is a Toeplitz matrix. If you want to find the impulse response coefficients of mic2, then you need to solve the following optimization problem \begin{align} \arg \min_{\mathbf{h}_2} ||\mathbf{X} \mathbf{h}_2 - \mathbf{b}||^2_2 \end{align}

The solution to the above problem is a simple least-squares solution. In the above formulation, I tried to express the convolution operation as a matrix multiplication. Find the filter coefficient response and express the transfer function in terms of $H_2(z)$. Once you know the transfer function, it is easy to determine the magnitude and phase response.

$\endgroup$
  • $\begingroup$ Are you sure about the least-squares criterion? Wouldn't the solution be $\textbf{h}_2 = \textbf{h}_1$? $\endgroup$ – Crenguta Jul 27 at 7:51
  • $\begingroup$ @Crenguta I fixed the solution. Thanks for pointing out the trivial case. $\endgroup$ – Maxtron Jul 27 at 15:42
0
$\begingroup$

Assuming that your microphones and speaker set up is such that you don't have echos or noise from external sources, you could use the cross FFT.

Its output gives you the comparison of two signals. If the two are identical, you get a flat line. Multiply that line with the known response of the reference microphone, and you have the response of your unknown microphone.

If you use white noise, average the complete output for a lot of FFTs. It's been a while since I did this kind of thing a lot, but you'll need dozens to hundreds of averages get a clean result out of white noise. It works, and gives good results. You just have to be a bit patient.

What I've also done is to use chirps. That's basically a sine sweep, but at fairly high speed.

You sychronize the capture with the chirp so that you always get a block of audio that contains the entire chirp.

You do the cross FFT (or DFT because of the block length) on the entire block and the whole chirp at once.

That gets you a nice, clean, clear analysis in one shot. It comes at the cost of having to pick your whole chirp out of the recorded audio and analyse it in one (often) enormous chunk.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.