Next Article in Journal
An Effective and Secure Mechanism for Phishing Attacks Using a Machine Learning Approach
Next Article in Special Issue
Diagnostics and Control of Pumping Stations in Water Supply Systems: Hybrid Model for Fault Operating Modes
Previous Article in Journal
LCA-Based Carbon Footprint Accounting of Mixed Rare Earth Oxides Production from Ionic Rare Earths
Previous Article in Special Issue
Sliding Mode Observer-Based Fault Detection and Isolation Approach for a Wind Turbine Benchmark
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Predictive Control in Water Distribution Systems for Leak Reduction and Pressure Management via a Pressure Reducing Valve

by
Jose-Roberto Bermúdez
1,
Francisco-Ronay López-Estrada
1,
Gildas Besançon
2,
Guillermo Valencia-Palomo
3,* and
Ildeberto Santos-Ruiz
1
1
Tecnológico Nacional de Mexico, I.T. Tuxtla Gutiérrez, TURIX Diagnosis and Control Group, Carretera Panamericana km 1080, SN, Tuxtla Gutierrez 29050, Mexico
2
GIPSA-Lab, CNRS, Grenoble INP, Université Grenoble Alpes, 38000 Grenoble, France
3
Tecnológico Nacional de México, IT Hermosillo, Av. Tecnológico y Periférico Poniente S/N, Hermosillo 83170, Mexico
*
Author to whom correspondence should be addressed.
Processes 2022, 10(7), 1355; https://doi.org/10.3390/pr10071355
Submission received: 1 July 2022 / Revised: 7 July 2022 / Accepted: 8 July 2022 / Published: 12 July 2022

Abstract

:
This work proposes a model predictive control (MPC) strategy for pressure management and leakage reduction in a water distribution system (WDS). Unlike most of the reported models that mainly consider EPANET-based models, the proposed method considers its dynamic representation given by ordinary differential equations. The proposed MPC uses a pressure-reducing valve (PRV) as a control element to regulate the pressure in the WDS to track the demand. The control scheme proposes a strategy to manage the high nonlinearity of the PRV and takes into account the demand profile throughout the day as well as the leaks that occur in the pipeline. The estimates of magnitude and location of the leak are provided by an Extended Kalman Filter from previous work and with the aid of a rule-based set point manager reduces the fluid loss in the event of a leak. Different scenarios are studied to illustrate the effectiveness of the proposed control system, achieving an approximate reduction of up to 5% of water losses, demonstrating robustness in the case of uncertainty in the leak location estimate.

1. Introduction

Water distribution systems (WDS) are the most sustainable and efficient means of transporting fluids such as drinking water, natural gas, and oil [1]. These systems are composed of pipelines, pipe joints, connection nodes, and other components such as valves and pumps, which are prone to damage due to aging or unwanted events, such as earthquakes, floods, and lack of management, among others [2]. According to a study by the Organisation for Economic Co-operation and Development [3], these abnormal events cause water losses by leaks that reach almost 21%. The study examined water usage in 48 major cities across 17 countries, finding that in some cities of Mexico, the percentage was more than 40%. This highlights the need to propose technological developments to mitigate such losses.
From the control theory point of view, it is essential to investigate techniques to reduce the leaks without affecting the demand. In the literature, it has been found that the most effective approach to find a trade-off between maintaining the desired demand and reducing the water losses is by considering pressure water controllers on critical nodes of the water distribution network [4]. However, many challenges are associated with increasing demand and managing the pressure levels. In particular, pressure-reducing valves (PRV) are the recommended actuators to minimize these undesirable effects and operate the WDS effectively by following a pattern of demands [5].
Modeling the WDS is vital for designing any control algorithm [6,7]. These models are analyzed taking into account the location and number of PRVs for a correct evaluation of the pressure [8]. For instance, Mazumder et al. [9] developed an optimization method based on genetic algorithms for pressure management in a WDS by adjusting a PRV of a hydraulic network designed in EPANET. Parra et al. [10] proposed a pressure management system in EPANET composed of a PRV and a pump as a turbine where the hydraulic model played a decisive role identifying critical nodes and predicting hydraulics properties in the network. García-Ávila et al. [11] designed a water leakage minimization system by optimizing pressure using a PRV. The hydraulic model of the WDN was developed using EPANET and WaterNetGen software. Dini and Asadi [12] designed a methodology based on particle swarm optimization (PSO) to identify the PRV that requires adjustment and obtain pressure management in the system; the network model was designed in EPANET. Hernández et al. [13] proposed a detrended fluctuation analysis (or DFA) to highlight some of the traits such as the head loss of high-viscosity gas–liquid flows. Navarro et al. [14] designed a leak diagnosis system for a pipeline and residue analysis using genetic algorithms (GA) to minimize location error. Jara-Arriagada and Stoianov [15] designed a sensitivity analysis system to evaluate the potential impact of pressure control in a WDS to reduce pipe breaks by applying a logistic regression technique. Mosetlhe et al. [16] proposed a review of techniques for locating PRVs and controlling pressure in a WDS, minimizing problems such as excessive pressure in the system. Mathye et al. [17] designed a pressure management system to reduce leaks through PRVs, taking into account consumption and leak flow. All those works developed algorithms for pressure management using hydraulic models based on EPANET and waterNetGen software, whose main limitation is that the models only work in steady-state behavior, while the effects of leaks and pressure changes are dynamic.
The present work proposes a dynamical approach to pressure management in a WDS. The transient effects due to pressure changes or leaks are modeled on the basis of water-hammer equations. Then, a constrained model predictive control (MPC) system is proposed to track the desired pressure profile driven by a set point manager that considers the water loss due to leaks and the demanded pressure profile. Moreover, a strategy to handle the high nonlinearity of the PRV control input is proposed. Finally, some simulations are proposed by considering the mathematical model of a real distribution system that can be configured as a single pipeline or a branched system. The results illustrate the effectiveness of the proposed method in the presence of physical constraints, noise, and transient behaviors due to leaks, saving up to 5% of water losses in the event of a leak and demonstrating robustness in the case of uncertainty in the leak location estimate. The rest of the document is organized as follows: Section 2 presents the considered case studies; Section 3 describes the problem formulation; Section 4 is devoted to the control strategy; Section 5 presents the simulation results; finally, Section 6 draws the conclusions.

