• Tidak ada hasil yang ditemukan

Modelling and control of potable water chlorination.

N/A
N/A
Protected

Academic year: 2023

Membagikan "Modelling and control of potable water chlorination."

Copied!
153
0
0

Teks penuh

The aim of this study was to develop an effective strategy to predict and control the chlorine concentration at the exit of the reservoir. A Computational Fluid Dynamic study was undertaken to gain an understanding of the physical processes operating in the reservoir (FLUENT software).

LIST OF TABLES

LIST OF SYMBOLS

INTRODUCTION

  • T HE WATER TREATMENT PLANT
  • C ONTROL PROBLEM
  • DISSERTATION LAYOUT

It presents the problem of controlling the chlorine concentration at the outlet of the works in light of a variable demand. Therefore, three partition models were created to estimate the chlorine kinetic decay factor and to control the outlet chlorine concentration.

Figure 1-2: Wiggins Waterworks aerial view (Umgeni Water (2002))
Figure 1-2: Wiggins Waterworks aerial view (Umgeni Water (2002))

First, a Computational Fluid Dynamic (CFD) simulation was undertaken to gain an understanding of the physical processes in the reservoir. It also considers the feasibility of using a tracer test to predict the residence time distribution of the chlorine contact reservoir.

LITERATURE REVIEW

  • C HLORINE CONTACT RESERVOIR
  • Pre-treatment
  • Mixing, Coagulation and Flocculation
  • Sedimentation and Filtration
  • Disinfection
  • Distribution
    • C HLORINE CONTACT RESERVOIR KINETICS
    • C HLORINE CONTACT RESERVOIR HYDRAULICS
    • C OMBINATION OF HYDRAULICS AND K INETICS
    • T RACER TEST
    • C OMPUTATIONAL FLUID DYNAMIC SIMULATION
    • C ONTROL OF WATER PROCESSES
    • E XTENDED KALMAN FILTER AND PARAMETER IDENTIFICATION
    • C ONTROL

Total residual chlorine is the sum of free residual chlorine and total residual chlorine. A pulse or step in tracer concentration at the inlet allows the residence time distribution to be determined.

Figure 2-2: Well-mixed reactor scheme
Figure 2-2: Well-mixed reactor scheme

THE CHLORINE CONTACT RESERVOIR CONSIDERED IN THIS STUDY

T HE CONTACT RESERVOIR

  • Flow through the reservoir

At the outlet of this tank, treated water is transferred to the Durban Unicity intermediate tanks based on consumer demand.

Umgeni Water Durban Unicity Inanda

  • Geometry of the reservoir sections
  • Instrumentation
  • D ATA COLLECTION
  • T RACER TEST

The amount of chlorine required is dependent on the amount of water present in the reservoir and the flow rate. The total outflow from the reservoir is measured by magnetic flow meters (Kent ABB, calibrated by positive displacement . tests on the storage reservoir, accuracy: ±0.5%).

Figure 3-4: Illustration of the inflow, outflow and level in the reservoir
Figure 3-4: Illustration of the inflow, outflow and level in the reservoir

COMPUTATIONAL FLUID DYNAMIC MODELLING

  • E QUATIONS SOLVED
    • The reservoir
    • Mesh of the computational domain
  • I NITIAL AND BOUNDARY CONDITIONS
    • Boundary conditions
    • Initial conditions
  • S IMULATION RESULTS
    • Flow patterns
    • Chlorine decay simulation
  • 0.817 mg/L; section 2 = 0.812 mg/L)
  • 0.622 mg/L; section 2 = 0.709 mg/L)
  • 0.762 mg/L; section 2 = 0.661 mg/L)
  • 0.715 mg/L; section 2 = 0.662 mg/L)
  • 0.779 mg/L; section 2 = 0.773 mg/L)
    • S IMPLIFIED COMPARTMENT MODEL

