## 2 Method  
### Delay-and-Sum Beamforming Algorithm  
Beamforming is a mature digital signal processing technology that is commonly used in the fields of radar, sonar, and seismic detection. The basic idea of the beamforming algorithm is to calculate the energy of a wave in a certain hypothetical direction by summing the delays of the signal of each array element to give an estimate of the wave arrival direction. The beamforming method uses a sensor array with a fixed spatial position to measure the spatial sound field, and it processes the signals that are measured by each sensor to obtain detailed sound source information. In the leak detection method that is covered in this paper, the direction of a leak can be obtained by a set of sensors. The final location point can be obtained by the intersection of two sets of sensor arrays. In beamforming algorithms, the choice of sensor array shape is critical. According to the characteristics of spacecraft structures, a planar array can be used for detection. The shape of a planar array is usually circular, square, triangular, cross, and the like. For spacecraft, the load needs to be as small and light as possible. Research by [PERSON] et al. [16] showed that L-type arrays can obtain the best experimental results with the smallest number of sensors. Therefore, in the following research, an L-shaped array with 8 sensors was used as an example. Moreover, the method proposed in this paper is applicable to other array formats. The demonstration of the beamforming algorithm is shown in Figure 1.  
As shown in Figure 1, the sensor array in the figure is labeled n, including #0-7. Among them, the #0 sensor is for reference. When a leak occurs, sound waves propagate through the plate and are acquired by the sensor. \(f(t,n)\) is defined as the signal that is acquired by each sensor at the time of \(t\). The relative angle \(\theta\) between the leak source and the array is defined as the actual direction of the leak source, and \(\theta^{\prime}\) represents the hypothetical direction. When the distance between the sensor array and the leakage source is far greater than the size of the array, the signal waves are considered to propagate along parallel paths. Under this assumption, the signal sampled by the reference sensor #0 is the replica of time-delayed signals that are recorded by other array elements. The time delays between array elements are determined by both by the relative  
Figure 1: Demonstration of beamforming. distance from the signal source to array element #_n_ compared to the reference sensor #0 under the direction of arrival and by the wave speeds. Usually, the direction of arrival is unknown; a hypothetical direction of arrival \(\theta^{\prime}\) is set. According to the geometric relationship of Figure 1, the time delay of each signal for #0 can be expressed as:  
\[\Delta t_{n}=\frac{d_{n}}{v}, \tag{1}\]  
where \(d_{n}\) represents the relative distance as shown in Figure 1 and \(v\) represents the wave speed. \(d_{n}\) can be defined as:  
\[d_{n}=\left\{ \begin{array}{c}n\times d\times\cos\theta^{\prime},[n=1,2,3]\\ (n-3)\times d\times\sin\theta^{\prime},[n=4,5,6,7]\end{array} \right., \tag{2}\]  
where d represents the distance between the sensors; this distance is the same as the diameter of the sensor and is 8 mm. If \(\theta^{\prime}\) is consistent with the true angle \(\theta\), the signal will be concentrated through the superposition of time delay. Therefore, the signals of each sensor are delayed and superimposed to obtain the following delayed sum signal \(g(t,\theta^{\prime})\):  
\[g(t,\theta^{\prime})=\sum_{n=1}^{7}f(t-\Delta t,n)+f(t,0), \tag{3}\]  
The energy of the signal can be obtained by squaring and integrating the superimposed signal in the time domain. By scanning calculations for different hypothetical angles, an energy function \(B\) (\(\theta^{\prime}\)) related to the angle can be obtained:  
\[B(\theta^{\prime})=\int g^{2}(t,\theta^{\prime}))dt, \tag{4}\]  
After obtaining the angle of the peak, it can be used as the result.