2. Case Studies

Three different cases will be considered in this paper, corresponding to different hydraulic system structures with the pressure to be controlled at a specific position (called controlled node) and some leaks affecting the system at some other position.

2.1. Case 1: Pipeline with a Leak before the Controlled Node

In this case, the system is a pipeline under a leak like the one shown in Figure 1. It is composed of a reservoir that provides the fluid to the pipe divided into three sections for convenience. The first section is related to the distance between the inlet node and the leak ( z ); the second one is related to the distance from the leak to the controlled node ( z 2 = z 1 z ); and finally, the third section is related to the distance between the controlled node and the outlet node ( z 3 ).
The mathematical model can be determined by considering water-hammer equations [18], which can be approximated on the basis of the three considered sections as follows (e.g., [19,20]):
Q ˙ 1 = α 1 z ( H 1 H ) + μ 1 ( Q 1 ) Q 1 | Q 1 | α 1 z 1 Δ H v ,
H ˙ = α 2 z ( Q 1 Q 2 Q ) ,
Q ˙ 2 = α 1 z 2 ( H H 3 ) + μ 2 ( Q 2 ) Q 2 | Q 2 | ,
H ˙ 3 = α 2 z 2 ( Q 2 Q 3 ) ,
Q ˙ 3 = α 1 z 3 ( H 3 H 4 ) + μ 3 ( Q 3 ) Q 3 | Q 3 | ,
with
α 1 = g A r , α 2 = c 2 g A r , Q = λ H ,
μ i ( Q i ) = f ( Q i ) 2 D A r , f ( Q i ) = 1.325 ln ϵ 3.7 d + 5.74 ( 4 Q i π d v ) 0.9 2 ,
where H 1 , H , H 3 , and H 4 are the piezometric heads (m) at the inlet, leak node, controlled node, and outlet, respectively; Q 1 , Q 2 , Q 3 are the volumetric flow rates in each section (m3/s); g is the gravitational constant (m/s2); A r is the cross-sectional area of the pipe (m2); c is the wave speed (m/s); d is the pipeline diameter (m); ν represents the kinematic viscosity; the friction term is f ( Q i ) ; ϵ is the roughness of the pipe; and λ is the leak coefficient. Finally, Δ H v describes the PRV effect.
A PRV is an actuator used to reduce downstream pressure. Internally, a PRV is made of a fixed orifice, a pilot valve, and a needle valve [21]. The shutter is the outer mechanism for adjusting the outlet pressure, either increasing or decreasing the pressure in a range from 0 to 100%. Figure 2 shows the schematic view of a PRV, where H v 1 and H v 2 are the piezometric head at valve ends, r ( 0 , 1 ] is the valve adjustment (control input), and Q 1 is the flow through the valve.
The differential pressure in a PRV is described as [22]:
Δ H v = H v 1 H v 2 = Q 1 | Q 1 | ( r E ) 2 ,
where E = C v A v ( 2 g ) 1 / 2 is the Torricelli expression, C v is the discharge coefficient of the valve, and A v is the cross-sectional area of the valve (m2).

2.2. Case 2: Pipeline with a Leak after the Controlled Node

When the leak appears after the controlled node, as shown in Figure 3, then z 2 = z 3 z , and the model becomes
Q ˙ 1 = α 1 z 1 ( H 1 H 2 ) + μ 1 ( Q 1 ) Q 1 | Q 1 | α 1 z 1 Δ H v ,
H ˙ 2 = α 2 z 1 ( Q 1 Q 2 ) ,
Q ˙ 2 = α 1 z ( H 2 H 3 ) + μ 2 ( Q 2 ) Q 2 | Q 2 | ,
H ˙ = α 2 z ( Q 2 Q 3 λ H ) ,
Q ˙ 3 = α 1 z 2 ( H 3 H 4 ) + μ 3 ( Q 3 ) Q 3 | Q 3 | .

2.3. Case 3: Branched Water Distribution Network

In this third case, a branched water distribution network is considered with the topology shown in Figure 4. With the same notations as before, the mathematical model describing branch flows Q i and node pressures H i can be given by:
Q ˙ 1 ( t ) = α 1 z 1 ( H B 1 H 2 ) + μ 1 ( Q 1 ) Q 1 | Q 1 | Δ H v ,
H ˙ 2 ( t ) = α 2 z 1 ( Q 1 Q 2 Q 4 ) ,
Q ˙ 2 ( t ) = α 1 z 2 ( H 2 H ) + μ 2 ( Q 2 ) Q 2 | Q 2 | ,
H ˙ ( t ) = α 2 z 2 ( Q 2 Q 5 Q 3 Q ) ,
Q ˙ 3 ( t ) = α 1 z 3 ( H 3 H B 2 ) + μ 3 ( Q 3 ) Q 3 | Q 3 | ,
Q ˙ 4 ( t ) = α 1 z 4 ( H 2 H B 3 ) + μ 4 ( Q 4 ) Q 4 | Q 4 | ,
Q ˙ 5 ( t ) = α 1 z 5 ( H 3 H B 4 ) + μ 5 ( Q 5 ) Q 5 | Q 5 | .
The mathematical models developed here are valid for any pipeline system with the configurations described in Figure 1, Figure 2, Figure 3 and Figure 4. For validation tests, the physical parameters were taken from a real system located at the Hydroinformatics Laboratory of the Technological Institute of Tuxtla Gutiérrez, whose mathematical model was presented in [23].
Remark 1.
Notice that λ and z are unknown parameters that must be estimated by considering a leak detection and localization method. For Cases 1 and 2, we consider our previous result published in [24] where a leak location and estimation method was designed using an extended Kalman filter (EKF). For Case 3, an EKF as the one in [25] can be used. Therefore, for the sake of simplicity, λ and z are assumed to be known.

3. Problem Formulation

