# Design of a Phase Calibrator to Evaluate Non-Matched Microphones for Intensity Probes
## 2 Materials and Methods
### The Software Implementation  
The software, implemented in LabVIEW, was designed to extract the phase difference between the microphones. It was allowed to change the averaging parameters in terms of mathematical formulation (RMS, peak-to-peak, crest, etc.) and number of averages as reported in Table 2. To test the software core capabilities, a simulation version with both generating and acquiring modules was designed. We simulated the microphones with two sine signals with a certain amount of noise. These two signals were 180 degrees out of phase.  
From Figure 20, it is evident that the software was able to detect that the virtually generated 70 Hz sound waves (10% of the amplitude white noise) were 180 degrees shifted, which was the imposed phased difference between the signals. Once the software calculation core was validated, it was necessary to implement the possibility of acquiring the two microphone signals when exposed to the acoustic field. The software is organized into 3 modules. The first two windows are dedicated to phase-mismatch correction by calculating the imaginary part of the cross-spectrum of the two signals. In this case, given the necessary FRF calculation, we decide to provide the possibility of using multiple windowing modes and input/output optimization parameters [24; 25]. The last module is implemented to show that with the provided phase correction, the newly corrected phase mismatch becomes theoretically null in the frequency range of interest. In addition to the phase difference and the amplitude ratio, we decided to provide information regarding the coherence between the signals.  
\[C=\frac{\left|S_{xy}(\omega)\right|^{2}}{S_{xx}(\omega)S_{yy}(\omega)} \tag{10}\]  
Coherence, defined by Equation (10) in which \(S_{xy}\) represents the cross-power spectral density between two signals \(x(t)\) and \(y(t)\), and \(S_{xx}\) and \(S_{yy}\) are the power spectral density of signal \(x(t)\) and \(y(t)\), is a statistical measurement that expresses the level of linear dependency between two ergodic signals. It is a real number ranging from 0 to 1 that represents the possibility of obtaining one signal from another through a linear filter. Coherence can therefore be intended as a measurement of the linearity of a system and a measurement of how a certain peak can represent a mode shape of the system rather than measurement noise.  
\begin{table}
\begin{tabular}{c c} \hline \hline
**Module** & **Scope** \\ \hline Calibration module & Phase correction calculation \\ FFT module & Single signal analysis \\ Measurement module & Measuring of corrected phase mismatch \\ \hline \hline \end{tabular}
\end{table}
Table 2: Final software modules and capabilities.  
Figure 19: Detail of the positioning of the microphones into the calibrator’s cap.  
The acoustic signal was generated with Audacity software. In our case, white noise was the signal of choice. This was purely arbitrary since the only needed condition was the equivalent exposure to the same acoustic level of the two microphones. Given the characteristics of the speaker and the physics of the problem, no input/output synchronization was needed.