Pressure Signal Enhancement of Slowly Increasing Leaks Using Digital Compensator Based on Acoustic Sensor

Pipeline leak detection technologies are critical for the safety protection of pipeline transportation. However, they are insensitive to slowly increasing leaks. Therefore, this study proposes an enhancement method for slowly increasing leak signals. By analyzing the characteristics of pressure signals of slowly increasing leaks, a digital compensator is developed to overcome the disadvantages of pressure signals and enhance the pressure signals. According to the frequency response analysis of the digital compensator, the enhancement principle is the parameter adjustment of the digital compensator. Therefore, this paper further proposes an adaptive adjustment method of the parameter to enhance different degrees of leak signals online in real-time, and the proposed method is evaluated using two field pipelines. The experimental results demonstrate that this method is suitable not only for enhancing slowly increasing leaks but also for enhancing abrupt leaks.


Introduction
Many pipelines, such as chemical feedstock transportation pipelines, urban gas pipelines, and water pipelines, suffer from leaks which may occur because of corrosion, aging pipelines, or third party damages [1][2][3][4][5]. Nowadays, researchers have developed many leak monitoring systems which mainly have three steps: (1) sensing signals through sensors, (2) leak diagnosis, and (3) leak location. Therefore, the effectiveness of leak signals is crucial for pipeline leak detection.
When a pipeline leak occurs, the leak of the medium will cause many physical changes, such as the pressure, strain, acoustic wave. For the heated medium, the temperature would also vary. These physical variables can be measured by the sensors installed on the pipeline. Moreover, the most widely used sensors are the optical fiber sensors [6,7], acoustic transducers [8][9][10][11] and pressure transducers [12][13][14][15]. The fiber optical sensors can sense leak signals by monitoring temperature, strain, or acoustic signals based on laying a long sensing cable along the outside of a pipeline [7,16,17]. This method has been widely applied in pipeline leak detection thanks to its high sensitivity and reliability [16,18]. However, the laying and maintenance of fiber optical sensors are often costly and difficult, especially for underground pipelines.
The acoustic transducers are installed on both ends of the pipeline and can monitor a pipeline leak by measuring relative pressure [19]. As presented in [20,21], the acoustic transducer has a wide frequency response and high sensitivity. Moreover, the waveform of the acoustic signal is sharp, which helps the accurate location of a leak. Therefore, the acoustic transducer is widely employed in pipeline leak detection [22][23][24][25]. However, the acoustic transducers cannot sense slowly increasing leaks. In this paper, pipeline leaks are divided into abrupt and slowly increasing leaks according to whether the leak aperture changes slowly. It is important to note that the slowly increasing leak is not the same as the small leak.
Compared with acoustic transducers, pressure transducers are used to measure absolute pressure. Furthermore, almost all pipelines have been equipped with pressure transducers due to their stability and low cost. However, the pressure changes caused by the leak are too small in contrast to the pressure fluctuation and whole pressure transducer range [12,19,26], particularly for slowly increasing leaks. Additionally, the infection point of a slowly increasing leak signal is difficult to obtain accurately, which will influence the precision of the leak location. Nevertheless, the pressure signal can still record the pressure drop process caused by a slowly increasing leak, which provides the possibility of detecting the slowly increasing leak.
Therefore, after taking into account the cost and ability to measure slowly increasing leaks, this paper designs a digital compensator based on the advantages of the acoustic transducer to enhance pressure signals of slowly increasing leaks. Moreover, the input and output of the digital compensator are the pressure signals and the compensated signals, respectively. According to the frequency response of the digital compensator, the pressure signals of slowly increasing leaks can be enhanced by adjusting the parameter (the discretization frequency f s ) of the digital compensator. Hence, a parameter adaptive adjustment method is proposed to real-time online enhance pressure signals of with different degrees of leaks.
The rest of this paper is organized as follows. Section 2 describes the methodology including the development and the stability analysis of the digital compensator, the signal enhancement principle of slowly increasing leaks, the adaptive adjustment of parameters, and the leak detection and location. Section 3 describes the field experiments. The conclusions of this study are summarized in Section 4.

Methodology
In practice, slowly increasing leaks may occur during the pipeline pressure regulation process (increase, decrease, or fluctuation). Figure 1 shows some instances of slowly increasing leaks coming from the pressure transducers installed on the crude oil pipeline. Moreover, the specific parameters of the field pipeline are given in Section 3. As can be seen, leak pressures are highly susceptible to the static pressure of the pipeline, and their waveforms are smoother and milder. Moreover, these characteristics make slowly increasing leaks hard to identify. Consequently, the purpose of the digital compensator is to compensate for these characteristics and enhance pressure signals. As the analysis in Section 1, the acoustic and pressure transducers have a certain complementarity. Therefore, the digital compensator is developed based on the acoustic transducer. Figure 2 shows the structure and physical diagram of the acoustic transducer that is composed of a piezoelectric acoustic sensor and signal conditioning circuit.