WDS are designed to meet the desired demands at their ends, even when affected by leaks. It is important to note that these demands have different profiles depending on the time and day. Typically, the demand is higher during the day and lower during the early morning [26]. In case of a leak event, the fluid loss rate (leak magnitude) can be reduced by reducing the pressure on the controlled node. However, this also reduces the flow at the node of demand, compromising the main objective of the WDS. In this regard, the control strategy for reducing leaks must consider a time-varying profile, with the primary objective to maintain a trade-off between reducing the leak magnitude and maintaining the desired demand.
To address this problem, the control scheme shown in Figure 5 is proposed. This scheme is made of three components: an extended Kalman filter (EKF), a pressure controller, and a set point manager. The EKF is used to estimate the flows and pressures along the WDS and to detect and estimate the leak position and its magnitude by using only pressure head and flow rate measurements at the pipeline ends. The EKF considered for Cases 1 and 2 is the one reported in our previous work in [24] and, for Case 3, the one in [27] is considered; however, any other leak location and estimation method can be used for the proposed scheme. The pressure controller is an MPC that takes into account physical constraints and the leak dynamics. For its operation, the MPC uses the estimated values obtained from the EKF ( z ^ , λ ^ , H ^ ) and measured flows and pressures from the WDS. It is important to mention that the MPC also considers the PRV model whose behavior is highly nonlinear due to the inverse quadratic term of its control variable (r), which represents a challenge for the control system. Finally, the set point manager block provides the reference pressure ( s k ) to the MPC; it handles the trade-off between fluid loss and fulfilment of a demanded pressure profile (DP) in the event of a leak.

4. Pressure Control

The control strategy adopted to regulate the pressure in the WDS is an MPC. Figure 6 shows the implemented scheme which will be detailed in this section. The basic idea in MPC is to calculate the control action at each sampling instant through the solution of an optimization problem, which is written in terms of a prediction model.

4.1. PRV Handling

The PRV has the function of regulating the incoming water for a safer constant predetermined downstream level. The control signal r establishes the downstream pressure. One of the main challenges in using a PRV is its high nonlinearity as an inverse quadratic term (r) represents its control variable. This term affects the control input considerably because the more the PRV is closed, the greater the effects on the pressure. Then, to use linear models in the MPC formulation, the PRV control variable r is substituted in (6) by a virtual input u v to artificially hide the nonlinear behavior of the PRV for the prediction model. This is accomplished with:
Δ H v = Q 1 | Q 1 | u v E 2 , with u v = 1 r 2 ,
where u v [ 1 , ) , but for practical reasons u v ranges from 1 (for the PRV fully open, r = 1 ) to 100 (for the PRV 90% closed, r = 0.1 ). This new term is substituted in the three models discussed in Section 2. In this way, the MPC calculates u v instead of r. Next, u v is transformed back to r before it is applied to the WDS with u = r = 1 u v , as shown in Figure 6.

4.2. Prediction Models

The standard MPC strategy considers linear prediction models [28,29], so the models of the case studies listed before need to be linearized.
For a pipeline with a leak before the controlled node, the state and input vectors are defined as x ¯ = [ x 1 , x 2 , x 3 , x 4 , x 5 ] = [ Q 1 , H , Q 2 , H 3 , Q 3 ] , and u ¯ = [ H 1 , H 4 , λ , u v ] T . The system (1)–(5) is linearized at the operating point ( x ¯ * , u ¯ * ) taking the form x ¯ ˙ ( t ) = A c x ¯ ( t ) + B c u ¯ ( t ) + δ c , where δ c is the offset caused by linearization. The Jacobian matrices are given by:
A c = a 11 α 1 z 0 0 0 α 2 z 0 α 2 z 0 0 0 α 1 z 2 a 33 α 1 z 2 0 0 0 α 2 z 2 0 α 2 z 2 0 0 0 α 1 z 3 a 55 ,
B c = α 1 z 0 0 g A r x 1 * | x 1 * | E 2 z 0 0 α 2 H 2 * z 2 0 0 0 0 0 0 0 0 0 0 α 1 z 3 0 0 ,
with
a 11 = 2 | x 1 * | μ ( x 1 * ) + 2 ( 1.325 ) 0.9 5.74 ( 4 π d ν ) 0.9 ( x 1 * ) 1.9 ln ( ϵ 3.7 d ) + 5.74 ( 4 x 1 * π d ν ) 0.9 3 2 A r g | x 1 * | u v * z 1 E 2 , a 33 = 2 | x 3 * | μ ( x 3 * ) + 2 ( 1.325 ) 0.9 5.74 ( 4 π d ν ) 0.9 ( x 3 * ) 1.9 ln ( ϵ 3.7 d ) + 5.74 ( 4 x 3 * π d ν ) 0.9 3 , a 55 = 2 | x 5 * | μ ( x 5 * ) + 2 ( 1.135 ) 0.9 5.74 ( 4 π d ν ) 0.9 ( x 5 * ) 1.9 ln ( ϵ 3.7 d ) + 5.74 ( 4 x 5 * π d ν ) 0.9 3 , δ c = f 1 ( x ¯ * , u ¯ * ) A c x ¯ * B c u ¯ * + Δ 1 ,
where f 1 ( x ¯ * , u ¯ * ) is the nonlinear model of Case 1 evaluated at the linearization point, and Δ 1 gathers terms of order larger than 1.
For a pipeline with a leak after the controlled node, the state and input vectors are defined as x ¯ = [ x 1 , x 2 , x 3 , x 4 , x 5 ] = [ Q 1 , H 2 , Q 2 H , Q 3 ] , u ¯ = [ H 1 , H 4 , λ , u v ] T . Using a 11 , a 33 , a 55 from the previous case, the Jacobian matrices for system (7)–(11) are:
A c = a 11 α 1 z 1 0 0 0 α 2 z 1 0 α 2 z 1 0 0 0 α 1 z a 33 α 1 z 0 0 0 α 2 z 0 α 2 z 0 0 0 α 1 z 2 a 55 ,
B c = a 1 z 1 0 0 g A r x 1 * | x 1 * | E 2 z 1 0 0 0 0 0 0 0 0 0 0 a 2 H 4 * z 0 0 a 1 z 2 0 0 ,
δ c = f 2 ( x ¯ * , u ¯ * ) A c x ¯ * B c u ¯ * + Δ 2 ,
where f 2 ( x ¯ * , u ¯ * ) and Δ 2 refer to the nonlinear model of Case 2 as before.
For the branched water distribution network, the states and the inputs are defined as x ¯ = [ x 1 , x 2 , x 3 , x 4 , x 5 , x 6 , x 7 ] = [ Q 1 , H 2 , Q 2 , H , Q 3 , Q 4 , Q 5 ] , u ¯ = [ H B 1 , H B 2 , H B 3 , H B 4 , λ , u v ] T . The Jacobian matrices for system (12)–(18) are:
A c = a 11 α 1 z 1 0 0 0 0 0 α 2 z 1 0 α 2 z 2 0 0 α 2 z 1 0 0 α 1 z 2 a 33 α 1 z 2 0 0 0 0 0 α 2 z 2 0 α 2 z 2 0 α 2 z 2 0 0 0 α 1 z 3 a 55 0 0 0 α 1 z 4 0 0 0 a 66 0 0 0 0 α 1 z 5 0 0 a 77 ,
B c = α 1 z 1 0 0 0 0 g A r x 1 * | x 1 * | E 2 z 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 α 2 H 3 * z 1 0 0 α 1 z 3 0 0 0 0 0 0 α 1 z 4 0 0 0 0 0 0 α 1 z 5 0 0 ,
with
a 11 = 2 | x 1 * | μ ( x 1 * ) + 2 ( 1.135 ) 0.9 5.74 ( 4 π d ν ) 0.9 ( x 1 * ) 1.9 ln ( ϵ 3.7 d ) + 5.74 ( 4 x 1 * π d ν ) 0.9 3 2 A r g | x 1 * | u v * z 1 E 2 , a 33 = 2 | x 3 * | μ ( x 3 * ) + 2 ( 1.135 ) 0.9 5.74 ( 4 π d ν ) 0.9 ( x 3 * ) 1.9 ln ( ϵ 3.7 d ) + 5.74 ( 4 x 3 * π d ν ) 0.9 3 , a 55 = 2 | x 5 * | μ ( x 5 * ) + 2 ( 1.135 ) 0.9 5.74 ( 4 π d ν ) 0.9 ( x 5 * ) 1.9 ln ( ϵ 3.7 d ) + 5.74 ( 4 x 5 * π d ν ) 0.9 3 , a 66 = 2 | x 6 * | μ ( x 6 * ) + 2 ( 1.135 ) 0.9 5.74 ( 4 π d ν ) 0.9 ( x 6 * ) 1.9 ln ( ϵ 3.7 d ) + 5.74 ( 4 x 6 * π d ν ) 0.9 3 ,
a 77 = 2 | x 3 * | μ ( x 7 * ) + 2 ( 1.135 ) 0.9 5.74 ( 4 π d ν ) 0.9 ( x 7 * ) 1.9 ln ( ϵ 3.7 d ) + 5.74 ( 4 x 7 * π d ν ) 0.9 3 , δ c = f 3 ( x ¯ * , u ¯ * ) A c x ¯ * B c u ¯ * + Δ 3 ,
where f 3 ( x ¯ * , u ¯ * ) and Δ 3 refer to the nonlinear model of Case 3.
For all cases, the controlled output is y ( t ) = C c x ¯ ( t ) = x 2 ( t ) . It is also noted that the only manipulated input is u v . The rest of the elements in u ¯ are non-manipulated in the three cases.
Now for a discrete-time implementation, the previous linear models are discretized, with a sample time T s , leading to systems of the form
x k + 1 = A d x k + B d u k + δ d ; y k = C d x k .
The MPC calculates control input increments; then each model is augmented to express it in those terms:
ζ k + 1 = A d B d 0 I A ζ k + B d I B Δ u k + δ d 0 δ ,
y k = C d 0 C ζ k ,
where ζ = [ x k T u k 1 T ] T and Δ u k = u k u k 1 .

