1. Introduction
Leaks, as well as partial or complete blockages, can be considered as a usual fault arising in pipelines that creates troubles [
1,
2,
3,
4]. Leaks result in loss of fluid that causes a loss in pressure, efficiency as well as economic expense, also on occasions it may impact the environment. Blockage barricade flow, which causes a loss in pressure, and so enhances the required pumping expenses in order to dominate the loss in pressure, also occasionally blockage results in absolute termination of functioning [
5,
6]. Advanced diagnosis, as well as an exact place of leaks or blockages, can help in avoiding the troubles created by such faults and also develop the correct timing decision in order to deal with faults for preventing or diminishing production/performance suspension [
7,
8,
9,
10,
11].
Blockages have been classified based on their physical extent related to the entire length of the system. Localized contractions, which are taken to be point discontinuities, are defined as discrete blockages. Blockages that contain remarkable length related to the entire pipe length are defined as extended blockages [
12]. Dissimilar to the leaks inside piping systems, blockages do not produce obvious exterior indicators for their location to be mentioned as the release and agglomeration of fluids surrounding the pipe. Oftentimes intrusive approaches, utilizing devices the insertion of a closed-circuit camera or a robotic PIG (pipeline intervention gadget), are needed in order to specify the place of blockages. Insertion of a camera or robotic pig can lead to several uncertainties related to the speed of travel and the distance of travel in the midst of the insertion point and the blockage such that on many occasions cases the camera or the robotic pig is trapped into the blockage and leads to greater trouble in this case compared with the appearance of the blockage solely.
Recently, flow analysis is developed on the basis of efficient methods in order to identify blockages. The developed techniques utilize fluid transients according to the responding of the system to an injected transient in order to detect, locate, as well as to measure blockages, which have demonstrated a promising development. In [
13,
14] a time reflection technique is suggested in order to detect partial blockage of discrete and extended types in a single pipeline for different numbers of blockages. In [
15] an impulse response technique is proposed in order to detect leaks as well as partial blockages of discrete type in a single pipeline, and also the technique is tested numerically. In [
16] the authors used the damping of fluid transients on the basis of the analytical solution as well as experimental verifications in order to detect partial single discrete blockage in a single pipeline. In [
17] the numerical outcomes with laboratory experiments are compared and concluded that the blockage location can be identified with nearly no error, whilst the size identification contains some errors.
The recent published research findings are more dependent on designing the observer, controller or fault identification approaches [
18,
19,
20,
21,
22,
23,
24]. In this work, a novel method is proposed in order to analyse pipeline system, generally for identification and location of blockage using model-based techniques and extended Kalman filter observer. The modelling process is based on discretization with the finite-difference technique of classical mass as well as continuity equations. The discretization results in a system of ordinary differential equations with boundary conditions, which demonstrate faults as well as pipeline accessories. The states of the produced system are flows, pressure heads, the blockage and a parameter concerned with the blockage intensity. In continuous-time, a nonlinear system is used for designing observers. Observers are commonly on the basis of a conversion of the treated system into a triangular observable form accordingly, the variables that are straightly estimated correlate with the output derivatives. Furthermore, in this paper, the observability and the controllability of the pipe networks are investigated.
2. Pipeline Modelling
Here, we neglected the convective variation in velocity, also the compressibility in the line of length
. The liquid density (
), the flow rate
and also pressure
at the entry and exit of the pipe can be measured for evaluation. The cross-sectional region
related to the pipe was taken to be fixed all over the pipe system. The feature of the pipe is illustrated in
Figure 1.
For acquiring the mass and momentum in hydrodynamics utilizing Newton’s second law (
) to a control volume in the continuum and body force pipe [
25] (
ρ ) the below-mentioned equation can be developed,
By substituting
and
in (1) the following relation is gotten,
which may be simplified as
This equation may be written as
where
is taken to be the pressure head
,
is taken to be the flow rate (
),
is considered as the length coordinate
,
is considered as the time coordinate
,
is taken to be the gravity
,
is taken to be the section area
,
is taken to be the diameter
and
is considered as the friction coefficient.
In most work the friction coefficient is fixed, even if it is sometimes updated known to depend on the so-called Reynolds number
and the roughness friction coefficient of the pipe
. The Swamee–Jain equation [
26] describes this friction coefficient value for a pipe with a circular section of diameter
as:
Such that,
where
is the fluid density and
is the fluid viscosity. Equation (5) is valid for
and
.
The continuity equation can be defined as follows for the pipeline system,
Replacing the pressure head
as well as the flow rate
in Equation (7), we have,
Such that
is taken to be the velocity of the pressure wave
.
The pressure head and flow rate are taken to be functions of position and time as and , such that , where is the pipe length.
If a system has minor variations we have,
3. Blockage Modelling
Blockages have been considered as usual faults in pipes as well as pipeline networks. They can be generated because of the agglomeration of the transported fluid or the partial block of a valve. A blocked is a reduced cross-sectional area of the pipe with significant length
. For modelling the blocked stretch (see
Figure 2), the blockage region, displayed by
, is expressed as a percentage of the pipe region
. The subscript
signifies the blockage.
Pressure varies due to the blockage and this changed pressure is displayed by .
A mathematical expression for a blockage can be deduced from the Bernoulli’s equation, which relates the pressure difference between the pipeline inside and outside. Bernoulli’s equation applies under the following considerations [
27].
Non viscous flow;
Continuous flow;
Through the pipe line;
Constant density.
By applying Bernoulli’s principle as well as continuity equations among point 1 (before the blockage) and point 1b (in the blockage), we have [
27],
where
denotes the pressure head of the fluid,
V denotes the velocity of the fluid flow,
ρ is considered to be the density of the fluid,
Z is taken to be the elevation at points blockage,
denotes energy inputs with pumps or turbines and also
is the pressure losses in the pipe sector. Since In horizontal pipe levels
as well as
are equivalent, and also energy inputs with pumps and/or turbines are zero (in this case), so we have
According to the continuity of conservation of mass we have
where
is taken to be the cross-sectional area of the pipeline, also
is taken to be the cross-sectional area at the blockage. Hence,
By substituting Equation (13) in Equation (11) the following relation is extracted
Assume
to be very small, as it is taken to be a function of the flow as well as the blockage geometry. Hence, the below-mentioned relation, which contains a discharge coefficient
is utilized:
By substituting Equation (15) in Equation (14) the following relation is extracted
which, stated in regards to the volumetric flow
, becomes
This model considers the two circumstances happening at the two edges of the blocked sector: a constriction happening upstream of the blockage (from to ) and a distension happening downstream (from to ).
The following equations describe the dynamics of pressures head and flows before blockage (
,
) and after it (
,
) respectively.
where
and
are calculated using Bernoulli’s and continuity Equations [
27] as below
and at the point of the blockage, the flow rates are equal such that
and
. In Equations (18) and (19),
are the pressure head variables and
are the flow rate variables. In this work, we aimed to construct observer and controller for the systems stated in Equation (8) as well as Equation (9). A nonlinear model can be expressed as follows
such that
x is taken to be the state vector, which has
unknown flow perturbation quantities at every point.
Several numerical methods are available for the solution of Ordinary differential equations (ODEs) Equations (20) and (21). Here the finite-difference approach is used for its simplicity, and because it is suitable for simulation and non-linear observer design [
28]. Control variables in the different cases can be presented by the pressures head and flow rates at the beginning and end of the pipe. The solution of the discretized model, using any technique needs boundary conditions that present known values of the variables at the edge of the researched area. Boundary conditions may just be pressures head, just flows, or combining both. The selection of boundary conditions alters the construction of the models, also may change the quantity of equations wherein the discretized model is subdivided. In real systems, boundary conditions can be defined using the elements existing in the hydraulic system.
Figure 3 represents the possible boundary conditions in a scheme of a discretized pipeline. We had six cases for the modelling, based on choosing the control variables.
Case 1: The controllable initial as well as boundary conditions are taken to be pressure heads at the start and ending of the pipe, see
Figure 3A. The input conditions can be stated as
and output values are
The vectors
and
are the inputs and outputs of the system respectively. We have
,
and
. Hence,
where
and
are calculated using Bernoulli’s and continuity Equations as below,
Case 2: The controllable boundary conditions are taken to be flow rate and pressure head at the start and ending of the pipe, respectively, see
Figure 3B. The input conditions can be stated as
and output values are
The vectors
and
are the inputs and outputs of the system respectively. We have
and
. Hence,
where
and
are calculated using Bernoulli’s and continuity equations as below,
Case 3: The controllable initial and boundary conditions are taken to be flow rate and pressure head at the start of the pipe, see
Figure 3C. The input conditions can be stated as
and output values are
The vectors
and
are the inputs and outputs of the system respectively. We have
,
and
. Hence,
where
and
are calculated using Bernoulli’s and continuity equations as below,
Case 4: The controllable initial and boundary conditions are taken to be flow rate at the start and pressure head at the ending of the pipe, see
Figure 3D. The input conditions can be stated as
and output values are
The vectors
and
are the inputs and outputs of the system respectively. We have
,
and
. Hence,
where
and
are calculated using Bernoulli’s and continuity equations as below,
Case 5: The controllable initial and boundary conditions are taken to be flow rate at the start and ending of the pipe, see
Figure 3E. The input conditions can be stated as
and output values are
The vectors
and
are the inputs and outputs of the system respectively. We have
,
and
. Hence,
where
and
are calculated using Bernoulli’s and continuity equations as below,
Case 6: The controllable boundary conditions are taken to be pressure heads and flow rate at the start and ending of the pipe, respectively, see
Figure 3F. The input conditions can be stated as
and output values are
The vectors
and
are the inputs and outputs of the system respectively. We have
,
and
. Hence,
where
and
are calculated using Bernoulli’s and continuity equations as below,
4. Observer Design by Using the Extended Kalman Filter
In estimation theory, the extended Kalman filter (EKF) is the nonlinear version of the Kalman filter, which linearizes about an estimate of the current mean and covariance. The extended Kalman filter was introduced to solve the problem of non-linearity in Kalman filter. The standard extended Kalman filter is commonly derived from a first order Taylor expansion of the state dynamics and measurement model. There is a version of the extended Kalman filter that extends this concept to include also an approximation of the second order Taylor term. The extended Kalman filter resembles the Kalman filter in that they both intend to get correct first order moments. The extended Kalman filter makes the non linear function into linear function using Taylor Series, it helps in getting the linear approximation of a non linear function. However, one common idea considered in this paper for the aim of blockage identification problem is the blockage parameter approximation
as well as
, utilizing an extended Kalman filter. For this aim, the model proposed in Equations (18) and (19) has been developed by the dynamics of these parameters, also a nonlinear observer has been made for the developed system [
29]. For different cases it has been assumed to measure only pressures head, or only flow rates or combination of both at the beginning or end of the pipeline. For case 1, flow rates at the start and ending of the pipe are considered as outputs which are directly measured as follows,
and the pressure heads at the start and ending of the pipe considered as known inputs are
The derivatives of blockage parameters
and
have been taken zero as their alterations are minute. Therefore Equations (18) and (19) can be extended as below,
where
and
are computed as below [
27],
Accordingly, Equation (49) can be formulated as below,
where
and
is taken as a nonlinear function.
Now, to estimate the block parameters
and
, a discrete-time extended Kalman filter is designed for the nonlinear model described in Equation (49). To do that, this model is discretized by using Heun’s method. In this method, the solution for the initial value problem is given by [
30],
Therefore,
where
is taken to be the time step also,
is taken to be the index of discrete-time. Applying Equation (53) into Equation (49) the following are extracted,
in compact form:
where
Observer Approach
A the discrete-time extended Kalman filter as a state observer for the system Equation (49) is defined as below [
31],
where
is the priori estimate of
:
is the priori covariance matrix:
is the posteriori covariance matrix:
is the Jacobian matrix:
Finally,
and
are known as the covariance matrices of measure and process noises, respectively. Notice that:
with
and
.
5. Simulation Results
Here, simulations were carried out in Matlab for one case for the model shown in
Figure 1. The model was realized on the pipeline with the following physical parameters:
The length of the pipeline was Γ , the diameter of the pipe was δ , the cross-section was Θ , density was gravity was , the friction factor of the pipe was , the friction factor of the blockage part was and the wave speed was .
Control variables are the pressures head at the start and ending of the pipeline ( and ). In addition, the flow rates ( and ) are taken to be outputs of the system.
The covariance matrices of measure and process noises introduced by expressions respectively
The initialization of the state is given in
Table 1. The model, the observer, as well as the state feedback construction are demonstrated in
Figure 4.
Figure 4 and
Figure 5 demonstrate the simulated pressure head at the inlet
and outlet
of the pipe.
Figure 6,
Figure 7 and
Figure 8 shows the estimation of the position, length and the area of blockage in the pipeline. Where the Position of blockage was 80 m from initial of pipe and length of blockage was 12.2 m and cross section area in blockage was
.