Abstract
The design of an effective procedure for leak detection, estimation, and leak size classification is necessary to maintain the healthy and safe operations of pipelines for conveying fluids and gas from one place to another. The complexities of nonlinear and uncertain behavior inherent in a pipeline lead to difficulty of detection, estimation, and leak size estimation. Hence, a robust hybrid leak detection and size estimation method based on the back stepping hyperbolic Takagi-Sugeno (T-S) fuzzy sliding mode extended ARX-Laguerre Proportional Integral (PI) observer for pipelines is presented. Because of the effects of gases and fluids in pipelines, accurate physical modeling of a pipeline is difficult. Consequently, the ARX-Laguerre technique is used for pipeline modeling in this study. Early detection of leaks is important to avoid product loss and other severe damage. To address this issue, the extended ARX-Laguerre PI observer is utilized to detect and estimate a leak. In addition, a T-S fuzzy technique is applied to an extended ARX-Laguerre PI observer to improve leak estimation in the presence of uncertainties. Thus, the T-S fuzzy sliding mode extended ARX-Laguerre PI observer adaptively improves the reliability, robustness, and estimation accuracy of leak detection and estimation. To leak size classification in the presence of uncertainties, the hyperbolic differential equations are governed by the T-S fuzzy extended ARX-Laguerre PI observer to find the exact solution for the kernels of a backstepping-based leak boundary. The leak estimation convergence error shows that the leak size estimation can be calculated independent of the location of the leak, which is the main contribution of this research. It is assumed that pressure and flowmeter sensors are available at the inlet and outlet of the pipeline. The effectiveness of the proposed robust backstepping hyperbolic T-S fuzzy sliding mode extended ARX-Laguerre PI observer was tested over an experimental dataset. According to the results, the proposed technique improved the leak detection, estimation, and size estimation.
Keywords
Introduction
Pipe networks are exposed to many difficulties such as surface load, poor quality, pitting corrosion, and water hammers which can cause cracks in the pipeline or joints [1, 2]. Task complexities, uncertainties, and nonlinear parameters in pipes contribute to several challenges in the detection, size estimation, and localization of leaks. Incidence leakage of a liquid from a transmission pipeline causes a sudden decline of pressure and flow rate, which can cause failure of the pipe network. Therefore, reducing the time for leak detection and identification are important to avoid product loss and other severe damage [3]. Various defects in pipelines can be categorized as leakages and blockages. Whenever there is a leak in a pipe, the pipe will generate a residual signal depending on the location and size of the leak. To analyze the condition of leakage faults in a pipeline, various pipe condition monitoring techniques such as flow, pressure, temperature, vibration, and acoustic emission measurements have been reported [4–6]. This research exploits pressure and flow measurements since these signals are suitable for system and fault modeling, leak detection, estimation, and localization.
Various techniques have been recently presented for pipeline leak detection and localization which can be divided into two main categories: a) hardware-based techniques which rely on various physical instruments installed along the pipe network and b) software-based methods which utilize limited equipment. Different techniques are used for software-based leak detection and identification such as model-reference techniques [7, 8], signal-based methods [9, 10], knowledge-based algorithms [11–13], and hybrid methods [14–16]. Hybrid leak detection and estimation algorithms are used to design a stable and reliable technique by employing different techniques. Different techniques have been used as hybrid methods [14–16]. In this study, the hybrid method is designed based on three different algorithms: a) signal-based method for system (pipeline) modeling based on the pressure/flow at the inlet and outlet, b) a model reference technique to design a sliding mode extended PI observer for leak estimation and a backstepping algorithm for leak localization and size estimation, and c) a knowledge-based algorithm to design a T-S fuzzy technique to improve the leak estimation accuracy in the sliding mode extended PI observer. The ARX-Laguerre method is used in the first step to model the pipeline based on the inlet and outlet flow and pressure data. In the second step, the T-S fuzzy-based ARX-Laguerre PI observer technique is used to estimate the normal and abnormal signals for leak detection and estimation.
The theoretical-based (physical-based) system modeling and experimental-based methods for system estimation are the main techniques used for modeling complex systems. Apart from the reliability of physical system modeling, this technique has a drawback in highly uncertain systems. The system estimation and identification technique such as Auto Regressive with eXogenous input (ARX), ARAMAX, orthonormal function bases (OFB), and generalized orthonormal bases (GOB) methods have been used for system estimation in different applications. Independence of the system time delay and reduction of the number of parameters are the main advantages of orthonormal techniques such as OFB and GOB with respect to classical system modeling such as ARX and ARMAX techniques. Apart from the advantages of orthonormal techniques compared to classical algorithms, these techniques have two difficulties. The first one is calculating the optimal orthonormal values and the second issue is the number of restrictions in decoupled systems. To circumvent these challenges, the ARX-Laguerre technique is presented in this research [17–19].
Linear-based observation techniques and nonlinear-based observation algorithms are the main techniques used to design observers [18–21]. Linear observers such as Proportional Integral (PI) have been applied in different systems for control and fault diagnosis but their effectiveness in the presence of uncertainties is the main restriction of these algorithms [22]. To circumvent this restriction, nonlinear observation techniques such as sliding mode techniques [18, 23], feedback linearization methods [19], and fuzzy algorithms have been recommended [24–26]. Despite the advantages of nonlinear observers, a feedback linearization observer has a challenge of robustness [19], a sliding mode observer has a limitation of chattering in uncertain conditions [18], and fuzzy logic observers have the challenge of reliability and predefinition of fuzzy gain updating factors [27] for fault detection, estimation, and identification. Consequently, the hybrid algorithm is suitable for leak detection, leak size estimation, and leak localization for pipelines.
Figure 1 shows the block diagram of the proposed method. The proposed backstepping fuzzy sliding mode extended ARX-Laguerre PI observer has the following steps: a) modeling the pipeline based on the filtered ARX method, (b) modifying the performance of the filtered ARX technique based on an orthonormal function and designing the ARX-Laguerre method, (c) designing the high performance linear observer based on the ARX-Laguerre PI observation technique, (d) improving the robustness of the ARX-Laguerre PI observer based on the sliding mode algorithm, (e) improving the performance of leakage signal estimation based on the T-S fuzzy technique, (f) residual generation and threshold process for leak detection, (g) detecting and estimating the leak, and (h) leak size estimation based on the inverse transformation of observation functions to hyperbolic. The novelties of the proposed method include a) improving the robustness of the ARX-Laguerre PI observer by the extended sliding mode algorithm to reduce the effect of uncertainties, b) reducing the error of leak estimation based on the T-S fuzzy technique, and c) introducing the advance observer based on the backstepping method for transformation of the observation signal, which is independent of leak location, and increasing the convergence for developing leak size classification. This paper introduces three different problems and the solutions to solve these problems. The problems and solutions are briefly described below.

