Case study of leak detection based on Gaussian function in experimental viscoelastic water pipeline

Leakage in transmission pipelines and water distribution networks causes water and energy loss and reduces water quality. The accuracy of leakage detection using transient-based methods depends on several factors. This study investigated the sensitivity of location and size of leaks in simple polyethylene transmission pipelines to dynamic parameters, ﬂ ow regime, sample size, spatial-step increment, and leak size and location. For this purpose, a hydraulic transient solver was ﬁ rst developed to take into account the dynamic effects of unsteady friction, viscoelasticity of the pipe wall, and the leak. The leakage was assumed to function with a quasi-normal distribution around its real location to reduce the problem dimensionality and unnecessary computations. This approach was evaluated based on experimental transient data in which leaks were simulated in different sizes and locations. Results revealed that the hydraulic transient model that includes only viscoelasticity effects could pinpoint leakage characteristics. The sample size evaluation indicated that half and a single period of the pressure signal are suf ﬁ cient to determine the leakage location and size in simple viscoelastic transmission pipelines, respectively. The optimal ratio of the spatial-step to pipe length ( Δ x / L ) was 0.025. (cid:129) Sensitivity analysis of leak detection and sizing in the viscoelastic pipeline. (cid:129) Leakage simulate using a new approach with a quasi-normal distribution function. (cid:129) Development of an experimental transient model to evaluate the proposed approach.


INTRODUCTION
Recently, climate change and drought, population growth and, consequently, the increasing domestic and industrial demand for water consumption have led to water shortages in many parts of the world. Moreover, the inevitable aging of pipeline infrastructures in urban water supplies leads to an undesirable increase in leakage and burst frequencies.
Increasing pressure, inadequate design, improper construction and operation, and pipe corrosion intensify this problem. Water losses from source to consumers account for 15% to 40% of the total water supply and, in some cases, up to 80%, as reported by Maksimovic et al. ().
As a result, leak control and reduction and demand management are high priorities for managers and decision-makers in the urban water industry. Therefore, water companies in This is an Open Access article distributed under the terms of the Creative Commons Attribution Licence (CC BY 4.0), which permits copying, adaptation and redistribution, provided the original work is properly cited different countries investigate and diagnose problems to offer better water supply systems (Ghazali ).
In recent years, the application of polymer pipes (such as polyethylene (PE) and polyvinyl chloride [PVC]) has been increasing day by day because of their technical and economic advantages over pipes of other materials, such as steel, cast iron, concrete, and asbestos. Transient flow modeling and analysis in polymer pipes have some fundamental differences compared to non-polymer pipes, mainly supply systems, for which they employed ITA in a step-wise manner. In the first step, the leakage candidates were spread along the entire length of the pipe. In the next steps, they began to gradually concentrate around the significant leakage points from the previous steps. The results of said study showed that leakage candidates have a normal-like distribution around the actual leakage. Sarkamaryan et al. () applied ITA for leak detection in benchmark elastic pipe networks. They modeled the leakage as a quasi-normal distribution using the Gaussian function. Through this approach, the number of decision variables, multimodality, and ITA complexity was reduced. To better understand this method's capabilities, they suggested evaluating it based on real or laboratory pipe systems. So far, this method has not been evaluated based on laboratory or field results.
The current study aimed to evaluate the Gaussian function in estimating leakage characteristics in viscoelastic pipelines based on a suitable laboratory model. For this purpose, a sensitivity analysis was conducted to determine the location and size of leaks relative to the dynamic parameters, flow regime, sample size, space-step increment, and leak size and location. This method's capability in estimating single leakage in several laboratory samples and one sample with two leaks was evaluated.