Thus, it was hoped that the dynamic state would realistically approximate the reservoir state. FLUENT's chemical reaction modeling tools were used to simulate the behavior of chlorine in tank sections.

Figure 4-1: Level linearisation from 9h00 of 25 th  August 2001 to 20h00 of 26 th  August 2001
Figure 4-1: Level linearisation from 9h00 of 25 th August 2001 to 20h00 of 26 th August 2001

PROCESS MODELLING

  • Four-compartment model
  • Six-compartment model
  • One-compartment model
  • E XTENDED KALMAN FILTER
    • Linearisation of DAEs
    • Discrete model
    • Kalman filter
  • P ROGRAM
    • Model initialisation (Step 1)
    • Present operating conditions (Step 2)
    • Variables initialisation (Step 3)
    • Data storage (Step 4)
    • Re-evaluation flag setting (Steps 5 to 7)
    • Variables setting (Step 8)
    • Equations setting (Step 9)
    • Jacobians re-evaluation (Step 10)
    • Kalman filter algorithm (Steps 11 to 13)
    • Plotting
  • R ESULTS
    • Residence time distribution
  • I DENTIFICATION MODE

Where α is the part of the outflow from the hypothetical compartment (compartment 2) that goes directly to the exit. The Init parameter is set to 1 to allow an initialization of all variables during the first iteration of the simulation. If it is the first iteration of the simulation, an initialization of all variables is performed.

If it is the first iteration, the Reevaluate flag is directly set to 1, to force the calculation of the first Jacobians. All rooms in the different room models are defined by their water volumes. The kinetic factor k is set to 0 d-1, and thus chlorine is considered the "trace".

All the data (inlet and outlet flow rates, inlet and outlet chlorine concentrations, and water level, measured at the plant over the period indicated below) are set as observed variables, and k must be calculated as such.

Figure 5-1: Four-compartment model
Figure 5-1: Four-compartment model

Time (d)

F ORWARD MODELLING

  • Tuning of the extended Kalman filter
  • Comparison amongst three models

Kinetic factor k values ​​are for the one-compartment model; the six-compartment model and the four-compartment model are 0.2 d-1, 0.45 d-1 and 0.55 d-1, respectively. It is noted that the four-compartment model is simpler than the six-compartment model, so it converges faster (its computation time is less than the computation time of the six-compartment model) and is more stable than the six-compartment model . The simulation with the one-compartment model gives good results, but not as good as the other two models above.

For the following work, the ε factor (measurement sensitivity) is set equal to 1, because the six-compartment model gives good results for this value, although it becomes unstable at a higher value. Since the 6-compartment model is the most accurate, the work below continues with it to illustrate the tuning of the EKF. The six-compartment model (C = 6) is the best as it predicts the detailed variation of the observed chlorine concentration in the exhaust (circled in Figure 5-15).

On the other hand, being the simplest one, the one-compartment model is more robust than the others.

Figure 5-10: Real-time prediction using the same inputs as the process
Figure 5-10: Real-time prediction using the same inputs as the process

ADAPTIVE CONTROL

  • D YNAMIC MATRIX CONTROL THEORY
    • Definition
    • Theory
  • A PPLICATION TO OUTLET CHLORINE CONCENTRATION CONTROL In this work, the control model for the chlorine contact reservoir is single-input, single-output,
  • P ROGRAMMING
    • Initialisation (Step 1)
    • Steps 2 and 3
    • DMC step responses (Step 4)
    • Control (Step 5 to 8)
  • R ESULTS AND DISCUSSION
    • Tuning of the DMC
    • Optimisation horizon (P)

B0 is the offset matrix of the coefficients and BOL is the matrix of the open-loop response coefficients. At each control step, one of the solutions (in order) is reset to the current modeled output. The continuous adjustment of the dynamic matrix guarantees adjustment for non-linearity in the original complex process model (Figure 6-4).

