Frequency response of a microphone using a sine sweep 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.


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?





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.
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.