Acta Chim. Slov. 1999, 46(2), pp. 289-300 Parametric Sensitivity and Evaluation of a Dynamic Model for Single-Stage Wastewater Treatment Plant Igor Plazl, Goran Pipuš, Maja Drolka and Tine Koloini Faculty of Chemistry and Chemical Technology, University of Ljubljana, Aškerčeva 5, 1001 Ljubljana, Slovenia *JP VO-KA Ltd., Krekov trg 10, Ljubljana Slovenia (Received 7.4.1999) Abstract Simulation models of the activated sludge process are believed to be a useful tool for research, process optimisation and troubleshooting at full-scale treatment plants, teaching and design assistance. However, the application of the models in most treatment plants is limited due to a lack of advanced input parameter values required by the models. Although the numbers of typical conversion factors and stoichiometric constants are presented in the literature, the range of some parameters is too wide considering the parametric sensitivity of the dynamic model. On the other hand, it is well known that the values of some parameters depend on the nature of a specific wastewater treatment plant. The present paper is concerned with a dynamic model of the activated sludge process taking place in the single stage wastewater treatment plant with parametric sensitivity and evaluation. Model calibration was successfully experimentally confirmed for the steady-state operational conditions. Introduction Activated sludge is a complex dynamic process and simulation of such system must necessarily account for a large number of reactions between a large number of components. Successful process modeling requires good knowledge of process variables such as the most influential kinetic and stoichiometric parameters and the resulting biomass composition. Model parameters and state estimation associated with modern control studies based on the available noisy process measurements. Dedicated to the memory of Prof. Dr. Jože Šiftar. 290 The parameters of biological models usually vary with environmental conditions and need to be frequently updated through on- and off-line algorithms [1]. An alternative parameter approach is via laboratory analysis. These procedures of the IAWPRC Activated Sludge Model I [2] are presented in Ekama et al. [3,4]. However, an important aspect of instrumentation theory is that measurements are never deterministic variables, since they always involve random noise as well as experimental random errors [5]. On the other hand, many authors discuss various nonlinear numerical estimation methods (Bayesian estimation method – [6]; Maximum Likelihood methods – [7]). Kabouris and Georgakakos [1] presented a continuous process model formulation in state-space form. The model is discretized to allow for different time-steps in numerical integration and measurements acquisition. They presented the measurement model, including the relationship between measured quantities and model state variables, followed by development of the Linearized Maximum Likelihood (LML) algorithm. In this study attempts were made to present the dynamic model for activated sludge process taking place in a pilot single-stage wastewater treatment plant. Efforts were made to simplify the parameter evaluation procedure. The calibration of the dynamic model was successfully experimentally confirmed. Experimental The laboratory at Vodovod-Kanalizacija Ltd., Ljubljana, monitors daily the activated sludge process of a pilot single-stage wastewater treatment plant with reactor volume, V1 = 1.585 m3, and settler volume, V2 = 0.709 m3 (Figure 1). For the purpose of this work, some additional analyses were made. The concentrations of autotrophic nitrifying biomass, XA, heterotrophic biomass, XH, activated sludge concentration, inlet and outlet ammonium, A, dissolved oxygen, SO, and the concentration of inlet and outlet substrate (in g COD m-3), SCOD, were determined by standard methods (Standard Methods for Water and Wastewater, 19th Edition, AWWA, Washington d.c., 1995): SIST ISO 6060, SM 4500-NH3C, SM 2540 D, SM 2540 E. The average measured values with deviations for the period from 4 to 20 July 1998 are presented in Table 1. 291 Table 1. The average measured values of process parameters for period from 4 to 20 July 1998 (source: JP Vodovod Kanalizacija Ltd., Ljubljana).________________________ Qo (inlet flow) 0.263 ±0.001m3 h"1 So 3.6±1.0 gO2 m"3 Scod,o (inlet) 416±50 g COD m"3 Ao (inlet) 16.1±6.0 gN-NH4+ m"3 Scod,2 = Scod,i (outlet) 42±10 g COD m"3 A2 = Ai (outlet) 0.5±0.2 gN-NH4+ m"3 Xh,i 3104 g m"3 Xa,i 96 g m"3 Activated sludge concentration 4920±400 g m"3 Biomass fraction 65 % 1 - reactor, 2 - settler Q , S , A 1 Q 2, Q "—i r—"i r^ Figure 1. Sketch of the single-stage wastewater treatment plant. Simulation Model Considering the mass balances of substrate, ammonium, autotrophic and heterotrophic biomass for the single-stage wastewater treatment plant (Figure 1), the following set of linear differential equations is obtained, separately for the reactor and the settler [1,2,8]: 292 ¨ reactor dS Vi C0D,1 dt QoScod,0 +Q2Scod,2 -QlScod.l RHV1 Y V dX H,l dt dA Q2Xh,2 -Q1Xh,1 + R hV1 -bHXH,1V1 RV Vj —^- = Q0A0 +Q2A2 -QjAj------—L-ixRHVj -ixRAVj dt dX A,l V1 dt ¨ settler V dS COD,2 dt Ya Q2Xa,2 -Q1Xa,1 + R aV1 -bAXA,1V1 O.Smn —QSnm -O/iSnm ^-1 Ü(Jd,1 ^- 5 coL), 2 ^- 4 coL), 2 dX H,2 Vn,z 2=QlXh,l-Q3Xh,2 V V dt dA2 dt dX A,2 dt QjAj -Q3A2 -Q4A2 0,X , -Q,A ^-1 a,l j a,2 Aerobic growth of heterotrophs and autotrophs: R„ = u H r max, H S COD,l Scod,1 +Ks S S +K O O,H o k R. = u A r max,A A A1 +KA S +K O O,A o k Flow rates, as shown in Figure 1, can be described: Q1 = Q0 +Q2 Q0 [(Scod,0 -Scod,1 )Yh +(A0 -A1 )Ya ] bHXH,1V1 bAXA,1V1 Q2 =Q0 - ++ (Xh,1 +Xa,1 j (Xh,l+Xa,lj lXh,l+Xa,l) Qo[(Scod,o -Scod.iK +(Ao -AiKaJ bnX^V! +bAXA1V! Q0 -Q2 2(XHj1+XAj1) 2(XHj1+XAj1) 0, = Qi + Q< ^-J 2 O "4 ^-1 ^- i (1) (2) (3) (4) (5) (6) (7) (8) (9) (10) (11) (12) (13) (14) (15) S O 2 293 The flow equations for recycle, Q2 (eq 12), and sludge wastage, Q5 (eq 13), are obtained considering the basic flow relation (eq 11) and the mass balances for heterotrophic and autotrophic biomass. In addition, the following conditions are applied: Xh,2 = 2Xh,1 and Xa,2 = 2Xa,1 (16) In the described algorithm all flows (Q1-5, (m3h-1)) are time dependent. Table 2. Definition and typical values for the kinetic and stoichiometric coefficients, used in our model (Hence et al., 1994). Temperature mmax,H = Maximum growth rate (heterotrophic org.) mmax,A = Maximum growth rate (autotrophic org.) bH = Heterotrophic decay rate bA = Decay rate for nitrifiers KS = Substrate half saturation KA = Ammonia half saturation KO,H = Oxygen half saturation (heterotrophic org.) KO,A = Oxygen half saturation (autotrophic org.) YH = Heterotrophic yield coefficient YA = Autotrophic yield coefficient iX = N content of biomass 20 0C 10 0C Units 6.0 3.0 day 1.0 0.35 -1 day 0.4-0.2 -1 day 0.15-0.05 -1 day 4 - 20 g COD m-3 1 g N m-3 0.2 gO2 m 0.5 gO2 m 0.63 gCOD(gCOD ) 0.24 gCOD(gN ) 0.07 gN (gCOD) The model can now be solved by an appropriate numerical method, using the literature data on the kinetic and stoichiometric parameters (Table 2). However, in order to get acceptable agreement between the measured (Table 1) and predicted sludge process, numerical estimation of some parameters is necessary. To simplify this procedure, considering that the experiments were performed at steady-state conditions, the dynamic model was rebuilt for the case of steady-state operation. In this way, the set of differential equations (1-8) becomes a set of ordinary equations and the equations for flow rates (11-15) become time independent. On the basis of the experimental values of sludge process variables (Table 1) and by using some of the parameters from literature 294 (YH, YA, KO,h, KO,a, KA) the estimation of other parameters (|lmax,H, |max,A, bH, ba, iX) can be obtained by steady-state model calibration, using an appropriate numerical method. However, it was found again that the parametric sensitivity of the simplified model is still very high and we are unable to simply calibrate the parameters with ordinary numerical methods, built in a powerful mathematical package (Mathematica 3.0). The following iterative procedures was eventually found as most effective and successful method for model calibration: a) Some parameters (YH, YA, KO,h, KO,a, Ka) were adopted from literature (Table 2). b) The assumed value for KS can be found in the literature (Table 2) as the initial value for calibration. The study of parametric sensitivity of the dynamic model has shown that the influence of KS (in range 4-60 gCOD m3) on system stability is negligible in our case. On the other hand, the linear dependence of KS on evaluation of the maximum growth rate of heterotrophic organisms can be obtained (Eq. 18: \lmax,H[Ks=4 gCOD m~3] = 0.0146 h-1; \lmax,H[Ks=60 gCOD m~3] = 0.0324 h-1). c) The assumed value for iX can be found in the literature (0.07 gN (gCOD)1, Table 2) as the initial value for calibration. d) The assumed value for bA can also be found in the literature (0.0063-0.002 h~, Table 2) as the initial value for calibration (0.002 h1). e) The value for heterotrophic decay rate, bH, is calculated from the following equation (Eq. 17): b =b + H A Q0(SCOD,0 -SCOD,1)YH ^ TQ0(A0 -A1)Ya *i (17) V -X , 1 H,1 / V • X , 1 A,1 / which can be obtained by equalizing equations 1 and 2 arranged for steady-state, considering a simple flow relation (Eq. 11), substrate concentration equality (Scod,1=Scod,2), and condition XH,2=2XH,1 (Eq. 16). f) The value for maximum growth rate of heterotrophic organisms, |lmax,H, can now be calculated from the equation (Eq. 18): 295 max, H Q0(Scod,0-SCOD,1)Yh Xh,1-V1 So +Ko,h So S COD,1 + K S I (18) I • COD,1 / which is derived from the mass balance of heterotrophic organisms (Eq. 2) arranged for steady-state operation, considering again the simple flow relation (Eq. 11), substrate concentration equality (SCOD,1=SCOD,2), and condition XH,2=2XH,1 (Eq. 16). Finally, equation 18 is obtained after simple mathematical procedures considering the expressions for bH (Eq. 17) and Q2 (Eq. 12). g) The maximum value of N content of biomass, iX,max, is determined from the condition of positive growth rate at defined operational conditions (see Eq. 21): iX LiX,max = () . (19) Q0 A0 -A1 RHV1 If the initial value of iX is bigger than iX,max, the procedure is then repeated from step c) until satisfying system solution (Eq. 22). The study of parametric sensitivity of the dynamic model has shown that the influence of iX on system stability is very high. After a number of iterations the final value, iX = 0.001 gN (gCOD)-1, was found for our experimental conditions at which the system error is negligible. h) The value for the maximum growth rate of autotrophic organisms, mmax,A, can be calculated from the equation (Eq. 20): [Q0 A0 - A1 Ya -iXQ0(Scod,0 -Scod,1)YhYa] A1 +K a (So +Ko,a ) m = () (), (20) max, A Xh,1A1SoV1(1+iXYA ) which is derived from the mass balance of ammonium (Eq. 3) arranged for steady-state operation, considering again the simple flow relation (Eq. 11), ammonium concentration equality (A1=A2), and condition XA,2=2XA,1 (Eq. 16). After some simple arrangements, RA can be expressed: Q0(A0 -A1)Ya iX RhV1Ya Ra = - , (21) V1(1+ iXYA ) V1(1+ iXYA) and by replacing the growth rate of heterotrophs, RH with Equation 9 considering the expression for mmax,H (Eq. 18), Equation 20 can be obtained. 296 i) The system error considering the initial value of bA can be determined from the following equation (Eq. 22): 0 =Q2XA,2 -Q1XA,1 +RA V1 -bAXA,1V1 , (22) which is derived from the mass balance of autotrophic organisms (Eq. 4) arranged for steady-state operation. From Equation 22 the new value for bA can be obtained. The procedure is then repeated from step d) to i) until reaching system solution. Results and Discussion On the basis of the described method the calibrated parameters defined for steady-state activated sludge process taking place in a pilot single-stage wastewater treatment plant (Table 1) can now be used for successful process simulation based on the dynamic model (Eq. 1- 16). The calibrated parameters used in the dynamic model are presented in Table 3. Table 3. Estimated and typical literature values for some kinetic and stoichiometric coefficients (Hence et al., 1994). Parameter Steady-state model calibration Literature data Units bn 0.0079 0.008-0.016 -1 h b>A 0.0018 0.002-0.006 -1 h iX 0.001(0.066) 0.07 gN (gCOD/ f^max,H 0.0146(0.0324) 0.125-0.25 -1 h f^max,A 0.0218 0.015-0.042 -1 h The substantial deviation can be seen for iX = 0.001 and mmax,H = 0.0146 in case the system calibration error is practically zero. However, for practical purposes which still allowed stability of the system (system error determined from Eq. 22 is -0.015) at acceptable agreement with experimental data, the value 0.066 gN (gCOD)-1 for iX and the value 0.0324 h-1 for mmax,H[KS=60 gCOD m-3] were calculated. Some examples of dynamic model experimental confirmation for the single-stage wastewater treatment plant (JP Vodovod Kanalizacija Ltd., Ljubljana) are presented in Figures 2 and 3. It is quite remarkable that the dynamic model predictions are in agreement with the experimental data for steady-state activated sludge process. Some dynamic simulations 297 of the activated sludge process are presented in Figures 4-7 for sinuous and “real” disturbances of inlet wastewater flow. O O u M) (/3 500 400 300 200 100 42 0 1 1 ' 1 ' 1 ' 1 ' 1 ' - - - (^ = 0.263 m3 h"1 3 1 Q2 = 0.256 m h - prediction 3 -1 Q_ = 0.004 m h - prediction - - -- SCOD,0 - inlet S — c COD,l °COD,2 - 1,1,1,1,1 0 50 100 150 t (h) 200 250 300 Figure 2. Dynamic model prediction of substrate concetration for the steady-state activated sludge process taking place in a single-stage wastewater treatment plant. 7000 6000 5000 4000 e/j ^ 300 t (h) Figure 3. Dynamic model prediction of heterotrophs for the steady-state activated sludge process taking place in a single-stage wastewater treatment plant. 298 200 I 1°° 8 Q0(t) = 0.3-0.04 Sinp 1/24) \ 50 100 t (h) scoD, - reactor SCOD,2 - settler 150 200 Figure 4. Dynamic response of substrate concentration in the reactor and settler at sinuous simulation of inlet wastewater flow. 7000 6000 ir- 5000 OXj X ,m 4000 3000 2000 0 50 100 t (h) l'I Q0(t) = 0.3 - 0.04 Sin(pt/24) | - - - - X 1 - reactor X^2 - settler 150 200 Figure 5. Dynamic response of heterotrophs concentration in the reactor and settler at sinuous simulation of inlet wastewater flow. 299 300 250 200 150 100 50 ' 1 ' 1 ' 1 ' 1 i ' J Q0(t) = 0.263 + [t 30 Exp(-0.21]/8 10 - - - - X - reactor 1 X^2 - settler 1 i,i,i 1,1, 50 100 150 t (h) 200 250 300 Figure 6. Dynamic response of ammonium concentration in the reactor and settler at simulation of “real” two-day disturbation of inlet wastewater flow. 2.0 1.5 1.0 0.5 0.0 g J /o 6 Q0(t) = 0.263 + [t 30Exp(-0.2 t)]/a-10 1 - f\ J \ - A1 - reactor A2 - settler 1,1,1 1,1, 50 100 150 t (h) 200 250 300 Figure 7. Dynamic response of autotrophs in the reactor and settler at simulation of “real” two-day disturbation of inlet wastewater flow. 0 0 300 Conclusions A mathematical model of the activated sludge process taking place in a pilot single-stage wastewater treatment plant was built. A relatively simple procedure for kinetic and stoichiometric coefficients evaluation is proposed. The dynamic model calibration was successfully experimentally confirmed for steady-state operational conditions. Acknowledgment The author thanks representatives of JP Vodovod-Kanalizacija Ltd., Ljubljana, in particular to Jurij Kus and Alojz Hoj s for their encouragement, cooperation, and financial suport. We also express our appreciation to Mitja Lakner for his useful mathematical discussions. References [1] J.C. Kabouris, A.P. Georgakakos, Wat. Res. 1996, 30, 2853-2865. [2] M. Hence, C.P.L. Grady, W. Gujer, G.v.R. Marais, T. Matsuo, Activated Sludge Model No. 1, IAWQ Scientific and Technical Reports No. 1, IAWPRC, London, 1987, ISSN 1010-707X. [3] G.A. Ekama, G.v.R Marais, A.R. Pitman, G.F.P. Keay, L. Buchan, A. Gerber, M. Smollen, South African Water Research Commission, Pretoria, South Africa, 1984. [4] G.A. Ekama, P.L. Dolt, G.v.R Marais, Wat. Sci. Tech., 1986, 18, 91-114. [5] H.H. Willard, Jr.L.L. Merritt, J. A. Dean, Jr.F.A. Seattle, Instrumental Methods of Analysis; Wadsworth, Belmont, Calif., 7th edition, 1988. [6] M.B. Beck, System Simulation in Water Resouces; North-Holland Publishing Co., Amsterdam, 1976. [7] P.S. Mybeck, Stochastic Models, Estimation and Control; Volume 2, Academic Press, New York, 1982. [8] M. Hence, C.P.L. Grady, W. Gujer, G.v.R. Marais, T. Matsuo, Activated Sludge Model No. 2, IAWQ Scientific and Technical Reports No. 3, Preprint for IAWQ Specialised Seminar on Modelling and Control of Activated Sludge Processes, Copenhagen, 1994, 22-24. Povzetek Simulacijski modeli čistilnih naprav so zelo uporabna orodja pri optimiranju obstoječih in pri načrtovanju in optimiranju novih čis tilnih naprav. Prav tako je lahko matematični model v veliko pomoč pri razumevanju kompleksnih procesov čiščenja, izobraževanju in treningu, kot tudi pri uvajanju automatizacije procesov. Vendarle, pa je uporaba modela za večino čistilnih naprav omejena s poznavanjem vrednosti nekaterih parametrov, kijih zahteva model. Čeprav v literaturi obstaja precej eksperimentalno določenih podatkov za posamezne parametre pa lahko ugotovimo, da je razpon objavljenih vrednosti nekaterih parametrov zelo širok. Po drugi strani pa je parametrična občutljivost dinamičnega modela izredno velika. Uveljavilo seje spoznanje, da vrednost nekaterih parametrov v veliki meri zavisi od narave določene čistilne naprave. Pričujoče delo predstavlja dinamični model enostopenjske čistilne naprave, ki je bil uspešno testiran na pilotni čistilni napravi Ljubljana. Pri študiju smo posebno pozornost namenili določitvi realnih parametrov za posamezno čistilno napravo in parametrični občutljivosti dinamičnega modela.