Improving Process Management in a Water Treatment Plant Using Control Modelling

. This work presents a modelling and a simulation of a pH con-trol for process management in a drinking water treatment plant. A range of historical data, or knowledge base, was used to deﬁne the behavior of each input and disturbances of the process, using the MATLAB/Simulink software. The present pH control modelling has been simulated and compared to some experimental tests, thus con-tributing to achieve and identify operational scenarios in a real water treatment plant. Therefore, the present results allows to predict not only the present scenari-os but also new operational conditions, in order to estimate the better process parameters and reduce some costs related to raw materials, such as the lime con-sumption, in water treatment plants.


Introduction
The pH neutralization process, or the control of pH, is a crucial task in wide industrial applications, such as chemical, biotechnological engineering, wastewater and water treatment plants (WTP).The pH, as a definition, is the logarithmic value of hydrogen ion activity in an aqueous solution or a measure of the acidity or alkalinity of a solution [1].In terms of numerical values, a solution with a pH equal to 7 is neutral and for an alkalinity solution, this value is greater than 7.In an acidic solution, the pH value is less than 7.
The control of a pH neutralization is one of the major problem in water treatment plants, particularly due to its highly nonlinear characteristics [2].In the last years, many researchers have studied pH control strategies and methods to resolve or min-imize this strong nonlinearity [2].
In some cases, an extended Kalman filter (EKF) and an unscented Kalman filter (UKF) were used to estimate some values in a nonlinear pH process [3,4].In [5], double-control scheme for pH process was employed to obtain a good load rejection performance, particularly simultaneous change occurs in set point and in disturbance inputs.This solution was proposed to overcome some drawbacks usually found in conventional PID (proportional-integral-derivative) systems, such as the robustness of the control.
In [6], a Wiener-Laguerre model was used to evaluate the pH neutralization process as a nonlinear model predictive control framework, based on the sequential quadratic programming algorithm.This solution was designed considering an operation of the pH process in distinct set points.A Wiener model identification and predictive control also was applied of a pH neutralization process in [7], but in this case in an effluent solution control.
A multi-model nonlinear predictive control scheme was applied in [8] to describe and handle the nonlinearities of a pH industry process.This approach included a parallel integral action in the controller to compensate unmeasured states.
In a WTP, for example, natural dissolved organic matter (DOM) is present and this kind of product may cause relevant problems for process control [9].In this situation, a coagulation step should be applied to maximize the removal of DOM in water, but accordingly to [9], some coagulants are able to modify the final pH, especially after enhanced coagulation.In [10], a reset/hybrid control application was applied an in-line pH process, in order to test the performance of a reset controller for a non-linear system with disturbances.
In some cases, a pH process requires an online monitoring and control system due to its highly nonlinear aspects [11,12].Other researches took into account the use of artificial intelligence techniques to improve pH control, in particular for predictive purposes and adaptive and/or optimization strategy [13,14,15,16,17,18,19,20,21].
As aforementioned, the pH control is a major issue in some industrial processes due to its nonlinear behavior, thus, in this context, the aim of this work consists in the modelling and simulating a pH closed-loop control of a real WTP, in order to better manage the process and reduce some costs related to the use of raw materials in a water treatment plant, for some operational scenarios, as well as identify the better parameters for this type of process.