Equations governing the transient flow
The equations governing transient flow in closed conduits include the equations of conservation of mass and momentum.
Assuming a control volume and using the Reynold transport theorem for a differential component of the fluid motion and considering the two dynamic terms of the unsteady friction and the pipe wall viscoelasticity effects, these two partial differential equations can be deduced as follows (Soares et al. ; Evangelista et al. ; Keramat et al. ): where k 0 is the decay factor, and SGN is the operator for the sign.
Strain (ε), due to specific stress, is expressed as a sum of an instantaneous-elastic strain (ε 0 ) and retarded-viscous strain (ε r ). For small strains, by applying continuous stress σ(t) to the polyethylene pipe, the total strain, according to Boltzmann principle, is equal to: where J 0 is the instantaneous creep compliance function, and J(t 0 ) is the creep compliance function at time t 0 .
in which J is the creep compliance function, J k represents the creep of the spring of the Kelvin-Voigt k-element defined It uses the collected data to estimate the system's unknown parameters. In this method, the system's behaviors are simulated using a hydraulic transient solver as a function of unknown parameters. The difference between the measured and computational values is minimized using the optimization model, and unknown parameters are specified. In this study, the measurement data used in the ITA is the pressure signal upstream of the transient valve. Usually, experimental models' pressure signals are polluted with some high-frequency noises due to environmental conditions. For this purpose, the measured pressure data was first passed through the Butterworth low-pass filter and then called in the ITA. The general flowchart of the ITA method is shown in Figure 1.
The genetic algorithm (GA) was used as the optimization method in this research. According to Equation (8), the average least-square errors (ALSE) are defined as the optimization's objective function: where OF(p) ¼ objective function, p ¼ decision variables vector, q ¼ the observation pressure, M ¼ number of elements of measured pressure, and q(p) ¼ predicted system response for a given vector p. In this study, p includes all decision variables, namely quasi-normal function constants, creep function parameters, and the unsteady friction model's decay coefficient.
Since the number of leakages is unknown at the beginning of the solution, the leak detection process is carried out in several steps in traditional methods. Initially, a large number of leak candidates were scattered throughout the pipeline in a specific location. In the next steps, the leaks were spread around the previous step's justifiable values (Covas ). Given the multi-step nature of the process and the multitude of leak candidates, this method is more time-consuming and burdensome to solve. According to Unlike traditional methods, this function covers the entire pipe, and all nodes can have a potential leakage.
With this trick, the number of decision variables was reduced and, consequently, the speed and precision of the ITA was increased.
The leak discharge Q L (m 3 /s) was described by the orifice law, which depends on the piezometric-head at the  Uncorrected Proof leak location and the orifice shape as follows: where A e ¼ effective orifice area; H ¼ piezometric-head at leak location; and g ¼ gravity acceleration.
The criteria for relative errors of the leaks' location and size are defined according to Equations (10) and (11), respectively. These indicators are defined to evaluate the ITA performance in determining the leaks' location and size: in which X and X true are estimated and true leak distance from the upstream boundary, respectively. L is total pipe length, A e and A e(true) are estimated and true effective area of leakage, respectively, and N L is the number of leaked nodes.

Experimental setup and collected data
In line with this research's objectives, a laboratory pipeline The sampling frequency during transient flow was 1,000 Hz.

Numerical model calibration
In simple intact viscoelastic pipeline systems (reservoir-pipevalve), by defining the upstream and downstream boundary conditions, including reservoir level and valve maneuvers, the ITA usually involves estimating steady and unsteady friction coefficients, pressure wave speed, and creep function.
In this study, the inside air pressure was measured by a transducer, and the inside water level was introduced to the numerical model as the upstream boundary condition. In this study, the steady-state friction coefficients were estimated based on steady-state flow conditions. As mentioned earlier, the steady friction coefficient was directly This section is organized into three main subsections.
First, the hydraulic transient solver accuracy and the appropriate approach for estimating decision parameters were evaluated. Secondly, the appropriate sample size for the pressure signal was assessed to accurately determine the leak location and size. Finally, a suitable spatial-step was determined for numerical simulation. In the sensitivity analysis stage, the inverse solution model was implemented with one leak, and the scenario with the least errors in leak location and size was selected as the appropriate model. All scenarios were carried out for two sets of experimental data with leak location at 117.4 m from the upstream boundary.
The A e first and second leak parameters were set at 1.98 E-05 (Q L ¼ 0.57 l/s, Q L is leak discharge) and 1.99 E-05 In the first scenario, leak detection was performed using the classical (elastic) model of HTS (hydraulic transient solver), in which the unknown parameters include the Gaussian function coefficients (GFCs) and pressure wave speed a.
As expected, classic HTS led to significant discrepancies between numerical and real characteristics of leaks ( Figure 5(a)). In the next two scenarios, the intact system's calibrated parameters were used in the corresponding HTS with and without unsteady friction, and the only unknowns of the ITA were the GFCs. Like the first scenario, the numerical results obtained from these scenarios had large discrepancies with the real leaks, and the leak location was determined at the downstream end of the pipeline ( Figure 5(b) and 5(c)).
In scenarios 4-6 and 7-8, HTS was considered with and without unsteady friction, respectively. In these scenarios,    Hence, similar to the last scenario, the creep compliance function should be calibrated using an accurate HTS and ITA coupling in an operation stage.