4.3. Prediction Equations

The predictions equations of the augmented-state, output and input over a prediction horizon n y , and control horizon n u are:
ζ k = P ζ ζ ζ k + P ζ Δ u Δ u k 1 + P ζ δ δ ,
y k = P y ζ ζ k + P y Δ u Δ u k 1 + P y δ δ ,
u k 1 = P u Δ u Δ u k 1 + P u ζ ζ k ,
where the arrow notation denotes prediction and is defined as x k = [ x k + 1 T x k + 2 T ] T .
Augmented state prediction matrices are
P ζ ζ = A A 2 A n y , P ζ Δ u = B 0 A B 0 A n y 1 B A n y n u B , P ζ δ = I I + A I + i = 1 n y 1 A i .
Output prediction matrices are P y ζ = diag ( C ) P ζ ζ , P y Δ u = diag ( C ) P ζ Δ u , P y δ = diag ( C ) P ζ δ . Input predictions matrices are given by:
u k 1 = I 0 0 I I 0 I I I P u Δ u Δ u k 1 + col 0 I P u ζ ζ k ,
and for the states x k = P x ζ ζ k = diag I 0 ζ k .
To construct the prediction vectors, full state availability is required. Although H ( t ) is not a measured state and λ , z are unknown parameters, all are considered known as they could be provided by the EKF estimator. The rest of the states are measured flows and pressures.

4.4. Cost Function and Constraints

The cost function to be optimized penalizes the future output error with respect to the desired output value s k and control input along the prediction and control horizons:
J = i = 1 n y ( y k + i s k ) T Q ( y k + i s k ) + i = 0 n u 1 Δ u k + i T R Δ u k + i
with Q > 0 and R > 0 .
Constraints of the form:
diag ( A x ) x k col ( b x ) ; diag ( A y ) y k col ( b y ) ; diag ( A u ) u k 1 col ( b u ) ; diag ( A Δ u ) Δ u k 1 col ( b Δ u )
are considered, where A x , A y , A u , A Δ u = [ I , I ] T and b x , b y , b u , b Δ u are vectors that contain the maximum and minimum values allowed in the form [ m a x m i n ] T .

4.5. Control Law

Cost function (27) and constraints (28) can be expressed in terms of the decision variable Δ u [30], and the following optimization problem is obtained:
Δ u k 1 * = arg min Δ u k 1 1 2 Δ u k 1 T H Δ u k 1 + F T Δ u k 1 s . t . M c ζ k + N c Δ u k 1 f c ,
with
H = P y Δ u T diag ( Q ) P y Δ u + diag ( R ) ; F = P y Δ u diag ( Q ) ( P y x ζ k + P y δ δ s ^ k ) ; M c = diag ( A x ) P x ζ P ζ ζ diag ( A y ) P y ζ diag ( A u ) P u ζ 0 ; N c = diag ( A x ) P x ζ P ζ Δ u diag ( A y ) P y Δ u diag ( A u ) P u Δ u diag ( A Δ u ) ; f c = col ( b x ) col ( b y ) col ( b u ) col ( b Δ u ) diag ( A x ) P x ζ P ζ δ diag ( A y ) P y δ 0 0 δ .
Finally, the control law is given by
u k = u k 1 + Δ u k * ,
where Δ u k * is the first element of Δ u k 1 * .