Development of the Digital Compensator
Based on the acoustic transducer (Figure 2), the structure of the digital compensator is shown in Figure 3, where the input P(z) is the original pressure signal from the pressure transducer and the output P c (z) is the compensated signal. Moreover   Since the internal parameters and structure of the piezoelectric acoustic sensors produced by different manufacturers vary widely, and these specific data are confidential to the customer, it is impossible to establish a corresponding mechanism model based on the structure of the sensor. The ideal operating state of a senor is the linear relationship between input and output. Moreover, for the customer of the sensor, the known parameters are its sensitivity and range. Based on this, the H p (s) is expressed as: where A p is the sensitivity coefficient of the piezoelectric acoustic sensor. Moreover, according to the principle of analog circuit shown in Figure 4, the H c (s), H h (s), H l (s), and H a (s) are: where R c is the feedback resistance of the charge amplifier; τ c , τ h , and τ l are the time constant of the charge amplifier, high-and low-pass filters; A a is the gain of the amplifier. Hence, the continuous model H(s) is: where τ 1 = τ c , τ 2 = τ h , and τ 3 = τ 4 = τ l . Then, a bilinear transformation method is used to discretize the continuous model H(s). Moreover, the discrete model H(z) can be expressed as: where A = A p A a R c ; f s is the discretization frequency, and it has the same definition with the sampling frequency. According to the Z inverse transformation of Equation (7), the backward difference equation is: where k represents the sampling time, and the values of the coefficients a m and b n can be calculated with Equation (9).
So far, the digital compensator is established. Moreover, its input and output are the original pressure signal P(k) and the compensated signal P c (k), respectively. Equations (6)-(8) are its continuous, discrete, and backward difference forms.

Stability Analysis of the Digital Compensator
According to Equation (7), the poles of the digital compensator H(z) are: As the discretization frequency f s and the time constant τ i are both positive, then: Hence, the pole p i satisfies: According to Equation (12), the digital compensator is stable with f s > 0 and τ i > 0.

Pressure Signal Enhancement Principle of Slowly Increasing Leaks
The frequency response H(e jω ) of the digital compensator H(z) (Equation (7)) is: According to Euler's formula (e jω = cos ω + j sin ω), Equation (13) can be rewritten as: Hence, the amplitude response H(e jω ) (the specific derivation is given in Appendix A) is: According to Equation (15), it can be concluded that: (1) the f s is the scale factor, (2) A is the translation step, and (3) τ c , τ h , and τ l have both scale and translational effects. Figure 5 shows the amplitude response H(e jω ) varying with the parameters ( f s , A, τ c , τ h , and τ l ) and the corresponding cutoff frequency is given in Table 1. It is important to note that: (1) when a parameter is a variable, other parameters are set to fixed values ( f s = 100 Hz, τ c = 4 s, τ h = 2 s, τ l = 0.01 s and A = A p A a R c = 5.348 × 10 −11 C/Pa × 3 × 2 × 10 10 Ω = 3.21 Ω×C/Pa); and (2) according to the structure of the digital compensator, the cutoff frequency of the charge amplifier, high-pass filter and low-pass filter should be f c < f h < f l , since f = (2πτ) −1 , the change of τ c , τ h and τ l needs to satisfy τ c > τ h > τ l . It can be seen from Figure 5 and Table 1 that the parameters f s , τ c , τ h , and τ l play a telescopic effect on the amplitude response H(e jω ) , in which the effect of f s and τ l is obvious.
Based on the above analysis, the amplitude response H(e jω ) changes with the frequency, that is, the digital compensator |H(z)| can selectively pass and amplify certain frequencies of the pressure signal. Therefore, the digital compensator has a frequency selective characteristic, and these passing frequencies are determined by the parameters f s , τ c , τ h , and τ l . Different leak pressure signals have different frequency distributions, as illustrated in Figure 6. Therefore, in order to enhance pressure signals, the pass-band of the digital compensator should be matched or overlapped with the frequency band of the leak pressure signals, which can be achieved by adaptively adjusting the parameters f s , τ c , τ h , and τ l of the digital compensator. Since the adjustment of the τ c , τ h , and τ l needs to satisfy τ c > τ h > τ l , this study adjusts only the discretization frequency f s .
and its unit is Ω×C/Pa because A p is the sensitivity coefficient of the piezoelectric acoustic sensor, and its unit is C/Pa; A a is the gain of the amplifier and is dimensionless, and R c is the feedback resistance of the charge amplifier and its unit is Ω.
To sum up, the key to the enhancement of slowly increasing leaks is that the digital compensator has suitable parameters.