Methodology
The present work has been applied for simulation purposes and some process variables were chosen by mathematical modelling.These variables were identified con-sidering their impact for pH control in a real drinking water treatment plant, located at São Paulo city, Brazil.The rated flow of this WTP is 33 m 3 /s.In this context, this research has been performed in six steps, as follows: 1. Identify the process variables according to the desired pH behavior.Thus, consid-ering the knowledge of the operators, some parameters were identified as relevant for pH control, such as, chlorine dosage and fluorine dosage at the end of the pro-cess treatment, raw water flow, treated water turbidity and the lime dosage; 2. Select a range of historical data stored in a Supervisory Control and Data Acquisi-tion (SCADA system).This system is running at the local water plant and Figure 1 shows a screen of the SCADA used for operating the WTP and lime dosage to con-trol the pH of the drinking water.On this screen is possible to adjust the reference value for automatic controller or the lime pump frequency, as well as other parameters such as the lime flow, lime dosage and dosage pumps.3. Identify a sample data wherein the pH process was being controlled in automatic mode.Table 1 shows a brief sample of the experimental data used for modelling and simulation.4. Load these data in the MATLAB R software and execute some specific commands to determine the behavior (transfer function) of each input and respective output variable.In this case, the output variable is the measured pH.The following com-mands were used: -Command "iddata": create a data object to encapsulate the input/output data and their properties(Eq.1).
Where: Y = output, U=input and Ts = sampling interval -Command "tfest": This MATLAB c function estimates a continuoustime transfer function, sys, using time-or frequency-domain data, DAT obtained from "iddata" command, and contains np poles, as follows Eq 2: sys = tf est(DAT, np) 5. Modelling each input/output variable and/or equipment in the MATLAB Simulink environment, in order to proceed to the operational scenarios simulation.Figure 2 shows an aerial view of the WTP used for modelling and experimental validation.Figure 3 shows a final model of each variable, i.e., chlorine dosage, treated turbidity and flow, as well as the equipment behavior, such as lime and fluorine pumps, after modelling step.Figure 3 also highlights a transfer function obtained for one disturb-ance, i.e., for chlorine dosage, using Equations 1 and 2. This function is a relation between the chlorine dosage and its influence in the pH value.Equations 1 and 2 also were used for determining the other disturbances, such as fluorine dosage, flow and turbidity influence.3: Where, is desired value; is value obtained from the mathematical model and N is number of existing samples.The next section shows the results and discussion about the simulation of three operational scenarios using the model depicted in Figure 3.

Results and Discussion
This session shows the results and discussion about the simulation of three operational scenarios using the final mathematical model depicted in Figure 33.In each case, the initial conditions were used to start the simulation and proceed with experi-mental validation.
-First scenario (initial conditions): in this case the initial parameters were defined as follows: chlorine dosage = 1.74 mg/l, fluorine dosage = 0.645 mg/l, raw water flow = 13.83m 3 /s and treated turbidity = 0.422 NTU.The results show a good approximation between the simulated and experimental data, even though some operational points should be better evaluated in each case.On the other hand, it should be noted that the results achieved in the scenario 3 are better than those obtained in other cases, as this last scenario have considered a data sampled time equal to 10 seconds from the knowledge base (SCADA system), while in the first and second cases were employed data sample time equal to 2.5 minutes.Table 2 shows the MAE values for each scenario.
The frequency of each lime pump is a relevant parameter capable of estimating the lime consumption in the WTP, since this parameter is useful to determine lime flow.Today, the pH control at the water plant used for experimental validation requires more than 15 tons of lime per day, when the raw water flow is near 33 m 3 /s.

Conclusions
This work presented a model of a pH control for process management in a drinking water treatment plant.A data set obtained from a SCADA software was used to define the behavior of each input and disturbances of the process, using the MATLAB/Simulink c software.The results of the three operational scenarios show a good approximation between simulated and experimental data, thus, the present model can be used in other operational conditions, in order to estimate the lime pump frequency and the pH in the treated water, as well as improve the raw water quality and reduce the lime consumption.The current mathematical model can be a useful tool for a decision-making process and production management; particularly for estimating the daily chemical refills in the WTP, which is not an easy task.It should be mentioned that lime consumption could represent 15% of total operational costs in a WTP [22].Moreover, the lime consumption could be better evaluated due to initial parameters of the WTP.Further investigations should be considered, using an artificial intelligence approach, to estimate the minimum dosage of the lime pumps, maintaining the quality of the treated water.That could lead to cost reduction in the water treatment process.

Fig. 1 .
Fig. 1.A process screen in the SCADA system for pH monitoring and lime dosage

Fig. 2 .
Fig. 2. The water treatment plant used for modelling and simulation

Fig. 3 .
Fig. 3.The process modelling in the MATLAB/Simulink c software

Figure 3 (
a) and (b) show the lime pumps dosage, and the pH obtained in the experimental and simulated data.

( a )Fig. 4 .
Fig. 4. a) Frequency of lime pumps 1 and 2 and b) pH measured for experimental and simulated data

( a )Fig. 5 .Fig. 6 .
Fig. 5. a) Frequency of lime pumps 1 and 2 and b) pH measured for experimental and simulated data

Table 1 .
Some historical data selected from SCADA software

Table 2 .
Values of MAEs scenarios