Proposed algorithm for leak detection, size estimation, and localization.
The rest of this research paper is organized as follows: In Section 2, the pipeline is modeled based on the ARX-Laguerre procedure. The proposed backstepping hyperbolic T-S fuzzy extended ARX-Laguerre PI observer for pipeline leak detection, estimation, and leak size classification are presented in Section 3. Section 3 includes three main steps. In the first step, the T-S fuzzy extended ARX-Laguerre PI observer is utilized. In the second step, leak detection and estimation are proposed. To leak size estimation, the backstepping hyperbolic algorithm is applied to the proposed T-S fuzzy extended ARX-Laguerre PI observer in the third step. In Section 4, leak detection, estimation, and size classification results for the pipeline are analyzed. Finally, the conclusions are provided in the last section.
Pipe networks have various problems such as the surface load, poor quality, pitting corrosion, and water hammers, which can cause cracking in a pipeline or joints [1, 2]. Task complexities, uncertainties, and nonlinear parameters in pipes contribute to several challenges in pipe modeling. The proposed scheme is introduced based on the ARX-Laguerre pipe model. The momentum and continuity equations in the pipeline can be expressed as follows [28]:
According to Equations (1) and (3), the precise mathematical formulation of flow and pressure in the pipeline is significantly complicated and it is not accurate in the presence of uncertainty. Moreover, the system behavior in theoretical and practical applications may be different, which causes challenges in leak detection, estimation, isolation, and localization in the pipeline. The ARX-Laguerre pipe model is used to address this issue. The ARX system model is defined as follows [17].
Here, F
o
(k) , (∂
a
& ∂
b
) , F
i
(k), and (i
a
, i
b
) are the flow out, model parameters, flow in, and system order, respectively. The model parameters can be introduced by the following equation:
To improve the performance of the filter-ARX technique, the Laguerre function is defined by Equation (8).
Here,
Based on Equations (8), (10), and (11), the following equation is used to optimize the orthonormal basis.
The block diagram of the ARX-Laguerre algorithm is illustrated in Fig. 2. Here,