Adaptive Adjustment of the Discretization Frequency f s
The discretization frequency f s should satisfy Nyquist sampling theorem: (16) where f max is the maximum frequency of the signal. Since the sampling frequency f of pressure signals have satisfied this theorem, the f s can be selected from the values greater than the f ( f s ≥ f ). Figure 7 shows the time-domain waveforms of compensated signals with different discretization frequency f s . When f s = 2000 Hz, the waveform of the compensated signal almost reproduces the pressure signal except for the amplitude and polarity. Therefore, when f s increases to a certain extent, the digital compensator has almost no selectivity for the pressure signal, that is the corresponding compensated signal is not enhanced. At this time, the width of the leak waveform in the compensated signal is approximate to the width in the pressure signal. And the better performing parameters should make the former smaller than the latter, as the f s = 200 Hz shown in Figure 7. According to the above analysis, the width characteristic of the signal can further constrain the range of the f s . Based on the signal decomposition method [27], a compensated signal is decomposed into sub-signals, and the sub-signal width of the maximum peak is taken as its width characteristic which is denoted as W P c ( f s ), as shown in Figure 8. Similarly, the pressure signal is divided into intervals based on extreme points. The width between the largest drop interval and the adjacent ascending interval in the pressure signal is taken as the width characteristic of the pressure signal and is denoted as W P , as shown in Figure 8. Then, the f s should make the W P c ( f s ) smaller than the W P . Therefore, the constraints of parameter f s are The signal-to-noise ratio (SNR) of the compensated signal is an indicator that can evaluate whether the pressure signal is enhanced. However, the SNR calculation depends on the signal abnormality, which is unknown before leak detection [27]. Therefore, it is not feasible to directly use SNR as an indicator to select an appropriate f s . Moreover, the better performing compensated signal has two characteristics: (1) its leak amplitude is significantly larger than the normal, and (2) it is evenly distributed around zero. The former can be described by the standard deviation, and the latter can be represented by the number of intervals in which the signal can be decomposed by its zero crossings. Hence, this paper proposes the optimization goal shown below: where σ is the standard deviation of the normalized signal; M is the number of intervals [27]; c is the penalty factor and is determined by: 19) where N is the data length of the signal; n e (i) is the end position of the ith drop interval; and n s (i) is the start position of the ith drop interval. Therefore, under the constraint shown in Equation (17), the optimized f s should make the optimization goal maximize. Figure 9 shows the original pressure signal and the compensated signals with the optimized f s , where c is 0.221 and 0.044, respectively. As can be seen, the waveforms of the compensated signals are sharp, and the infection points are obvious. Therefore, the pressure signals are enhanced by the digital compensator with suitable parameters.

Leak Detection and Location
After the signal enhancement, these signals should be judged whether they are leak signals, which can be achieved by signal conditioning or machine learning. This paper uses the leak detection method based on model-free abnormal acoustic signal isolation [27], and the equation of leak location is [27] x L = 1 2 (L + a∆t) where x L is the distance from the leak point to the upstream sensor; a is the velocity of signals propagating inside the pipeline; L is the length between the upstream and downstream sensors; and ∆t is the time difference of the upstream and downstream leak signals, which can be calculated by Equations (21)- (23).
R xy (∆n 0 ) = max R xy (∆n) (22) where R xy is the cross-correlation coefficient; ∆n is the delay points, ∆n 0 is the delay points corresponding to the maximum of the cross-correlation coefficient R xy ; N is the data length of a signal; x(i) is the upstream signal; and y(i) is the downstream signal.

Field Experiments
In order to verify the effectiveness of the method based on the digital compensator, two field pipelines (a naphtha pipeline and a crude oil pipeline) are used. Figure 10 shows the installation diagram of the transducers on field pipelines. Their parameters are presented in Table 2, and the fixed parameters A p , R c , A a , τ c , τ h , and τ l of the digital compensator, referring to the acoustic transducer, are set to 5.348 × 10 −11 C/Pa, 2 × 10 10