The controller module is written at the end of the extended Kalman filter program (see Appendix C). The small fixed offset added to the inlet chlorine concentration (cf. Pages 6-6 and 6-7) is set to + 0.1 mg/L and the number of control sweeps is set to 1. If DMC is disabled, ∆ The mPAST vector is updated in the same way, according to any manual configuration of the inlet chlorine concentration, to enable an accurate open-loop prediction after the DMC controller is activated.

In the first part of the program, the extended Kalman filter algorithm predicts the outlet chlorine concentration using the input vector (inlet chlorine concentration).

Figure 6-1 illustrates an example of a 2-input, 2-output system: the chlorine contact tank in  which inlet microbe concentration (Y 0 ) and inlet chlorine concentration (C 0 ) cause variations in  the outlet microbe concentration (Y R ) and outlet chlorine
Figure 6-1 illustrates an example of a 2-input, 2-output system: the chlorine contact tank in which inlet microbe concentration (Y 0 ) and inlet chlorine concentration (C 0 ) cause variations in the outlet microbe concentration (Y R ) and outlet chlorine

ON-LINE IMPLEMENTATION

S IMPLIFIED ONE - COMPARTMENT MODEL

Then, in the DMC algorithm, the B, BOL, and B0 matrices (Equations 6.1 and 6.2) depend on the kinetic factor k, which is updated each time the extended Kalman filter is run, allowing better control of the outlet chlorine concentration. The optimization steps to the horizon for DMC are set to 40 points spaced at 3-minute intervals (2h horizon). For the 2-4 hour response times observed at the typical tank volumes and flow rates considered here, this was a trade-off considering the computational burden.

A table in Appendix D gives the symbols used in the theory for their equivalent in the Visual Basic program (Appendix E). The ADROIT Script Agent can be used in offline mode or in online mode. In the offline mode, the plant is simulated using equations that use the measured plant inputs to predict the outlet chlorine concentration (if the DMC controller is enabled, it replaces input plant chlorine concentration with the DMC output).

This smoothed chlorine concentration is then used as feedback to the DMC, and of course the DMC output is sent to the installation when the DMC is enabled.

Figure 7-2: Simplified flow diagram of the ADROIT program
Figure 7-2: Simplified flow diagram of the ADROIT program

R ESULTS

  • Adroit presentation
  • Off-line mode
  • On-line mode

In the online mode, the Adroit program is called every 5 seconds to give a fairly quick response on the screen to operator changes of the settings such as set point or tuning parameters. Depending on the value of the Kalman gain ε, the steady state is reached more or less quickly (Figures 7-4 and 7-5). The Kalman filter gain ε is set to 100 and the inflow rate is doubled (from 130 ML/d to 260 ML/d), and the value of the kinetic factor k obtained is 1.14 d-1, which was the expected result (twice the kinetic factor obtained with an inflow rate equal to 130 ML/d).

In order to use the required inlet chlorine concentration calculated by the DMC algorithm, an open-loop predictor was added to set the hypo pump flow rate to achieve the specified inlet chlorine concentration, which in this case is the manipulated variable DMC. The first part of the following graph has no automatic control, as can be seen from the occasional change of the hypo pump setting by the operator. The automatic control is acceptable, perhaps a little better than occasional adjustments by operators.

Given that this version of the DMC controller does not handle constraints optimally (it simply "clips" the hypopump settings to maximum and minimum values), one.

Figure 7-4: Estimation of the kinetic factor k with different values of the EKF
Figure 7-4: Estimation of the kinetic factor k with different values of the EKF

CONCLUSIONS

In preparation for commissioning the online control algorithm, and to experiment with parameter tuning, preliminary closed-loop offline tests were designed to determine robustness and controller performance. To apply the algorithm online using the inlet chlorine concentration requested by the DMC, a feed controller was created to manipulate the NaOCl pump flow rate to achieve the inlet chlorine setting. Acceptable performance of the DMC controller for the outlet chlorine concentration has been achieved, to the extent that there is some confidence in it by experienced operators.