Sample size assessment
A sensitivity analysis was carried out in this subsection to determine the optimal sample size for leakage location and size. For this purpose, the last two scenarios of the previous section were used for four sample sizes that were analyzed corresponding to multiples of the theoretical   Table 2.

Evaluating spatial step
This subsection highlights the importance of the spatial step to the successful application of ITA. Thus, to assess the spatialstep effect on leak detection accuracy, six different spatialsteps, ranging between 0.006 and 0.053 of the total pipe length, were selected. Similar to the previous steps, the model with the viscoelastic effect only (last scenario) gave the best results, so in this part, this model was used. This analysis was also performed for the two leaks used in the previous steps. It should be noted that the spatial-step affects the accuracy of solving the MOC and the leak modeling function.
Errors in leak locations and sizes for both sets of experimental data are shown in Figure 7(a) and 7(b), respectively. As shown, the accuracy of the ITA results was increased by selecting the spatial-step size between 0.019 and 0.032 of the pipe length.
Selecting a smaller spatial-step increase the ITA runtime and reduces the accuracy of detection of leak characteristics.
Details of calibrated decision variables for different spatial steps are shown in Table 3.

Validation of calibrated and analyzed model
The results showed that despite the pipe wall's viscoelastic effects, the HTS simulated the pressure wave and detected leakages in polymer pipes in the previous sensitivity analysis stages. Thus, the unsteady friction can be ignored. Therefore, in the validation phase, the last scenario of Figure 5 was used in which the numerical model included only the dynamic effect of the pipe wall viscoelasticity, and all the design variables were calibrated simultaneously. In the sensitivity analysis stage, the purpose was to analyze the sensitivity of a particular parameter. Thus, knowing that there is a leak in the system, a leak candidate (Gaussian function) was considered in the inverse solution model. In this study, similar to real systems, it was assumed that the number of leaks in the system is unknown, and ITA was  run with at least two leak candidates. As mentioned earlier, if the estimated leak locations and sizes were significantly different, the number of candidate leaks would increase in each step over time. This procedure continues until one of the leaks is small or two leaks are adjacent. In the first step, if the model has only one leak, one of the two candidate leaks will have a small amount, or they will fall in the vicinity. Once the number of leaks is specified, the error is calculated based on that number.

Single leak with different sizes and locations
In this section, the ITA was performed for 11 new experimental datasets to investigate the effects of leakage location and size on leakage detection accuracy. The modeling results are shown in Table 4. Results indicated that ITA could locate and quantify leakages in most of the analyzed tests, although leak location and size errors depended on leak size and location. In most cases, these errors were less than 3%, which corresponds to 4.74 m in the pipeline. In conclusion, ITA is very promising for use in identifying the leakage range in water pipeline systems and can be combined with other local leak detection techniques such as acoustic equipment.

Multiple leaks detection
Transient-based ITA was tested for the detection of two simultaneous leaks in the pipeline. According to Figure 3, the first leak was located at X ¼ 56.3 m (from the upstream) with A e ¼ 1.15 E-05 m 2 (Q L ¼ 0.57 l/s), and the second at X ¼ 117.4 m with A e ¼ 1.94 E-05 m 2 (Q L ¼ 0.33 l/s). The pipeline end flow-rate was 0.95 l/s. Similar to what was described earlier, ITA was run in a step-wise manner for both 0.5T and T sample sizes. In both sample sizes, ITA was implemented in the first step with two leak candidates.
Because of the significant values of leakages in the first step, the models were run with three leak candidates in the second step. Figure 8 depicts the optimal solutions of both sample sizes in the two steps, and the respective errors are presented in Table 5. ITA points to two leakage locations

CONCLUSIONS
The transient-based ITA method is a well-known approach for the calibration and defect detection of water pipeline systems. Although this model-based approach seems relatively simple to apply in pipelines, its accuracy depends on various parameters. This study investigated the sensitivity of leak location and size in viscoelastic pipelines relative to the dynamic parameters, flow regime, sample size, spatial-step increment, noisy data, and leak size and HTS incorporates viscoelasticity effects that can reasonably describe the transient pressure response of polyethylene pipes, and therefore, unsteady friction can be neglected for defect detection. Optimal sample size assessment showed that leak location and size could be accurately estimated using a sample size equal to a half and a single period of the pressure signal, respectively. The spatial-step   analysis achieved acceptable results with a spatial step-tolength ratio between 0.019 and 0.032. The ITA was tested for a system with two leaks, and it was found that this approach could also detect multiple leaks.

DATA AVAILABILITY STATEMENT
All relevant data are included in the paper or its Supplementary Information.