Fuzzy Gain Scheduling and Feed-Forward Control for Drinking Water Treatment Plants (DWTP) Chlorination Process
필름·전자재료 · (15) 디스플레이 패널재료
기본 정보
- 저자
- DOI
- 10.1109/access.2020.3002156
- 저널
- IEEE Access
- 발행년도
- 2020
- 발행기관
- Institute of Electrical and Electronics Engineers
- 피인용수
- 5
- 라이선스
- cc-by
- 논문 유형
- –
- 언어
- –
- 원문 페이지
- https://doi.org/10.1109/access.2020.3002156
- 토픽
- Membrane Separation Technologies
- OpenAlex ID
- W3035055174
평가 내용
- 관련도
- 사업분야
- 필름·전자재료 · (15) 디스플레이 패널재료
- 부 분야
- –
- R&D 측면
- –
- 확신도
- –
- 근거 용어
- –
- 판단 근거
- 임베딩 유사도 기반 평가로 '필름·전자재료 > 디스플레이 패널재료' 분야에 선정된 논문입니다.
- R&D 활용 포인트
- –
- 평가 입력
- –
초록
본문 69,541자
본문 펼치기
섹션 본문 67문단 · 47,916자
(제목 없음)
1Chlorination in drinking water treatment plants (DWTP) is the final process applied to water before it is sent to storage tanks in the supply network for subsequent human consumption. An excessive dosage of chlorine or, conversely, too small a dosage, may breach existing legal regulations on mandatory limits. Furthermore, excessive amounts generate an unnecessary cost in terms of chlorine and, collaterally, problems due to an increase in the maximum permitted amounts of such by-products as trihalomethanes, which are carcinogenic compounds for humans. In DWTP where there is no significant variability in the quality of the water to be treated, a type of control that is proportional to the flow rate in the effluent can have fully satisfactory results. However, in a control strategy applied when there are inherently long delays in the process, variability in the quality of the water to be treated and considerable variations in flow, a proportional type of control does not tend to work and an alternative type is needed. This article presents the strategy and results of a control method that combines a feed-forward system with gain scheduling in a (Proportional-Integral) PI control. The control system design was validated beforehand by simulation and then applied to a real DWTP, producing satisfactory experimental results.INDEX TERMS Chlorination process, drinking water treatment plants, fuzzy control, gain scheduling.110018This work is licensed under a Creative Commons Attribution 4.0 License. For more information, see https://creativecommons.org/licenses/by/4.0/ VOLUME 8, 2020
I. INTRODUCTION
2Chlorine is the most widely used disinfectant in drinking water treatment plants (DWTP) due to its high efficiency as a germicide and its excellent capacity to eliminate odors and tastes from water destined for human use. It is also used in Wastewater Treatment Plants (WWTP) to minimize the public health risks associated with exposure to reclaimed water, where the most important goal is the reduction of pathogens during tertiary treatments [1].
3Chlorination processes at output from DWTP have been extensively analyzed in terms of control. The interest lies in achieving a fully automated process, in which humans The associate editor coordinating the review of this manuscript and approving it for publication was Mohsin Jamil . only intervene as supervisors, and in which the quality of the effluent complies with the established regulations, while optimizing operating costs. In the last decade, advances in online instrumentation [2]- [5], i.e. our 'eyes' on the ground, together with controllers with the capacity to run advanced control algorithms [6], have successfully automated processes that were traditionally controlled manually. However, in the case of chlorination, it would be no use having the finest instrumentation and controls to address the problem if the chemistry of the water to be treated is not taken into consideration. Most problems in chlorination control come down to an improper understanding of the chemistry of water, inexistent or incomplete modeling, and/or problems derived from a poor choice of sensors or actuators.
4The reaction of chlorine when it comes into contact with water can be divided into several phases [7], which clearly mark the control strategy applied. In a first phase, a significant part of the chlorine reacts quickly with the existing (organic and inorganic) matter [8], these reactions occur between the first 5 and 10 minutes [9] after the chlorine comes into contact with the water. The amount of organic matter and nitrogenous substances that react in these first moments will cause considerable variation in the gain of the process in a quick reaction and must be taken into account when designing the control system. When the variability in water quality is homogeneous, this problem will be barely exist. However, when treating waters in which this amount of organic matter can vary, and therefore its chlorine demand too, a control is required with variable gains that adapt to this characteristic. The problem is heightened by the occasional existence of ammonia, which might vary the process gain in a non-linear manner and cause what is called a 'breakpoint scenario'. In these cases, the measurement of residual chlorine at output, the controlled variable, goes through three states with different behaviors. Depending on the nitrogen-derived compound that is reacting in each of these three states, the demand for chlorine will vary. The control system in these cases must be able to deal with these changes in water chemistry and detect when the transition from one state to another occurs [10]. This phenomenon is explained in [11] from the point of view of water chemistry, as well as the influence when computing the process gain for the control system.
5The remaining part of chlorine that has not reacted at first, reacts more slowly and requires a minimum period of contact with water in order for its disinfection to be effective. This time is normally between 20 and 30 minutes. This characteristic must be taken into account when designing the control system since it can considerably affect the behavior, as will be seen in the results of later sections. This reading time by the residual chlorine meter in output will also be affected by the variations in flow that may occur in the system. For example, the system delay will vary if the flow is 1 m 3 /s or triple that amount (3 m 3 /s) and, depending on the system, and not taking this time into account could hinder the implemented control.
6There are also certain problems that can hinder the control of chlorination caused by the sensors and actuators used. Regarding residual chlorine analyzers, it is important to consider their location to ensure that their free chlorine reading is a real value and therefore significant. They must therefore be located somewhere that guarantees that the water to be treated at its highest flow has been in contact with the chlorine for at least 30 min, otherwise the meter reading will not be correct. Likewise, it is important to measure genuinely free chlorine and not combined chlorine. In the case of combined chlorine readings, the control system would produce an incorrect measurement that, depending on its state in the breakpoint [12], [13], could cause underdosing due to chlorine dosage increasing without taking this into account. In these cases, where there could be ammonia in the water to be treated, the installation of an ammonia analyzer is highly recommended, and almost obligatory. Its reading setting (every 5-10 min.) will also be a factor to be taken into account in the design of the control system since this will entail an additional delay on top of those inherent to the chlorination process. Normally, the drawback of this type of analyzer is that, apart from a sampling time below 0.02 ppm or 0.05 ppm, it does not give a reliable reading. There are no online analyzers on the market that offer such precision of particles per billion (ppb) of NH4-N. The error in this measurement range makes it hard for the control system to anticipate, since the output variable cannot be computed directly as a function of the input ammonia variable. In this case, the possible chlorine demand must be estimated, based on other indirect parameters such as temperature, water origin or pH.
7In most cases, the chlorine used for disinfection in large drinking water treatment plants tends to be supplied in pressurized chlorine tanks or drums. The output of chlorine gas from these drums is transferred to the chlorinators (actuators), where chlorine gas is mixed with auxiliary water to obtain chlorinated water with concentrations ranging from 1 to 3 gr/l. If the variability in the dosage is large, as is the case in the present study, there are sure to be different chlorinators to hence cover a wide range of flow rates. Switching between these chlorinators with different ranges of action, as well as changes in the drums due to chlorine gas depletion, will cause considerable disturbances to the control system and these will require a quick response in order to keep the output within the desirable limits.
8In summary, for DWTP treating large flows, there are different possible problems that the control system must consider when automating the chlorination process:
9• Large variations in chlorine demand, due to the diversification of the organic matter present in the water to be treated and the occasional appearance of ammonia.
10• Long delay times in the measurement of chlorine at effluent output, due to the inherent time that the process requires in order for disinfection to be effective.
11• Unreliable sensors that measure combined chlorine as well as free chlorine or mechanical errors in actuators.
A. RELATED LITERATURE
12Depending on the origin of the water to be treated and the available instrumentation and control, the strategies used in drinking water chlorination processes may also vary. In drinking water supply tanks, a form of post-chlorination is performed on water that has already been treated beforehand and the main demand for chlorine from organic and inorganic compounds has already been covered. In [13] presents a model for estimating chlorine decay in water output from the DWTP, the object of the control presented in this article. In relation to the problems with long delays and major disturbances, some kind of control at output evidently needs to be recommended. Hence, a model-based predictive control (MPC) algorithm is used to try to optimize the future behavior of the plant in each interval, computing a sequence of VOLUME 8, 2020 manipulated future variables [14]. Reference [15] addresses the problem of chlorination control in supply tanks using an MPC based on the flow to be treated and the system model. In this case, the chlorine decay for different flow rates is known, and the controller can predict and anticipate before detecting deviations on the setpoint in the effluent. Reference [16] addresses the control of chlorination in drinking water supply systems based on a robust predictive control model. The use of Epanet simulation software [17]- [19] should be highlighted in applications for systems controlling drinking water supply. This software can also describe in great detail the behavior of the reaction kinetics of chlorine in the water treated for a supply. However, the computation requirements and not working in 3 dimensions mean it is unsuitable for the type of application being presented. In [20] propose a control system based on the ratio between flows of water to be treated from wells and the demand for chlorine to be dosed. Reference [9] presents a highly detailed overview of different chlorination control strategies in WTP, ranging from manual control to automated systems based on feedback algorithms such as PID combined with feed-forward. In the case of manual control, the need for the presence of a technician to set the dosage is an operating cost that must be taken into account. For DWTP in which variability in the quality of the water to be treated is minimal, this manual strategy may work well. The technician in this case sets the dosage and is aided by an output instrument that can make rectifications if it veers from the desired setpoint. This operation can be repeated 2 to 3 times a day and does not take long, so the operational effort is sustainable. The need for automation mainly arises when the variability in flow and water quality at input make manual operation unfeasible in terms of costs and 'human in the loop' unreliability.
13In this sense, a first level of automation with respect to manual dosage is what is called flowpacing. In this case, for a chlorine demand with little variability and without disturbances of quality, the strategy might work, but not when the demand is variable. The first option to address these changes in water quality (chlorine demand) is to close the control loop and apply, for example, a PID algorithm that compensates for the effect of possible disturbances at output. If the range of flow rates of the water to be treated varies, the integral gain of the controller should also vary since the system downtime changes. Non-constant water quality will affect the system gain, and consequently controller gain. From all of the above, it follows that for a type of water with variable delays and demands, the gain of the PID controller must be adjusted to the different operating points. Reference [21] describes a system that compensates for this variability in system gain, using a PID controller with variable parameters based on the particle swarm optimization (PSO) computational method for chlorination of drinking water. Reference [22] presents an adaptive predictive PI controller that adapts or self-adjusts depending on demand. Another strategy presented in [23] uses a cascaded PI to control chlorination in contact tanks with long downtimes. As alternative strategies to PID algorithms, [24] presents a control algorithm in which the variability of demand is addressed through the use of neural networks for a drinking water plant with a nominal flow rate of 0.9 m 3 /s. Reference [25] addresses the problem of chlorination control by means of a predictive control strategy using a controller in a dynamic matrix configuration.
B. CONTRIBUTION
14This article presents a strategy to control chlorination processes with severe disturbances and long delay times. A system of distributed parameters is addressed from the point of view of simulation and control, the identification of such parameters as diffusion, convection and decay of chlorine having been necessary at each point of operation. A gain scheduler and feed-forward control system designed on the basis of the operator's experience and data validated by more than 5 years of records is used.
15The proposed control model can be applied to plants where there is variability in the demand for chlorine, thus providing a method for the design of a type of control system that takes this factor into consideration. It can also be applied to respond to severe disturbances in water chemistry, such as the appearance of ammonia; or operations such as changes between chlorination cabins that are not always linear. Also, as a contribution, based on the variation in flows it offers a potential solution for changes in downtimes that might affect the control system.
16One of the advantages of this article over other solutions reported on the current state-of-the art is that it might not require specific hardware for physical implementation. Indeed, this study provides a solution involving an easily implemented control strategy using the existing hardware in the DWPT under study. Specifically, the market controller used is a commercial PLC (Programmable Logic Controller) made by Rockwell Automation. Unlike other control systems presented in the literature, this one requires much less computation, is easily exportable to other architectures (since it is based on a standard), and is also robust enough to be used in industrial environments.
C. STRUCTURE
17The remainder of the article is structured as follows. Section II describes the chlorination plant in terms of hydraulics and equipment. Section III presents and describes the mathematical model applicable to chlorination treatment, identifies the system and presents the parameters for different chlorine flow rates and demands. Section IV explains the structure of the implemented controller and details the tuning parameters that were run in the actual plant. Section V explains how the simulator used to test the control system was designed and run. Section VI details the running of the algorithm designed in a market PLC controller. Section VII presents the results obtained from fuzzy gain scheduling and feed-forward (FGS & FF) control, both in the custom-built simulator and in the aforementioned actual treated plant. Finally, Section VIII presents the conclusions based on the results obtained.
II. DRINKING WATER TREATMENT PLANT
18The DWTP that is the object of this article is one of the most technologically advanced water treatment plants in operation. Producing 120 Hm3 of drinking water a year and with a maximum capacity of 6 m 3 /s, it is one of the biggest drinking water treatment plants in Southern Europe.
19At this DWTP, traditional processes such as pretreatment, clarification and final disinfection of water coexist alongside other latest generation ones, such as treating water with ozone and active carbon, and reverse osmosis. For disinfection, there are two chlorination tanks, the first of these being the subject of the work presented herein. Figure 1 shows a diagram of tank 1 where the first chlorination of the water to be treated at the WTP is performed. The 10,000 m 3 tank is hydraulically connected to a second tank of identical size and which, in the event of an anomaly in either of these tanks, can treat the entire flow of the plant.
A. CHLORINATION PLANT LAYOUT
20As mentioned earlier, the object of study in this article is the first tank (figure 1). However, it would also be applicable to the second tank, albeit modifying the control system parameters. In fact, both tanks are cleaned every year and while this is happening, all the water to be treated only passes through the one tank that is still in service.
21The flow of water to be treated in tank 1 comes from a small chamber in which water from a traditional treatment by granular activated carbon filters (F GACF ) is mixed with water treated by reverse osmosis (F RO ). On output from both treatment processes, there are respective flow meters that show the flow from both the osmosis and carbon filter treatments, F RO and F GACF , respectively. The sum of these two flows will be the total flow to be treated variable, and the input for the control system presented in this article. The actual flow treated by the plant is between 5.5 m 3 /s, at maximum performance, and a minimum flow in certain situations of 1.5 m 3 /s. Under normal conditions, the distribution by GACF and by RO is 50%. However, this distribution may change by hours depending on the operating conditions of the DWTP. This flow balance must be taken into account by the control system because it will cause variations in the system's gain, as shall be explained later. The theoretical residence time in the tanks can vary between 30 min and 2.5 hours, depending on the flow. It is important for this time, depending on the velocity of the water, to be considered by the control system in order to modify its integral gain. The tank is divided by a baffle that forces the water to travel 200 meters, 100 m in one direction and 100 m more in the opposite direction. This design is due to the need to guarantee a minimum reaction time so that the dosage of chlorine that comes into contact with the water can be effective.
22The sensors and actuators that are used to perform the control are flow meters (FT, flow transmitter) (F RO , F GACF ), a quality transmitter (Q), ammonia analyzer in the mixing chamber (AN1) and a temperature transmitter (TT). Both level meters (LT, level transmitter) are available for tanks 1 and 2. Two free chlorine analyzers located at the midpoint (specifically at 87 m) at the end of the tank (AN2, AN3, respectively). As actuators there are four chlorination cabins that produce a flow of chlorinated water (F CHLORINE ) in accordance with the setpoint. Of the four cabins, two have a range of 0-40 Kg/h and the other two of 0-160 Kg/h. The main meter that closes the loop from the control system in question is AN2, but there is a second meter (AN3) on output from tank 1. Should there be any problem with AN2, meter AN3, with the corresponding settings, becomes the control system process variable. Tank 2 has two residual chlorine analyzers AN4 and AN5 that serve a similar purpose as tank 1 but with different setpoints and settings. Neither the control nor meters in tank 2 are studied in this article.
III. MATHEMATICAL MODEL. SYSTEM IDENTIFICATION
23The chlorine dispenser system in the contact tanks can be characterized as a distributed parameter system that occurs in two connected reactors. The effects of advection, diffusion, and reaction can be generalized by the partial derivative equation in the following linear form [26]:
24where V is the volume of the tank (m 3 ), Q is the flow (m 3 /s), c is the concentration of chlorine (ppm), D is the diffusion coefficient (m 2 /s), A C is the cross-sectional area of the tank (m 2 ), and k is the first order chlorine decay coefficient (s −1 ).
25If we simplify the model and x and t tend to 0, equation (1) can be expressed as:
26where U is the velocity of water through the tank (m/s).
27In the case of the tank being studied in this article, the diffusion coefficient (D) was obtained from simulations with the commercial CFD Comsol˙software and its value ranges VOLUME 8, 2020 from 0.0055 m 2 /s to 0.013 m 2 /s for velocities of between 1.5 m 3 /s and 3.7 m 3 /s respectively. Velocity (U ) according to previous flows and the dimensions of the tank is between 0.052 m/s and 0.12 m/s. Dosage (c) under normal conditions without ammonia is between 0.15 ppm and 2 ppm of chlorine, depending on the system's gain.
28The chlorine decay constant (k) depends on different variables that must be taken into account when designing the control system. A significant part of the chlorine (c) reacts quickly with the existing (organic and inorganic) matter, and the remaining matter reacts with the remaining fraction. Given the location of chlorine analyzer AN2, the time that elapses from dosage on entering the tank to measurement is sufficient for the chlorine to react completely and quickly. If the reactive term in equation (2) is developed as shown, the decay in chlorine can be divided as the sum of one fast-acting fraction and one slow-acting one. Reference [8] presents a second-order model that differentiates between both reactions, the fast reaction having a decay coefficient that is differentiated from the slow one:
29If we replace the reactive term -kc of equation (2) with the expression of equation (3) we get:
30For the purposes of the control system presented in this article, the fourth term (-k s c) is practically negligible, as shown in [13] for the type of water treated, k S is between 0.5 day −1 and 0.008 day −1 and the maximum time until the meter reading for a flow of 1.5 m 3 /s is 30 min.
31The third term (-k R c 2 ), unlike the fourth, is decisive, since the initial chlorine demand will cause the system gain to vary, and so the control system needs to take this into account. The nonlinear term (−k R c 2 ), in turn, can be decomposed into a whole set of reactions of water with organic and inorganic matter and ammoniacal compounds such as ammonia. For the case discussed in this article, the chlorine demand due to organic and inorganic matter can vary between 0.15 ppm and 0.5 ppm of chlorine. This variation has been determined from 5-year statistical data and heavily depends on water temperature and therefore on the time of year when the water is treated. Another aspect that has a major influence is the origin of the water; i.e. how the inflow is distributed between FCAG or RO treatment. If the water predominantly comes from FCAG, the system gain will be low, unlike when the flow comes from RO, whereupon much of the organic matter has been eliminated and, therefore, the demand for chlorine will be close to 0.
32The appearance of ammonia in reactions will cause variations in system gain in a non-linear manner and its considerable impact needs to be taken into account by the control system. Reference [27] presents an in-depth study of the reaction of chlorine and ammonium compounds, determining the different constants of the process depending on the chlorine reaction phase in which it occurs. With the appearance of ammonia, the system gain for the DWTP in question changes dramatically and for each ppm of ammonia, a dosage of 7.5 times ppm of chlorine is required. The value of 7.5 has been obtained from 5-year statistical data.
A. SYSTEM IDENTIFICATION
33If we consider the reaction of chlorine in the treated tank to be a homogeneous reaction, the model presented in equation (4) can be characterized with a fairly precise degree of fit to a system with 2nd order transfer function with delay and two real poles as presented in equation (5):
34where K p is the system gain, T 1 and T 2 the time constants, and T d the delay. If we assign the parameters of equation (2) to equation (5) we find that K p will depend on k R , time constants T 1 and T 2 will depend on the velocity of the water flow U and of diffusion D and, finally, T d will depend on the velocity U , equation (6).
35For the case of the chlorination tank being studied in this article, a subset of system gains, time constants T 1 and T 2 and delays T d for different operation points and chlorine demands at different flow rates is shown in Table 1.
IV. CONTROL STRATEGY
36The main objective of the control system designed and implemented herein is to cover the basic demand for chlorine in tank 1 (figure 1). The purpose of tank 2 is to dose the established setpoint (usually 1.0 ppm) to guarantee compliance with the quality requirements of current legislation in the supply network. A control strategy with feed-forward and PI control with variable gains computed from a fuzzy supervisor has been designed for both tanks. This article describes the control for tank 1, which differs from the control for tank 2 ( fig. 1), and also in the parameterization of the gains, by considering compensation for the appearance of ammonia in the mixing chamber. However, as mentioned earlier, it should be noted that although the control described in this article focuses on tank 1, it would also be applicable to tank 2, modifying the parameters of the control system. A. CONTROL SCHEME Figure 2 shows a block diagram of the control implemented for tank 1. There is a fuzzy supervisor that controls, on the one hand, a block of variable gains, input for a PI control. On the other hand, it controls a feed-forward block that generates two outputs (FF_MON, FF_NH 4 ) in addition to the control signal generated by the PI controller.
37The fuzzy supervisor input variables are temperature, ammonium (NH + 4 ) in the mixing chamber, and the flow rates from reverse osmosis (F RO ) and the granular activated carbon filters (F GACF ). The setpoint (S CL ) for the control system tends to be between 0.3 ppm and 0.6 ppm of free chlorine at output from tank 1. This study has obtained four operating points (flows, 1.5 m 3 /s, 2.0 m 3 /s, 2.7 m 3 /s, 3.7 m 3 /s) applying [28], depending on the possible range of flows to be treated, from 1.5 m 3 /s to 5.0 m 3 /s.
B. FUZZY GAIN SCHEDULING DESIGN
38The gains of the PI controller for the four described operating points were computed depending on the temperature in the mixing chamber and the water distribution between RO and FCAG. Based on historical data and with the help of the statistical tool R [29] it was possible to validate that the chlorine demand varies in winter and summer between 0.3 ppm and 0.5 ppm of chlorine due to temperature. This demand can drop to 0.15 for cases in which a large amount of the treated flow is from reverse osmosis, where a large part of the organic and inorganic matter has been eliminated. In equation (7), the controller transfer function for the controller gain differences computed at the operating points is presented in a generic manner.
39Let G c be the controller transfer function, let K pn be the proportional gain, let K in be the integral gain for n taking values in the range 1, 2, 3 and 4 for the different operating points. It is well worth to note that there will be different values of proportional and integral gain for every operating point. Table 2 presents the gains (K pn , K in ) obtained in Matlab R using the PID Tuner tool [30] for every operating point. To choose the controller parameters, the minimum overshoot and minimum settling time criteria prevailed.
40Gain scheduling involved use of a fuzzy supervisor that, depending on the temperature in the mixing chamber and the distribution of flow rates between RO and FCAG, interpolates the different gains of the control system.
41The tool used in the design of the fuzzy supervisor was the Rockwell Automation RSLogix 5000 Fuzzy Designer commercial software [31]. Figure 3 shows a general block diagram of the structure of the fuzzy supervisor made with this tool. The linguistic variables that were defined are Flow, Temperature, TPGacf and Amonium. The inference engine (GainSc_FF) for the control system is based on 18 rules that modify the parameters of the PI controller. Depending on the temperature and origin of the water, the control system makes an estimate of the demand for chlorine based on the organic matter in the water to be treated. This estimated chlorine demand (FF_MON) is a value that is added to the PI controller output variable.
42Depending on the amount of ammonium in the water to be treated, the control system computes a value, FF_NH 4 , which is added to the PI control output. Its value can vary between 0 and 7.375 ppm depending on the ammonia in the water (0. . . 1 ppm).
43For example, figure 4 shows for the linguistic variable Flow with a universe of discourse U = [1.0, 5.0], the four fuzzy sets (c 1 . . . c 4 ) with the respective linguistic values (labels) VOLUME 8, 2020 llow, low, medium and high with GAMMA and LAMBDA type membership functions. In the specific case, for a flow value of 3.2 m 3 /s, the degrees of membership to the low and medium sets are 0.3 and 0.7, respectively.
44Meanwhile, figure 5 shows for the variable Temperature, with a universe of discourse U = [5.0, 20.0], the 2 fuzzy sets that it contains, with linguistic values winter and summer, and with GAMMA type membership functions. Table 3 shows a subset of the rules defined to interpolate the different gains of the control system. The defuzzification algorithm applied was the center average method. The output variables for the weighted output functions A j,k,l , A(c j,k,l ) is the maximum of the degrees of membership of all the rules with the consequent A j,k,l ; c j,k,l is the position of the centroid of the member function A j,k,l , and M is the set number of A j,k,l, with two low (0.18) and medium (0.82) fuzzy sets.
45Applying equations (8), (9) and (10) to equation (7), at time t = 1, and considering that the existing ammonia is FF_NH 4 = 0, the controller would provide an output as shown in (11). u = K p e + K i ed t + FF MON + FF NH 4 4 = 0.6e + 0.00077 ed t + 0.35 + 0 (11) where e is the error obtained from the difference between the setpoint and the process variable, measurement of free chlorine by sensor AN2. Figure 6 shows a 3D lattice graph for the Flow and TPGacf input variables and the K i output variable. As shown in the
C. AMMONIUM COMPENSATOR DESIGN
46The control system must compensate for severe disturbance in cases where ammonia is detected in the mixing chamber. There are currently ammonium analyzers (NH 4 -N) on the market that have acceptable precision and accuracy with sample times of 5 min. The problem with these analyzers is that below 0.02 ppm, their measurements are not reliable. This problem is solved by the designed control system, with the estimation of chlorine demand based on the temperature and origin of the water to be treated. As explained in Section II (Plant Layout), there is a meter in the mixing chamber that enables the control system to detect the presence of ammonia and generate a proportional output in addition to the PI control action (Figure 2). The meter output is used by the control system for values above 0.02 ppm of NH 4 . For ammonium compensation, the control system uses a conventional Takagi-Sugeno model that offers a smooth change between the different slopes of action on the control variable.
47As shown in figure 7, two work zones have been defined, equivalent to the Error and Good fuzzy sets. The Error set represents those values at which the meter measures below 0.02 ppm and the Good set those values between 0.02 ppm and 1.0 ppm. Below 0.02 ppm the value measured by the sensor is not considered to be a reliable reading. For the specific case in the figure, a typical value (0.37 ppm of NH 4 -N) is shown in winter for ammonia load episodes.
48Hourly values from the last 5 years have been analyzed and a linear correlation of 0.93 has been obtained between the ammonium meter readings and the chlorine demand. Equation (12) presents the correlation line obtained with the statistical program R. With the appearance of ammonia, the controller output due to FF_NH 4 is updated by multiplying the existing ammonium value (NH 4 ) by the value slope of 7.37529. y = 7.37529 * NH 4 + 0.39694 (12) In equation (12) the value of the ordinate at origin is 0.39694 and is equivalent to the chlorine demand due to the organic and inorganic matter present. This value is already taken into account by the control system in its FF_MON term and is not added to the control variable in the finally implemented control. Table 4 shows the two rules defined for the ammonia output variable.
49For example, in the case of the control variable u in equation (11), with the appearance of 0.035 ppm of ammonia in the mixing chamber, the control system would produce an output as shown in equation (13).
V. CONTROL SIMULATION
50Simulation is an important and necessary tool to test and validate control models before they are applied to operative installations. Note that that this proposed control has been run in a real plant that supplies drinking water to more than 2 million people. No errors are permissible, so a simulator was needed to easily test the control algorithm and make sure that it could be connected to the program being run in the PLC.
51The simulator was run on the Matlab/Simulink tool using the C language to code the functions that describe the plant's behavior. The simulation code was programmed and encapsulated in an S-Function (Level 2), and the interface was adapted to contrast data from the Supervisory Control and Data Acquisition (SCADA) software output with the simulation output. The proposed simulator can be set up for any PLC and SCADA controller with an open platform communications (OPC) interface. Figure 8 shows the model run in Simulink to compare the controller described in this article (sub-block 2 inset in the same figure 8) with a conventional PI algorithm (subblock 1). Block 1 of the figure is the running of the aforesaid conventional PI whose input parameters are proportional and integral gain. Block 2 is the control model named in figure FGS&FF with which we compared the PI. This model's input parameters, in addition to the error between the setpoint and the AN2 value, are the different variables that, as shown above, enable the controller output to be computed: Flow, Temperature TPGacf and Ammonium. The outputs of both controllers go to respective blocks, Chloring System1 and Chloring System2, respectively, which model the chlorine dosage behavior, adding first order delay and response. The output from both blocks that model dosage are inputs to both plants (Tank1, Tank2) with identical parameters. Finally, on output from the plants (Tank1, Tank2) there are two blocks (Chlorine Analitzer) that model the behavior of the chlorine analyzers (AN2), also including the reading delay and first order function that are characteristic of such measurements.
52The input variables to the system that have been modified for the different defined operating points have been delimited by block 3 in figure 8. A total of 16 comparisons were made, demand in winter and summer for the four operating points (1.5 m 3 /s, 2.0 m 3 /s, 2.7 m 3 /s, 3.7 m 3 /s) with a normal F GACF flow. The controllers were also tested for scenarios where chlorine demand is low or high due to flow variations in F GACF .. Finally, the system for the different ammonium values was tested and compared, producing different steps and revealing the response in both control models. The results obtained in all these comparisons are presented in the results section.
53Finally, we note that the function of block 4 (estimateCd) in Figure 8 is to calculate the diffusion coefficient from the inlet flow and the chlorine demand depending on temperature. The output from this block is the input for the respective chlorination plant models.
VI. THE HARDWARE. REAL IMPLEMENTATION
54The existing control architecture in the DWTP is based on the ControlLogix system by Rockwell Automation [32].
55User defined type (UDT) data structures were created to logically group the variables of the FGS&FF control system. Distributed throughout the DWTP they are linked to the PLCs that control the different processes (intermediate pumping, capture, chlorination, etc.). The SCADA supervisory layer that exchanges data with the controller is based on the System Platform solution by Wonderware [36]. Finally, the existing communication between the PLC controllers and the SCADA is based on the Ethernet/IP standard, Common Industrial Protocol (CIP).
56The FGS&FF control algorithm was run on the PLC that controls all production of chlorine and chlorine dioxide from the DWTP. This controller in turn communicates with the PLC that controls the carbon filters to read the flow from the filters (F GACF ). There is also communication with the osmosis controller to read the sum of flows (F RO ) for each of the 10 frames of the RO. The control system uses the two flows to calculate the proportion (0...1) of flow F GACF (TP FGACF ) out of the total flow. Figure 9 shows a fragment of the code run in the PLC controller with an output equal to that of the example given in (14) for the first instant of time. The setpoint, for this example, is 0.5 ppm and the meter reading is 0.15 ppm of free chlorine. As shown in the figure, in the first line of code we load the input variables of the fuzzy block (GainSc_FF), namely the flow, ammonia and temperature. The percentage of water from the F GACF carbon filters is also loaded based on the division of the F GACF flow between the total flow. All of the variables are loaded into a data structure (FZ_DATA) that was created to encapsulate all control system variables and parameters.
57In line 2 of Figure 9, the fuzzy instruction with the variables assigned in the previous line of code is run in second intervals. After it is run, the instruction provides as output the four variables required to parameterize the PI algorithm for each operating point. These variables in line 3 are assigned to the parameters of the PI controller. In the case of the example, the control system would produce the outputs: K p = 0.6, K i = 0.000777, FF MON = 0.35 and FFNH 4 = 0.258 with values identical to the case presented in [14].
58In line 4 of figure 9, the PI controller is run with the parameterization obtained from the GainSc_FF function and output (FZ_DATA.Dosage) is loaded onto the control variable FZ_DATA.Out. If we apply the controller shown in (14) with the parameterization that is being programmed in this example for a setpoint of 0.5 ppm and an AN2 meter reading of 0.15 ppm of chlorine, the controller output would obtain a value of 0.8187 equivalent to the ppm of chlorine to be dosed. This value would be multiplied by the flow to be treated and by 3.6 to obtain the Kg/h to be dispensed by the chlorine cabins, 11.78 Kg/h.
59The control system was started dynamically and smoothly so as not to produce abrupt changes when switching from semi-automatic to automatic mode. The semi-automatic mode is the one in which the operator sets the amount of chlorine to be dispensed in ppm and the control system varies the Kg/h to flowpacing. In turn, when the system is in automatic mode, the output is computed solely by the FGS&FF controller.
60In the system start-up sequence, the operator sets the amount of chlorine to be dispensed (d SEMI ) based on the state of the plant and his/her experience. After a preset stabilization time called T2End, the system switches from semi-automatic to automatic mode, the control variable then being controlled by the FGS&FF system. During T2End the FGS&FF system goes into a mode called 'Software-Manual' and forces output of the PI controller to the d SEMI value. The T2End function is computed for the time when the FGS&FF system is in 'Software-Manual' mode. This is obtained from the flow rate and the distance to the measuring point (i.e. where the AN2 sensor is located). Its purpose is to show when the system can switch to 'Software-Automático' mode. Figure 10 shows part of the code that is used for T2End function calculation. For the case of the example, with a flow rate of 4.0 m 3 /s, we get a velocity of 0.139 m/s for the tank section at input. Every second the distance traveled by the sheet of water is increased and is adapted to possible variations in flow (velocity). Once the T2End time interval ends (T 2End = 0), i.e. the sheet of water has traveled the distance to the meter reading point, the FGS&FF system transfers control to the fuzzy supervisor, which goes from 'Software-Manual' mode to what is called 'Software-Automatic' mode, where the PI updates its output based on the error and the value of the K p and K i gains of the controller.
VII. RESULTS
61This section presents the results obtained both in the custombuilt simulator and in the actual DWTP based on using the FGS&FF system. Note that the graphs chosen are those that are considered most significant, bearing in mind the problems presented in the introduction section, variation in chlorine demand, flow variations and, consequently, delay times and the appearance of the ammonium disturbances, which can cause non-linear variations in demand.
A. FACTORY ACCEPT TEST. SIMULATION
62The figures presented below were obtained by comparing the FGS&FF control system with a conventional PI control in the simulator run for this purpose. The conventional PI was set to find the best response for flows between 3.7 m 3 /s and 1.5 m 3 /s and a high chlorine demand, typical of the winter season (figures 11 and 12). Figures 13 and 14 show the results of the comparison for the same IP parameterization as in the previous tests (figures 11 and 12) but this time for low chlorine demand (summertime). As shown, the computed gains for a high demand do not work properly with a low chlorine demand, producing a very significant oscillation at the PI controller output. Figure 15 shows a comparison between the two control systems with a step of 0.04 ppm ammonium. This is a highly typical situation in the winter season and in the DWTP under study in this article. Note that the time between when the FGS&FF and the conventional PI reach the set point is 100 minutes. For both systems there is a strong initial drop in the process variable (measured by the AN2 sensor) which is inevitable and is due to the distance between the generation of chlorine in the cabins and the dosage point. When ammonium is detected in the mixing chamber, the FGS&FF controller reacts by raising its output in relation to the amount of ammonium. However, the approximately 10 minutes that the chlorine takes to travel the distance to the dosage means there is an inevitable drop in chlorine at the outlet. Figure 16 shows an episode with a stepwise increase in ammonium and subsequent decrease in the same. It can be observed that the time difference in reaching the setpoint between the FGS&FF and the PI is still around 100 min. The distance between each successive step of ammonium may produce the effect that the output never reaches the desired chlorine setpoint. The opposite case is a drop in ammonium for short episodes and small intervals in the decrease that can also lead to never reaching the set point. Fortunately, this phenomenon rarely occurs and is due to a highly concentrated bag of chlorine in the mixing chamber.
B. REAL TIME SCADA TREND
63The following are graphs obtained with the Historian Client Trend tool of the SCADA in the DWTP in question. Three cases are presented that show the behavior of the FGS&FF controller in response to the problems raised in the introduction section. Table 5 shows a description and range of the variables used in the graphs. Figure 17 shows an episode of a stepwise increase in ammonium where the FGS&FF system is able to act in advance and counteract the decrease at the outlet (AN2). Figure 16 featured the same situation but simulated, and shows that for a setpoint of 0.3 ppm, the initial drop is 0.1 ppm of chlorine, similar to the drop presented for the actual behavior in Figure 17. Note that both AN2 and AN3 are always within the ±0.1 ppm interval of chlorine around the setpoint (which in this case is equal to 0.55 ppm). Figure 18 shows a typical situation of increase in flow that occurs when switching between treating water from aquifers and rivers. In a normal situation, the treated water is of fluvial origin; however, when the turbidity of the river is high due to the effect of rain, aquifer water is treated instead. When river water can be treated again, the DWTP begins to process this water. This effect can be observed in the graph that, for a short period of time, goes from treating 2 m 3 /s of aquifers to almost 5 m 3 /s of river water. The successive stepwise increase in F RO by 0.4 m 3 /s (the capacity of an RO frame) can also be observed, as can a gradual increase in water from carbon filters (F GACF ). As can be seen, throughout this flow episode, a low but sufficient ammonium level remains constant enough for the control system to take it into account (0.023 ppm of NH 4 -N). Throughout the described action, the FGS&FF controller keeps the tank output (AN3) within the range of 0.1 ppm around the setpoint.
64Meanwhile, figure 19 represents an instance of using sodium hypochlorite to clean the carbon filters. This cleaning is done periodically depending how long the filter has FIGURE 17. FGCFF controller's response to an ammonium episode from 0.03 to 0.05 ppm NH4. VOLUME 8, 2020 been washing the filter. The effect caused to the system is a decrease in chlorine demand of approximately 0.2 ppm of chlorine. Until minute 100, the system maintains the chlorine output at the 0.55 ppm setpoint. As shown, the FGS&FF system, after dosing hypochlorite and an increase in chlorine at the outlet, reacts and corrects its dosage to stabilize the chlorine as required. Throughout the episode of four continuous cleaning operations, the control system keeps the tank outlet (AN3) within the interval of ±0.1 ppm of chlorine around the setpoint (equal to 0.55 ppm).
VIII. CONCLUSIONS
65Chlorination systems in drinking water treatment plants can present different problems that make it difficult for control of chlorination in effluent to be effective. Long downtimes, variation in chlorine demand, or the occasional appearance of various nonlinear ammonia disturbances are just some of these problems that have a major effect on the design of the control system when it comes to automating the chlorination process. This process belongs to the group of distributed parameter systems where the phenomena of diffusion or convection arise and which must be taken into account both in the simulation and in the control.
66This article has presented the analysis, design and implementation of a control system based on variable gains and feed-forward that addresses these problems. For each operating point, the parameters that describe the behavior of the system had to be identified. The article has described the design of the controller, explaining the control architecture, the set of fuzzy rules used, its implementation in a real system and the simulation and experimental results obtained in a real treatment plant.
67The FGS&FF control has been compared with a conventional PI. The results show a considerable improvement to the system with respect to the use of a conventional PI. Stable output from the control system is guaranteed, within the expected margins in case of any variation in chlorine demand, flow rate or any possible disturbance such as the appearance of ammonia or cleaning with sodium hypochlorite.
참고문헌 15건
- Real time monitoring and control in water distribution systems for improving operational efficiency Desalination and Water Treatment · Taylor & Francis · 2015 10.1080/19443994.2015.1069224
- Modelling and control of potable water chlorination Water Science & Technology · Pergamon Press · 2002 10.2166/wst.2002.0216
- The Handbook of Chlorination and Alternative Disinfectants 1992
- Self-tuning PID Controller with Variable Parameters Based on Particle Swarm Optimization 2013 10.1109/isdea.2012.297
- Modeling Chlorine Decay in Surface Water Journal of Environmental Informatics · International Society for Environmental Information Sciences · 2003 10.3808/jei.200300003
- Chlorine Decay Model Calibration and Comparison: Application to a Real Water Network Procedia Engineering · Elsevier BV · 2014 10.1016/j.proeng.2014.02.135
- Relation of Ammonia-Nitrogen to Break-Point Chlorination American Journal of Public Health and the Nations Health · American Public Health Association · 1941 10.2105/ajph.31.8.803
- Microbial indicators and pathogens: Removal, relationships and predictive capabilities in water reclamation facilities Water Research · Elsevier BV · 2008 10.1016/j.watres.2008.07.037
- Trihalomethane levels in chlorinated Michigan drinking water Ecological Modelling · Elsevier BV · 1986 10.1016/0304-3800(86)90028-1
- Design of an Adaptive Self-Tuning Smith Predictor for a Time Varying Water Treatment Process IFAC Proceedings Volumes · Elsevier BV · 2009 10.3182/20090712-4-tr-2008.00143
- Chlorination control in a large water treatment works 1995 10.1049/ic:19950738
- Chlorine Demand and TTHM Formation Kinetics: A Second-Order Model Journal of Environmental Engineering · American Society of Civil Engineers · 1998 10.1061/(asce)0733-9372(1998)124:1(16)
- Integration of Hydraulic and Water Quality Modelling in Distribution Networks: EPANET-PMX Water Resources Management · Springer Science+Business Media · 2017 10.1007/s11269-017-1760-0
- On Line Control Strategies for Disinfection Systems: Success and Failure Proceedings of the Water Environment Federation · Water Environment Federation · 2006 10.2175/193864706783761716
- Numerical Methods for Engineers 2016