ARX-Laguerre orthonormal method for pipe network estimation.
Here, S
s
(k) , (α
s
, α
o
, α
i
) , S
o
(k) , S
i
(k) , ∂ (k), and (G)
T
are the pipeline modeling states, coefficients, measured pipeline flow out, pipeline inlet flow, uncertainties and fault (leak), and Fourier coefficient, respectively. Two parameters have important roles for a leak: a) the size of the leak and b) the location of the leak. α
s
, α
o
, and α
i
are presented in Equations (14–18).
Figure 2. ARX-Laguerre orthonormal method for pipe network estimation.
Here, (ON
a
,N
b
and ON
b
,N
a
) are null matrices. The output coefficient matrix and input coefficient matrix are represented in Equations (17) and (18), respectively.
Figures 3 and 4 illustrate the estimation accuracy and errors for the healthy and faulty (5 millimeter (mm) crack size) conditions based on the filtered ARX method and ARX-Laguerre technique. According to these figures, the estimation accuracy of the ARX-Laguerre technique is higher than that of the ARX technique and the error rate in the ARX-Laguerre estimation technique is close to zero under normal and abnormal conditions.

Filter ARX technique and ARX-Laguerre orthonormal method for pipeline flow estimation under normal conditions: (a) measured and estimation flow and (b) error of flow estimation.

Filter ARX technique and ARX-Laguerre orthonormal method for pipeline flow estimation under abnormal conditions: (a) measured and estimation flow and (b) error of flow estimation.
Based on Fig. 1, the pipeline was modelled using the ARX-Laguerre technique. After modeling the pipeline using the ARX-Laguerre technique, the advanced observer will be designed to comprise three main blocks: a) the ARX-Laguerre PI observer, b) improve the robustness and increase the estimation performance based on the extended sliding mode ARX-Laguerre PI observer algorithm, and c) reduce the estimation error of the extended sliding mode ARX-Laguerre PI observer based on the T-S fuzzy algorithm.
T-S fuzzy advanced observer
Considering the second block in Fig. 1, the second step consists of the following parts: a) ARX-Laguerre PI observer, b) modify the ARX-Laguerre PI observer based on the sliding mode extended observer, and c) improve the performance of the extended ARX-Laguerre PI observer using the T-S fuzzy technique. Based on Equation (13), the ARX-Laguerre PI observer for a pipeline is proposed in the following equation.
For leak estimation based on the PI observer, we propose the following equation.
The state and fault estimation error in the ARX-Laguerre PI observer are represented by the following equations:
Based on Equations (19) and (22), the extended ARX-Laguerre PI observer is represented by Equation (23).
Based on Equations (22) and (23), the sliding mode extended ARX-Laguerre PI observer leak estimation is denoted as follows.
The state estimation error and fault estimation error based on the extended ARX-Laguerre PI observer can be written as
Here, r
a
(k) , TH
i
, and L
F
are the residual signal, threshold values under normal and abnormal conditions, and fuzzy coefficient, respectively. Based on Equation (26), the proposed T-S fuzzy rule base is represented by the following equation. Two membership functions are defined for T-S fuzzy fault estimation, as shown in Fig. 5.

Membership functions for T-S fuzzy leak estimation.
Concerning Equations (23) and (27), the T-S fuzzy extended ARX-Laguerre PI observer is represented by Equation (28).
Based on Equations (27) and (28), the T-S fuzzy extended ARX-Laguerre PI observer leak estimation is represented by the following equation.
The proposed state estimation error and fault estimation error are represented as follows.
Here,

(a) Leak estimation accuracy and (b) leak estimation error for the ARX-Laguerre PI observer, extended ARX-Laguerre PI observer, and proposed method.
Based on Fig. 1, the third step for leak detection, size estimation, and localization in the pipeline has the following parts: a) a residual generation and threshold process, b) leak detection and estimation, c) leak size estimation, and d) leak localization. The residual signal is generated by the following formulation.
The following robust technique can be used to generate the threshold value [22].
Here, (J ɛ , J σ ) are the threshold generation coefficients.
For leak detection, there are two different conditions: (a) healthy condition (δ (k) =0) and (b) faulty condition (δ (k) ≠0). The threshold level for the normal condition is defined by (TH n ). When the system is under normal and abnormal conditions, the following equations can be used for leak detection. Figure 7 illustrates the leak detection for the ARX-Laguerre PI observer, extended ARX-Laguerre PI observer, and proposed algorithm when the leak size and leak location are 5 (mm) and 1 (m), respectively.