4.6. Offset-Free Tracking

The MPC presented earlier does not contain an explicit mechanism to deal with disturbances and modeling errors that arise from set point changes that move the system away from the original operation point where it was linearized. Therefore, an integral action must be embedded into the control law to deal with these situations and guarantee zero steady-state error. This is performed including in the state space model an integrating state
x ¯ ˙ ( t ) ξ ˙ ( t ) = A c 0 C c 0 x ¯ ( t ) ξ ( t ) + B c 0 u ¯ ( t ) + δ c s ( t ) , y ( t ) = C c 0 x ¯ ( t ) ξ ( t ) .
A stabilizing feedback gain can be computed to guarantee that in steady-state y ( t ) = x 2 ( t ) = s ( t ) . Another approach to obtain integral action could be to estimate the disturbance with the use of a disturbance observer [31].

4.7. Set Point Manager

The set point manager (SPM) is a ruled-based algorithm that takes into account the periods of expected maximum and minimum demand through time conditions, that is, it identifies the hours (early morning) in which it is possible to reduce the pressure to reduce the leak magnitude without affecting the demand. Therefore, when the system is leak-free (i.e., λ = 0 ), the SPM computes the pressure reference ( s k ) by solving the hydraulic model to ensure that the demand is satisfied. Then, if there is no fluid loss, the priority is to supply to the WDS the pressure needed to fulfil the users’ demand in both maximum and minimum demand hours.
On the other hand, the SPM receives the leak magnitude estimate through the leak coefficient λ k when a leak occurs. The SPM identifies if it is possible to reduce the pressure reference according to the day’s time, prioritizing meeting the DP. If the DP is maximum, the pressure reference is set to the control pressure ( H ctrl ) calculated by simulation. Otherwise, the pressure reference is reduced to meet the minimum DP to minimize fluid loss without neglecting the required demand. This procedure is formally described in Algorithm 1.
Algorithm 1: Set point manager for pressure management
Input: One-day demand profile (DP), time-varying leak coefficient ( λ k ), leak detection threshold ( λ th ).
Output: Time-varying set point ( s k ). Initialization:
for each index i in DP do
  Compute the control pressure ( H ctrl ) to ensure
  scheduled demand in DP assuming leak-free
  conditions:
H ctrl [ i ] solveHydraulics ( DP [ i ] )
end for
Online operation:
for each time-step k do
  if λ k > λ th
S k min ( H ctrl )
  else
t k getCurrentTime ( )
S k interp ( H ctrl , t k )
  end if
end for
The solveHydraulics ( ) subroutine in Algorithm 1 solves the hydraulic model to compute the required pressure in the control node, ensuring that the demand is satisfied at each hour of the day. The interp ( ) subroutine computes by interpolation the control pressure corresponding to each time step t k .

5. Simulation Results

