Real-time neuro-fuzzy controller for pressure adjustment in water distribution systems

This work applied a neuro-fuzzy technique for real-time pressure control in water distribution systems with variable demand. The technique acted to control the rotation speed of the pumping system, aiming mainly at increasing energy efficiency. Fuzzy, neural and neuro-fuzzy controllers were tested in an experimental setup to compare their performances in a transient regime, a permanent regime, and with respect to disturbances applied to the system. To evaluate the efficiency of the system, a demand variation curve was emulated for different operating conditions. The results demonstrate that the neuro-fuzzy controller (NFC) presented a significant increase in pumping system efficiency and a reduction in specific energy consumption of up to 79.7% when compared to the other controllers. Target pressures were kept close to the set-point values with low hydraulic transients and maintained satisfactory stability (error <8%) under severe situations of demand variation. It is concluded that the NFC presented superior results when compared with the other analyzed controllers.


INTRODUCTION
Water distribution systems (WDSs) are important infrastructure in modern society and occupy a prominent position for economic development (Geng et al. ). These systems can be defined as a set of equipment, works and services aimed at water supply for domestic, industrial and public consumption purposes. Due to their dimensions and particularities, these systems generally present a high complexity that hampers their design and operation. The demand variation, which is intrinsic to many WDSs, results in changes to the operational dynamics of pumping systems and requires the use of energy control and rationalization methods for different operating scenarios.
Energy conservation and efficiency are gaining prominence in many water utilities, mainly due to environmental regulations and increasing energy costs (Salomons & Housh ). However, PRV are designed to produce head losses.
Due to the high energy consumption of WDSs, engineering solutions that adopt variable-frequency drives (VFDs) in pumping systems have been highlighted in the literature. In this operating mode, it is possible to increase the energy efficiency of the pumps when operating at a variable speed. In practice, it is common to apply proportional-integral-derivative (PID) control techniques in WDS pumping and control valves. Designing and tuning a PID controller appears to be conceptually intuitive but can be difficult in practice if multiple (and often conflicting) objectives such as transience (period until steady-state) and high stability (ability to keep the output stable when a disturbance is inserted in the system) are to be achieved. In specific cases, systems cannot undergo major changes in their operational conditions because of the risk that control will become unstable or require adjustments to its parameters.
In addition, if a large time delay is not correctly considered in the control of a pump rotation in a large WDS, oscillations and instabilities can occur in the control process.
These dilemmas have encouraged researchers to develop novel 'intelligent' tools for WDSs (Moura et al. ).
Control is defined here as a closed feedback loop in which the difference between a measured process variable and a desired set-point is minimized over time by the adjustment of a process setting (Page et al. b Therefore, more robust monitoring, control and operation techniques are necessary to minimize instability, increase efficiency and guarantee essential conditions to serve the final consumer in both quantity and quality. Hybrid control techniques, such as the neuro-fuzzy (NF) technique, are widely used in several areas of engineering where mathematical problem modeling is complex. The great advantage of this method is that it does not require a mathematical model of the system (commonly used for the design of conventional controllers) or a specialist for modeling the system's rule base (necessary for the design of fuzzy controllers). In addition, NF controllers provide numerous advantages when combining the properties of artificial neural networks and fuzzy logic, such as the ability to learn, generalize and interpret. This type of control has been used in several studies due to its good perform- Brazil. The NFC is tested and analyzed with respect to performance (permanent regime, transience and disturbances) and energy savings, as indicated by energy efficiency indicators (pumping system efficiency and specific energy consumption). To validate its performance, the designed controller is compared to fuzzy and neural controllers.

EXPERIMENTAL SETUP
The experimental setup (Figure 1), which emulated a real WDS with variable demand, was powered by a pumping system connected to a reservoir and consisting of a threephase 3 HP induction motor and a centrifugal pump with a maximum flow of 12 m 3 /h and maximum head of 45 m.
The system has a control valve to vary the demand and the operational conditions of the experimental setup. The system was driven by a VFD to control the rotation speed of the pump.
LabVIEW, a graphical programming language used to accommodate the supervisory control and data acquisition (SCADA) system in a microcomputer, was used for data acquisition and instrument control software. The SCADA system allows an operator to make the set-points change on the controller, to open/close the valve and to monitor actuators and sensors. These sensors measured pressure, flow and power consumption.

NEURO-FUZZY CONTROLLER
The neuro-fuzzy controller was the hybridization result of two methods based on artificial intelligence techniques: artificial neural networks and fuzzy logic. The training adopted was supervised; thus, the elaboration of this controller involved the development of a robust database with the data parity of a pre-existing (primary) controller.
In this work, a fuzzy primary controller (FC) with the control surface illustrated in Figure 2 was proposed to control the system and generate parity of the training data.
Error was defined as deviation from the set-point value (difference between the measured pressure and the desired   Downloaded from http://iwaponline.com/ws/article-pdf/21/3/1177/886340/ws021031177.pdf by guest set-point), error variation (dError) was the difference between the Error at k and k À 1, and the frequency variation (dFreq) was the VFD output frequency at k and k À 1. The database was formed by the data parity of two input variables (error and error variation) and an output variable (frequency variation), as shown in Figure 4(a). Table 1 shows the system variables and how sampling occurs at time k. For the acquisition of training data, a frequency of sampling equal to 100 samples/s was used, estimating an average value for every 10 samples to reduce variations during data acquisition. In total, 5,900 data sets were used to train the neural controller (NC) and NFC. The controller   The artificial neural network architecture used in this work is illustrated in Figure 5. It consists of five layers, representing the training steps. The first layer calculated the membership value (μ x,i ) and the degree of relevance (W 1 and W 2 ) with which the entries (Error: X 1 and Error variation: X 2 ) satisfy the values or linguistic terms associated with these nodes. In the second layer, each node corresponded to a rule and calculated to what degree (Ai,j) the consequent rule was being met; that is, the implications of the premises. The third layer was responsible for normalizing the vector, while in the fourth layer, neuron outputs were calculated using the product of the consequent rule.
The respective output was calculated on the last layer (frequency variation: Y).

EVALUATION OF SYSTEM EFFICIENCY
Water distribution systems are subject to variations in water demand. This continuous change in demand is reflected in the variation in system pressures, which fluctuate throughout the day. In times of lower demand, the pumping system, which is designed to operate at a nominal rotation speed, supplies the network with excess pressure, wasting energy and causing an increase in the incidences of ruptures and leakages. The opposite is observed in times of greater demand, where the pressure will drop. To increase the efficiency of these systems, intelligent techniques are being developed for real-time pressure control of WDSs. This work adopted the demand variation curve shown in Figure 6 to assess the impacts of the controllers (Fuzzy and Neuro-Fuzzy). The daily demand pattern described the typical consumption variation throughout the day. Two of the most common performance indicators were used in the pumping systems evaluated: pumping system efficiency and specific energy consumption (Equations (1) and (2)). The energy Average value estimation of error and error variation for every 10 samples.   gain of the different control strategies was evaluated by comparing the results before and after the automation process.

Neuro-fuzzy controller analysis
Fuzzy, neural and neuro-fuzzy controllers were tested in an experimental setup to compare their performances in a transient regime, a permanent regime, and with respect to  disturbances applied to the system. A control system is considered robust when it is able to maintain the stability of a system even when subjected to disturbances. The first two tests were carried out with a sudden increase in the demand for water in the network; the third experimental trial adopted a milder variation in demand; the fourth assessed the controller's response to dynamic changes in the set-point; and the last test was carried out to evaluate the control response and its stability. to verify that the NFC is the only one that maintains good stability, adapting to system changes with low error (error <8%). Table 2  For a WDS, the steady-state error is not an extremely critical factor, mainly in situations of demand variation, with tolerable errors in the order of 2 to 5%. Analyzing the performance of the controller by varying the demand slowly ( Figure 10), it is possible to observe that the NFC maintains the pressures with a low percentage of error (error <3.3%), compared with 9.8% for the NC and 2.1% for the FC. The controller results also demonstrate that the power of the pumping system was stable and had no peak current, an important aspect for the protection of electromechanical equipment. The presence of a high peak (up to 179% higher than NFC) in power consumption for the FC shows that it can have harmful transient characteristics.
To demonstrate the controller's effectiveness at different set-points, Figure 11 shows the controller operation results      In real systems, operational changes are often gradual and slow, which would facilitate the performance of the NFC.

Energy efficiency analysis
To assess the energy efficiency of the system, a consumption profile was implemented in the SCADA system and four operating scenarios were tested: • Pressure control by a FC; • Pressure control by the NFC; • Manual control; and • Uncontrolled system.
The system is considered uncontrolled when there is no automatic regulation of pressure or flow. Manual control was performed by manually adjusting a valve inserted after the pump. In both scenarios, the pumping system operated at the rated speed of rotation. The efficiency of the VFDmotor-pump system for the four scenarios is shown in Figure 12. It was observed that during times of low demand (i.e. 0 h-3 h), the efficiency of the controlled system was higher than other modes of operation. As expected, the performance of the controlled system was lower during peak demand times. The increase in performance during the minimum demand mentioned was because the controller maintains the pressure at 10 m. For the FC, there was an average increase in efficiency of 9.16% when compared to manual control. The increase was 9.59% for NFC due to the lower control action, reflecting the greater stability and energy efficiency. When the system operated with the pump at nominal speed (uncontrolled system) and demand was controlled by valve (manual control), there was a pressure drop at the end user due to the excess pressure loss caused by the valve, negatively affecting the overall system performance. Figure 13 shows the behavior of specific energy consumption, where it is evident that FC and NF show better results than the other two methods. In the period evaluated, from 9:00 am to 2:59 pm, SEC equality is observed in the four methods adopted because, in all cases, the system   The behavior of the pressure of the system over 24 h was also investigated for each of the four operating scenarios proposed in this research, whose results are shown in Figure 14. For the NFC, the average pressure was 10.3 m, and for the fuzzy controller, the average pressure was 10.7 m, with errors of 3 and 7%, respectively. It was also found that the system without a controller presented the greatest pressures during periods of least demand. This could cause the rupture of pipes, increase water loss by leaks and reduce operational efficiency.

CONCLUSIONS
The application of control systems in water distribution sys- or noisy, the controllers derived from these techniques will have the ability to control the system with greater robustness and performance. This is one of the great advantages of an NFCit allows for more efficient controllers to be designed from poorly designed and/or inefficient controllers.
The energy efficiency analysis showed that there was a significant reduction in energy consumption and in the specific energy consumption of the pumping system when comparing the NFC to other controllers. The results demonstrated that the neuro-fuzzy controller (NFC) presented a significant increase in pumping system efficiency and a reduction in specific energy consumption of up to 79.7% compared to the other controllers. Target pressures were kept close to the set-point values and with low hydraulic transients, in addition to satisfactory stability (error <8%) in severe situations of demand variation. Finally, it is concluded that the NFC presented superior results when compared with the other analyzed controllers.