Leak detection for the ARX-Laguerre PI observer, extended ARX-Laguerre PI observer, and proposed method.
In the previous section, the leak was estimated based on the proposed algorithm. The leak conditions are a function of two parameters: a) leak size and b) leak location. To estimate the size of a leak, the proposed estate estimation and output estimation are re-written based on the leak size. Based on Equation (13), we assume that the state-space ARX-Laguerre system model with an unknown leak size is represented by Equation (34).
Here, ∂
size
is the leak size over the pipeline. Considering Equations (28) and (34), the proposed algorithm represents the leak size estimation.
The leak size can be estimated based on the proposed estimation technique shown below.
To find the leak size estimation gains, (Ji*, JSMA-2*), and guarantee size estimation convergence, the backstepping transformation is recommended [29, 30]. In the first step, the backstepping transformation and kernel equations are used to map the original observer with respect to the unlimited fault (Equation (37)) to the new observer (Equation (38)) with respect to the boundary fault. This technique is used to reduce the dependency of the leak size to the leak location. Considering Equations (13) and (28), the state and output estimation error are represented by the following equation.
Based on Equations (36) and (37), to have a feedback observer without a leak effect, the backstepping transformation is represented as shown in the following equations [29, 30].
Here, H
oo
, H
oδ
, H
δo
, and H
δδ
are represented by the following equations [30].
The kernels (boundary conditions) of Equations (39)–(42) are considered as follows.
Here,
Thus, Equations (35) and (36) are independent of the leak location. Based on this technique, the leak can be estimated, detected, and its size estimated regardless of the number of leaks and the location of the leaks. Algorithm 1 illustrates the T-S fuzzy sliding mode extended ARX-Laguerre PI observer for leak detection, estimation, and size estimation. Figure 8 demonstrates the leak size estimation for the ARX-Laguerre PI observer, extended ARX-Laguerre PI observer, and proposed algorithm when the leak size and leak location are 5 (mm) and 1 (m), respectively.
T-S fuzzy sliding mode extended ARX-Laguerre PI observer for leak detection, estimation, and size estimation of the pipeline.

Leak size Estimation for the ARX-Laguerre PI observer, extended ARX-Laguerre PI observer, and proposed method.
Based on Fig. 8, the ARX-Laguerre PI observer estimates the leak size at 69.4 s, extended ARX-Laguerre PI observer estimates the size of the leak at 54 s, and for the proposed algorithm the leak size estimates at 51 s. Therefore, the proposed algorithm has 1 s delay, extended ARX-Laguerre PI observer has 4 s delay, and ARX-Laguerre PI observer has 19.4 s delay.
Figure 9 shows the setup of the water pipeline system. The testbed installation and the sensors are listed in Table 1. The effectiveness of the proposed T-S fuzzy-based sliding mode extended ARX-Laguerre PI observer for leak estimation, detection, and size estimation was compared to the extended ARX-Laguerre PI observer and ARX-Laguerre PI observer.

Experimental setup to record normal and abnormal data.
Experimental parameters
Figures 10 and 11 illustrate the leak estimation, leak estimation error, and leak detection for the ARX-Laguerre PI observer, extended ARX-Laguerre PI observer, and proposed algorithm when the leak size and leak location are 5 (mm) and 1.5 (m), respectively.
Regarding Fig. 10, the fault estimation error performance in the proposed algorithm is close to zero, whereas in the extended ARX-Laguerre PI observer and ARX-Laguerre PI observer, the average estimation errors are larger. Based on this figure, the sensitivity of the flow estimations in the proposed method is exceptionally high and the error rate is close to the zero. Figure 11 illustrates leak detection for the proposed algorithm, extended ARX-Laguerre PI observer, and ARX-Laguerre PI observer in the experimental setup. Regarding this figure, the delay of the proposed method to fault detection is less than the other two techniques.

Experimental setup (a) leak estimation accuracy and (b) leak estimation error of the ARX-Laguerre PI observer, extended ARX-Laguerre PI observer, and proposed method.

Experimental setup leak detection of the ARX-Laguerre PI observer, extended ARX-Laguerre PI observer, and proposed method.
The sequence of simulation is performed as follows:
In the first scenario, the simulation starts without leaks, at 50 s, the valve located at 1500 mm was opened and the leak proceeded. The simulations are based on the leak with two different diameters, i.e., 0.5 mm and 3 mm. In the second scenario, the simulation starts without leaks, at 50 s, the valve located at 600 mm was opened, the leak sizes are 0.5 mm and 3 mm. Figures 12–15 demonstrate the leak estimation, leak detection, and leak estimation error for the ARX-Laguerre PI observer, extended ARX-Laguerre PI observer, and proposed algorithm for four different conditions, respectively.