This section presents simulations of the WDS built in the Hydroinformatics Laboratory at the Technological Institute of Tuxtla Gutierrez, whose mathematical model was validated in [23]. The system parameters are given in Table 1. The system can be configured as a single horizontal pipeline and a branched network as in Figure 1, Figure 3, and Figure 4. An EKF-based method [24] has been considered to estimate the leak position z , its magnitude λ ^ , and the leak pressure H for Cases 1 and 2. A leak occurring in an accessory (pipeline joint) located in an unknown position is assumed for Case 3; nevertheless, it can be estimated by an EKF, e.g., [25]. However, it is important to note that the proposed method is not attached to any leak estimation method, and it could be generalized to any WDS within the topology presented here.
The initial conditions for the flows Q i ( 0 ) and pressures H i ( 0 ) for all cases are presented in Table 2. The sampling period is T s = 0.01 s . Gaussian noise with a variance of 2.53 × 10 10 m 6 / s 2 for the flow rate and 3.72 × 10 4 m 2 for the pressure were added to the signals. These noise levels were characterized according to the response of the Yokogawa sensors installed in the physical system as described in [32]. Cases 1 and 2 take into account an uncertainty for z , λ , and H of ± 15 %, that is, an error in the estimation of the leakage variables. For Case 3, the same value for λ as the previous cases is considered. For the MPC, the prediction horizon is n y = 15 , the control horizon is n u = 3 , and the weights are Q = 1 and R = 0.5 . These values are based on well-known tuning methods [33]. The constraints were proposed according to the physical behavior and expected DP. For all cases, 0.1 r 1 . For Case 1, the constraints on the states are
1 × 10 3 m 3 / s Q 1 , 2 , 3 1.3 × 10 3 m 3 / s , 2 m H 3 2.87 m .
For Case 2,
1.5 × 10 3 m 3 / s Q 1 , 2 , 3 2 × 10 3 m 3 / s , 4.3 m H 2 5.4 m .
Finally, for Case 3,
0.17 × 10 3 m 3 / s Q 1 3.2 × 10 3 m 3 / s , 0.7 × 10 3 m 3 / s Q 2 1.6 × 10 4 m 3 / s , 0.4 × 10 4 m 3 / s Q 3 0.7 × 10 4 m 3 / s , 0.95 × 10 4 m 3 / s Q 4 1.5 × 10 4 m 3 / s , 0.4 × 10 4 m 3 / s Q 5 0.7 × 10 4 m 3 / s , 1.2 m H 2 2 m .
These constraints were chosen to satisfy a minimum demand, even in the case of a leak.
The simulation covers a period of 24 h whose maximum and minimal magnitudes are concerning a typical demand profile. For Case 1, the results are displayed in Figure 7. The top plot of Figure 7 shows the pressure in the demand node. The dotted line is the DP, the dashed is the reference driven by the SPM that adapts S k during the leak period to reduce the water losses, and the solid line represents the controlled pressure ( H 3 ) in the node. The leak occurs at t = 3   h with the conditions given in Table 1. The SPM identifies a time of minimum demand and reduces the pressure. This pressure reduction remains until t = 7   h where the maximum demand period starts. During the period of maximum demand, the SPM does not adjust the reference because the priority is to satisfy the demand. After t = 17   h , the SPM again reduces S k to reduce the leak magnitude. The middle plot of Figure 7 shows the effect of leak reduction due to the SPM. The solid line is the leak magnitude without the SPM and the dashed-line with the SPM. The bottom plot of Figure 7H shows the PRV opening to track the desired reference. It is important to note that all the constraints are satisfied for the MPC. We can conclude that the MPC tracks the set point with good performance even during the leak period, which demonstrates the effectiveness of the proposed method.
For Case 2, the results are displayed in Figure 8. As can be seen, the MPC tracks the pressure reference provided by the SPM even in a leakage scenario. Similar to Case 1, the SPM automatically adjusts the controlled node pressure at the maximum and minimum demand periods to reduce water losses, and all the constraints are satisfied for the MPC. To test the robustness of the controller, ± 15 % of uncertainty in the location of the leak is added, demonstrating the performance of the controller even when there is a leak location error.
To contrast the results with the traditional method of control and management of pressure in a pipe, Figure 9 presents a comparison between a traditional PID controller and the proposed predictive control scheme. The PID gains were computed with the Matlab® PIDtuner®, obtaining the optimal values for proportional K P = 1 , integral K I = 0.5 , and derivative K D = 0.5 gains. It can be seen that the PID tracks the demand profile with good performance. However, in the event of a leak, the set point remains the same, and the leak is seen by the controller as a disturbance. So the PID adjusts (increases) the pressure to track the original demand profile. This way of operating guarantees the pressure in the demand node but at the cost of fluid loss. In contrast, the MPC is aware of the leak event and with the aid of the set point manager adjusts the pressure operating point to a lower value reducing the fluid loss and delivering the minimum allowed pressure to the demand node.
Results for Case 3 are shown in Figure 10, with a leak being simulated at a connection. The MPC still achieves a good tracking of S k that the SPM sets, which proposes a pressure reduction at the time of the leak. This pressure reduction remains constant in the first period until the maximum demand. The middle plot of Figure 10 shows the leak magnitude with and without the SPM. Note that Case 3 considers three demand nodes (due to its branches) controlled by adjusting the pressure on the controlled node. Therefore, it is essential to analyze these flows to evaluate the MPC effectiveness. The magnitudes with and without the SPM are represented by a dashed and a solid line, respectively. As can be seen, the priority is to satisfy each node demand during the maximum demand periods. However, during the minimum demand periods, the pressure is reduced, which reduces water losses.
Finally, Figure 11 displays the flow rates at the demand nodes for Case 3: Q 3 , Q 4 , and Q 5 . The solid lines are the flows without the effect of the SPM, and the dotted lines represent the reduction due to the SPM. The reduction of flows is within the minimum permissible limits given by constraints on the states taken into account by the MPC and only during the hours of minimum demand.
For all the cases, the trade-off between maintaining a minimum demand and reducing the leak magnitude was achieved due to the good performance of the MPC and the SPM algorithm. As a result, a reduction of water losses of ≈5% was accomplished, which is important due to the fact that water distribution systems must operate without interruptions throughout the year.

6. Conclusions

This work proposed a model-based predictive controller for managing and controlling water distribution systems. The proposed method seeks a trade-off between maintaining water supply and reducing water losses due to leaks. To achieve this goal, the MPC is based on the water-hammer equations of the hydraulic system together with physical constraints and an adaptive demand profile managed by a set point manager algorithm. The control input was calculated by minimizing the output errors with respect to the demand profile driven by the set point manager. The control objective was formulated with state, input, and output constraints on the cost function. Moreover, the control scheme includes a strategy to handle the strong nonlinear behavior of the PRV. The controller was tested with numerical simulations in a model characterized by a real pipeline and pipe network located at the Hydroinformatics Laboratory of the Technological Institute of Tuxtla Gutiérrez. Therefore, this work presents a mathematical model based on a real system and realistic operating conditions. The simulation results illustrate the performance and robustness of the MPC for pressure management in the system and the reduction of leaks due to water losses, with an average of 5% in the presence of noise, disturbances, and uncertainty in the leak location estimate. Future work will extend this work to an integrated methodology of a multi-leak tolerant control algorithm.

Author Contributions

Conceptualization, J.-R.B., F.-R.L.-E. and G.B.; methodology, J.-R.B., F.-R.L.-E. and G.B.; software, J.-R.B. and G.V.-P.; validation, J.-R.B., G.V.-P. and I.S.-R.; formal analysis, J.-R.B., F.-R.L.-E. and G.B.; data curation, G.V.-P. and I.S.-R.; writing—original draft preparation, J.-R.B., F.-R.L.-E. and G.B.; writing—review and editing, G.V.-P. and I.S.-R.; visualization, I.S.-R.; supervision, F.-R.L.-E. and G.B.; project administration, F.-R.L.-E. and G.B. All authors have read and agreed to the published version of the manuscript.

Funding