Case Study
(1) Slowly increasing leaks Figure 11 is the case of a slowly increasing leak generated when the upstream pressure was steady, and the downstream was fluctuating. Owing to the fluctuation, the identification of the infection points of the downstream pressure signal becomes more difficult, and the acoustic signal of the slowly increasing leak is submerged in the noise. However, the compensated signal ( f s = 236 Hz) of the downstream becomes a noticeable pulse, which facilitated its detection. The f s corresponding to the compensated signal of the upstream is 181 Hz. And the SNRs corresponding to the pressure signals, the acoustic signals, and the compensated signal are (upstream: 3.7719 dB, downstream: 0.0131 dB), (upstream: 9.4516 dB, downstream: 0.3084 dB), and (upstream: 20.2370 dB, downstream: 5.8836 dB), respectively. As can be seen, the compensated signals are the best. Figure 12 illustrates the case of a slowly increasing leak occurred when the upstream pressure was steady, and the downstream was rising. As can be seen, the leak pressure drop propagated from the leak point to the downstream was offset by the upward trend of the downstream pressure. However, as the acoustic transducer and the digital compensator can eliminate static pressure, the leak is noticeable in the acoustic signal and compensated signal (upstream: f s = 116 Hz, downstream: f s = 100 Hz). Moreover, the SNRs of the compensated signals (upstream: 12.1120 dB, downstream: 12.0793 dB) are greater than the acoustic signals (upstream: 5.9677 dB, downstream: 0.8939 dB).   Figure 13 shows the case of a slowly increasing leak generated when the upstream pressure was steady and the downstream was falling. The leak pressure drop captured by the pressure transducer of the downstream is hardly distinguishable from the pressure signal. However, the leak in the acoustic signals and the compensated signals (upstream: 184 Hz, downstream: 100 Hz) is more visible, and the corresponding SNRs are (upstream: 9.3254 dB, downstream: 3.4554 dB) and (upstream: 14.7680 dB, downstream: 10.5375 dB), respectively.
(2) Abrupt leaks Figure 14 shows the case of an abrupt leak. The SNRs of the pressure signals, the acoustic signals, and the compensated signal are (upstream: 0.2291 dB, downstream: 0.0883 dB), (upstream: 17.8417 dB, downstream: 15.2260 dB), and (upstream: 17.7724 dB, downstream: 15.8009 dB), respectively, and the f s of the upstream and downstream compensated signals is 58 Hz and 80 Hz. From the perspective of the waveform, these signals are obvious. From the perspective of the SNR, the acoustic and compensated signals are greater than the pressure signals, and the acoustic signals and the compensated signals are approximately equal.  In summary, the proposed method is suitable not only for slowly increasing leaks but also for abrupt leaks.

Comparison of Leak Detection and Location
To further prove the validity of the compensated signal, the leak detection and location results of the pressure signals, acoustic signals, and compensated signals are compared. The negative pressure wave method [12] is used to detect the leak pressure signals, and the model-free method [27] is for the leak detection of acoustic signals and compensated signals.
(1) Data set. The data set includes 28 leak samples and 200 normal samples of which 15 abrupt leak samples and 100 normal samples are from the naphtha pipeline, and the rest (13 slowly increasing leak samples and 100 normal samples) are from the crude oil pipeline.
(2) Parameter settings. The alarm thresholds of the negative pressure wave method were set as 10 KPa (naphtha pipeline) and 1 KPa (crude oil pipeline) based on the leak samples (randomly selected) from the data set, and the model-free method does not require parameter setting.
(3) Comparison results. The leak detection and location results are listed in Table 3. For the abrupt leaks from the naphtha pipeline, there is no missing alarm with the acoustic signals and compensated signals, but the pressure signals reached 46.67%. For the slowly increasing leaks from the crude oil pipeline, the compensated signals have no missing alarm, but the pressure signals and acoustic signals were 61.54% and 53.85%, respectively. Additionally, the location error of the pressure signals is the maximum, and the location errors of the acoustic signals and compensated signals are small. Therefore, the performance of compensated signals is better than the others for leak (abrupt leak or slowly increasing leak) detection.
For the normal samples, the false alarm rate of acoustic signals is the lowest, followed by compensated signals and pressure signals. However, the missing alarm rate of acoustic signals and pressure signals is high. After comprehensive consideration of the missing alarm rate and false alarm rate, the compensated signals are the best.

Conclusions
An enhancement method based on the digital compensator was proposed for the slowly increasing leaks, and the digital compensator is developed according to the advantages of the acoustic transducer. It can not only overcome the effects of static pressure on signals but also converts the slowly decreasing pressure into a noticeable pulse. Based on the adaptive adjustment of the parameter (discretization frequency f s ), both abrupt and slowly increasing leaks can be enhanced online in real-time. The experimental results indicated the better performance of the compensated signals compared with the pressure signals and the acoustic signals.