(a) Leak estimation accuracy and leak detection (b) leak estimation error for the ARX-Laguerre PI observer, extended ARX-Laguerre PI observer, and proposed method when the location of the leak and the size of the leak are 1500 mm and 0.5 mm, respectively.

(a) Leak estimation accuracy and leak detection (b) leak estimation error for the ARX-Laguerre PI observer, extended ARX-Laguerre PI observer, and proposed method when the location of the leak and the size of the leak are 1500 mm and 3 mm, respectively.

(a) Leak estimation accuracy and leak detection (b) leak estimation error for the ARX-Laguerre PI observer, extended ARX-Laguerre PI observer, and proposed method when the location of the leak and the size of the leak are 600 mm and 0.5 mm, respectively.

(a) Leak estimation accuracy and leak detection (b) leak estimation error for the ARX-Laguerre PI observer, extended ARX-Laguerre PI observer, and proposed method when the location of the leak and the size of the leak are 600 mm and 3 mm, respectively.
Regarding Figs. 12–15, delays of the proposed method and the extended ARX-Laguerre PI observer for fault detection are less than the ARX-Laguerre PI observer. To test the power of the leak size estimation, the proposed algorithm, extended ARX-Laguerre PI observer, and ARX-Laguerre PI observer were compared. In the first scenario (Fig. 16), the leak size is 0.5 mm, in two different leak locations: a) 1500 mm, and b) 600 mm.

Leak size Estimation of the ARX-Laguerre PI observer, extended ARX-Laguerre PI observer, and proposed method when the size of the leak is 0.5 mm.
Based on Fig. 16, the ARX-Laguerre PI observer estimates the leak size at about 64 s, the extended ARX-Laguerre PI observer estimates the size of the leak at 53 s, and the proposed algorithm estimates the leak size at 51 s. Therefore, the proposed algorithm has a 1 s delay, the extended ARX-Laguerre PI observer has a 3 s delay, and the ARX-Laguerre PI observer has about 14 s delay.
In the second scenario (Fig. 17), the leak size is 3 mm, in two different leak locations: a) 1500 mm, and b) 600 mm. Based on Fig. 17, the ARX-Laguerre PI observer estimates the leak size at 65 s, the extended ARX-Laguerre PI observer estimates the size of leak at 54 55 s, and the proposed algorithm estimates the leak size at 51 s. Therefore, the proposed algorithm has a 1 s delay, the extended ARX-Laguerre PI observer has a 4 5 s delay, and the ARX-Laguerre PI observer has about 15 s delay.

Leak size Estimation of the ARX-Laguerre PI observer, extended ARX-Laguerre PI observer, and proposed method when the size of the leak is 3 mm.
Regarding the results, the leak size estimation can be calculated independently from the location of the leak.
This paper proposed a T-S fuzzy extended sliding mode ARX-Laguerre PI observer technique to reliably detect and estimate a leak in addition to classify its size in a pipeline. In the first step, the ARX- Laguerre method is introduced for pipeline modeling. In the second step, the ARX-Laguerre PI observer is designed for leak detection and estimation. To improve the robustness of the ARX-Laguerre PI observer, in the third step, the extended sliding mode algorithm is considered. To reduce/eliminate chattering and increase the leak estimation accuracy, the T-S fuzzy algorithm is applied to the extended ARX-Laguerre PI observer in the fourth step. To perform leak size classification in the presence of uncertainties, hyperbolic differential equations govern the TS fuzzy extended ARX-Laguerre PI observer to find the exact solution for kernels of a backstepping-based leak boundary. The leak estimation convergence error shows that the leak size estimation can be calculated independently from the location of the leak. Experimental and simulation results showed that the leak detection and size classification delay were significantly reduced with proper evaluation of the advance backstepping T-S fuzzy extended ARX-Laguerre PI observer. Based on the results and analysis, the proposed algorithm estimates and identifies leaks in the presence of uncertainty and disturbances. In the future, a hybrid observation-based leak localization method using two sensors will be designed to enhance the performance of fault diagnosis.
Footnotes
Acknowledgments
This work was supported by the Korea Institute of Energy Technology Evaluation and Planning (KETEP) and the Ministry of Trade, Industry & Energy (MOTIE) of the Republic of Korea (No. 20172510102130).