This research has been supported by the Consejo Nacional de Ciencia y Tecnología (CONACyT) and by Tecnológico Nacional de México under the program Proyectos de Investigaciȯn Científica y Desarrollo Tecnolȯgico e Innovaciȯn 2022.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Zaman, D.; Tiwari, M.K.; Gupta, A.K.; Sen, D. A review of leakage detection strategies for pressurised pipeline in steady-state. Eng. Fail. Anal. 2020, 109, 104264. [Google Scholar] [CrossRef]
  2. Kilinç, Y.; Özdemir, Ö.; Orhan, C.; Firat, M. Evaluation of technical performance of pipes in water distribution systems by analytic hierarchy process. Sustain. Cities Soc. 2018, 42, 13–21. [Google Scholar] [CrossRef]
  3. OECD. Water Governance in Cities; OECD Publishing: Paris, France, 2016.
  4. Samir, N.; Kansoh, R.; Elbarki, W.; Fleifle, A. Pressure control for minimizing leakage in water distribution systems. Alex. Eng. J. 2017, 56, 601–612. [Google Scholar] [CrossRef]
  5. Berardi, L.; Simone, A.; Laucelli, D.B.; Ugarelli, R.M.; Giustolisi, O. Relevance of hydraulic modelling in planning and operating real-time pressure control: Case of Oppegård municipality. J. Hydroinformatics 2018, 20, 535–550. [Google Scholar] [CrossRef] [Green Version]
  6. Do, N.; Simpson, A.; Deuerlein, J.; Piller, O. Demand estimation in water distribution systems: Solving underdetermined problems using genetic algorithms. Procedia Eng. 2017, 186, 193–201. [Google Scholar] [CrossRef]
  7. Ares-Milián, M.J.; Quiñones-Grueiro, M.; Verde, C.; Llanes-Santiago, O. A Leak Zone Location Approach in Water Distribution Networks Combining Data-Driven and Model-Based Methods. Water 2021, 13, 2924. [Google Scholar] [CrossRef]
  8. De Paola, F.; Giugni, M.; Portolano, D. Pressure management through optimal location and setting of valves in water distribution networks using a music-inspired approach. Water Resour. Manag. 2017, 31, 1517–1533. [Google Scholar] [CrossRef] [Green Version]
  9. Mazumder, R.K.; Salman, A.M.; Li, Y.; Yu, X. Performance evaluation of water distribution systems and asset management. J. Infrastruct. Syst. 2018, 24, 03118001. [Google Scholar] [CrossRef]
  10. Parra, S.; Krause, S.; Krönlein, F.; Günthert, F.; Klunke, T. Intelligent pressure management by pumps as turbines in water distribution systems: Results of experimentation. Water Sci. Technol. Water Supply 2018, 18, 778–789. [Google Scholar] [CrossRef] [Green Version]
  11. García-Ávila, F.; Aviles-Anazco, A.; Ordonez-Jara, J.; Guanuchi-Quezada, C.; del Pino, L.F.; Ramos-Fernández, L. Pressure management for leakage reduction using pressure reducing valves. Case study in an Andean city. Alex. Eng. J. 2019, 58, 1313–1326. [Google Scholar] [CrossRef]
  12. Dini, M.; Asadi, A. Optimal operational scheduling of available partially closed valves for pressure management in water distribution networks. Water Resour. Manag. 2020, 34, 2571–2583. [Google Scholar] [CrossRef]
  13. Hernández, J.; Galaviz, D.; Torres, L.; Palacio-Pérez, A.; Rodríguez-Valdés, A.; Guzmán, J. Evolution of high-viscosity gas–liquid flows as viewed through a detrended fluctuation characterization. Processes 2019, 7, 822. [Google Scholar] [CrossRef] [Green Version]
  14. Navarro, A.; Delgado-Aguiñaga, J.; Sánchez-Torres, J.; Begovich, O.; Besançon, G. Evolutionary observer ensemble for leak diagnosis in water pipelines. Processes 2019, 7, 913. [Google Scholar] [CrossRef] [Green Version]
  15. Jara-Arriagada, C.; Stoianov, I. Pipe breaks and estimating the impact of pressure control in water supply networks. Reliab. Eng. Syst. Saf. 2021, 210, 107525. [Google Scholar] [CrossRef]
  16. Mosetlhe, T.C.; Hamam, Y.; Du, S.; Monacelli, E. A survey of pressure control approaches in water supply systems. Water 2020, 12, 1732. [Google Scholar] [CrossRef]
  17. Mathye, R.P.; Scholz, M.; Nyende-Byakika, S. Optimal Pressure Management in Water Distribution Systems: Efficiency Indexes for Volumetric Cost Performance, Consumption and Linear Leakage Measurements. Water 2022, 14, 805. [Google Scholar] [CrossRef]
  18. Chaudhry, M.H. Applied Hydraulic Transients, 3rd ed.; Springer: New York, NY, USA, 2014. [Google Scholar]
  19. Besançon, G.; Georges, G.; Begovich, O.; Verde, C.; Aldana, C. Direct observer design for leak detection and estimation in pipelines. In Proceedings of the European Control Conference, Kos, Greece, 2–5 July 2007. [Google Scholar]
  20. Dulhoste, J.; Besançon, G.; Torres, L.; Begovich, O.; Navarro, A. About Friction Modeling For Observer Based Leak Estimation In Pipelines. In Proceedings of the 50th IEEE Conference Decision & Control and European Control Conference, Orlando, FL, USA, 12–15 December 2011. [Google Scholar]
  21. Prescott, S.; Ulanicki, B. Improved control of pressure reducing valves in water distribution networks. J. Hydraul. Eng. 2008, 134, 56–65. [Google Scholar] [CrossRef]
  22. De Persis, C.; Kallesoe, C.S. Pressure regulation in nonlinear hydraulic networks by positive and quantized controls. IEEE Trans. Control. Syst. Technol. 2011, 19, 1371–1383. [Google Scholar] [CrossRef] [Green Version]
  23. Bermúdez, J.R.; López-Estrada, F.R.; Besançon, G.; Valencia-Palomo, G.; Torres, L.; Hernández, H.R. Modeling and simulation of a hydraulic network for leak diagnosis. Math. Comput. Appl. 2018, 23, 70. [Google Scholar] [CrossRef] [Green Version]
  24. Santos-Ruiz, I.d.l.; Bermúdez, J.R.; López-Estrada, F.R.; Puig, V.; Torres, L.; Delgado-Aguiñaga, J. Online leak diagnosis in pipelines using an EKF-based and steady-state mixed approach. Control Eng. Pract. 2018, 81, 55–64. [Google Scholar] [CrossRef]
  25. Delgado-Aguiñaga, J.; Besançon, G. EKF-based leak diagnosis schemes for pipeline networks. IFAC-PapersOnLine 2018, 51, 723–729. [Google Scholar] [CrossRef]
  26. De Paola, F.; Fontana, N.; Giugni, M.; Marini, G.; Pugliese, F. An application of the Harmony-Search Multi-Objective (HSMO) optimization algorithm for the solution of pump scheduling problem. Procedia Eng. 2016, 162, 494–502. [Google Scholar] [CrossRef] [Green Version]
  27. Delgado-Aguiñaga, J.; Santos-Ruiz, I.; Besançon, G.; López-Estrada, F.; Puig, V. EKF-based observers for multi-leak diagnosis in branched pipeline systems. Mech. Syst. Signal Process. 2022, 178, 109198. [Google Scholar] [CrossRef]
  28. Valencia-Palomo, G.; Hilton, K.; Rossiter, J.A. Predictive control implementation in a PLC using the IEC 1131.3 programming standard. In Proceedings of the 2009 European Control Conference (ECC), Budapest, Hungary, 23–26 August 2009; pp. 1317–1322. [Google Scholar]
  29. Valencia-Palomo, G.; Rossiter, J.A. Auto-tuned predictive control based on minimal plant information. IFAC Proc. Vol. 2009, 42, 554–559. [Google Scholar] [CrossRef]
  30. Khan, B.; Rossiter, J.A.; Valencia-Palomo, G. Exploiting Kautz functions to improve feasibility in MPC. IFAC Proc. Vol. 2011, 44, 6777–6782. [Google Scholar] [CrossRef] [Green Version]
  31. Pannocchia, G. Offset-free tracking MPC: A tutorial review and comparison of different formulations. In Proceedings of the 2015 European control conference (ECC), Linz, Austria, 15–17 July 2015; pp. 527–532. [Google Scholar]
  32. Pérez-Pérez, E.; López-Estrada, F.R.; Valencia-Palomo, G.; Torres, L.; Puig, V.; Mina-Antonio, J.D. Leak diagnosis in pipelines using a combined artificial neural network approach. Control Eng. Pract. 2021, 107, 104677. [Google Scholar] [CrossRef]
  33. Garriga, J.L.; Soroush, M. Model predictive control tuning methods: A review. Ind. Eng. Chem. Res. 2010, 49, 3505–3515. [Google Scholar] [CrossRef]