It is recommended that the optimization horizon be increased from 2 to 4 hours and that the controller gain β be reduced in controlled tests. This online implementation of advanced control in a water treatment process has shown that there is potential for further development in this area, especially in a case like this where long time constants, temporal changes in behavior and a multivariate dependence conspire to make intuitive operator interventions less effective.

Suivi numérique : prédiction de la répartition des temps de séjour (DTS) à l'aide d'outils numériques de mécanique des fluides.

APPENDIX A

EXTENDED KALMAN FILTER FORMULATION

To account for the possibility that some of the z elements may be free, overspecify the behavior by suggesting that z will move to some observed value z0. Inlet chlorine concentration data x0_data Outlet chlorine concentration data xR_data Chlorine concentration at the mixing point xM.

TABLE B-1: INTERPRETATION OF VARIABLES IN  MATLAB PROGRAM
TABLE B-1: INTERPRETATION OF VARIABLES IN MATLAB PROGRAM

MATLAB PROGRAM

Also open all offset solutions to find the step response for the DMC check if tlast==0 % should initialize the solutions.

TABLE D-1: INTERPRETATION  OF VARIABLES IN  ADROIT SCRIPT PROGAM (VISUAL BASIC)
TABLE D-1: INTERPRETATION OF VARIABLES IN ADROIT SCRIPT PROGAM (VISUAL BASIC)

ADROIT SCADA System : Visual Basic Program

Protection against clock-of-day lockout and other timing corruptions If dt_mod < 0 Then. If pump_setting > pump_set_max Then pump_setting = pump_set_max End If.

APPENDIX F

ADAPTIVE PREDICTIVE CONTROL OF THE CHLORINE CONCENTRATION AT THE OUTLET OF

THE CHLORINE CONTACT RESERVOIR USER MANUAL

  • A IM OF THE ALGORITHM
  • V ALUES SET BY THE OPERATORS
  • T IME LOOP
  • P ROGRAM : VALUES STORAGE
    • Extended Kalman filter parameters
    • Dynamic Matrix Controller parameters
    • Pump parameters
  • F LOW D IAGRAM OF THE PROGRAM
  • P OSSIBLE PROBLEM
    • Time alarm
    • The program does not run or gives completely false results

The operator sets the value (between 0.8 and 1.2 mg/L) that must be reached by the chlorine concentration at the outlet of the tank (Set-point). Because the program must know the time of its last call (time last call), the internal time of the extended Kalman filter (t-kal), the internal time of the dynamic matrix controller (t-dmc). Each time t-kal or t-dmc is positive, the extended Kalman filter or the dynamic matrix controller is triggered.

The algorithm must be called every 5 seconds, which means that the time between two calls is set in seconds in the Script Agent Configurator to 5 seconds. This updates at each iteration the kinetic factor (kinetic factor) and the covariance matrix (M value) and it must use them for the next call. To run, the DMC needs the data from the previous call for the inlet and outlet chlorine concentration (x0_data_last and xr_data_last), for the calculated inlet chlorine concentration (x0 vs last dmc) and the matrix of previous inputs (dm_past).

Finally, the inlet and outlet chlorine concentration calculated by the program (Cl2_inlet_calculated and Cl2_outlet_calculated) are set on the user interface screen.

Gambar

Figure 2-3: Residence time distribution curve for a plug flow vessel by an impulse  injection
Figure 2-4: Residence time distribution curve for a well-mixed vessel by an impulse  injection
Figure 3-4: Illustration of the inflow, outflow and level in the reservoir
Figure 3-5: On-line pH meter, Chlorometer at the exit of the reservoir
+7

Referensi

Dokumen terkait

Kondisi Permukaan Air Tanah: a Sangat Dangkal; b Agak Dalam; dan c Sangat Dalam Pada daerah dengan kondisi mikro relief datar ± cekung lereng 0±2 % dengan keadaan hidrologi tergenang