## 2 The Principle of Leak Location Method Based on the Generalized Cross-Correlation Function
### The Modified Generalized Cross-Correlation Location Method
In fact, \(S_{ss}(\omega)\) is often unknown as it depends on the leakage aperture, the gas pressure difference between inside and outside the pipe [10], etc. However, \(H_{1}(\omega)\) and \(H_{2}(\omega)\) can be obtained by the impulse response method [26], and can be calculated by using:  
\[H_{i}(\omega)=\frac{Y_{i}(\omega)}{X(\omega)},\ i=1,2, \tag{6}\]  
where the parameter \(i\) indicates the sensor serial number, \(Y_{i}(\omega)\) denotes the DFT of the impulse response signal measured by the corresponding sensor, and \(X(\omega)\) is the DFT of the impulse signal measured by the impact hammer. In this study, the impulse signal is assumed as the Dirac delta function. Therefore, to compensate for the weakening effect of the pipes on the AE signals, the modified frequency weighting function of the GCC function is written as:  
\[\Psi_{g}(\omega)=\frac{1}{\left|H_{1}^{*}(\omega)H_{2}(\omega)\right|}. \tag{7}\]  
The modified GCC function \(R_{x1x2^{g}}(\tau)\) can be derived by substituting Equations (4) and (7) into Equation (3), and expressed as:  
\[R_{x1x2}^{g}(\tau)=F^{-1}\Big{\{}S_{ss}(\omega)e^{i\omega d}\Big{\}}=R_{ll}( \tau)\otimes\delta(\tau+d). \tag{8}\]  
Compared with Equation (5), pre-filter \(\Psi_{g}(\omega)\) removes the effects of the propagation paths on the AE signal, \(\delta\left(\tau+d\right)\) is only broadened by \(S_{ss}(\omega)\). Therefore, the modified frequency weighting function can increase the degree of correlation between two measured signals and improve the accuracy of the time delay estimation. The modified frequency weighting function differs from the PHAT processor function [25] in that the frequency weighting function involves pre-whitening of the leakage-induced signal. To reduce the effects of noise on the time delay estimation, only the leakage-induced signal with greater power spectral density should be extracted and processed by the proposed pre-filter. Figure 2 shows a schematic of the modified GCC location method, which contains N-point DFT, complex conjugate, cross power spectrum, pre-filter and N-point inverse discrete Fourier transform (IDFT). Figure 2: Schematic of the implementation of the modified GCC location method. The leakage can be located by:  
\[R_{s1s2}(\tau)=R_{x1x2}(\tau), \tag{2}\]0  
where \(l\) is the distance between the two sensors, \(l_{est}\) is the estimated distance between the leak and one sensor, and \(d_{est}\) is the time delay estimation. The frequency-dependent speed \(v(\omega_{0})\)[9] of AE signals along the pipe wall is discussed in Section 2.2. In this study, the relative location error with respect to the distance between the leak and one sensor is determined as:  
\[R_{s1s2}(\tau)=R_{x1x2}(\tau), \tag{2}\]1  
The cross-correlation coefficient (CCC) [27] in terms of the time delay \(\tau\) can be used to evaluate the correlation of two measured signals and it is given by:  
\[R_{s1s2}(\tau)=R_{x1x2}(\tau), \tag{2}\]2  
where \(R_{x1x1}(0)\) and \(R_{x2x2}(0)\) are the amplitudes in the autocorrelation functions of \(x_{1}(t)\) and \(x_{2}(t)\), respectively, for \(\tau=0\). The larger the maximum peak in CCC is, the higher the degree of the correlation between the two signals is [28].