Model Predictive Controller for Integrated Wastewater Treatment System

Model Predictive Controller for Integrated Wastewater Treatment System

Copyright © IFAC Large Scale Systems: Theory and Applications. Osaka, Japan. 2004 ELSEVIER IFAC PUBLICATIONS www.elsevier.comllocatelifac MODEL PRE...

8MB Sizes 0 Downloads 108 Views

Copyright © IFAC Large Scale Systems: Theory and Applications. Osaka, Japan. 2004

ELSEVIER

IFAC PUBLICATIONS www.elsevier.comllocatelifac

MODEL PREDICTIVE CONTROLLER FOR INTEGRATED WASTEWATER TREATMENT SYSTL.~

Tomasz Gminski(l), MietekA.

( 2)

Brdvs{~),

Michal Grochowski{I), Marcin Drewa(l)

School of Engineering. Department of Electronic. Electrical and Computer Engineering. The University of Birmingham. Birmingham B 15 2IT. UK. email: [email protected] tel. +44 (0) 121 4144354,fax: +44 (0)121414 4291

Department ofAutomatic Control. Gdansk University ofTeclmology. Ill. G.Nanlfowicza 11112. 80952 Gdamk. Poland. em ail: [email protected]. [email protected]@elypg.gda.pl te/. (048) (58) 342 29 04

Abstract: Optimising control of wastewater treatment systems (WWfS), allowing for cost savings while fulfilling the eftluent discharge limits over long period requires application of advanced control teclmiques . Model Predictive Control (MPC) is a very suitable control teclmology for a synthesis such a truly multivariable controller that can handle constraints and accommodate model-based knowledge combined with hard measurements. A hierarchical architecture is used to structure the MPC controller into the funrt;onal · Supervisory, Optimising and Follow up levels. The Optimising Control Level is further decomposed into three layers operating in different time scales: slow, medium and fast. The paper considers MPC controller operating in medium time scale. As it is impossible to efficiently control the plant under all possible influent conditions, three dedicated control strategies were designed. The controller performance was validated by simulation based on Kartuzy WWTS data records. Recently developed mechanism for soft switching between different MPC control strategies was used in the simulations. Copyright © 2004lFAC Keywords : hierarchical structures, predictive control, optimal control, waste treatment.

I. INTRODUCTION

Mayne et al.. 2002) . Because of mentioned system features, a control structure was decomposed into levels (functional decomposition) and layers (time decomposition) and details can be found in (Brdys, et al.. 2oo2b) and in the accompanying paper (Grochowski, et aI., 2004) At Middle Level, the Optimising Level, the MPC is further decomposed in order to efftciently handle three time scales: Slow, Medium and Fast. The paper gives detailed description of the MPC controller in the medium time scale. As it operates between two other layers the interlayer control objectives are carefully examined and they are incorporated into the controller objectives. As it is impossible to etliciently operate the plant under all possible intluent conditions by using one control strategy, three different control strategies are derived and preliminarily tested. The Kartuzy wastewater treatment plant serves an example case study . The measurements are partly gathered from the plant and

The continuing enhancement of requirements on eftluent quality and increasing concern regarding the operational cost saving on one hand, and such features of the controlled system as multiple time scales, highly non linear and mutually interacting dynamics of large dimension, large transportation delays, limited on line measurements, lack of reliable models of processes, on the other hand necessitates application of advanced control methods. Model Predictive Control (MPC) is one of the suitable methods . The MPC is an open loop control teclmology with feedback where the current control action is - obtaineo by solving on line, at each sampling instant, a ftnite horizon open-loop optimal control problem, using the current state of the plant as the initial state; the optimisation yields an optimal control sequence and the ftrst control in this sequence is applied to the plant (Maciejowski, 2002;

579

3. OPTIMISING CONTROL STRUCTURE

partly delivered by Extended Kalman Filter based estimation (Brdys, et aI. , 2004).

Optimising Control level (OCl) is responsible for generating the control trajectories in order to meet objectives prescribed by Supervisory Control level (SuCl). The control objectives at the OCl can be split into the long term (biological sustainability and operational cost), medium term (etlluent quality , actuator constraints, technological constraints, operational cost) and short term (eftluent quality during heavy and of short duration events, actuator constraints, meeting demand on desired carbon, PIX and dissolved o:\:ygen and operational cost). The different time horizons of the objective are as a matter of fact mainly implied by a multiple time scales feature of an internal dynamics of the biological treatment processes and variability of the disturbance inputs. There can be various ways of control in each of the time scales This depends on assumed/chosen control strategy and associated with that objective function and constraints. In order to fulfil desired objectives, OCl generates control trajectories over each of the control horizons.

2. KARTUZY WASTEW ATER TREATfv1ENT SYSTEM DESCRIPTION Kartuzy (17 000 inhabitants) is a town situated approximately 30 km from Gdansk (Poland) in the heart of the Kaszubian lakeland. The recipient (the Klasztorna Struga River) belongs to the catchment supplying a signiticant portion of drinking water to the city of Gdansk, so stiff quality treating performance is required . The Kartuzy WWTS structure is shown in Fig. 1. Equalization basins. The influent nowrate exceeding 500 m 3Jh is pumped temporary to two equalization tanks possessing the total capacity of 6000 m 3. After decreasing of the t10wTate the accumulated wastewater returns to the treatment line. Activated sludge reactor. The advanced biological treatment with nutrient removal is accomplished in the activated sludge reactor designed and operated according the UCT (University of Cape Town) process. The fust zone is anaerobic where the phosphorus release occurs. The internal recirculation of mixed liquor originates from the anoxic zone. The second zone is anoxic where denitrification occurs. The returned activated sludge from the bottom of the clarifiers and the internal recirculation from the end of the aerobic zone (containing nitrates) are directed to the anoxic zone. An aerobic zone constitutes the last part of the reactor. It is aerated bv a diffused aeration system This zone is divided into four compartments of various intensity of aeration. Secondary sedimentation. The biologically treated wastewater and biomass (activated sludge) are separated in two parallel horizontal (rectangular) secondary claritiers. Chemical treatment. In order to ensure a high level of phosphorus removal, iron sulphate (PIX) is added to the aerobic zone to precipitate most of the remammg soluble phosphorus (simultaneous precipitation). There is also the opportunity to precipitate phosphorus in the grit chamber (preprecipitation) .

Control sln/cture at Afedium Control Layer Figure 2 illustrates MPC at MCL. The structure consists of three main components : Robust Model Predictive Controller (RMPC), Grey Box Parameter Estimation (GBPA) (Konarczak, et aI. , 2004) and State Estimation by Extended Kalman Filter, (SEEKF). The RMPC at Medium Control layer uses grey box model of the controlled plant to predict its future outputs. The GB model because of its feature has to be adapted to the current conditions and it is done by manipulating its parameters J (Rutkowski, et aI., 2002 ). Suitable parameters are computed via Weighted last Squares (WLS) estimation procedure. A generic RMPC proposed by (Brdys and Chang, 2002) has been already successfully applied to drinking water network (Brdys, et aI., 2001a; Duzinkiewicz et al., 2002) . Complexity of our control problem requires further signiticant development of the generic RMPC including switching between different control strategies. SCL

• ~~. RelertioH.Une l1'tJj«Jo,,' • M1u SI"",," tnJj
inl
• EqiaIiSltm fa IC'VCI njcdory • SqXIC tar*. level rrajcdory

-

MCL

}

objectives

Grey Box par.unetcr estimation

~I • Dtssotvcd OX)'!cn concentration • Rccircullllons

FeL

Fig. I. Kartuzy WWTS structure. ET-equalization tank, ST -septic tank, AN-anaerobic zone, AX anoxIc zone, AE-aerobic zone, SS-secondary settler.

• Pumpin~ inJ~ ~ctcntionlSlnihf1on ranks

Stale or the plan!

os_on by EKF

}

.

m. .pulaled

vUlables

• Olcmical prCCIPWf10n

Fig. 2. Structure of RMPC at medium time scale. Needed data are delivered by hard sensors and by Extended Kalman Filter. The EKF utilizes the measurements and full ASM2d model of the plant to estimate missing state measurements. The ASM2d

580

Notice, that the above calls for multiobjective control technology (Wierzbicki et aI., 2000).

model of the plant has to be periodically calibrated based on real plant data . . 4.

5. FORMULATION OF MPC AT MCL

CONTROL GOALS

Once the control goals have been described let us formulate the control problem at medium time scale. The assumptions regarding control problem, MPC inputs and outputs, ditTerent control strategies, hence ditTerent pert'ormance indices and constraints are to be detailed.

In this section the main control goals of operating the integrated WWT system are described. The objectives can be split into four main streams, that are : ensuring the biological sustainability of the plant over long time period, fulfilling the legal limits on eft1uent quality parameters, minimising the total pollution load of discharged sewage, and finally saving the cost. These objectives are broken down into more detailed ones: a) to stabilize biological treatment process : • to maintain sludge retention time (SRT) reference (terminate value or trajectory), • to maintain sludge mass (MS) reference value (terminate value or traJectory), • to maintain equalisation tank reference (terminate value or trajectory), • to maintain septic tank reference (terminate value or trajectory), b) to maintain output constraints (solids at eftluent): • to satisfy ammonium nitrogen constraint (SNH4), • to satisfy nitrate constraint (SNOx), • to satisfy Total Nitrogen constraint (TN), • to satisfy Total Phosphorous constraint (TP) • to satisfy Carbon Oxygen Demand constraint (COD), • to satisfy Biological Oxygen Demand constraint (BOO), • to satisfy soluble substrate constraint (Ss), • to satisfy Total Suspended Solids constraint

5.1. Key assumptions:

control of integrated Sewer Network- Waste Water Treatment Plant (SN-WWTP) via Model Predictive Control technology, plant model is build based on a grey box model of ASM2D (Rutkowski et aI., 2002), full state of the plant is measured or estimated, predictions of the WWTS intluent including quality (COD, BOO, TSS) and innow to septic tanks are known, trajectories of volume level in retention tanks (at the end of control horizon) are known from Auxiliary Slow Control Layer (ASCL) activity and SRT, MS are known from experience of plant operators who support it giving ASCL-OS . They are called' interlayer objectives' and MPC at MCL needs to meet them, MPC employs ditTerent control strategy. 5.2. MPC input variables:

state measurements or estimates at: anaerobic zone, anoxic zone, aerobic zones, equalization tank, septic tank, disturbance predictions: innow to WWTS (composition [COD, TN, TP] and quantity [now rate)), intlow to septic tank (composition [COD, TN, TP] and quantity [now rate]), SCL interlayer variables : MS set point, SRT set point, equalization tank reference trajectory (from ASCL), septic tank reference trajectory (from ASCL).

(X TSS ),

c) to minimise environmental costs (discharge to receiver): • to minimise ammonium nitrogen pollution load, • to minimise nitrate pollution load, • to minimise Total Nitrogen pollution load, • to minimise Total Phosphorous pollution load, • to minimise Carbon O~:ygen Demand pollution load, • to minimise Biological Oxygen Demand pollution load, • to minimise soluble substrate pollution load, • to minimise Total Suspended Solids pollution load, d) to minimise plant running costs: • to minimise air now rate to aerobic zones, • to minimise recirculations pumping, • to minimise excessive sludge pumping, e) other: • to limit control variables maxunum changing rate, • to minimise overtlow volume or to avoid overnow (constraint), • to take into consideration maximum blower station capacity (F<;L interlayer).

5.3. MPC Olllplll variables:

dissolved oxygen concentration in aerobic zones, recirculations now rate, excessive sludge now rate, chemical addition, (PIX) into aerobic zone, pumping into retention tanks, pumping from retention tanks pumping from septic tanks . 5.4. Conlrol strategies and strategy switching.

A control strategy is adapted to the system operational state. Each of the control strategy has difTerent control objectives to fulfil. As they are all the MPC strategies, it means that they have different performance indices and constraint functions.

581

Soft constraints components:

Switching from a current strategy to the new one needs to be done in a smooth manner. It IS achieved by weighting the perfonnance and constraint functions and gradually varying the weights (Grochowski et ai , 2004) .

W ..'"

* W.J

cl

(;)* £ COIfIjIOI'"'' (i)

where : slack variable multiplier weight, slack cost factor weight vector, 6 co"",0",", - slack value (constraint violation magnitUde)

Wsm -

w,_cf-

The main assumptions regarding the control strategies are : cost minimisation control strategy (CS I) • plant numing costs, • environmental costs due to eft1uent pollutant loads, • soft constraint components, • components due to tracking the interlayer objective references, discharge minimisation control strategy (CS2): • plant numing costs, • environmental costs due to the etlluent and overflow pollutant loads, • soft constraint components, • components due to tracking the interlayer objective references, overt1ow minimisation control strategy (CS3): • environmental costs due to overt1ow, • soft constraint components, • components due to tracking the interlayer objective references,

Components due to tracking the inter/ayer objective references: • W"cm

I wsc _ cJ

v

;).(/oV)-l c .., I

POinIV))~ I;)

c _ "el _ powl V

where: i or j = k+H p , multiplier weight, wsc_if-cost factor weight vector, Ic - SCL interlayer variable, I c_so'J>om, - SCL interlayer variable reference .

j

E

Wscm -

5.6. MPC constraints

Model constraints:

y(i) - G(x(t),u(t1t) = 0 where : y - output variable, G(x,u,t) - simulated model mapping. Slack variables value constraints (eqllalities) :

5.5. MPC goal function

The main performance index contains objective functions from all control strategies : where: 6 - slack variable, Ymax - output variable upper limit, Yr. - output variable safety zone .

where: u - decision variable vector, A - decision variable vector feasible set, k - current time instant, i = k, k+l, , k+Hp-l, k+Hp , Hp - prediction horizon, wf- vector of "forward" weights, Wab Wa1> Wa3 - vector of weights for the cost minimisation strategy, discharge minimisation strategy and overt1ow minimisation strategy, respectively.

Decision vector variable constraints: u min (i) ~ uv h um.,.{i) where: u - decision variable vector, u mi" - decision vector lower bound, U max - decision vector upper bound. Rate constraints on control variables: u(i)- u(i - 1) ~ L'1u max { - (u(i) -1I(i -I)) ~ L'1u max

Plant running cost components: w",(i)· w<>._c • control vtc ia6I. (i) where : Woe - energy cost weight vector, wcvJ control variable energy consumption vector.

Aeration system constraints: Lair _flJw(i) ~ air _flowmu

where: air-.flow max - maximal blower station capacity . Tank capacity and overflow constraints:

Environmental costs due to efl1uent pol/utant loads, 1II,c/ • effluentfl- __ (i)· effluent qunlin. _ C_', (i) where: w.if- environmental cost factors.

J'equ _ nun -< J'equ (.)
o$ Qo-flow $ Qo-flow _ '""" where:

",g. - equalization tank volume level,

Environmental costs due to overflow pollutant loads w« f •

" ..ptic -

overflowflow_..to (/ ) . overflow....,"> _"""""""'(;)

septic tank volume level, overt1ow rate .

Qovnj1u.. -

582

6.

CASE STUDY

6.1 . MPC implementation

MPC is implemented in a reduced space of decision vector. Hence, the decision vector contains control variables over prediction horizon. State variables are calculated by simulation. All the MPC parameters are tuneable. The prediction step is 1 hour. prediction horizon and control horizon equal to 24 hours. At each MPC step, a number of allowed iterations is limited, in order to save the computing time . The control structure IS implemented in Matlab Simulink software and as optimisation tool the T omlab package was used. At present, the ideal intlow predictions are used.

°0 - --·--

·-'·--- ·-·- 2--

-···- - --4--·-·- - ·--·----- 6 time

Id)

Fig. 5. Internal recirculation 2 flow rate .

n t

.. 10:; Metal dosing in aerobic zono 3

2~ ~

~



1-

1 .5 1

~

~ tim ..

6.2. Results

10000 ....

~

6

Ammonium (~NH4)

at _Hluent from WW

o

I~ .

5 I--------~---------~--

~04 1

~

i

i ::f.. 1\ ,/\ i " f..-

\ . '-

0 . 1 -

.

1\\---'/ \

! V ·. _-v.: _.-l

'!•

0 2 4 tlm ..

Fig. 7. Ammonium

~

10r

-

8

~

6

(~H4)

0

Id)

at etl1uent from WWTS.

, otal Nitrogen (I N) at effluent from WWTS .

i

12\,

\f\._}\';.. I-\. . . ; ..... . ..

/

T'

\ .- ..

/

l\.:~l /

... .

\..~/ '~ ;

;

!\ _l-.r ..

/

40~-----2~---~~4-----~6 tim ..

Id)

Fig. 8. Total Nitrogen ON) at etl1uent from WWTS.

Flow into WWTS 15000 -- - - -- - - - ~ -----

~

Idl

Fig 6. Metal dosing in aerobic zone 3.

The MPC was implemented with 1 hour prediction step and 8 hours prediction and control horizons . The control simulation was carried out during six days. A mixed dry-wet weather disturbance scenario was used (see Figure 3). The resulting control variable trajectories are illustrated in Figure 4-6. The efIluent quality parameters (controlled outputs) are shown in Figure 7-9. Notice that the control objectives are nicely met, that IS SNH4:5;6 [g/m3], Total Nitrogen:5;15 [glm 3 ], Total Phosphorous:5;1 [glm 3 ] With the CSl control strategy during wet weather conditions, that is during 2-4 days, an overflow would be unavoidt: .: Therefore, soft switching from CS 1 to CS2 control strategy was activated at t}=72 [h] and it was completed at t 2=76 [h]. As the result an excellent utilisation of the equalization tanks capacity was achieved as illustrated in Figure lO. Performance of the EKF is demonstrated in Figure 11-12.

(~

/ -..

O{f"- ---,- J-........... . . .. ;

Total Phosphorus (TP) at effluent from WWTS

:· ·· .A:/{\" · · - ~;.:.)/\ · ·· · I

~

1. I

f

I

I t

~ 50oo >'N\]N\/\t'\/N\J'-V"~ °ci-------~---- ~ ------- ~ time>

Id)

Fig. 3. Flow into WWTS.

tlm ..

Id)

Fig. 9. Total Phosphorus (TP) at effiuent from WWTS.

Dtssohr.,d oxygen concentration

In aerobte zone 3 .

Volume in equalisation tank.

6ooorL --------~--------~/~· / '-----­

-;: time

/

..

/

Id)

'-.

Fig. 4. Dissolved oxygen concentration in aerobic zone 3.

°0

I .-

;

- 2-' tIme

" Id)

Fig 10. Volume in equalisation tank.

583

6

2001 World Water and Environmental Resources Congress, Orlando, Florida, May 2024,2001. Brdys, MA and 1. Chang (2002a). Robust model predictive control under output constraints. Proc. of the 15th IFAC World Congress, Barcelona, July 21-26. Brdys, M.A, M Grochoviski, W Chotkowski and K. Duzinkiewicz (2002b) Design of control structure for integrated wastewater treatment plant- sewer systems. I International Conference on Technology, Automation and Control of Wastewater and Drinking Water SystemsTiASWiK'02, Gdansk - Sobieszewo, June 19 21, 2002, Poland Brdys M.A, T. Chang and K. Konarczak (2004) . Estimation of wastewater treatment plant state for model predictive control of N-P removal at medium time scale. IF AC 10th Symposium Large Scale Systems: Theory and Applications. July 26-28, 2004, Osaka, Japan Duzinkiewicz, K. , MA Brdys and 1. Chang (2002). Hierarchical model predictive control of integrated quality and quantity in drinking water distribution systems Urban Water Journal. Grochowski, M , MA Brdys and T. Grninski (2004). Intelligent control structure for control of integrated wastewater systems. IF AC 10th Symposium Large Scale Systems: Theory and Applications. July 26-28 2004, Osaka, Japan. Konarczak, K., 1. Rutkowski, M.A Brdys and T. Grninski (2004). Weighted Least Squares parameter estimation for model predictive control of integrated wastewater systems at medium time scale. IF AC lOth Symposium Large Scale Systems: Theory and Applications. July 26-28 2004, Osaka , Japan. Maciejowski, JM (2000) . Predictive Control with constraints, w'\Iw.control.eng.cam.ac.uk/jrnm/ mpcbook/mpcbook.html MATLAB - http://www.mathworks.com Mayne, D.Q., J8. Rawlings, C.V Rao and P.O.M. Scokaert (2000) . Constrained model predictive control: Stability and optimality. Automatica 36 (2000), 789-814. Rutkowski,1., M. Grochowski, MA Brdys, J Mtkinia and K. Duzinkiewicz (2002). Robust recursive on-line estimation of variables and parameters in grey-box models of biological reactor in activated sludge wastewater treatment plants. I International Conference on Technology, Automation and Control of Wastewater and Drinking Water SystemsTiASWiK'(t2, Gdansk-Sobieszewo, June 19-21 , 2002, Poland. SIMBA - http://simba.ifakthg.de TOMLAB - http://tomlab.biz Wierzbicki, AP., M Makowski and J Wessels, Eds. (2000). Model-based Decision Support Methodology with Environmental Applications. Series: Mathematical Modelling and Applications. Kluwer Academic Publishers, Dordrecht

:'~t_t::-::'~~~;~f.i7~1 °0-

I~\,

VI".., ."'\0 V I I,J..j _: . - - - - - - :2.-- - - .-- -4"---.-time

V'i.J .. 11

6

Id]

Fig. 11 _Ammonium (SNH4) at anaerobic zone. Phosphate (SPQ4) at aerobic zone 4 .

2------------------------------,

6

2 tlm ..

Id]

Fig. 12. Phosphate (SP04) at aerobic zone 4. Simulation was performed in Matlab environment SIMBA package was used as a real plant simulator. TOMLAB /SOL solvers was applied to carry out the optimisation task. 7. CONCLUSIONS The paper has proposed new robust model predictive control mechanism for optimising control of integrated wastewater systems. The new controller comes across recent operational challenges. In particular, it is truly multivariable, efficiently accommodates different time scales and multiobjective structure of the control goals by employing hierarchical approach. Moreover, it is capable of handling full range of disturbance inputs by adapting a control strategy to plant operational conditions. Promising results have been obtained for Kartuzy case study system. ACKNOWLEDGMENT This work was supported by the Polish State Committee for Scientitic Research under grant No. 8TlIA-021-18, grant No . 8 TlIA 00924 and by the European Commission under contract number EVK I-CT -2000-00056 SMAC. The authors wish to express their thanks for the support. REFERENCES Brdys, MA, T. Chang and K. Duzinkiewicz (200Ia) _Intelligent model predictive control of chlorine residuals in water distribution systems. Proc. of the 4th ASCE Annual Water Distribution Systems Analysis, 2001 World Water and Environmental Resources Congress, Orlando, Florida, May 20-24, 200 I. Brdys MA, K. Duzinkiewicz, M. Grochowski and 1. Rutkowski (200 I b). Robust estimation of integrated hydraulics and parameters in water distribution systems. Proc. of the 4th ASCE Annual Water Distribution Systems Analysis,

584