Figure 1. Case 1: Pipeline with a leak before the controlled node.
Figure 1. Case 1: Pipeline with a leak before the controlled node.
Processes 10 01355 g001
Figure 2. Schematic view of a PRV.
Figure 2. Schematic view of a PRV.
Processes 10 01355 g002
Figure 3. Case 2: Pipeline with a leak after the controlled node.
Figure 3. Case 2: Pipeline with a leak after the controlled node.
Processes 10 01355 g003
Figure 4. Case 3: Branched water distribution network.
Figure 4. Case 3: Branched water distribution network.
Processes 10 01355 g004
Figure 5. Block diagram representation of MPC used in WDS.
Figure 5. Block diagram representation of MPC used in WDS.
Processes 10 01355 g005
Figure 6. MPC scheme for pressure control.
Figure 6. MPC scheme for pressure control.
Processes 10 01355 g006
Figure 7. Case 1: Pressure control and management in a pipeline with a leak before the controlled node.
Figure 7. Case 1: Pressure control and management in a pipeline with a leak before the controlled node.
Processes 10 01355 g007
Figure 8. Case 2: Pressure control and management in a pipeline with a leak after the controlled node. Including ± 15 % of uncertainty in the leak location.
Figure 8. Case 2: Pressure control and management in a pipeline with a leak after the controlled node. Including ± 15 % of uncertainty in the leak location.
Processes 10 01355 g008
Figure 9. Case 2: Comparison between a traditional PID controller and the proposed control scheme.
Figure 9. Case 2: Comparison between a traditional PID controller and the proposed control scheme.
Processes 10 01355 g009
Figure 10. Case 3: Pressure control and management in a branched water distribution network.
Figure 10. Case 3: Pressure control and management in a branched water distribution network.
Processes 10 01355 g010
Figure 11. Case 3: Flows in the main water intakes for the WDS.
Figure 11. Case 3: Flows in the main water intakes for the WDS.
Processes 10 01355 g011
Table 1. System parameters.
Table 1. System parameters.
ParameterValue
Relative roughness ( ϵ ) 0.1 × 10 4
Fluid (water) density ( ρ ) 995.736   k g / m 3
Kinematic viscosity ( ν ) 0.803 × 10 6   m 2 / s
Leak coefficient ( λ ) 0.1 × 10 4   m 5 / 2 / s
Gravity acceleration ( g ) 9.81   m / s 2
Valve coefficient ( C v ) 1.156
Pipeline diameter ( d ) 0.048   m
Case 1 lengths ( z 1 , 2 , 3 ) 11.278 , 27.662 , 75.7   m
Case 2 lengths ( z 1 , 2 , 3 ) 38.94 , 14.79 , 60.91   m
Case 3 lengths ( z 1 , , 5 ) 34.456 , 31.056 , 34.456 , 35.456 , 35.456   m
Table 2. Initial conditions for the three simulation cases.
Table 2. Initial conditions for the three simulation cases.
VariableCase 1Case 2Case 3Units
H 1 ( 0 ) 3.5480 7.04 m
H 2 ( 0 ) 5.29081.99 m
H 3 ( 0 ) 3.2 m
H 4 ( 0 ) 1.5884 2.21 m
H B 1 ( 0 ) 5.6542 m
H B 2 , B 3 , B 4 ( 0 ) 1 m
Q 1 ( 0 ) 0.0012 0.0019 0.0030 m 3 / s
Q 2 ( 0 ) 0.0012 0.0019 0.0014 m 3 / s
Q 3 ( 0 ) 0.0012 0.0019 0.0007 m 3 / s
Q 4 ( 0 ) 0.0015 m 3 / s
Q 5 ( 0 ) 0.0007 m 3 / s
H ( 0 ) 3.2 4.6889 1.2255 m
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Bermúdez, J.-R.; López-Estrada, F.-R.; Besançon, G.; Valencia-Palomo, G.; Santos-Ruiz, I. Predictive Control in Water Distribution Systems for Leak Reduction and Pressure Management via a Pressure Reducing Valve. Processes 2022, 10, 1355. https://doi.org/10.3390/pr10071355

AMA Style

Bermúdez J-R, López-Estrada F-R, Besançon G, Valencia-Palomo G, Santos-Ruiz I. Predictive Control in Water Distribution Systems for Leak Reduction and Pressure Management via a Pressure Reducing Valve. Processes. 2022; 10(7):1355. https://doi.org/10.3390/pr10071355

Chicago/Turabian Style

Bermúdez, Jose-Roberto, Francisco-Ronay López-Estrada, Gildas Besançon, Guillermo Valencia-Palomo, and Ildeberto Santos-Ruiz. 2022. "Predictive Control in Water Distribution Systems for Leak Reduction and Pressure Management via a Pressure Reducing Valve" Processes 10, no. 7: 1355. https://doi.org/10.3390/pr10071355

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop