Open Collections

UBC Theses and Dissertations

UBC Theses Logo

UBC Theses and Dissertations

Modelling activated sludge treatment of pulp and paper wastewater Sreckovic, Goran 2001

Your browser doesn't seem to have a PDF viewer, please download the PDF to view this item.

Item Metadata

Download

Media
831-ubc_2001-720306.pdf [ 28.52MB ]
Metadata
JSON: 831-1.0063983.json
JSON-LD: 831-1.0063983-ld.json
RDF/XML (Pretty): 831-1.0063983-rdf.xml
RDF/JSON: 831-1.0063983-rdf.json
Turtle: 831-1.0063983-turtle.txt
N-Triples: 831-1.0063983-rdf-ntriples.txt
Original Record: 831-1.0063983-source.json
Full Text
831-1.0063983-fulltext.txt
Citation
831-1.0063983.ris

Full Text

MODELLING ACTIVATED SLUDGE TREATMENT OFPULP ANDPAPER WASTEWATER by GORAN SRECKOVIC B . A . S c , The University o f Belgrade, 1987 M . A . S c , The University o f Belgrade, 1992  A THESIS SUBMITTED IN PARTIAL F U L F I L M E N T O F T H E REQUIREMENTS FORTHE DEGREE O F DOCTOR OF PHILOSOPHY in T H E F A C U L T Y O FG R A D U A T E STUDIES Department of Civil Engineering Environmental Engineering G r o u p We accept this thesis as-conforming to the required standard  T H E UNIVERSITY O F BRITISH  COLUMBIA  August, 2001 copyright by Goran Sreckovic, 2001  In  presenting this  degree at the  thesis  in  University of  partial  fulfilment  of  of  department  this thesis for or  by  his  or  scholarly purposes may be granted her  representatives.  permission.  Department The University of British Columbia Vancouver, Canada  for  an advanced  Library shall make it  agree that permission for extensive  It  publication of this thesis for financial gain shall not  DE-6 (2/88)  requirements  British Columbia, I agree that the  freely available for reference and study. I further copying  the  is  by the  understood  that  head of copying  my or  be allowed without my written  ABSTRACT  The research aim was to develop a mathematical model for predicting the behaviour of an activated sludge plant treating pulp and paper wastewater.  A one-dimensional mechanistic model for the primary and secondary clarifiers was selected. The Activated Sludge Model No. 1, selected for the bioreactor, was modified to include components and processes related to activated sludge treatment of pulp and paper wastewaters. The mechanistic models were calibrated against data originating from full-scale facilities using genetic algorithms. The mechanistic models were connected to neural networks to form hybrid models.  The response of the primary clarifier mechanistic model was fair for both overflow and underflow suspended solids. The hybrid model did not improve the mechanistic model response.  The secondary clarifier mechanistic model response was very good for the underflow suspended solids and poor for the overflow suspended solids. A hybrid model improved the secondary clarifier mechanistic model in predicting overflow suspended solids concentrations. The neural network model introduced pH and BOD  5  as variables related to clarification.  The activated sludge mechanistic model predictions for effluent COD, mixed liquor suspended solids, phosphorus and oxygen uptake rate were very good. The model response was acceptable for nitrite plus nitrate, but inadequate for ammonia.  The steady-state neural network model did not improve the activated sludge mechanistic model predictions.  ii  Temperature- and pH-dependent growth and decay rates were introduced in the activated sludge mechanistic model to gain an insight into the impact of variable model parameters on the overall model predictions. A conclusion was that a reason for using the pH- and temperature-dependent parameters existed only if the model responses for readily biodegradable COD and oxygen consumption were sought.  The introduction of different coefficients representing the COD content of active biomass and a remaining portion of the mixed liquor suspended solids provided better model predictions for effluent COD and mixed liquor suspended solids  The calibration results indicated the importance of having long term, dynamic data for both influent and effluent COD fractions to improve model accuracy. Thus, a need for extending full scale plant measurements to include influent and effluent COD fraction measurements was recognized.  iii  TABLE OF CONTENTS  ABSTRACT  ii  TABLE OF CONTENTS  iv  LIST OF TABLES  ix  LIST OF FIGURES  ;  LIST OF TERMS AND SYMBOLS  ix  ACKNOWLEDGEMENTS  1  2  V. ..xi  xxi  INTRODUCTION  1  1.1  Introduction  1  1.2  Pulp and paper wastewater treatment modelling issues  1.3  Organization of the thesis  4 11  LITERATURE REVIEW  12  2.1  Mathematical modelling  12  2.2  Optimization techniques  24  2.3  Introduction to activated sludge systems  34  2.4  Activated sludge mathematical models  35  2.4.1  Activated sludge stochastic models  36  2.4.2  Activated sludge deterministic models  37  2.4.3  Activated sludge hybrid models  57  2.5  Clarifier models 2.5.1  Solidsfluxmodels  2.5.2  One-dimensional models  58 . ....  59 63  iv  2.5.3 2.6  Novel clarifier modelling approaches  65  Summary  67  2.6.1  Process modelling and calibration techniques  67  2.6.2  Activated sludge models  68  2.6.3  Clarifier models  70  3  R E S E A R C H OBJECTIVES A N D A P P R O A C H  72  4  MODEL DEVELOPMENT  76  4.1  Activated sludge model  77  4.1.1  Selection of model structure and complexity  78  4.1.2  Model components  80  4.1.3  Model processes  86  4.1.4  Model formulation  107  4.1.5  Adequacy of model response  115  4.1.6  Sensitivity analysis of aeration basin mechanistic model  125  4.2  4.3  4.4  Clarifier model  131  4.2.1  Selection of model structure and complexity  131  4.2.2  Model formulation  132  4.2.3  Adequacy of model response  141  4.2.4  Sensitivity analysis of clarifier mechanistic model  146  Mechanistic model calibration and verification 4.3.1  Selection of calibration technique  4.3.2  Model calibration methodology  Hybrid model  147 ,  151 153 161  v  4.5  5  6  Summary  DATA  166  168  5.1  Input data and their sources  168  5.2  Missing data reconstruction  175  5.3  Outliers  178  5.4  Selection of calibration and verification data sets  184  5.5  Data dynamics  191  5.6  Summary  205  RESULTS AND DISCUSSION  213  6.1  Introduction  213  6.2  Primary clarifier calibration and verification  216  6.2.1  Mechanistic model  216  6.2.2  Hybrid model  223  6.2.3  Discussion of results  225  6.2.4  Summary  236  6.3  6.4  Secondary clarifier calibration and verification  237  6.3.1  Mechanistic model  237  6.3.2  Hybrid model  248  6.3.3  Discussion of results  256  6.3.4  Summary  272  Activated sludge model calibration  273  6.4.1  Mechanistic model calibration  273  6.4.2  Hybrid model calibration  300  vi  7  6.4.3  Discussion o f results  325  6.4.4  Summary  347  CONCLUSIONS A N D RECOMMENDATIONS  349  7.1  Conclusions  349  7.2  Recommendations for future work  353  REFERENCES  355  A P P E N D I X 1: G E N E T I C A L G O R I T H M S S T R U C T U R E A N D O P E R A T I N G P R O C E D U R E  369  A P P E N D I X 2: G E N E T I C A L G O R I T H M S P A R A M E T E R O P T I M I Z A T I O N  373  A P P E N D I X 3: N E U R A L N E T W O R K S S T R U C T U R E A N D O P E R A T I N G P R O C E D U R E  376  A P P E N D I X 4: N E U R A L N E T W O R K P A R A M E T E R O P T I M I Z A T I O N  380  A P P E N D I X 5: N E U R A L N E T W O R K W E I G H T S  381  A P P E N D I X 6: P O R T A L B E R N I M I L L D A T A M E A S U R E M E N T F R E Q U E N C Y A N D A N A L Y T I C A L METHODS  384  A P P E N D I X 7: P O R T A L I C E M I L L D A T A M E A S U R E M E N T F R E Q U E N C Y A N D A N A L Y T I C A L METHODS  387  A P P E N D I X 8: P H Y S I C A L S I Z E S O F T H E W A S T E W A T E R T R E A T M E N T P L A N T U N I T S . . . .  388  A P P E N D I X 9: M I S S I N G D A T A  389  A P P E N D I X 10: V O L A T I L E C O D C O M P O N E N T E X P E R I M E N T  392  A P P E N D I X 11 S O F T W A R E E M P L O Y E D  393  APPENDIX 12:PRIMARY CLARIFIER M E A S U R E D INPUT D A T A PLOTS  396  A P P E N D I X 13: P O R T A L B E R N I S E C O N D A R Y C L A R I F I E R M E A S U R E D I N P U T D A T A P L O T S 404 A P P E N D I X 14: P O R T A L I C E S E C O N D A R Y C L A R I F I E R M E A S U R E D I N P U T D A T A P L O T S  .413  vii  APPENDIX 15: AERATION BASIN MEASURED INPUT DATA PLOTS  423  APPENDIX 16: HEAT TRANSFER REACTION RATES  440  APPENDIX 17: ACTIVATED SLUDGE MODEL RESPONSE TO STEP CHANGES  444  APPENDIX 18: DISK WITH THE MEASURED DATA USED FOR MODEL CALIBRATION ... 445  viii  LIST OF TABLES  Table 4.1. Definition of component symbols in pulp and paper activated sludge model  87  Table 4.2: List of activated sludge switching functions, their definitions and parameters  89  Table 4.3: Temperature impact on growth reaction rate  91  Table 4.4: Temperature impact function on decay rate  92  Table 4.5: pH impact function on growth reaction rate  94  Table 4.6: Hydrogen peroxide impact function on growth reaction rate  97  Table 4.7: Model matrix for pulp and paper activated sludge model - part 1  109  Table 4.7: Model matrix for pulp and paper activated sludge model - part 2  110  Table 4.7: Model matrix for pulp and paper activated sludge model - part 3  Ill  Table 4.8: Process rate equations  112  Table 4.9: List of activated sludge kinetic parameters  113  Table 4.10: List of activated sludge stoichiometric parameters  114  Table 4.11: Values of activated sludge model parameters used for model response analysis  117  Table 4.12: List of activated sludge parameters used for sensitivity analysis  128  Table 4.13: Sensitivity of the activated sludge model to the changes of the model parameters  130  Table 4.14: Values of clarifier model parameters used for model response analysis  142  Table 4.15: List of clarifier model parameters used for sensitivity analysis  146  Table 4.16: Sensitivity of the clarifier model to the changes of the model parameters  147  Table 4.17: Calibrated activated sludge system parameters  160  Table 5.1: Port Alberni primary clarifier data: mass balance analysis  180  Table 5.2: Port Alberni primary clarifier data: statistical analysis  187  Table 5.3: Port Alberni secondary clarifier: statistical analysis  188  Table 5.4: Port Alberni aeration basin data: statistical analysis  189  Table 5.5: Port Alice secondary clarifier data: statistical analysis  190 ix  Table 6.1: Literature parameter ranges used for clarifier calibration  217  Table 6.2: Primary clarifier parameter ranges and the optimal parameter set  218  Table 6.3: Port Alberni Mill primary clarifier model relative errors  228  Table 6.4: Secondary clarifier optimal parameter sets  238  Table 6.5: Port Alberni Mill secondary clarifier model relative errors  243  Table 6.6: Port Alice Secondary clarifier model relative errors  243  Table 6.7: Optimal activated sludge model parameters  285  Table 6.8: Activated sludge mechanistic model relative errors  291  Table 6.9: Average activated sludge component values within the reactor (non-constrained parameters) 293 Table 6.10: Port Alberni Mill activated sludge hybrid model relative errors  324  Table A7.1: Genetic algorithms parameter optimization results  374  Table A7.2: GA parameters used in model calibration  375  x  LIST OF FIGURES  Figure 2.1: Typical activated sludge process flow sheet (partially  from  34  Figure 2.2: Settling zones in settler  61  Figure 4.1. Substrate components  83  Figure 4.2. Temperature impact on growth rate  92  Figure 4.3. Temperature impact on decay rate  93  Figure 4.4. pH impact on growth rate  95  Figure 4.5. Hydrogen peroxide impact on growth rate  98  Figure 4.6: Input variable relative disturbances for the aeration basin Figure 4.7: Aeration basin response to step changes  117 124  Figure 4.8: Schematic view of a settler (Vitasovic, 1989)  136  Figure 4.9: The traditional one-dimensional settler layer model (Takacs and Patty, 1991)  140  Figure 4.10: Settling velocity function (Takacs and Patty, 1991)  141  Figure 4.11: Input variable relative disturbances for the overflow suspended solids  144  Figure 4.12: Clarifier model dynamic response for the overflow suspended solids  144  Figure 4.13: Input variable relative disturbances for the underflow suspended solids  145  Figure 4.14: Clarifier model dynamic response for the underflow suspended solids  145  Figure 4.15: Hybrid model structure  163  Figure 5.1: Schematic of the wastewater treatment plant at the Port Alberni Mill (MacMIllan Bleodel Limited, 1995)  174  Figure 5.2: PC cross-correlation: measured input data vs. measured overflow SS - long calibration set 196 Figure 5.3: PC cross-correlation: measured input data vs. measured underflow SS - long calibration set 196 Figure 5.4: PC cross-correlation: measured input data vs. measured overflow SS - short calibration set xi  197 Figure 5.5: PC cross-correlation: measured input data vs. measured underflow SS - short calibration set 197 Figure 5.6: PC cross-correlation: measured input data vs. measured overflow SS - verification set . . . . 198 Figure 5.7: PC cross-correlation: measured input data vs. measured underflow SS - verification set . . . 198 Figure 5.8: SC cross-correlation: measured input data vs. measured underflow SS - calibration set... . 199 Figure 5.9: SC cross-correlation: measured input data vs. measured overflow SS - calibration set  199  Figure 5.10: SC cross-correlation: measured input data vs. measured underflow SS - short calibration set 200 Figure 5.11: SC cross-correlation: measured input data vs. measured overflow SS - short calibration set 200 Figure 5.12 :SC cross-correlation: measured input data vs. measured underflow SS - verification set . . 201 Figure 5.13: SC cross-correlation: measured input data vs. measured overflow SS - verification set . . . 201 Figure 5.14: Port Alice SC cross-correlation: measured input data vs. measured underflow SS - calibration 202 Figure 5.15: Port Alice SC cross-correlation: measured input data vs. measured overflow SS - calibration 202 Figure 5.16 :Port Alice SC cross-correlation: measured input data vs. measured underflow SS - verification 203 Figure 5.17: Port Alice SC cross-correlation: measured input data vs. measured overflow SS - verification 203 Figure 5.18: AB cross-correlation: measured input data vs. measured effluent COD - calibration set . . 206 Figure 5.19: AB cross-correlation: measured input data vs. measured nitrite&nitrate - calibration set . . 206 Figure 5.20: AB cross-correlation: measured input data vs. measured MLSS - calibration set  207  Figure 5.21: AB cross-correlation: measured input data vs. measured phosphorus - calibration set . . . . 207 Figure 5.22: AB cross-correlation: measured input data vs. measured OUR in basin 1 - calibration set  xii  208 Figure 5.23: AB cross-correlation: measured input data vs. measured OUR in basin 4 - calibration set 208 Figure 5.24: AB cross-correlation: measured input data vs. measured effluent COD - verification set..  209  Figure 5.25: AB cross-correlation: measured input data vs. measured nitrite&nitrate - verification set 209 Figure 5.26: AB cross-correlation: measured input data vs. measured MLSS - verification set  210  Figure 5.27: AB cross-correlation: measured input data vs. measured phosphorus - verification set . . . 210 Figure 5.28: AB cross-correlation: measured input data vs. measured OUR in basin 1 - verification set 211 Figure .29: AB cross-correlation: measured input data vs. measured OUR in basin 4 - verification set 211 Figure 6.1: Primary clarifier settling velocity function  222  Figure 6.2: Primary clarifier clarifier settling velocity function - extended  222  Figure 6.3: Primary clarifier overflow SS - calibration  229  Figure 6.4: Primary clarifier overflow SS - verification  229  Figure 6.5: Primary clarifier underflow SS - calibration  230  Figure 6.6: Primary clarifier underflow SS - verification  230  Figure 6.7: PC residuals cross-correlation functions, overflow SS - calibration  231  Figure 6.8: PC residuals cross-correlation functions, overflow SS - verification  231  Figure 6.9: PC residuals cross-correlation functions, underflow SS - calibration  232  Figure 6.10: PC residuals cross-correlation functions, underflow SS - verification  232  Figure 6.11: Primary clarifier autocorrelation functions - calibration  233  Figure 6.12: Primary clarifier autocorrelation functions - verification  233  Figure 6.13: Port Alberni secondary clarifier settling velocity function  242  Figure 6.14:Port Alberni secondary clarifier settling velocity function (extended up)  242 xiii  Figure 6.15: Port Alberni secondary clarifier overflow SS - calibration (NN with pH and BOD )  244  5  Figure 6.16: Port Alberni secondary clarifier overflow SS - verification (NN with pH and BOD ) . . . . 244 5  Figure 6.17: Port Alberni underflow SS - calibration  245  Figure 6.18: Port Alberni underflow SS - verification (NN with pH and temperature)  245  Figure 6.19: Port Alice secondary clarifier overflow SS - calibration (NN with pH, BOD and Cl ) . . . 246 5  2  Figure 6.20: Port Alice secondary clarifier overflow SS - verification (NN with pH, BOD and Cl ) . . . 246 5  2  Figure 6.21: Port Alice overflow SS - verification (NN with pH and BOD )  247  5  Figure 6.22: Port Alice secondary clarifier underflow SS - calibration (NN with pH, BOD and Cl ) . . 247 5  2  Figure 6.23: Port Alice secondary clarifier underflow SS - verification (NN with pH, BOD, and C l ) . . 248 2  Figure 6.24: Port Alberni SC cross-correlation functions, overflow SS - calibration  251  Figure 6.25: Port Alberni SC cross-correlation functions, overflow SS - verification  251  Figure 6.26: Port Alberni SC residuals cross-correlation functions, underflow SS - calibration  252  Figure 6.27: Port Alberni SC residuals cross-correlation functions, underflow SS - verification  252  Figure 6.28: Port Alice SC residuals cross-correlation functions, overflow SS - calibration  253  Figure 6.29: Port Alice SC residuals cross-correlation functions, overflow SS - verification  253  Figure 6.30: Port Alice SC residuals cross-correlation functions, underflow SS - calibration  254  Figure 6.31: Port Alice SC residuals cross-correlation functions, underflow SS - verification . . . . . . . .  254  Figure 6.32: Port Alberni secondary clarifier autocorrelation functions - calibration  264  Figure 6.33: Port Alberni secondary clarifier autocorrelation functions - verification  264  Figure 6.34: Port Alice secondary clarifier autocorrelation functions - calibration  271  Figure 6.35: Port Alice secondary clarifier autocorrelation functions - verification  271  Figure 6.36: Growth rate function for heterotrophs  287  Figure 6.37: Total effluent COD - calibration  .303  Figure 6.38: Total effluent COD - verification  303  Figure 6.39: MLSS concentration - calibration  304  Figure 6.40: MLSS concentration - verification  304 xiv  Figure 6.41: Ammonia residuals - calibration  305  Figure 6.42: Ammonia residuals - verification  305  Figure 6.43: Nitrate and nitrite residuals-calibration  306  Figure 6.44: Nitrate and nitrite residuals - verification  306  Figure 6.45: Phosphorus residuals - calibration  307  Figure 6.46: Phosphorus residuals - verification  307  Figure 6.47: OUR in basin 1 - calibration  308  Figure 6.48: OUR in basin 1- verification  308  Figure 6.49: OUR in basin 4 - calibration  309  Figure 6.50: OUR in basin 4 - verification  309  Figure 6.51: Estimated heterotroph concentrations in the aeration basin - verification  310  Figure 6.52: Estimated autotroph concentrations in the aeration basin - verification  310  Figure 6.53: Estimated inert particulate COD in the aeration basin - verification  311  Figure 6.54: Estimated inert soluble COD in the aeration basin - verification  311  Figure 6.55: Estimated slowly biodegradable COD in aeration basin 1 - verification  312  Figure 6.56: Estimated slowly biodegradable COD in aeration basin 4 - verification Figure 6.57: Estimated readily biodegradable COD in aeration basin 1 - verification  312 313  Figure 6.58: Estimated readily biodegradable COD in aeration basin 4 - verification  313  Figure 6.59: Temperature- and pH-dependent coefficients - verification  314  Figure 6.60: Total effluent COD, temperature and pH impact - verification  314  Figure 6.61: MLSS concentration, temperature and pH impact - verification  315  Figure 6.62: Ammonia residuals, temperature and pH impact - verification  315  Figure 6.63: Nitrate and nitrite residuals, temperature and pH impact - verification  316  Figure 6.64: Phosphorus residuals, temperature and pH impact - verification  316  Figure 6.65: OUR in basin 1, temperature and pH impact- verification  317  Figure 6.66: OUR in basin 4, temperature and pH impact - verification  317 xv  Figure 6.67: AB cross-correlation functions, COD residuals - calibration  318  Figure 6.68: AB cross-correlation functions, nitrite&nitrate residuals - calibration set  318  Figure 6.69: AB cross-correlation functions, MLSS residuals - calibration set  319  Figure 6.70: AB cross-correlation functions, phosphorus residuals - calibration set..  319  Figure 6.71: AB cross-correlation functions, OUR residuals in basin 1- calibration set  320  Figure 6.72: AB cross-correlation functions, OUR residuals in basin 4- calibration set  320  Figure 6.73: AB cross-correlation functions, COD residuals - verification  321  Figure 6.74: AB cross-correlation functions, nitrite&nitrate residuals - verification set  321  Figure 6.75: AB cross-correlation functions, MLSS residuals - verification set  322  Figure 6.76: AB cross-correlation functions, phosphorus residuals - verification set  322  Figure 6.77: AB cross-correlation functions, OUR residuals in basin 1- verification set  323  Figure 6.78: AB cross-correlation functions, OUR residuals in basin 4- verification set  323  Figure 6.79: Mechanistic model response for mixed liquor volatile suspended solids by Lessard and Beck (1993)  330  Figure 6.80: Aeration basin autocorrelation functions - COD  340  Figure 6.81: Aeration basin autocorrelation functions - MLSS  340  Figure 6.82: Aeration basin autocorrelation functions - Nirrite&nitrate  341  Figure 6.83: Aeration basin autocorrelation functions - Phosphorus  341  Figure 6.84: Aeration basin autocorrelation functions - OUR in basin 1  342  Figure 6.85: Aeration basin autocorrelation functions - OUR in basin 4  342  Figure 6.86: Model response for effluent COD by Coteet al. (1995)  344  Figure A l . l : Mutation within a chromosome  370  Figure A 1.2: Chromosome crossover  370  Figure Al.3: Inversion within a chromosome  371  Figure A1.4: Genetic algorithm  372  Figure A3.1: General structure of neural network  376  xvi  Figure A3.2: Concept of neuron  377  Figure A12.1: Primary clarifier influent flow rate - calibration  397  Figure A12.2: Primary clarifier influent flow rate - verification  397  Figure A12.3: Primary clarifier underflow flow rate - calibration  398  Figure A12.4: Primary clarifier underflow flow rate - verification  398  Figure A12.5: Primary clarifier influent suspended solids concentration - calibration  399  Figure A12.6: Primary clarifier influent suspended solids concentration - verification  399  Figure A12.7: Primary clarifier overflow suspended solids concentration - calibration  400  Figure A12.8: Primary clarifier overflow suspended solids concentration -verification  400  Figure A12.9: Primary clarifier underflow suspended solids concentration - calibration  . 401  Figure A12.10: Primary clarifier underflow suspended solids concentration - verification  401  Figure A12.11: Primary clarifier pH - calibration  402  Figure A12.12: Primary clarifier pH - verification  402  Figure A12.13: Primary clarifier temperature - calibration  403  Figure A12.14: Primary clarifier temperature - verification  403  Figure A13.1: Port Alberni secondary clarifier influent flow rate - calibration  405  Figure A13.2: Port Alberni secondary clarifier influent flow rate - verification  405  Figure A13.3: Port Alberni secondary clarifier underflow flow rate - calibration  406  Figure A13.4: Port Alberni secondary clarifier underflow flow rate - verification  406  Figure A13.5: Port Alberni secondary clarifier influent SS concentration - calibration  407  Figure A13.6: Port Alberni secondary clarifier influent SS concentration - verification  407  Figure A13.7: Port Alberni secondary clarifier overflow SS concentration - calibration  408  Figure A13.8: Port Alberni secondary clarifier overflow SS concentration - verification  408  Figure A13.9: Port Alberni secondary clarifier underflow SS concentration - calibration  409  Figure A13.10: Port Alberni secondary clarifier underflow SS concentration - verification  409  Figure A13.11: Port Alberni secondary clarifier pH - calibration  410 xvii  Figure A13.12: Port Alberni secondary clarifier pH - verification  410  Figure A13.13: Port Alberni secondary clarifier effluent total BOD - calibration  411  Figure A13.14: Port Alberni secondary clarifier effluent total BOD - verification  411  Figure A13.15: Port Alberni secondary clarifier temperature - calibration  412  Figure A13.16: Port Alberni secondary clarifier temperature - verification  412  Figure A14.1: Port Alice secondary clarifier influent flow rate - calibration  414  Figure A14.2: Port Alice secondary clarifier influent flow rate - verification  414  Figure A14.3: Port Alice secondary clarifier underflow flow rate - calibration  415  Figure A14.4: Port Alice secondary clarifier underflow flow rate - verification  415  Figure A14.5: Port Alice secondary clarifier influent SS concentration - calibration  416  Figure A14.6: Port Alice secondary clarifier influent SS concentration - verification  416  Figure A14.7: Port Alice secondary clarifier overflow SS concentration - calibration  417  Figure A14.8: Port Alice secondary clarifier overflow SS concentration - verification  417  Figure A14.9: Port Alice secondary clarifier underflow SS concentration - calibration  418  Figure A14.10: Port Alice secondary clarifier underflow SS concentration - verification  418  Figure A14.ll: Port Alice secondary clarifier pH - calibration  419  Figure A14.12: Port Alice secondary clarifier pH - verification  419  3  5  Figure A14.13: Port Alice secondary clarifier effluent total BOD - calibration 5  . 420  Figure A14.14: Port Alice secondary clarifier effluent total BOD - verification  420  Figure A14.15: Port Alice secondary clarifier temperature - calibration  421  Figure A14.16: Port Alice secondary clarifier temperature - verification  421  Figure A14.17: Port Alice secondary clarifier chlorine addition - calibration  422  Figure A14.18: Port Alice secondary clarifier chlorine addition - verification  422  Figure A15.1: Aeration basin influent flow rate - calibration  424  Figure A15.2: Aeration basin influent flow rate - verification  424  Figure A15.3: Aeration basin wastageflowrate - calibration  425  5  xviii  Figure A15.4: Aeration basin wastage rate - verification  425  Figure A15.5: Aeration basin recycleflowrate - calibration  426  Figure A15.6: Aeration basin recycleflowrate- verification  426  Figure A15.7: Aeration basin influent COD - calibration  427  Figure A15.8: Aeration basin influent COD - verification  427  Figure A15.9: Aeration basin influent COD loadings - calibration  428  Figure A15.10: Aeration basin influent COD loadings - verification  428  Figure A15.ll: Aeration basin phosphorus addition - calibration  429  Figure A15.12: Aeration basin phosphorus addition - verification  429  Figure A15.13: Aeration basin ammonia addition - calibration  430  Figure A15.14: Aeration basin ammonia addition - verification  430  Figure A15.15: Aeration basin pH - calibration  431  Figure A15.16: Aeration basin pH - verification  431  Figure A15.17: Aeration basin temperature - calibration  432  Figure A15.18: Aeration basin temperature - verification  432  Figure A15.19: Aeration basin effluent COD - calibration  433  Figure A15.20: Aeration basin effluent COD - verification  433  Figure A15.21: Aeration basin MLSS - calibration  434  Figure A15.22: Aeration basin MLSS - verification  434  Figure A15.23: Aeration basin residual ammonia - calibration  435  Figure A15.24: Aeration basin residual ammonia - verification  435  Figure A15.25: Aeration basin residual phosphorus - calibration  436  Figure A15.26: Aeration basin residual phosphorus - verification  436  Figure A15.27: Aeration basin residual nitrite&nitrate - calibration  437  Figure A15.28: Aeration basin residual nitrite&nitrate - verification  437  Figure A15.29: Aeration basin 1 oxygen uptake rate - calibration  438 xix  Figure A15.30: Aeration basin 1 oxygen uptake rate - verification  438  Figure A 15.31: Aeration basin 4 oxygen uptake rate - calibration  439  Figure A15.32: Aeration basin 4 oxygen uptake rate - verification  439  Figure A16.1: Heat exchange through basin walls (Sedory and Stenstrom, 1995)  443  Figure A17.1: Activated sludge model response to step changes of input disturbances  444  xx  LIST OF TERMS AND SYMBOLS Air al AOX AS ASM1 A S M 2  B b b BOD CC C^ COD C C^ CTMP DNA r| E EEM f f. f^ f^ F h  n  pa  h  pH  F^, F,^,, F f^  H202  4  bhjJ  f^ f f^ f^p f^ f^p GA H HRT ¥ K zbnj)  Kg a V  K Ka K, ao Ko Ko L  s  v  2  a  bh  bh  c  h  Switching function for oxygen Solar altitude Adsorbable organic halogens Activated sludge Activated sludge model No. 1 Activated sludge model No. 2 Atmospheric radiation factor Decay coefficient of Z Decay coefficient of Z^, Biochemical oxygen demand Cloud cover in tenths ( 1 1 0 ) Conversion factor for HP to cai Chemical oxygen demand Air specific heat Specific heat of wastewater Chemi-thermo mechanical pulping Deoxyribonucleic acid Efficiency knownfromthe aeration system design Emissivity of the water surface Environmental effects monitoring Ratio COD/biomass SS Ratio COD/non-biomass SS Fraction of Zy, remaining as endogenous residue Fraction of Z^ remaining as endogenous residue pH modulating function Non-settleablefractionof influent suspended solids Temperature modulating function Temperature modulating function for decay process rate Hydrogen-peroxide modulating function Nitrogen content in active Zy, Phosphorus content in active Zy, Nitrogen content in active Z^ Phosphorus content in active Z ^ Nitrogen content in endogenous Zy, Phosphorus content in endogenous Z Nitrogen content in endogenous Z ^ Phosphorus content in endogenous Z^, Genetic algorithm Henry's law constant Hydraulic retention time Transfer proportionality constant Thermal conductivity of the wall material Gas phase mass transfer coefficient Maximum specific hydrolysis rate Overall mass transfer coefficient Mass transfer coefficient at thefreesurface of the basin Surface conductivity at the air-surface outside the basin Surface conductivity at the ground-surface outside the basin xxi  K  s  Ammonification rate Half-saturation constant Half-velocity coefficient of on S Half velocity coefficient of on S^ Half-velocity coefficient of on S Hydrolysis half-saturation coefficient Reflectivity of water surface Growth rate coefficient Maximum growth rate coefficient Maximum growth rate of Z^, on S^ Maximum growth rate of on S Maximum growth rate of Zy, on S Switching function for ammonia Mixed liquor suspended solids Mixed liquor volatile suspended solids National Council of the Paper Industry for Air and Stream Improvement, Inc. Oxygen uptake rate Wire horsepower Pulp and Paper Research Organization of New Zealand Aeration heat exchange Surface convection heat transfer Evaporation heat transfer Gas flow rate Heat releasedfrombiological processes Long-wave radiation Power input heat transfer Solar radiation Density of wastewater Air density Reaction rate Relative humidity Settling parameter characteristic of the hindered settling zone Settling parameter characteristic of low solids concentration Resin and fatty acids Soluble components Bleaching agent Readily biodegradable soluble substrate Volatile soluble substrate Soluble non-biodegradable substrate Ammonia nitrogen Organic nitrogen Nitrite plus nitrate Dissolved oxygen Phosphorus Suspended solids Temperature University of Cape Town model Volume Maximal theoretical settling velocity Maximal practical settling velocity Volatile organic compounds s  K-  K^v  v  K, L  VM'max Hn Us  s  Hv  NH MLSS MLVSS NCASI OUR P PAPRO 3  Qa  Q. Qe Qb Qlr QP  Qso Pww Pair  r  Rh  r  h  R  P  RFA S s s  b s  S  v  Si Son Sno  s.  Sp  SS T UCT model V v  0  voc  v  xxii  w  WWT X  x,  x. Y Y Y  Z  h n v  Z»  z* z e  Wind velocity Wastewater treatment Particulate components Threshold concentration Non-biodegradable substrate Slowly biodegradable substrate Growth yield of Zy, on S Growth yield of Z^ on S^ Growth yield of Z on S Biomass components Active heterotrophic biomass Active autotrophic biomass Non-biodegradable endogenous biomass s  bh  v  xxiii  ACKNOWLEDGEMENTS  Some people's professional and emotional support helped me bring this piece of work to an end.I am grateful for what they have done.  The encouragement of Dr. Troy Vassos (NovaTec Consultants Inc., Vancouver, British Columbia) was very important. Without his and NovaTec's connections it would have been much more difficult to obtain the data used in the study. Dr. Angus Chu (Department of Civil Engineering, University of Calgary, Calgary, Alberta) was always willing to relate his ideas on the essence of microbial processes to the mathematical model developed in this study. Dr. Zdenko (Cello) Vitasovic (Reith Crowther, Seattle, Washington) inspired me with his knowledge on settlers and provided with valuable comments over the years. Dr. Sam Turk (NovaTec Consultants Inc., Vancouver, British Columbia) was always ready to comment on tricky issues related to pulp and paper activated sludge systems. Dr. Jules Thibault (Department of Chemical Engineering, University of Ottawa, Ottawa, Ontario) supported me greatly, commented on my work for years and helped me understand how neural networks worked. Dr. Dragan Savic (School of Engineering, University of Exeter, Exeter, England) was keen to pass to me his experience in practical genetic algorithms applications.  Dr. A.D.Russell (Department of Civil Engineering, University of British Columbia, Vancouver, British Columbia)and Dr.D.S.Mavinic (Department of Civil Engineering, University of British Columbia, Vancouver, British Columbia) certainly had significant impact on the final outcome of my studies at the University of British Columbia. Also, the help of the thesis advisor, Dr. E.R.Hall (Department of Civil Engineering, University of British Columbia, Vancouver, British Columbia), related to thesis editing is greatly appreciated.  Nenad Stefanovic (Microsoft, Seattle, Washington) and Srdjan Janev (Petnica Research Centre, Petnica,  xxiv  Serbia) were essential in introducing secrets of C++ to me. I would also like to thank Larry Cross (Pacifica Paper Alberni Specialties pulp and paper mill, Port Alberni, British Columbia) for his patience in providing data used in this study.  A special acknowledgment goes for the support of Dr. Ljubodrag Savic (Faculty of Civil Engineering, University of Subotica, Subotica, Serbia). His words of encouragement, maturity to shed light on the darkest sides of human nature, and broadmindness were precious inspiration throughout the course of work.  The work was partially financially supported by the Science Council of British Columbia. This support is also gratefully acknowledged.  The last, but not least, my wife Marina was always, pretty much unconditionally, there. My parents, Dragica and Milan Sreckovic also.  August, 2001  Goran  Sreckovic  xxv  1  INTRODUCTION  1.1  Introduction  Wastewater treatment facilities have received increased attention in the last decade with the introduction of new water quality criteria regulating the quality of effluent discharged from municipal and industrial wastewater treatment plants. Similar to other industries, the pulp and paper industry is faced with increasingly more stringent effluent standards and requirements to reduce contaminants discharged to the environment. The first Canadian regulations were introduced at the beginning of the seventies (Environment Canada 1972) and they set discharge limits for effluent suspended solids (SS), biochemical oxygen demand (BOD) and toxicity. New federal regulations, introduced in 1992, set more stringent limits oh effluent BOD, total suspended solids and toxicity (FISHERIES ACT, 1992).  To ensure compliancy with water quality regulations, pulp and paper mills have been trying to optimize their wastewater treatment facilities. Design and operation of the systems can be significantly improved with a better understanding of the treatment process behaviour and the influence of various operating conditions applied to the process. Better understanding of behaviour in conjunction with development of appropriate mathematical models can help introduce operational steps to reduce plant running costs and to improve the effluent quality. Even though both the primary and secondary treatment stages of the process are important, the secondary treatment process (bioreactor and secondary clarifier stage) is critical to successful wastewater treatment, because it has the greatest impact on the reduction of contaminants. It is the most complex process and the most difficult to operate and control.  Developing a mathematical model is a widely used approach for attaining a better understanding of a process. A good example is the Activated Sludge Model No.l (ASM1) (Henze et al., 1987), a dynamic mechanistic 1  model used for predicting the behaviour of the activated sludge unit in municipal wastewater treatment. Although the responses of the existing models based on the ASM 1 are widely accepted as good, those models have some drawbacks that follow.  •  Non-unique solutions for model parameters exist.  •  Certain state variables and parameters are not directly measurable.  *•  There is still a relatively poor understanding of some of the applied processes.  •  Extensive characterization of the influent wastewater is required.  •  The models suffer from potentially problematic mathematical non-linearities.  ••  The models do not consider temperature and pH dependency of the kinetic and stoichiometric coefficients.  •  The models have not been thoroughly tested on full scale plant data with diverse dynamics.  »•  There are no parameter sets for many industrial applications, such as pulp and paper wastewater treatment.  »•  The models do not include bacterial response to toxic spills.  •  Very few formal calibration attempts have been made for such models.  Regardless of the drawbacks, a comprehensive mathematical model could be a valuable tool in simulating variations in the system caused by changes in treatment plant operational conditions and the pulp and paper process. A computer simulation model based on the mathematical model of the process of concern could serve as a technical aid for several purposes discussed below.  •  The simulator can be used to improve design of an activated sludge system, given information on influent wastewater characteristics and enabling a range of process configurations and operational strategies to be evaluated.  2  •  The simulator can be used as an aid in the control of activated sludge systems to produce high quality effluent. By running the model under time-varying influent conditions, the appropriate operating conditions and control strategies can be identified and corrective measures suggested. The ability to assess operating strategies for changing wastewater characteristics is important for industrial wastewater which can originate from a number of unit processes with widely varying wastewater characteristics, in addition to fluctuations in hydraulic loading. Without the ability to verify the outcome of process changes, optimal biological treatment conditions would be difficult to achieve.  •  The simulator can be used as a tool for training plant operators. The model is able to simulate system behaviour under different conditions, to illustrate how changes in process parameters impact plant performance. Using the simulator, an operator can understand which parameters to change and what magnitude of change is required to correct problems in process operations. Where there is both limited design and operating experience available for a particular wastewater treatment facility, a simulator can be used to prepare contingency plans for emergency conditions and to train operations staff prior to commissioning the plant.  *•  The simulator can allow analysis of total plant performance over time. When compared to laws and regulations it can be used to determine the impacts of new effluent requirements on plant design and operational cost.  •  The simulator could serve as a research tool to build and test hypotheses and gain new knowledge about processes.  3  •  The simulator may provide students with an educational tool to explore new ideas and improve the learning process.  Pulp and paper wastewater treatment modelling issues  1.2  Although similar treatment processes are applied both to municipal and pulp and paper wastewaters, there are some differences in legal requirements, the contaminants present and general treatment issues.  Pulp and paper wastewater contaminants  The composition of wood, the species used, and the pulping and bleaching process employed, influence the composition of the effluents from pulp and paper mills. In addition, factors such as extent of wood seasoning, water usage per mass of pulp/paper produced, mill operating conditions and in-plant control measures can produce wide variations in effluent composition, even for mills of the same type (Stanyer, 1997).  Wood consists of three main components: carbohydrates, lignin, and extractives. At least 60% of the wood components are high-polymeric compounds: cellulose, hemicellulose and lignin. The remaining 5-15% of the components are extractives including resins, terpenes, fats, inorganic compounds and proteins (Fahmy, 1992).  Cellulose is a component of the cell wall and makes up about 45% of the total dry wood weight. Hemicellulose is a polymer of five different sugars: glucose, mannose, galactose, xylose and arabinose (Smook, 1989) and is another component of the cell wall. Lignin is a complex aromatic polymer of infinite molecular weight, built up from three different monomers (Fahmy, 1992). It is the second most abundant molecule (Fengel and Grosser, 1975), which binds plant fibres together and provides structural support.  4 r  Extractives are wood constituents which can be extracted by neutral solvents. Some of the major constituents of softwood extractives are fatty acids, fatty acid esters, higher molecular weight phenolics, resin acids, juvobione and compounds belonging to the terpenoid class (Leach et al., 1976).  However, the widely accepted concept of wastewater treatment system inputs does not deal with such a complexity of the wastewater, but with components that represent more general issues such as oxygen requirements to degrade the pollutants, suspended solids or toxicity present in the wastewater. As far as the wastewater treatment process is concerned, the wood and pulping process content in the wastewater can be classified into three components:  ••  biochemical oxygen demand (BOD) and chemical oxygen demand (COD),  •  suspended solids content, and  •  acute toxicity.  Biochemical and chemical oxygen demand  Although the discharge of chemical oxygen demand is not regulated, COD will be used in this dissertation because the use of COD is accepted in all modern activated sludge models for its more general meaning. The main sources of COD in pulp and paper process effluent are from organics such as cellulose, hemicellulose, and lignin (Springer, 1993). Methanol, as a volatile COD component, is also a significant contributor (Blackwell, 1978). The presence of volatile organic compounds (VOC's) in pulp and paper wastewater has an influence on the solids concentration (biomass and its by-products) and oxygen consumed in the aeration tanks in the system. One portion of the influent volatile COD can be oxidized by the microorganisms, while another one can be volatilized or stripped. The extent of COD removal due to oxidation, volatilization and stripping depends on the kinetics of these processes.  5  When chlorine is used for bleaching, a broad range of organo-chlorines created during the process exerts COD as well. These can be expressed as Adsorbable Organic Halogens (AOX) and can contain toxic compounds such as dioxins and furans. In addition to the chemicals solubilized from wood, some of the chemicals used in the pulp and paper production process can have a significant effect on COD (Springer, 1993).  Suspended solids  Suspended solids discharged by pulp mills include bark particles, sand, grit, coating andfillerparticles which are used as additives in paper making, lime mud, green liquor dregs, lime and other chemically induced floe from water treatment processes, calcium lignin complexes formed during treatment,fibrefrom wood and microbial cells from secondary treatment operations (Springer, 1993). The latter two are the most abundant, and thus most important.  Acute toxicity  Acute toxicity in pulp and paper wastewater treatment plant effluent originatesfromtwo sources: pulp and paper processes and wastewater treatment processes. Most of the toxicity of pulping effluent is due to the extraction and solubilization of toxic compounds, which were originally present in the wood. Major toxicity of pulping effluent is thought to be associated with resin and fatty acids (RFA) and chlorinated phenolic compounds derived from pulp bleaching when chlorine compounds are used for bleaching (Leach and Thakore, 1976; Edde, 1984; Springer, 1993). Minor toxic factors include alcohols related to sandaraopimaric, neoabietic and pimaric acids, in particular pimarol and isopimarol (Leach and Thakore, 1976). Since the pulp and paper process effluent lacks nutrients needed for bacterial growth in the wastewater treatment process, both nitrogen and phosphorus are usually added.  6  Chemicals used in bleaching  Both hydrogen peroxide and chlorine-based bleaching compounds are commonly used for bleaching in pulping processes. These components are strong oxidants, and thus are bactericidal. If a spill of these compounds occurs in the bioreactor, they inhibit bacterial growth and the process efficiency. The ASM 1 does not include a system process attributed to this issue.  Pulping process effluent temperature and pH variations  Variations in pH are common for pulp and paper applications and can affect either the COD removal (by changing the kinetic coefficients or inhibiting the growth of microorganisms), or the suspended solids settling in the secondary clarifier. Temperature variations of pulp and paper process effluent can also affect COD removal by changing the biomass growth and decay rates, or inhibiting the growth, if temperature is too high. Furthermore, the temperature difference between ambient air and the wastewater is higher for pulp and paper wastewater than that for municipal wastewater. This fact can also affect the treatment efficiency by introducing thermo-currents in the clarifiers.  Treatment process  The treatment of effluent generated from pulp and paper mills involves several sequential steps. Each step is designed to remove one or more classes of contaminants. The first step involves primary treatment, where a fraction of the suspended solids is removed from the wastewater. Following primary treatment, the wastewater undergoes secondary treatment, which is a biological process, often involving an aerated lagoon or an activated sludge system. This part of the system is responsible for removing the bulk of the organics and reducing the influent toxicity. Although each treatment step is important, the secondary treatment stage  7  is critical, since it has the greatest impact on the reduction of contaminants to low levels. It is the most complex process and the most difficult to operate and control. Understanding this stage of the treatment process is a key element in optimizing the performance of the treatment system.  In practice, aerated lagoons have often been found inadequate for the new water quality criteria, so that a more sophisticated process is required. In the absence of specific process guidelines, secondary treatment facilities which have been constructed to meet the criteria are typically activated sludge processes. Settling of the biomass built up in the aeration basin during treatment is also considered a part of the secondary treatment process and it is achieved in the secondary clarifier.  Varying wastewater characteristics  Wastewater treatment plant design is usually based on steady state assumptions and for that reason has employed large safety factors. However, plant performance is sensitive to time-varying conditions that are sometimes beyond the control of the plant operators. The performance of wastewater treatment facilities depends on the experience of the operations staff, who develop a "feel" for the operation, allowing them to cope with changing influent conditions in operating conventional treatment technologies. Often, operations staff do not have the knowledge and experience base for complex wastewater treatment facilities, with the associated inter-dependence of process operations. This can result in poor effluent quality, high operating costs, and the inability of advanced treatment processes to achieve optimal levels of performance.  If properly operated under design steady state loading conditions, pulp and paper wastewater treatment plants can satisfy the discharge requirements. However, dynamic changes occurring in the pulp and paper process can disturb the wastewater treatment process and alter the discharged concentrations of the regulated parameters. Changes in effluent quality may be related to the following events.  8  Changes in the influent COD andflowrates.  These changes are usually caused by pulp and paper  mill pulping operations.  Changes in the air supply.  These changes may be caused by malfunction of the air supply system.  Changes or variations in dissolved oxygen setpoints.  This may be caused by varying influent oxygen  demand or operating strategies.  Changes in the wastage rates and sludge ages.  The wastage rate and sludge age can be changed by  the plant operator.  Spills of pulp andpaper process liquors.  Black liquor spills may increase COD and toxic compound  loading to the treatment plant and thus decrease its effluent quality. White liquor spills may inhibit the bacterial growth in the activated sludge process by changing pH. The black liquor is a liquid in the kraft process, composed of spent pulping chemicals and wood residuals. The white liquor is a liquid in the kraft process composed of the chemicals used in the digester to cook the wood chips.  Chemicals used in bleaching.  Both hydrogen peroxide and chlorine-based compounds are  bactericidal and may inhibit the bacterial growth if present in sufficient concentrations in the bioreactor.  Fibre spills.  Being different in naturefromthe suspended solids in municipal wastewaters, some  fibre spills can increase the suspended solids concentration in the treatment plant effluent.  Pulping process effluent temperature andpH variations.  Temperature and pH variations can affect  9  the COD removal, either by changing the kinetic coefficients or by inhibiting the growth of microorganisms. In addition to that, temperature and pH variations can be expected to be important secondary clarifier parameters (Sreckovic et al., 1999).  •  Changes in the nutrient addition to the treatment plant.  Surplus ammonia or phosphorus discharge  can affect treatment plant toxicity. Insufficient nutrient addition can inhibit bacterial growth.  Major differences between municipal and pulp and paper treatment  Although municipal wastewater may contain volatile compounds, these components and related processes were not included in the Activated Sludge Model No.l. The volatile COD component, however, is present in the pulp and paper wastewaters.  As opposed to the already discussed composition of the suspended solids in the pulp and paper wastewater treatment systems, suspended solids contained in municipal wastewaters are mostly organic waste from municipal sources, as well as grit and sand.  In comparison, changes in the nutrient addition to the treatment plant, significant pH or temperature variations in the influent wastewater, or sudden bleaching chemical spills are not important issues in the municipal wastewater treatment systems.  The addition to the volatile COD component and the nature of suspended solids, the differences between municipal and pulp and paper wastewaters considered in the present study included chemicals used in bleaching, and influent wastewater temperature and pH variations.  10  1.3  Organization of the thesis  This thesis is organized into seven chapters. Chapter 2 reviews the literature on process modelling, optimization techniques, activated sludge mathematical models, and clarifier mathematical models. Chapter 3 introduces the thesis objectives. Chapter 4 discusses the methodology of model development for the activated sludge and clarifier models, as well as model calibration. Chapter 5 presents the sources of the data used for model calibration, and discusses the data dynamics and outliers. Chapter 6 presents the results of the modelling exercise for the primary clarifier, secondary clarifier and aeration basin. The thesis ends with Chapter 7 that presents the conclusions and gives the recommendations for future development of pulp and paper activated sludge models. The appendices provide material referred to in the thesis. APPENDIX 1 describes the genetic algorithms structure and operating procedure. APPENDIX 2 presents the genetic algorithms parameter sensitivity analysis. APPENDIX 3 describes, the neural networks structure and operating procedure while APPENDIX 4 presents the neural network parameter optimization. APPENDIX 5 lists the weights of the neural networks used in the hybrid model. APPENDIX 6 presents the data measurement frequency and analytical methods used at the Port Alberni Mill W W T (wastewater treatment) plant, while APPENDIX 7 presents the same information for the Port Alice Mill W W T Plant. APPENDIX 8 lists the physical sizes of the wastewater treatment plant units at the Port Alberni and Port Alice Mill W W T plants. APPENDIX 9 lists the missing data from the data base at the Port Alberni Mill W W T plant. APPENDIX 10 presents the results of the volatile C O D component experiment. APPENDIX 11 describes the computer software employed in the thesis. APPENDICES 12, 13, 14 and 15 present the plots of the measured data used for model calibration and verification. The plots are related to the measurements at the primary clarifier, secondary clarifier and aeration basin of the Port Alberni Mill W W T plant, as well as to the measurements at the secondary clarifier of the Port Alice Mill W W T plant. APPENDIX 16 discusses the heat transfer, while APPENDIX 17 presents the activated sludge model responses to a set of step input changes. APPENDIX 18 is a disk that contains the data presented in APPENDICES 12, 13, 14 and 15.  11  2  LITERATURE REVIEW  2.1  Mathematical modelling  A mathematical model can be defined as "A system of equations whose solution,  given specific input data,  is representative of the response of the process to a corresponding set of inputs"  (Denn, 1986). In other  words, a model is a mathematical representation of the process. Although sometimes it might seem that it is possible to develop a model for an entire process, a model generally covers only some aspects of the process. A model is developed because specific information is required. Therefore, the model needed to control a process may differ from the model used to optimize the same process.  The process of model development and verification is a complex procedure consisting of the following steps (Baker, 1994).  •  Model development. •  Selection of model structure and complexity.  •  Model formulation.  •  Data collection.  •  Model calibration and verification.  Each step is briefly discussed in the following paragraphs.  Model development  Selection of model structure and complexity.  Thefirststage of model development is to define the model 12  structure and complexity. The task involves identification of model components (state variables), processes which act upon these components, parameters involved and system outputs to be predicted. Initial development only considers key elements of the system to reduce its complexity. As each component or process of the system is better understood, the model complexity is increased in order to improve the model response. The required complexity of a model depends on the model objectives. As the objectives and requirements of the model are expanded, the model complexity is increased due to the inclusion of additional components and processes. However, the aim should be to develop the simplest model which satisfies the objectives.  Model formulation.  The data provided by research on the selection of model structure and complexity are  used for developing a system of equations which mathematically represents the response of the system.  Data collection  In order to prove the hypothesis made in the model development step, the model has to be tested against an established reference. The established reference is either a set of real data gatheredfroma real facility whose process is captured by the model, or outputs from a previously proven model. The process of reference data collection is probably the most resource consuming, but it is essential in the procedure of model development.  Model calibration and verification  The model should be tested and proven against established references. The final model development step before model verification is calibration. Calibration is a process of determining a single set of numerical values for the model parameters such that the model could predict the system response for a range of  13  operating conditions with reasonable accuracy. Calibration might be performed (1) automatically, by using an appropriate mathematical technique, (2) empirically (by engineering judgment), where the parameter values are assigned based on previous calibration experience or (3) by combination of those two approaches. The automatic calibration approach is efficient in searching the solution space and using computer time, but can assign some parameter values that might not be in accordance with the accepted parameter values. This weakness can be partially overcome by limiting the parameter values to their physically, chemically or biologically feasible ranges. On the other hand, the empirical approach is inefficient and it either leaves much of the solution space non-researched or is time consuming. Those two approaches can be merged in different degrees to provide better model calibration. For example, one approach to introducing engineering judgment to calibration is the analysis of the model responses sensitivity to different parameter values. The sensitivity analysis can indicate the model parameters that have little impact on the model predictions, so that those parameters can be given less importance (or even eliminated) in the process of calibration.  The last step in model development is model verification. Before the model outputs are taken for granted, they must be validated on a data set different from the calibration set. The process is known as validation or verification. Pragmatically, the usual procedure accepted in practical applications (Masters, 1993; Lessard and Beck, 1993; Baker, 1994; Cote et al., 1995; Pritchard, 1995; Beck and Chen, 1994; Eeles, 1993; Minns, 1996; Minns and Hall, 1996; Cousin and Savic, 1997; Jacq and Savic, 1997; Sreckovic et al., 1999; Savic et al., in press) is to separate the known data into two or several disjoint sets. One is used for calibration, while the other is used as the validation set. It is quite possible that the objective functions from calibration and verification differ. If the model has too many free parameters relative to the number of cases in the calibration set, it can overfit the data. Consequently, the validation objective function values will differ greatly from the calibration ones. If the difference is large, either the validation and calibration sets do not represent the same population or the model is inadequate. In either case, discrepancy in the errors warns that something is wrong either with the data or with the model, or in the relationship between the model and the  14  calibration method. It is imperative that the validation set not be used as a part of the calibration set. If it is used, it is not known if the calibrated model parameters are correct, i.e. general enough.  The issues a calibration process should satisfy are dealt with in the following questions (Reichert and Wild, 1995).  •  Is there a set of parameters yielding a good fit of the data?  •  If such a set exists, are the parameter values uniquely identifiable?  •  If the parameter estimates are unique, what is their accuracy?  A mathematical model comprises many components. These include system variables, parameters, constants, input variables and mathematical relations. Developing the relationships between the system variables and parameters is the crucial part of modelling. Considering a way to accomplish this, mathematical models can be mechanistic, black-box or hybrid. Each is reviewed in more detail in the following sections.  Mechanistic models  A common approach to developing a realistic model of a process is based upon "first principles" understanding. Such a first principles model is a mechanistic model. The development of a mechanistic model requires reasonable understanding of the physical, chemical or/and biological phenomena occurring within the process. These models generally consist of a set of equations developed from physical, chemical or/and biological laws. It is possible to develop a number of different mechanistic models for one process. The models may vary in their complexity, with, as a general rule, the more complex models generally being more accurate. However, the most accurate model may not be the most suitable for the end use. Frequently, a number of simplifying assumptions are made during the development of a mechanistic model. The  15  performance of a model depends on the validity of the simplifying assumptions and approximations made during its development. Any assumption is a compromise between the desire for a rigorous description and the need to obtain an answer that is good enough for the model's intended purpose. In a mechanistic model, there are generally a number of unknown parameters that need to be estimated before the model is used. This task can be accomplished by collecting data from a real process and then fitting the model outputs to the real data by finding the bestfitparameters.  The potential difficulties associated with mechanistic modelling can be classified in three categories (Stephanopoulos, 1984):  •  the size and complexity of the resulting model,  »•  the difficulty of obtaining accurate values for unknown parameters, and  •  problems associated with mathematically describing poorly understood phenomena.  Most modellers recognize that complete understanding ofthe phenomena involved in complex processes such as biological wastewater treatment is near impossible at the moment. At times, even an adequate understanding is also difficult to achieve. Therefore, the development of a pure mechanistic model is unsuitable when the basic phenomena are not well understood. In such a situation, an alternative modelling technique is needed.  Empirical models  For cases where there is insufficient process understanding to develop a detailed mechanistic model, it is sometimes possible to develop a "black-box", or empirical, model which uses experimental data to develop correlative dependencies between the system variables. Appropriate inputs and outputs over a range of  16  operating conditions are used. A better fit is often obtained by making assumptions about the mathematical structure of the equations based on the knowledge of the process. A curve is then fitted to the data to give a relationship between the inputs and the outputs using an algorithm which minimizes the error between the output values from the model and the measured process outputs by adjusting the model parameters. This type of empirical model is known as a statistical model. Although a statistical model can be developed where a mechanistic model cannot, there are still several problems associated with its use. If the mathematical relationships are not correctly specified, problems can occur in adequatelyfittingthe data. Difficulties also occur infittinghighly non-linear processes and in modelling multi-input multi-output systems. One of the main problems with using "black-box" models results from their nature. The equations are fitted to past data only and are limited by these values. The model can be assumed to be accurate when the operational conditions remain within the ranges used to develop the equations. Outside these ranges, where new operating conditions are explored, any solution must be used with caution. In cases where the model is optimized, the lack of accuracy when extrapolating can cause problems, as the optimum operating point may lie in a part of the feasible region that the model knows little about (Pritchard, 1995).  A more recent and potentially more versatile and powerful form of black-box model is an artificial neural network. A neural network consists of a number of interconnected neurons placed in several layers, and is intended to mimic behaviour of the human brain in an extremely simplistic way. It does not contain any specific process understanding or knowledge of the relationships existing within the system. It simply develops non-linear relationships between the input and output data sets presented to it during training (Masters, 1993). An advantage of neural networks over more traditional statistical models is the ease of model development for non-linear multi-input multi-output systems.  In developing any empirical model, a loss of process information usually occurs as what is known and understood about a process is not included in the model, except model inputs and outputs. For example, the  17  neural network models, as black-box models, do not need any understanding of the process, as opposed to mechanistic models. This fact is taken as either one of the main advantages of neural networks or a major disadvantage, depending on the point of view. The features of neural networks put them at the top of the choice list for a black-box part of the model. Thus, a brief description of general ideas neural networks are based on is warranted in the following paragraphs.  Neural networks  From the time of thefirstprimitive computing machines, their designers have been trying to push computers beyond the role of automatic calculators and into the realm of "thinking" machines. Neural networks represent one of these approaches. Neural networks are intended to mimic behaviour of the human brain in an extremely simplistic way. They consist of a number of interconnected neurons placed in several layers. Neural networks consider the biological neuron as the basic unit of the model. A biological neuron is a single cell capable of a sort of crude computation. It is stimulated by one or more inputs, and it generates an output that is sent to other neurons. The output is dependent on the strength of each of the inputs and the nature of each input connection. Some connections may be such that an input there will tend to excite the neuron and thus increase the output. Others may be inhibitory. An input to such a connection will tend to reduce the neuron's output. The actual relationship between inputs and output can be enormously complex. There can be significant time delays between application of the input stimulus and generation of the output response. A neuron does not always respond in the same way to the same inputs. Even random events can influence the operation of a neuron. The nature and strength of connections are determined through the process of neural network training. However, a large body of research indicates that simple models, which account for only the most basic neural processes, can provide excellent solutions to practical problems (Masters 1993).  The structure or architecture of the system forms the basis for information storage and governs the learning  18  process. A large number of different neural network architectures and activation functions has been described in the literature (Hech-Nielsen, 1988; Lippmann, 1987; Widrow and Lehr, 1990). Some of the varying architectures differ by the rules through which the weights are changed during training, how the neurons in the network are connected, how the layers are connected and differences in the presentation of training data. The activation function determines how the outputs from the hidden and output layers will be transformed. The sigmoid function is regarded as the most widely applied activation function (Chessari and Barton, 1992). Other activation functions that can be used include the hypertangent sigmoid and Gaussian transfer functions.  A huge variety of neural networks is used today. Individual neurons can be modelled by a simple weighted sum of inputs, a complex collection of differential equations, or anything in between. Connections between neurons can be organized in layers such that information flows in one direction only, or it can circulate throughout the network in cyclic patterns. All neurons can be updated simultaneously, or time delays can be introduced. All responses can be strictly deterministic, or random behaviour can be allowed. The variations are endless. Backpropagation is the most frequently used training algorithm in the reviewed applications.  Neural networks are likely to show their superiority to other methods under the following conditions (Masters, 1993).  •  The data on which conclusions are to be based cannot be defined properly by known deterministic techniques.  •  The patterns important to the required decision are subtle or deeply hidden. One of the principal advantages of a neural network is its ability to discover patterns in data which are so obscure as to be imperceptible to researchers and standard methods.  19  •  The data exhibit significant unpredictable non-linearity.  Some advantages of using neural networks as a modelling tool include the following.  •  No prior modelling information is needed. No knowledge about the relationships between inputs and outputs is required.  A neural network can cope with discontinuities in the process.  •  The cost in both time and effort of the development and validation of a model can be minimized, as it can take considerably less time to develop a neural network model than it would to develop a mechanistic model of the same process.  ••  Being least squares-based, neural networks are particularly tolerant of imprecise or noisy data. They tend also to undergo graceful degradation rather than catastrophic failure as they move outside their area of applicability.  As with any other technique, neural networks have weaknesses (Masters, 1993, Pritchard, 1995).  •  Neural networks give no indication as to the necessary inputs and outputs. It is up to the user to determine these beforehand. The choice of inputs and outputs is important as the network will attempt to develop a relationship between these, and if the wrong variables are chosen, then incorrect relationships will be developed.  •  It is difficult to develop the best neural network architecture. An infinite number of neural networks  20  can be developed for each set of data.  •  The relationships developed by a neural network depend on the training data being used. A different set of training data will result in a different set of weights being developed.  *•  The output of a neural network extrapolating beyond its training range can be very suspect.  ••  If the training data are not uniformly distributed over the entire training range, it is possible that the network may have localized regions of poor fit, even when the network is not extrapolating.  •  Neural networks typically do not include any first principles knowledge. This can result in the network predictions conflicting with known conservation principles (Kramer et al., 1992). For example, mass and heat balances that apply to the system may no longer be satisfied.  One of the general criticisms of neural networks is that they do not contain the relationships between the process inputs and outputs in the sense of mechanistic models. Further, all the knowledge available about a process is generally ignored if a neural network is applied as the only modelling method. However, a mechanistic model combined with neural networks can overcome the weaknesses of both approaches and provide a reasonably accurate tool. In reality, it is desirable to incorporate as much process knowledge as possible into a neural network model. In such cases they are capable of extracting a certain amount of information from the data used for training. However, the advantages of neural networks enable them to be used highly efficiently in hybrid models which might moderate their weaknesses.  21  Hybrid models  It is possible to develop a number of models for any process. No unique correct model exists. Denn (1986) suggests that the simplest model should be used, providing it is consistent with the available experimental data and the end use. Each modelling approach has its own advantages and weaknesses and the best approach depends on the application of concern.  By taking into consideration both weaknesses and strengths of both previously discussed model types, mechanistic and stochastic, these two approaches can be combined in order to create a hybrid model. There are two main reasons for using a hybrid model. Thefirstreason is concerned with increasing the use and accuracy of existing mechanistic models. By combining them with a black-box model that is used to model the least known or lesser understood parts of the process, it will minimize reality-model mismatches. The second reason is to overcome some of the perceived weaknesses associated with black-box models and to try to use them to better understand the mechanistic models. Some applications of hybrid models have been in situations where thefirstprinciples model (mechanistic model) was a simplification of the rigorous model (Pritchard, 1995). By simplification it is meant that some equations are included, but without the detailed structure of the rigorous model.  A black-box model can be used to extend the capabilities of a hybrid model. It can help qualify and quantify additional variables related to the process, which are not included in the mechanistic model (Sreckovic at al., 1999). Thus, a black-box model can be used not only to quantify, but also to improve understanding of missing parts of a mechanistic model.  As already discussed, a more recent and potentially more versatile and powerful form of black-box model is an artificial neural network. The neural networks applied in the different hybrid models described in the  22  literature (Kramer et al., 1992; Johansen and Foss, 1992; Psichogios and Ungar, 1992a and 1992b; Pulley etal., 1994; Fu and Barford, 1994; Thibault and Grandjean, 1990; Su etal., 1992a, 1992b; Tyagi etal., 1993; Cote et al., 1995; Zhao et al., 1997) have been used either to predict one or more mechanistic model parameters or to minimize the discrepancy between the mechanistic model and real data. These models showed a number of advantages compared to using either afirstprinciples or neural network model (Pritchard, 1995).  •  The performance of the hybrid model was generally shown to be superior to that of a pure neural network.  •  A hybrid model can be superior to purely mechanistic models, especially when complex real processes are being modelled. Even unsophisticated mechanistic models can be included as the first principles model within a hybrid model.  •  Maximum use is made of process understanding. This reduces the load on the neural network as it is only required to model a part of the process. When the neural network component is used for parameter estimation, the resultant hybrid model performs better than alternative state and parameter estimation strategies such as, for example, Kalman filtering.  •  It is possible to train the network component in regions where the calibration data are sparse, as fewer data sets are needed for a hybrid model than for a pure neural network model.  •  Model adaption is possible and more likely to succeed than for a pure neural network model, as the error sources are reduced and thus any changes are focussed rather then being spread over the entire model.  23  2.2  Optimization techniques  The problem of proper model parameter estimation (model calibration) is a very important issue in developing models, especially if models consist of a large number of parameters and are complex in nature. Thus, the choice of an appropriate calibration technique is a significant task.  Mathematically, the solution to an optimization problem is to (1)findthe optimum (maximum or minimum; minimum will be used in further discussion) value of an objective function f(X) in a given domain V(X) and given constraints c(X)<=0 and cl(X)=0, and (2) tofindthe values X' of the objective function variables X (vector X={x,, x , x j ) , for which the objective function extreme value is reached. The strict definition 2  of the global optimum X' of the objective function f(X) is AX')<AX)  (2.1)  X'*X  (2.2)  for all  in the domain V(X) (Lasdon, 1970).  If the strict inequality of Equation 2.1 holds for the condition given in Equation 2.2, the minimum is said to be unique. If Equation 2.1 holds only for all X in some neighbourhood of X', then X' is said to be a local or relative minimum of f(X), since X' is only the best point in the immediate vicinity, not in the whole domain.  If f(X) is continuous and has continuousfirstand second partial derivative for all X, the necessary conditions for a local minimum are -^=0,  i = l,2,...,»  (2.3) 24  and that the matrix of second partial derivatives evaluated at X' be positive semidefinite. Any point X' satisfying Equation 2.3 is called a stationary point f(X). Sufficient conditions for a relative minimum are that the matrix of second derivatives of f(X) evaluated at X' be positive definite and Equation 2.3. holds (Lasdon, 1970).  The set of criteria for choosing an optimization technique depends on the aims of the research. The criteria proposed by Schwefel (1981), Foulds (1981) and Bunday( 1984) are: accuracy, capability to converge to any minimum, capability to converge to the global minimum, capability to explore large solution spaces and computer time required to converge.  Accuracy.  A quest for accuracy is an obvious criterion, but does not have to be the major one. Sometimes,  a slightly less accurate method could be accepted if it satisfies other criteria.  Capability to converge.  Some combinations of objective functions and applied numerical methods cannot  provide convergence, which might lead to great loss of computational time. This criterion is quite difficult to assess for complex objective functions before the process starts, since theoretical mathematical tools to prove convergence are not applicable on complex solution spaces.  Capability to converge to the global minimum.  Certain optimization methods, such as those developed for  smooth objective functions, cannot deal with complex objective function solution spaces, containing a number of local minima. Such methods keep searching in the vicinity of the local minima and often are not capable of escaping to find the global minimum.  Capability to explore large solution spaces. If one of the research goals is to explore broader solution spaces  in order to, for example,findnew values for calibrated parameters, the method should be able to build up  25  an overall picture of the search space.  Computer time required to converge.  Even though modern computers are quite fast, complex objective  functions might require significant amounts of computational time for evaluation and the applied numerical method may need a huge number of objective function evaluations, so that computer time concern is not completely out of the picture.  The general classes of optimization models are classified into three groups:  •  models that meet the necessary and sufficient conditions for optimality based on the analytical representation of these conditions (analytical methods),  *•  models that meet the necessary and sufficient conditions for optimality based on numerical representations of these conditions: linear programming, dynamic programming, hill climbing strategies (gradient methods, Newton methods), and  •  iterative search methods or heuristic methods: random search methods, iterated search, simulated annealing, evolutionary strategies.  The first group, analytical methods, attempts to reach the optimum in a single step, without tests or trials. It is based on the analysis of the special properties of the objective function at the position of the extremum. The second and third groups approach the solution iteratively, at each step improving the value of the objective function.  For the most complex problems, such as that researched in this study, analytical methods cannot be applied  26  since the objective function is too cumbersome to be presented analytically, and/or the assumptions are not satisfied under which necessary conditions for extrema can be stated, and/or there are difficulties in carrying out analytical derivatives, and/or the equations representing the problem are not readily soluble. Thus, the only feasible approach for such problems are numerical and iterative search methods.  There are many numerical optimization techniques, some of which are only applicable to limited domains, like for example, linear programming or dynamic programming. Linear programming is out of the question for an objective function that cannot be linearized. Dynamic programming is a method for solving serial multi-stage systems that are characterized by a process which is performed in stages. Rather than attempting to optimize some performance measure by looking at the problem as a whole, dynamic programming optimizes one stage at a time to produce an optimal set of decisions for the whole process (Foulds, 1981). This method for solving control problems is applicable only where the overall objective function is the sum of the objective functions for each stage of the problem and there is no interaction between the stages (Bellman, 1957).  The major methods from the second and third group are discussed briefly.  Hill climbing strategies  A number of different methods for optimizing well-behaved continuous functions have been developed (Bunday, 1994; Schwefel, 1981) under the name of hill climbing strategies. The name hill climbing comes from the method of searching for a maximum that corresponds closely to the intuitive way a sightless climber might feel his way from a valley up to the highest peak of a mountain. All the hill climbing strategies assume a degree of smoothness in the objective function. They do not converge with certainty to the global minimum, but at best at one of the local optima, or sometimes only to a saddle point. The hill climbing methods may  27  be one- or multi-dimensional.  One-dimensional strategies  are concerned only with objective functions that depend on only one variable.  These strategies would be of little interest, were it not for the fact that many of the multi-dimensional strategies make use of one-dimensional minimizations in selected directions, referred to as line searches. Anyway, these strategies are not directly applicable to multi-dimensional objective functions.  Multi-dimensional strategies  can be broken down to three sub-groups: direct search strategies, gradient  strategies and Newton strategies. The direct search strategies need only the value of the objective function passed to them in the process of optimization and are quite convenient for complex, non-continuous objective functions. The gradient strategies require thefirstpartial derivative of the objective function, while the Newton methods make use of the second partial derivatives of the objective function.  Random search methods  The brute force approach for a difficult function is a random, or an enumerated search. Points in the search space are selected randomly, or in some systematic way, and their fitness evaluated. This is not a very intelligent strategy and is rarely used by itself.  Iterated search  Random search and gradient search may be combined to give an iterated hill climbing search. Once one peak has been located, the hill climb is started again but with another, randomly chosen starting point. This technique has the advantage of simplicity and can perform well if the function does not have too many local minima. However, since each random trial is carried out in isolation, no overall picture of the shape of the  28  domain is obtained. As the random search progresses, it continues to allocate its trials evenly over the search space. This means that it will evaluate just as many points in regions found to be of low fitness, as in regions found to be of high fitness. By comparison, genetic algorithms start with an initial random population and allocate increasing trials to regions of the search space found to have high fitness. This is a disadvantage if the maximum is in a small region, surrounded on all sides by regions of low fitness (Beasley et al., 1993, Janson and Frenzel, 1993). This kind of function is difficult to optimize by any method.  Simulated annealing  This technique was first introduced by Kirkpatrick in 1982 and an overview is given by Rutenbar (1989). It is essentially a modified version of hill climbing. Starting from a random point in the search space, a random move is made. If this move takes to a lower point in the solution space, it is accepted only with probability p(t), where t is time. The function p(t) begins close to 1, but gradually reduces towards zero - the analogy being with the cooling of a solid. Initially, any moves are accepted, but as the 'temperature' reduces, the probability of accepting a negative move is lowered. Negative moves are essential sometimes if local maxima are to be escaped, but obviously too many negative moves will simply lead away from the maximum anyway.  Like the random search, simulated annealing only deals with one candidate solution at a time, and so does not build up an overall picture of the search space. No information is saved from previous moves to guide the selection of new moves. This technique is still the topic of much active research (e.g. fast re-annealing, parallel annealing).  Evolutionary algorithms  Evolutionary algorithms are a class of direct, probabilistic search and optimization algorithms gleaned from  29  the model of organic evolution. The main representatives of this computational paradigm are genetic algorithms (GAs), evolution strategies (ESs) and evolutionary programming (EP), all of which were developed independently (Back, 1996).  These algorithms are based on models of organic evolution, i.e. nature is the source of inspiration. They model the collective learning process within a population of individuals, each of which represents not only a search point in the space of potential solutions to a given problem, but which also may be a temporal container of current knowledge about the "laws" of the environment. Over many generations, natural populations evolve according to the principles of natural selection and 'survival of thefittest',which is the base for the widely known Darwinian evolutionary process. By mimicking this process, evolutionary algorithms are able to evolve solutions to real world problems if they have been suitably encoded. The starting population is initialized by an algorithm-dependent method, and evolves towards successively better regions ofthe search space by means of (more or less) randomized processes of recombination, mutation and selection. The environment delivers quality information (fitness value) for new search points, and the selection process favours those individuals of higher quality to reproduce more often than lower quality individuals. The recombination mechanism allows for mixing of parental information while passing it to their descendants, and mutation introduces innovation into the population. The theoretical background for evolutionary algorithms can be found elsewhere in the literature (Back, 1996; Davis, 1991; Goldberg, 1989; Holland, 1975).  While evolutionary programming is used as an optimization method to generate a computer program which calculates a certain input-output function, or for applications involving continuous parameter optimization problems, genetic algorithms and evolution strategies are sometimes both called genetic algorithms for their similar and interchangeable operators and are used for discrete parameter optimization problems. They are called genetic algorithms throughout the present study.  30  One major area of usefulness for genetic algorithms lies in testing and fitting quantitative models. Genetic algorithms can be useful for two largely distinct purposes in this area. One of them is the selection of parameters to optimize the performance of a system. Usually it is concerned with a real or realistic operating system, such as a distribution pipeline system, traffic lights, travelling salesmen, allocation of funds to projects, scheduling, handling and blending of materials or similar problems dealing with optimizing objective functions. Such operating systems typically depend upon decision parameters which can be chosen by the system designer or operator, or which arise as a consequence of operational changes. In realistic systems, the interactions between the parameters are not generally amenable to analytical treatment, and the researcher has to resort to appropriate search techniques (Everett, 1995).  The second potential use for genetic algorithms lies in model parameter estimation. Quantitative models generally include one or more parameters, whose values have to be estimated adequately to fit the model to the data. Some scientific research consists of the iterative process of building models, collecting data, testing the models and discrepancies between the modelled and real data, modifying the models and then repeating the process until the problem is solved. Genetic algorithms are used to test and fit quantitative parameters that optimize a fitness function. However, in contrast to the situation where GAs are used to maximize the performance of an operating system, for modelling applications they are used to find parameters that minimize the misfit between the model and the data. The fitness function, or misfit function, is some appropriate function of the difference between the observed data values and the data values that would be predicted from the model. Optimizing involvesfindingparameter values for the model that minimize the misfit function.  Compared to the traditional optimization techniques (some of which were used for calibration of activated sludge systems in literature reports), GAs have several advantages that suit the complex objective function environment (Back, 1996; South et al., 1993; Beasley et al., 1993; Davis, 1991).  31  •  There is evidence from a vast number of applications that GAs are robust, in the sense that they give reasonable performance over a wide range of different topologies.  •  GAs work well with unimodal or multi-modal, continuous or discontinuous objective functions.  •  GAs search from a population of solutions, rather than a single solution point. Therefore, they are able to explore a much greater part of the search space, and are less likely to be trapped in local minima.  •  GAs use available scoring information to assess the value of potential solutions, rather than auxiliary knowledge, e.g. derivatives. Traditional methods of optimization, such as steepest descent or other gradient-based methods, rely upon such auxiliary information and so cannot be applied if a nondifferentiable function is to be minimized  •  GAs use probabilistic rather than deterministic transition rules. This means that they are less likely to get stuck in local optima or to be led astray in the presence of noise. The success of deterministic methods often depends on a good choice of starting point, since the routine followed stems explicitly from this, but using probabilistic rules to find successive points for resting reduces this dependence, increasing robustness.  •  GAs are good where small changes in the parameters can cause a large change in the total objective function or vice versa. Classical optimization techniques search for the maximum slope, which might not be the right direction, because it can lead to local minima (Janson and Frenzel, 1993; Murray, 1994). GAs do not rely on the slope, so that they are less prone to become caught in local minima.  The GAs are not recommended for the objective functions that were used as blue prints for traditional methods. The standard methods are better on the functions for which they were designed (De Jong, 1975), such as smooth, quadratic-type and noise-free functions. By comparison, for example, to iterated search routines, genetic algorithms start with an initial random population and allocate increasing trials to regions of the search space found to have high fitness. This is a disadvantage if the maximum is in a small region,  32  surrounded on all sides by regions of low fitness (Beasley et al., 1993; Janson and Frenzel, 1993). This kind of function is difficult to optimize by any method.  Although there is no guarantee that the GAs willfindthe global optimum, they are less likely to become entrapped in a local minimum of a complex objective function than the hill climbing strategies. As opposed to the hill climbing methods thatfindthe global minimum within the limits of convergence, if they reach the valley of the global minimum, the GAs are more prone to stop near the absolute bottom of the valley, but further from the global minimum than the hill climbing methods. However, as discussed, GAs are more likely tofindthe valley of the global optimum than the hill climbing methods for complex multi-dimensional objective functions.  Also, as opposed to the hill climbing methods, the GAs do not provide auxiliary information on the shape of the objective function and on the sensitivity of the objective function to the changes of the objective function variables. The hill climbing methods supply this information by analysing the objective function values and the values of the objective function variables for each iteration.  Generally, genetic algorithms are applied in the following cases.  •  The space of potential solution is large, defying exhaustive or other intensive search procedures.  »•  The relationship between the dependent and independent variables is highly non-linear, so that proliferation of local optima is a hindrance to determining the true optimum.  •  Noise is present, which may be a big hindrance when deterministic solution-finding strategies are used.  •  The objective function is multi-dimensional and/or does not provide auxiliary information, e.g. derivatives.  33  Regarding the computer time usage, the present study showed (Chapter 6) that GAs calibration runs required fewer objective function evaluations on a more complex objective function, than any of the hill climbing methods tested by Schwefel (1981), who used objective functions for which those methods were developed.  As discussed in more detail later (Section 4.3.1), the features of genetic algorithms put them at the top of the list of the optimization techniques suitable for calibrating activated sludge systems.  2.3  Introduction to activated sludge systems  A literature review was conducted both for the existing municipal and industrial activated sludge models, because the existing models were used as a basis for a pulp and paper models.  A typical wastewater treatment plant consists of two solid-liquid separation units (clarifiers), and a bioreactor. One of the separation units, the primary clarifier, is placed at the head of the plant and the other, the secondary clarifier, at the end of the system. The bioreactor is situated between the clarifiers (settlers). A typical activated sludge process flow sheet is presented in Figure 2.1 (Baker, 1994).  PRIMARY CLARIFIER  \ INFLUENT  ACTIVATED SLUDGE REACTOR / AIR BUBBLES  THICKENED SLUDGE  '  SECONDARY CLARIFIER  I "  \ J  EFFLUENT  \ /  *„s  PRIMARY SLUDGE  RETURN ACTIVATED SLUDGE (RAS) RECYCLE  SLUDGE WASTAGE  Figure 2.1: Typical activated sludge process flow sheet (partially from Baker, 1994)  34  The role of an activated sludge reactor in a wastewater treatment plant is to remove organic compounds, although it can also remove inorganic components from the treated wastewater. The removal is achieved by the action of microorganisms using organics as a food and energy source. Both soluble and particulate organic material is removed in the bioreactor by the action of microorganisms, which results in an accumulation of biomass.  The primary clarifier removes solids from the influent stream, while the secondary clarifier separates the biomass from the mixed liquor, creating a clear effluent. The majority of the biomass settled in the secondary clarifier is recycled to the activated sludge reactor to enhance the removal rate, reduce the time the influent has to spend in the activated sludge reactor (hydraulic retention time - HRT), and consequently reduce the size of the reactor. The excess settled biomass is wasted from the system.  2.4  Activated sludge mathematical models  The activated sludge process has found wide application as an effective means of wastewater treatment. However, the lack of understanding ofthe true mechanisms ofthe biochemical processes involved has always been the major limitation of effluent quality control in activated sludge systems. As the process evolved, efforts to overcome operational difficulties have mostly been made on a trial and error basis, with very little input from fundamental principles. Modifications introduced as corrective measures to specific problems have occasionally met with success in particular situations. The absence of rational design parameters has limited their practical evaluation in terms of applicability and process optimization. This has led to a need for mathematical models, incorporating fundamental microbial mechanisms into a rational engineering description of the process. An evolution in modelling has occurred, from the simple model described by McKinney (1962) to complex models such as the Activated Sludge Model No.l (Henze et al., 1987) and Activated Sludge Model No.2 (Henze et al., 1995). The latter model deals with carbon, nitrogen and  35  phosphorus removal and includes 17 components and 28 processes.  Depending on the process understanding, the modelling of a system can take three main approaches, all of which have been applied to the activated sludge process with varying success. The approaches are:  •  stochastic modelling,  »•  deterministic/mechanistic modelling, and  •  hybrid modelling.  The following paragraphs review the literature for each approach.  2.4.1 Activated sludge stochastic models Stochastic models developed to explain the behaviour of municipal wastewater treatment systems (MacGregor, 1973; Berthouex et al., 1975a; Berthouex et al., 1975b; Berthouex et al., 1978; Berthouex and Box, 1996) have met with limited success. The main reason was that it was difficult to establish an input/output pattern of system behaviour without considering the nature of the processes occurring within the system. Difficulties in using a stochastic model to represent an industrial activated sludge system have also been reported by Debelek and Sims (1981). Stochastic models have been found to describe effectively the influent flow and loading patterns to the treatment plant using a time-series approach, but problems arise while attempting to model the input/output relationships between different parameters in the biological treatment system. Development of these models to estimate organics removal proved difficult, since in many cases there was no significant difference in effluent quality despite varying influent concentrations of organic material. However, Novotny et al. (1991) showed that combining deterministic and stochastic elements could produce time series models capable of providing better estimates of the system relationships, although only  36  for systems that could be presented linearly. The same study reported that the stochastic approach could be successfully applied to a biological phosphorus removal process, because it tended to exhibit more variation in effluent quality. It was indicated that the model could only be applied to the particular system examined and the specific mode of operation studied. It could not be applied readily to another activated sludge system or to a different operating strategy for the same plant.  Capodaglio et al. (1991) reported an application of time series analysis methods and neural networks to predict sludge volume index values. The proposed model showed good results for the system from which the calibration data were derived. Boger (1992) modelled the behaviour of the Shafdan WWT plant (Tel Aviv, Israel) by training a neural network from a database that contained weekly averages of 106 variables from the first two years of operation. The model showed a good response for the effluent ammonia concentration for the time period of 105 data points (105 weeks). The research showed the potential of neural networks in this type of application, but reported only the results on ammonia for weekly data averages.  Therefore, despite the existence of successful applications, the utility of stochastic models for describing the relationships between influent and effluent quality and the operational variables in activated sludge systems can be considered more limited than that of mechanistic models, whose description follows.  2.4.2  Activated sludge deterministic models  Deterministic models try to relate the system inputs to system outputs through a set of process equations that mathematically mimic the transformations occurring in the system. To date, most of the work in activated sludge system modelling has been directed to establish models for municipal wastewater treatment systems. Little research has been done in developing industrial wastewater treatment models. The following literature review is, therefore, mostly concerned with municipal models. However, industrial models are also reviewed.  37  Municipal wastewater treatment models  Historical development  Before any mathematical model o f activated sludge systems was proposed, the behaviour o f the system was explored experimentally. The concept o f using supplemental aeration for sewage purification dates from the 19th century when apparently engineers started to pay more close attention to the design o f the water purification facilities. Orhon and Artan had provided extensive bibliography and review on historical development o f activated sludge treatment models from the early beginnings up to the state-of-the-artmodels (Orhon and Artan, 1994). Their historical review is used as a basis for the literature review in the following paragraphs.  E a r l y experiments showed the possibility o f removing "the more readily putrescible matter" from sewage (Massachusetts Institute o f Technology, 1911), with appreciable nitrification (Massachusetts State Board o f Health, 1912). In these experiments, no importance was attached to the formation o f a "humus deposit" caused by the gradual decomposition o f the organic matter in sewage, except that the deposit had to be disposed o f before a new experiment could be started. Experiments at the Lawrence Experiment Station in Massachusetts (Clark and Adams, 1914) proved that aeration o f sewage for a short time produced a clear, non-nitrified effluent. Ardenn and Lockett (1914), proposed multiple uses for the deposit (settled biomass, sludge). This was the first introduction o f sludge recycling. They saved the flocculent solids and studied the effect o f their repeated use in sewage treatment by aeration. These flocculent solids, called by Ardenn and Lockett, activated sludge, increased the purification potential o f simple aeration. The effect depended upon the proportion o f activated sludge to treated wastewater. They discovered that with local sewage, an aeration period o f 6 to 9 hours and treatment with activated sludge would provide clear effluent. Further experiments established some design criteria for tank sizes and aeration periods. The performance o f the first activated  38  sludge plants was satisfactory. Due to increasing sewage loads, process modifications such as tapered aeration, step aeration, high rate activated sludge, extended aeration, and contact stabilization were subsequently introduced.  Even though the activated sludge process was shown to work successfully, its actual mechanism was not understood. Ardenn and Lockett (1914) speculated that physical, chemical and biological mechanisms might be responsible in varying degrees for the treatment of wastewater. A biological mechanism was introduced later on, by Buswell and Long (1923). They reported that activated sludge floe was made of a synthetic, gelatinous matrix, enclosingfilamentousand unicellular bacteria, as well as various protozoa and some metazoa. Their experiments suggested that purification was accomplished by ingestion and assimilation of organic matter from sewage and synthesis into the living material of the floe. The process was considered to be a change in soluble and colloidal organics to a state that would settle out.  However, recognition of the biological nature of the process did not fully explain the mechanism of organic matter removal. Biological oxidation was accepted as the ultimate step, but the then-existing theory that natural bacterial purification was a slow process requiring days or hours (Theriault,1927) led several investigators to propose the existence of other initial steps in the process. The observation of rapid initial removal rates, and large surface areas exposed by the activated sludge mass in aeration tanks, led to the conclusion that adsorption was a major removal mechanism. Since the adsorption theory postulated that activated sludge was an adsorbent, it was felt that its capacity to remove organic matter should remain unaltered without oxygen.  However, experiments showed that the exclusion of air was found to impair the removal ability of sludge, especially at high sludge concentrations. Both Goldthorpe (1936) and Williams (1940) reported that initial removal of organic matter was always accompanied by oxygen uptake, and that the rate of oxygen adsorption  39  was observed to reach the highest levels during thefirst30-60 minutes of contact, and to gradually decrease after that to a constant level. As research continued, the wastewater "pollution" content was indirectly represented by the oxygen demand. A deeper analysis of the biological removal mechanism of organic compounds from wastewaters has revealed that much of the difficulty in providing an acceptable conceptual process description could be associated with the approach that viewed the entire organic matter content of sewage as a single substrate characterized by collective parameters such as biochemical oxygen demand (BOD) or chemical oxygen demand (COD). This relatively simple approach worked for some time, but it was ultimately developed further. A new concept emerged from observation of two main substrate components in wastewaters (Dold et al., 1980; Ekama, and Marais,1984):  •  a readily biodegradable substrate, composed mainly of soluble compounds which can be readily taken up by cells for metabolic activities, and  »•  a slowly biodegradable substrate consisting of soluble and colloidal compounds with large and complex structure, requiring hydrolysis before adsorption.  This concept formed the basis for the IAWPRC Task Group's Activated Sludge Model No.l (Henze et al., 1987) developed for mathematical evaluation of the activated sludge process. It also provided a basis for a better understanding of wastewater characterization that now includes inert components and residual microbial products, in addition to the biodegradable elements. Although it has been available since 1987, the ASM1 is still considered to be the state-of-the-art in activated sludge models that do not consider biological phosphorus removal.  40  Model genesis  There has been a long time between the promotion of the activated sludge concept and the establishment of a theoretical framework describing the process. The conflicting nature of the many hypotheses explaining the mechanism of the process, the difficulties of expressing them in discrete mathematical models and the nature of the systems for which the models were developed, were the main reasons for the slow transition. It has been recognized that the activated sludge operation depended upon biological activity, but this relationship was entirely neglected in early design practice (Orhon and Artan, 1994). At first, aeration tanks were sized in terms of volumetric sewage loads according to arbitrary conventions in aeration period and without any emphasis on the organic matter content of the wastes. As the significance of BOD was recognized, an attempt was made to size aeration basins based on the volume for each unit mass of BOD applied. At the time, no significance was given to the nature of the biomass in the system. The need for a reliable basis for performance prediction in activated sludge systems led several investigators to propose mathematical models describing the substrate removal mechanism. Some suggested formulas that were based almost entirely upon laboratory studies with synthetic wastes, and sometimes on pure cultures of microorganisms, which was not entirely correct. Other proposed models were empirical and derived entirely from performance datafromexisting plants.  Despite the diversity of the formulas, they can be classified in two general groups (Orhon and Artan, 1994).  Thefirstgroup of models was developed to express the  different hypotheses that were proposed to explain  the removal of organic matter by activated sludge. These were models (Katz and Rohlich, 1956; Weston and Stack, 1963) which proposed that the effluent BOD concentration would be directly proportional to the influent BOD concentration and indirectly proportional to the mass of activated sludge. Some authors tried to explain BOD removal by using a Langmuir-type adsorption isotherm (Gram, 1956) or by a first-order rate  41  expression, similar to that of BOD removal kinetics (Chudoba, 1967). These models essentially did not describe the processes occurring in the reactor, but were used as a basis for further research.  The second group  regarded activated sludge as a continuous culture of microorganisms growing in  wastewater on a mixture of organic and inorganic substrates. It was felt that the removal mechanism could be best described by adopting the kinetics of microbial growth. This approach has been widely accepted, further developed and used as a basis for modern models. The most commonly recognized rate expression for microbial growth is the well known Monod expression, as an empirical deduction from pure culture studies: dX dt  S =  u  v  m « - p - r *  (2.4)  K+S  m d X  S r  1  rVax'  K  +  (2.5)  s  where X is the microorganism concentration, S is the growth-limiting substrate concentration, K is the halfs  saturation constant, p  raax  is the maximum growth rate, and p is the growth rate.  The expression was originally proposed to describe the enzymatic reaction rate as a function of the substrate concentration. Monod adapted the relationship to model microorganism growth rate as a function of the limiting substrate concentration. The expression was originally presented as valid for a single substrate and a single microbial culture, but today it is used in the original or slightly modified form to describe mixed cultures in practically every wastewater treatment model. It is still considered as an appropriate engineering approximation of the real process. The main reason for using it lies in the Monod kinetic's simplicity in presenting the complexity of the effect of substrate concentration on microbial growth. The concept of  42  multiple substrate kinetics was introduced four decades later (Dold et al., 1980) for the removal of readily and slowly biodegradable substrate fractions, but the Monod expression for the removal of readily biodegradable substrate remained unchanged. Several authors (Garett and Sawyer, 1952; Tench and Morton, 1962; Pearson, 1966) have experimentally demonstrated the applicability of the Monod expression.  The same ideas and elements derived from Monod's microbial growth kinetics (Food/Microorganism mass ratio, sludge age, specific substrate removal rate, reactor hydraulics) were used as a base for the traditional approach to activated sludge modelling. The approach proposes three main components of the system: BOD or COD, biomass and dissolved oxygen and two processes: microbial growth and decay. Some modifications included nitrification and denitrification processes and accompanying components. The main inadequacies of the traditional modelling approach were summarized by Orhon and Artan (1994) as the following.  •  The traditional approach describes substrate indirectly as BOD or COD, and biomass as volatile suspended solids, which is only a relatively rough approximation of the real fractions of substrate and biomass involved in the process.  •  The processes of growth and endogenous decay do not provide a complete and correct mechanistic description of the complex relationships and conversions among process components.  •  Microbial growth is supported only by the original substrate in the effluent, and the residual organic material in the effluent is assumed to be a part of the original substrate. Many studies proved otherwise, explaining that the effluent COD is mostly composed of organic matter released through microbial activities in the reactor.  The introduction of additional components and processes created a need for more accurate modelling.  43  Washington and Symons (1962) reported experimental evidence that biomass contains a fraction which is inert to microbial activity. This was supported by McKinney (1962), who labelled that fraction as the particulate residual organic matter in bacterial cells released to the solution during endogenous metabolism. Eckhoff and Jenkins (1967) proposed the use of COD as a substrate parameter to better visualize the electron equivalence between carbon source, biomass and oxygen. Their experimental results enabled them to calculate a soluble inert fraction of the influent COD that is resistant to microbial degradation. Grady and Williams (1975) demonstrated that the soluble COD in the process effluent was not the remaining portion of the influent substrate that was depleted, but was presumably organic matter released through microbial activity. A significant portion of this soluble organic matter was refractory, or at least slowly biodegradable, for the usual range of activated sludge operational settings (Chudoba, 1985).  Some of the most important work concerning modelling of the activated sludge process has been done at the University of Cape Town, South Africa, where the University of Cape Town model (UCT model) was developed. The UCT model established the modern approach in modelling the activated sludge process. Marais and Ekama (1976) presented a steady state aerobic model for carbonaceous and nitrogenous conversion and removal. They accepted the Monod expression as a linkage between the biomass growth rate and substrate concentration. They also proposed that the influent carbonaceous material be divided into three fractions: biodegradable, non-biodegradable particulate, and non-biodegradable soluble. The influent nitrogen was divided into four fractions: non-biodegradable soluble, non-biodegradable particulate, biodegradable organic, and free/saline ammonia. The Monod approach was used to describe the conversion of ammonia to nitrate. The BOD parameter was rejected and instead, COD was proposed as the electron donating capacity in its equivalent form. The oxygen utilization rate (OUR) was also recognized as the most sensitive parameter against which to test the behaviour of proposed models of the activated sludge process. Later, the same authors (Ekama and Marais, 1979) divided the influent COD into two more fractions: readily and slowly biodegradable. The readily biodegradable COD was presumed to consist of simple molecules that  44  are able to pass through the cell wall and immediately be used for synthesis by the organisms. The slowly biodegradable COD, which consisted of larger complex molecules, was assumed to be enmeshed by the sludge mass, adsorbed and then hydrolysed by extracellular enzymes before being transferred through the cell wall and used for metabolism (Orhon and Artan, 1994). Another concept was also introduced, the deathregeneration hypothesis. This was an attempt to explain the different reactions taking place in the organism die-off phase. The traditional endogenous respiration concept proposed that a fraction of the organism mass disappeared to provide energy for maintenance. However, practical experiments showed that the endogenous respiration model was not satisfactory. In the death-regeneration model, the cell material was released through lysis. One fraction was non-biodegradable and remained as a non-biodegradable residue while the remaining fraction was considered to be slowly biodegradable. It could thus return to the process and be used by the remaining organisms as substrate through hydrolysis (Orhon and Artan, 1994; Lishman and Murphy, 1994).  The model that is still considered the state-of-the-art model of the activated sludge process, the Activated Sludge Model No.l (ASM1) was developed by Henze et al. (1987). The model was based on the traditional approach and on the work of a number of researchers (McKinney, 1962; Washington and Symons, 1962; Weddle and Jenkins, 1971; Eckoff and Jenkins, 1967; Grady and Williams, 1975; Marais and Ekama, 1976; Ekamaetal., 1980; Doldetal., 1980; Dold and Marais, 1984; Clift and Andrews, 1981; Ekama and Marais, 1984; Chudoba, 1985). The main goal was to present the simplest model that could predict the performance of single sludge systems carrying out carbon oxidation, nitrification and denitrification. The proposed model was able to predict the dynamic response of municipal activated sludge systems to various influent and operating conditions. Many basic concepts were adapted from the UCT model. The standard Monod relationship was used to determine the growth rate of both heterotrophs and autotrophs. The COD was selected as the most suitable parameter for defining the carbonaceous material. The model consisted of 13 components describing substrate, biomass and terminal electron acceptors, 8 processes occurring in the  45  reactor, and a total of 19 stoichiometric and kinetic parameters. The process kinetics were mostly based on the traditional approach, but were adjusted for more components.  There were several differences between the ASM1 and the UCT model. First, enmeshed slowly biodegradable substrate was not considered to be adsorbed on the organism mass, but directly hydrolysed and released to the bulk liquid as readily biodegradable substrate. Second, the fate of organic nitrogen and the source of organic nitrogen for synthesis were treated differently. These allowed the 14 processes of the UCT model to be reduced to 8. An evaluation of the two models (Dold et al., 1991) showed similar predictions under most conditions when properly calibrated. The concept of switching functions was also introduced in the ASM1. These were used to turn specific process rates on and off, depending on the environmental conditions (lack of oxygen, nitrogen or phosphorus). The model promoted the structural presentation of biokinetic models via a matrix format, which was easy to read and understand. Although the ASM1 contains much of the current knowledge of biological wastewater treatment reactions (except bio-P removal), a number of drawbacks exists. Some have been recognized by the authors of the model and some have been shown in model applications. The major difficulties were summarized by Jeppsson (1993).  •  Non-unique solutions for model parameters exist. The model can produce identical results for different model calibrations.  •  Certain state variables and parameters are not directly measurable and therefore, it is very difficult to experimentally verify the biological interpretations.  »•  There is still a relatively poor understanding of some of the applied processes (eg. hydrolysis).  •  A very extensive characterization of the influent wastewater is required.  •  The mathematic model suffers from potentially problematic non-linearities (Monod expression, switching functions).  •  The model may be too complex for on-line control purposes.  46  •  The model does not consider temperature and pH dependency of the kinetic and stoichiometric coefficients used.  •  Highly sophisticated instrumentation and laboratory facilities may be required for calibration and verification purposes.  Several models including biological phosphorus removal also have been proposed (Wentzel et al., 1986; Dupont and Henze, 1989; Dold, 1992). The phosphorus removal process is often added as an extension to an earlier accepted model, for example, the ASM 1. As a logical extension of the ASM 1, the Activated Sludge Model No. 2 (ASM2) (Henze et al., 1995) was developed by inclusion of the biological and chemical phosphorus removal processes. The ASM2 consists of 19 components and 19 processes. Because of the complexity of the processes controlling phosphorus removal, any attempt to model them significantly enlarges the model, as can be seen in the ASM2. This implies problems in model calibration to any realistic set of data.  The most recent attempts to thoroughly explain the nature of the activated sludge process were focussed in two main directions. Thefirstapproach was to develop models describing details such as: 1) biosorption of soluble carbonaceous substrate (Novak et al., 1995); 2) estimation of the rate of slowly biodegradable COD hydrolysis (Mino et al., 1995); 3) the behaviour of nitrifying activated sludge systems influenced by inhibiting wastewater compounds (Nowak et al., 1995); and 4) bulking and scumming (Kappeler and Brodmann, 1995). The second approach involved a group of researchers who tried to improve the model response by improving the estimation of the activated sludge process parameters (Carstensen et al., 1995; Reichert et al., 1995).  47  Variable kinetics and stoichiometry  To start addressing one of the ASM1 drawbacks, the lack of temperature dependence, a thorough study by Sedory and Stenstrom (1995) resulted in a model of aeration basin temperature. Even though the proposed model does not use the ASM1 parameters as a function of temperature, the model was shown to be feasible in the prediction of aeration basin temperatures. However, the model application is limited due to the lack of temperature-dependent activated sludge parameters.  Some research has been done to define kinetic and stoichiometric parameters as a function of pH and temperature (Lallai et al., 1988; Helle and Duff, 1995; Helle, 1999). Lallai et al. (1988) researched the changes in maximum growth rate, yield coefficient and substrate uptake rate of a mixed culture growing on phenol at a series of pH values. Helle and Duff (1995) and Helle (1999) studied substrate uptake rate and acclimation of a bacterial culture growing on kraft mill pulp and paper wastewater at different pH and temperature values, as well as under transient pH and temperature conditions. Thefindingswere based on lab-scale experiments and are useful at least as qualitative guidance, if not quantitative, since the experiments were conducted on specific types of wastewater with specific input dynamics.  Calibration methods  Being multi-parameter models, modern activated sludge models are convenient targets for the application of optimization techniques for calibration. However, few formal attempts have been made to approach the calibration procedure as an optimization problem. The term formal is used here as in Beck and Chen (1995) and is meant as "the one that goes beyond the use of trial and error". Indeed, the literature shows that the models have been usually calibrated by trial and error, or an experimental procedure has been proposed to determine the model parameters. For example, Siegrist and Tschui (1992) used a trial and error method to  48  calibrate a proposed model. They developed several models, each with a different set of parameters tofitthe different model variables. The idea was to calibrate the model parameters partially and sequentially. COD removal calibration was accomplished by observing the oxygen consumption rate and the parameters estimated for COD removal were held constant in the calibration procedure for the other model parameters.  Lessard and Beck (1993) presented an evaluation of a dynamic model for carbonaceous and nitrogenous substrate removal with reference to a set of full scale plant data obtained from a 10-day monitoring program at the Norwich Sewage Works in England. The model employed a simplified version of the ASM1 for the aeration basin and a conventional empirical expression for clarification and conventional flux theory for thickening. The model was calibrated by a trial and error procedure. Larrea et al. (1992) proposed a calibration technique comprised of an experimental procedure and a curvefittingmathematical method to estimate the coefficients of the ASM1. The curve fitting method was an identification algorithm based on a recursive non-linear Kalman filter. To assess the validity of the proposed experimental procedure, modelsimulated results of measurable variables, generated from presumed real coefficients, were employed as real results by the identification algorithm.  Wanner et al. (1992) compared two alternative methods to calibrate the ASM1. Thefirstmethod was based on human professional experience and expertise and the parameters were determined one after the other by a sequential procedure. However, a thorough explanation of the procedure was not elaborated in the reference. In the second method, the parameters were determined by a mathematical optimization technique based on the Newton gradient method. The optimization objective function was a set of 25 oxygen respiration rate time-series that were obtained by lab batch tests. The study reported two problems. Thefirstone was that the lab experiments did not provide enough information for mathematical optimization to estimate all the parameters, and the second was that the employed optimization method was not always able tofindthe optimal set of parameters because of the existence of multiple local minima. Kappeler and Gujer (1992)  49  proposed experimental methodology to determine the ASM1 parameters by measuring oxygen respiration in a set of batch tests. Reichert and Wild (1995) used the computer program AQUASIM for the identification and simulation of aquatic systems with respect to parameter estimation of activated sludge models. The software was reported to perform the calibration procedure by using the weighted least squares method. According to the example given in the paper, it seems that a curve fitting method was used for sequential parameter calibration, where applicable. No formal optimization method was stated clearly. Cote et al. (1995) used the simplex-downhill method as an optimization technique to fit the ASM1 to an eight-day, full scale, municipal wastewater treatment (WWT) plant data extracted from the set used by Lessard and Beck (1993). The calibrated model employed 41 parameters. The study claimed good calibration results and reported the relative hybrid model errors on the whole set of the input data as 17% for aeration basin suspended solids concentrations, 16% for effluent COD, 46 % for effluent ammonia, 18% for aeration basin dissolved oxygen concentrations, and 3% for recycle suspended solids concentrations. The mechanistic model errors were higher and were reported as 47% for aeration basin suspended solids concentrations, 37% for effluent COD, 69% for effluent ammonia, 45% for aeration basin dissolved oxygen concentrations, and 7% for recycle suspended solids concentrations.  Full scale plant model validation  Most of the models proposed in the literature have not been verified against real full scale plant data, but rather against lab or pilot scale plant data. In fact, few examples have shown that the ASM1 can be used successfully to simulate full scale plant behaviour.  Lessard and Beck (1993) presented an evaluation of a dynamic model for carbonaceous and nitrogenous substrate removal, with reference to a set of full scale plant data obtained from a 10-day monitoring at the Norwich Sewage Works in England. The model employed a simplified version of the ASM1 for the aeration  50  basin and a conventional empirical expression for clarification and conventional flux theory for thickening. The model satisfactorily replicated the observed substrate removal and the production and the thickening of biomass, but fundamental weaknesses were apparent in the representation of the clarification function. The problem, however, was addressed by Cote et al. (1995) who used the same aeration basin model and the same set of input data, but replaced the clarifier model by the one-dimensional model proposed by Takacs and Patry (1991). Even though the new clarifier model did not improve the overall model response significantly, additional improvement was achieved by introducing a neural network. The neural network was employed as a black-box part of a hybrid model to improve the accuracy of the prediction of activated sludge mechanistic model variables such as effluent suspended solids, effluent total chemical oxygen demand, effluent ammonia, mixed liquor dissolved oxygen and volatile suspended solids in returned sludge. The neural network was employed to predict the error function for the effluent suspended solids, effluent COD, ammonia, mixed liquor dissolved oxygen and volatile suspended solids in returned activated sludge. The mechanistic model was optimized with full scale plant data from the Norwich Sewage Works in eastern England. Even though the model improvement was not quantified, the hybrid model qualitatively appeared to result in more accurate simulations of the treatment process phenomena.  A set of four case studies on real full scale wastewater treatment plants located in the UK and Canada was reported by Takacs et al. (1995). The models employed were the ASM1 for the aeration basins and onedimensional clarifier models by Takacs and Patry (1991) for the clarifiers. The effluent suspended solids response was reported to be good for the short term (2, 4 and 6 days) data sets, but the one-dimensional clarifier model could not accommodate the effect of extreme storm flows on clarification performance. For carbonaceous BOD removal, effluent ammonia and mixed liquor suspended solids (MLSS), the paper reported good agreement between simulated and actual data, although quantitative expression of the agreement was not given.  51  The same modelling approach was used by Rouleau et al. (1997) to evaluate the application of the model during rain events. The study was conducted using a data set collected from the WWT plant at Roeschwoog in France. The model showed good agreement for ammonia and dissolved oxygen for dry weather. The wet weather evaluation for effluent suspended solids, nitrate, dissolved oxygen and MLSS also showed good agreement between the model and measured values. It is interesting to note that the one-dimensional clarifier model responded well for peaks in the loading conditions. However, the magnitude of the input disturbance was significant, resulting in a three orders of magnitude difference in the effluent suspended solids before and after the disturbance, so that it was impossible to conclude whether the clarifier model responded well for the normal loading conditions. Nevertheless, the results showed that it is possible to simulate the behaviour of a plant during a wet weather period with the existing models, at least as a rough approximation of reality.  Model simplifications  Soon after the ASM1 had been proposed, its complexity and drawbacks led some researchers to simplify it by developing streamlined models that still would be able to offer satisfactory results for the required purposes. Fujie et al. (1988) proposed a simple model that predicted the concentration of organic material in aeration basins and in the effluent from a wastewater treatment plant performing only carbonaceous removal. Soluble organics only were modelled since the particulate materials were considered to be immediately adsorbed by the activated sludge and thereby, remain trapped within the system. The predictions were validated against experimental data and, reportedly indicated a large degree of agreement. It has to be emphasized that the effluent concentration of biodegradable organic substrate is not the most suitable variable for modelling a modern treatment plant receiving municipal wastewater. The effluent concentration of biodegradable organic substrate is usually so low that the uncertainty of any measurement is considerable. Since most of the modern plants also perform nitrification/denitrification, the sludge age is usually so long  52  that the effluent concentration of organic biodegradable soluble material is almost negligible.  Even before the ASM1 was presented, a number of mechanistically simplified models for organic substrate and active biomass had been tested against each other by Sheffer et al. (1984). Methods of automatically selecting the best possible model for a certain purpose were also discussed as well as the need for on-line updating of model parameters. A similar comparison between different levels of mechanistic simplification of the ASM1 to experimental data was reported by Gujer and Henze (1991). A very extensive simplification of the ASM1 was a model proposed by Jeppsson (1993). The model consisted of 10 components and 4 processes, as opposed to 13 components and 8 processes in the ASM1. Jeppson (1993) demonstrated that the simulation results did not change significantly if the number of components and processes was reduced. The model outputs were not verified against real data, but only against simulation results produced by the more comprehensive ASM1. Simulation comparisons for COD, ammonia, nitrate, active biomass concentrations and oxygen uptake rate, between the ASM1 and the reduced model, confirmed that the main features of the dynamics were retained. The main differences in the results were due to the fact that the reduced model did not include the hydrolysis process. The simplified model also excluded dissolved oxygen as a state variable, because it was thought to be the major cause of the numerical instability. It was thought that a sufficient DO level could be achieved in a real plant most of the time. In contrast to Jeppsson's comparison (Jeppsson, 1993), Lessard and Beck (1993) calibrated a simplified version of the ASM1 against full scale plant data. Steffens et al. (1997) used eigenvalue-to-state association and singular perturbation to identify candidate and "fast" state variables. Such candidate variables were "faster" than the time scale of interest and could be reduced to algebraic equations. Some "slower" variables were redefined as constants. The study showed significant reduction in computational time without incurring significant modelling errors for short simulation periods. However, modelling error existed for some variables over longer simulation periods and under more dynamic system conditions.  53  Another avenue of simplification was the development of complete models for an entire wastewater treatment system, including primary settling, aeration, secondary settling, gravity thickening, anaerobic digestion and waste disposal such as the one proposed by Tang et al. (1987). Such large models are usually only valid under steady state conditions and are mainly used to analyse the most cost-effective approach for the design of an entire plant.  Generally, the simplified models showed suitable results for the proposed purposes, which were usually narrower than that of the ASM1. Also, most of the proposed reduced models have not been proven against real world dynamics, but against artificially created step inputs.  Industrial wastewater treatment models  Differences between industrial and municipal wastewater components and the processes occurring in the treatment systems often make the models used for municipal wastewater treatment inappropriate for direct application to an industrial WWT system. To date, only a few models of industrial wastewater treatment have been published. Baker (1994) proposed a model for petroleum and petrochemical wastewater treatment. The model was based on the ASM1, but it was more complex. It included 19 components and 17 processes compared to 13 components and 8 processes in the ASM 1.The additional elements were related to the specific properties of the particular wastewater and the related activated sludge system.  Pulp and paper wastewater treatment models  Research conducted by the Pulp and Paper Research Organization (PAPRO) of New Zealand (Dare and Slade, 1990; Slade and Dare, 1991; Slade et al., 1991; Slade et al., 1992; Slade et al., 1994) attempted to directly apply the ASM1 to treatment of bleached kraft mill effluents in the pulp and paper industry. A data  54  base with kinetic coefficients (maximum growth rate, half velocity coefficient, growth yield, decay coefficient) and influent stream COD partitioning for pulp and paper wastewater was established. The final report (Slade et al., 1994) described the application of the ASM1 through a commercial software package (Aqua Systems AG) to a lab scale system treating pulp and paper wastewater. However, the report did not state whether all the ASM1 components and processes were included in the simulator. The authors reported a poor model response for the effluent COD and suspended solids concentrations and assumed that they were due to the following factors (Slade et al., 1994):  •  inadequately determined input parameters (kinetics and composition of substrate), and  ••  failure of the model to include a parameter or process that is vital to the adequate modelling of the biological treatment of bleached kraft mill wastewaters.  Another approach in modelling of pulp and paper wastewaters was presented by the National Council of the Paper Industry for Air and Stream Improvement, Inc. (NCASI) in a series of reports. An early model (NCASI 1982; NCASI 1986a) was based on the model by Stenstrom and Andrews (1979) and consisted of 5 components (five day biochemical oxygen demand - BOD , active biomass, endogenous biomass, oxygen 5  and nitrogen) and 2 processes (bacterial growth and death). This approach can be considered classical rather than modern. It was a simple model that did not take into account such processes as ammonification, hydrolysis, solids adsorption, volatilization or air stripping, but only microbial growth and decay. It also did not separate the fractions of influent BOD or COD. The validity of the model was demonstrated for long term results (one to two years monthly data) on BOD . The output data produced by the model in terms of effluent 5  BOD were satisfactory compared to the real effluent data and to the output of existing models proposed by 5  Adams and Eckenfelder (1974) and Lawrence and McCarty (1970).  In a later NCASI study (NCASI, 1986b), a general model incorporating removal mechanisms such as solids  55  adsorption, natural volatilization, air stripping and biodegradation was proposed. The removal pathways for four components of pulp and paper process effluent such as methanol, chloroform, resin acids and chlorophenolics were assessed. It was found that air stripping was the predominant removal pathway for chloroform and biodegradation was the predominant pathway for methanol removal. Even though measured resin acids removal efficiencies were consistently around 90%, the primary removal mechanism for resin acids was not identified due to a lack of coefficients for the model equations. The study reported that chlorophenols removal efficiencies were from 3-100 %, depending on the compound. The chlorophenols removal process was mostly sorption, but a portion was assumed to be biodegraded as well. The exact ratio between those two mechanisms was not identified, due to a lack of reliable partition coefficients between wastewater and biomass for different chlorophenols. The presented results demonstrated very close agreement between measured and predicted data for methanol and chloroform.  Although the early NCASI model was simple, it was up-to-date at the time of its development (1982). In comparison to recent modern models, it did not include components such as different types of influent COD, endogenous biomass, different nitrogen compounds (ammonia, organic, nitrate and nitrite), phosphorus; and processes such as hydrolysis, ammonification, air stripping, and sorption. Inclusion of those elements might have improved assessment of system behaviour. The latest NCASI (NCASI, 1986b) model includes more removal processes (air stripping, sorption, volatilization), but its description of biodegradation is even simpler than that in the early model. It is assumed that the microorganism growth rate is constant. That assumption can be used only for a rough assessment of the processes occurring in the system. However, the idea of the model was not to present a sophisticated bioremoval mechanism, but to assess the main removal mechanisms for selected wastewater components. In that context, the assumption was acceptable. To be more applicable, this model might have to overcome weaknesses similar to the early model, excluding additional processes presented.  56  Despite their weaknesses, the NCASI models, particularly the latest version which includes additional removal mechanisms, feature valuable basic ideas for the development of a more comprehensive model for pulp and paper activated sludge wastewater treatment.  2.4.3  Activated sludge hybrid models  As shown in the body of literature covering the activated sludge mechanistic models, the model outputs obtained even by very sophisticated models could be improved. Even the most complete wastewater treatment process models have a limited validity, due to the inherent character of variability of the parameters representing living organisms (Olsson, 1989). One way of addressing the problem without increasing the mechanistic model complexity, is through the coupling of a black-box model to the mechanistic model, i.e. developing a hybrid model. This could, in turn, result in a relatively simple model with a good response. The most commonly used black-box model in activated sludge modelling has been the artificial neural network.  Tyagi et al. (1993) used a neural network to represent the direct relationship, under steady state conditions, between the desired value of the waste sludge flow rate and recycle ratio as the model outputs and the influent flow rate, influent substrate concentrations and a given effluent set point. In addition, the authors proposed a neural network model for predicting the performance of a secondary settling tank. Su et al. (1992a, 1992b) have used a recurrent neural network model to predict the effluent compositions of nitrite/nitrate, phosphate and ammonium ions from data obtained in a well instrumented pilot plant at the Technical University of Denmark. Cote et al. (1995) used a neural network as a black-box part of a hybrid model to improve the accuracy of the prediction of activated sludge mechanistic model variables such as effluent suspended solids, effluent total COD, effluent ammonia, mixed liquor dissolved oxygen and volatile suspended solids in returned sludge. The neural network was employed to predict the error function for the effluent suspended solids, effluent COD, ammonia, mixed liquor dissolved oxygen and volatile suspended  57  solids in returned activated sludge. The mechanistic model was optimized with full scale plant data from the Norwich Sewage Works in eastern England. Even though the model improvement was not quantified, the hybrid model qualitatively did result in more accurate simulations of the treatment process phenomena. A similar approach was used by Zhao et al. (1997) to predict the output P0 ' and NO" concentrations in a 3  4  x  sequencing batch reactor. The differences in the model evaluation can be attributed to the fact that Cote et al. used full scale plant data while Zhao used lab scale plant data.  The research discussed above indicates that the hybrid model approach can improve the accuracy of mechanistic models, although none of the authors have used the neural network to go deeper into the mechanistic model in an attempt to understand the process better.  2.5  Clarifier models  Clarifiers or settlers are an integral part of the activated sludge process. Effective operation of both the primary and secondary clarifiers may determine the success or failure of the overall treatment system. A settler performs several functions such as: thickening, clarification and sludge storage. Failure of the settler to adequately clarify the secondary effluent may lead to substandard effluent quality. If the settler does not attain adequate thickening, settler operation will affect the performance of the aeration stage and the solids processing train of the activated sludge system. The complex behaviour of a settler and its importance for the successful operation of the activated sludge process have made the settling process an important issue for researchers working within the field of mathematical modelling. The uncertainty related to the clarification step in the clarification-thickening part of the model has often been reported as the reason for failure of the entire activated sludge system model. The force that makes the sedimentation of the particles in the liquid possible, originates from gravity and the density differences between the particles and the liquid.  58  Clarifier modelling has taken several different approaches.  •  Solids flux models.  The initial solids flux models were empirical and steady state models, which  ignored or oversimplified the complex hydraulics occurring within a clarifier. The later models had a theoretical basis useful for further research and practical applications.  >•  One-dimensional models.  These models are an extension of solids flux models and include some of  the complex hydrodynamic phenomena occurring in clarifiers. They are relatively simple, but provide reasonably good results and are used for simulators consisting of an aeration basin and secondary clarifier.  •  Multi-dimensional models.  The novel modelling approach consists of two- and three-dimensional  models that can be considered as the state-of- the-art in clarifier modelling. Their description of complex hydraulics occurring in settlers is the most comprehensive to date. However, their mathematical complexity overcomes modern computer abilities and those models cannot be used in reasonably fast simulators. Considering that relatively complicated calibration procedures usually require several thousands of runs, multi-dimensional clarifier models can not be readily used at the moment, at least not for quick simulators.  All the approaches are discussed in more detail in the following paragraphs.  2.5.1  Solids flux models  The foundation of sedimentation theory leads back to the work of Hazen (1904) who developed a theory for the continuous sedimentation of discrete particles having a common settling velocity. The models were  59  developed for both quiescent (non-turbulent) and turbulent conditions. For quiescent settling, Hazen found the fraction removal to be a discontinuous function of the relative overflow rate (settling velocity/ hydraulic loading rate) with an inflection point where the settling velocity equals the hydraulic loading rate. In an attempt to model the removal process under turbulent conditions, Hazen used several equally sized completely mixed tanks. Camp (1936, 1946) improved Hazen's quiescent settling theory by including discrete particles that had a distributed settling velocity. Camp assumed an ideal basin with homogenous horizontal flow, even inlet distribution, free settling and particle removal when they reached the bottom of the basin. The effluent concentration then depended only on the overflow rate and the particle settling velocity distribution, and was independent of depth and detention time. Within this generalization, Hazen's work has become a special case of Camp's. Dobbins (1944) developed a model for predicting concentrations in a settler for single velocity particles under isotropic turbulence with no bottom scour and starting from a constant inlet concentration. He found good agreement with lab scale tests.  The major disadvantages of the models of Hazen, Camp and Dobbins are the idealization of the flow conditions and basin shape. These models do not take into account turbulence effects, bottom scour, tank depth effects, cohesion between particles and hysteresis effects. A major criticism was that the early models focussed on the removal of solids from the liquid, which meant they did not consider any phenomena occurring within the part of the settler with high solids concentrations (Dick, 1970). These theories also ignored the thickening phenomenon prevalent in activated sludge systems.  A settler model used to separate flocculent, compressible particles is usually divided into four zones, referred to as the discrete particle, flocculent, hindered settling and compression zones as shown in Figure 2.2. The compression phase begins when the critical concentration, a characteristic of the suspension, is reached (Eckenfelder and Melbinger, 1957). In this region, the settling velocity is drastically reduced due to the high concentration of solids. Ingersoll et al. (1955) indicated that the factors influencing the thickening of the  60  sludge were: the nature of the mixed liquor particles (density, shape, floe structure, type of microorganisms, electrostatic charges, etc.), the nature of dissolved substances in the substrate, temperature, depth ofthe sludge blanket, surface area of the sludge blanket, effects due to mechanical actions (vibrations, pressure, etc.) and the concentration of settleable solids in the mixed liquor.  discrete particle zone flocculent zone  Figure 2.2: Settling zones in settler  In a fundamental work, Kynch (1952) made a theoretical analysis of sedimentation in which he concluded that the concentration of settleable solids in mixed liquor was of major importance when describing the settling process. Settling in batch reactors was analysed as a process by which levels of constant concentration moved upwards due to the downward movement of particles. The main four assumptions were:  »•  the settling velocity of a particle depends only on the local concentration of particles,  •  all the particles have the same shape, size and density,  »•  the particle concentration is constant within each horizontal cross-section of the settler, and  •  in continuous sedimentation the total settling velocity is a function of both the settling rate of particles relative to the liquid, and of the downward flow of the suspension, due to the underflow  61  withdrawn from the bottom of the thickener.  The first assumption was the fundamental one. This meant that all other forces acting on a particle were in equilibrium. Dick (1970) concluded that the mass-flow concept could be applied to a flocculent suspension, such as activated sludge, as a reasonable approximation. Kynch started a theory that would become known as the solids flux theory.  Based on the solids flux theory, a number of methods has been developed to determine the steady state behaviour of the secondary clarifier, which could be used for design purposes. Yoshioka et al. (1957) presented a simple geometric technique to find the limiting values from solids flux curves and Keinath et al. (1977) introduced the concept of a state point applied to the solids flux theory to define a safe operational zone for the settler. Another design method is the Coe and Clevenger method described by Dick (1970). From a mass balance over the settler, the limiting flux could be determined and a required cross-sectional area of the settler calculated. Vesilind (1968a) reviewed the different solids flux methods and found that all were sensitive to the accuracy of the solids flux curve, which must be determined empirically. He also assumed that the initial settling velocities measured in batch settling tests were representative of the settling characteristics of a large settler, and that the initial settling velocity was dependent on concentration, testcylinder diameter, stirring and flocculation characteristics of the sludge.  Even though the solids flux theory by Kynch contains idealized assumptions and generalizations that are not fully applicable to the type of solids present in an activated sludge process, its simplicity and deterministic background have attracted a lot of researchers to continue working with it.  62  2.5.2  One-dimensional models  A dynamic settling-clarification model can be developed using the solids flux theory as the constitutive assumption and formulating the conservation law. Tracy and Keinath (1973) developed one of the first dynamic models using a mass balance and Kynch's sedimentation law to obtain a partial differential equation, which was then solved numerically by finite differences. Although their work solved the problem from a conceptual point of view, the resulting model was too complex and suffered from typical numerical shortcomings in terms of stability and boundary condition specifications. Stehfest (1984) proposed a numerical method to solve some of the problems by reducing the original partial differential equation into a single ordinary differential equation by the "method of lines solution technique". The principles of the onedimensional layer model are based on the continuing work of Bryant (1972), Stenstrom (1975), Hill (1985) and Vitasovic (1985). The main assumptions were:  the continuous thickener does not exhibit vertical dispersion, •  the bottom of the solids-liquid separator represents a physical boundary to separation and the solids flux due to gravitational settling at the bottom is zero,  •  there is no significant biological reaction affecting the solids mass concentration within the separator,  •  the mass flux into a differential volume cannot exceed the mass flux the volume is capable of passing, nor can it exceed the mass flux which the volume immediately below it is capable of passing, and  *•  the gravitational settling velocity is a function only of the suspended solids concentration except when the assumption immediately above is violated.  Stenstrom (1975) divided the thickening part of the unit into a number of horizontal layers and formulated  63  a mass balance equation for each layer assuming complete mixing within each layer. The boundary conditions for the top and bottom layers were established to permit simultaneous solution for the equations.  A major drawback of the thickening model was its inability to predict the behaviour in the zone above the feed layer. Due to the upper boundary condition, the model could only be applied to the regions below the feed. Vitasovic (1985) extended the thickening model to include the clarification zone. The settler was divided into n layers. It was assumed that the feed was instantaneously and completely distributed throughout the feed layer. Fluid flows upward from the feed layer at the rate determined by the overflow and downward at the rate at which the thickened underflow is removed. The region below the feed level was modelled according to Stenstrom's approach. In the region above the feed layer, the solids were assumed to have a gravitational settling velocity greater than the upward movement of fluid in order to be separated from the overflow. An empirical threshold concentration was defined to describe the behaviour in the upper section of the settler. The top of the sludge blanket was determined by the highest layer with a solids concentration equal to or greater than the threshold concentration. However, the model still dealt primarily with the underflow concentration, leaving realistic effluent suspended solids predictions to empirical or statistical models such as those by Pflanz (1966), Busby and Andrews (1975), Chapman (1984) or Tyagi et al. (1993). This was partly because the settling velocity function used in the original model was of a type that could not predict a reasonable settling velocity for low concentrations of solids found in the clarification zone.  Different researchers have proposed models with different settling velocity functions. Six models, proposed by Laikari (1989), Takacs and Patry (1991), Otterpohl and Freund (1992), Dupont and Henze (1992), Hamilton et al. (1992) and a combination of Takacs and Patry (1991) and Otterpohl and Freund (1992) were evaluated by Grijspeerdt et al. (1995). The study concluded that the model of Takacs and Patry (1991) provided the most realistic results when compared with ten sets of experimental data, both for steady state and dynamic conditions.  64  Despite the drawbacks, one-dimensional models have been used and thought of (Dupont and Henze, 1992; Reichert and Wild, 1995; Cote et al., 1995; Takacs et al., 1995) as appropriate for the dynamic simulation of activated sludge systems including the aeration tank and secondary clarifier for reasons of simplicity and relatively good accuracy.  2.5.3  N o v e l clarifier m o d e n i lg a p p r o a c h e s  Very simple empirical models describing the behaviour of the secondary clarifier have been replaced by more sophisticated models based on extensive experimental work. With the development of high speed computers, more complex mechanistic and numerical models have been developed to describe the behaviour of the secondary clarifier.  One such approach was to use regression models based on empirical data. Olsson and Chapman (1985) conducted research to examine the transient performance of a settler and developed a dynamic model of minimal order based on effluent data. The basic problem with this type of black-box model is that it does not explain or increase the understanding of the underlying phenomena. However, such models can be useful for investigating correlations between different process variables and for practical implementation at a specific WWT plant. Due to the non-linear behaviour of settlers, the data used for identification of the models must include a significant amount of process dynamics. Otherwise, extrapolation of model results for situations not included in the data used for calibration, may produce highly erroneous results. This type of model must also be recalibrated on a regular basis to account for changing conditions, such as the time varying properties of the sludge.  Another approach is the inclusion of hydrodynamic phenomena into traditional models and the extension to two, or even three dimensions. Effects such as turbulent dispersion and mixing, bottom density currents,  65  buoyant density currents, short circuiting, density waterfall and recirculation within the settler can then be described more accurately. The suspended solids transport through an area in a settling tank is governed by the processes of advection, diffusion and settling (Vitasovic et al., 1994). Since the former two effects are determined by the turbulence of the flow, it is obvious that hydrodynamics play an important role in the behaviour of a settler, especially during transient conditions. Hydrodynamic models make it possible to investigate effects of baffle sizes, skirt radius, inlet zone design and other details in the design of the settler.  The study of flow patterns in settling tanks was started by Anderson (1945) and extensivefieldand laboratory investigations on the hydrodynamics and sedimentation in clarifiers were presented by Larsen and Gotthardsson (1976) and Larsen (1977). Larsen (1977) and Imam et al. (1983) separately developed similar numerical models to describe the settling process in rectangular clarifiers. Recent studies of hydrodynamic effects within the settler are quite extensive. Research has been done by Krebs (1991a, 1991b), Bretscher et al. (1992), Lyn et al. (1992), Samstag et al. (1992a, 1992b), Mazzolani and Pirozzi (1995), as well as by Ji et al. (1994), McCorquodale and Zhou (1994), Zhou and McCorquodale (1992a, 1992b), Zhou et al. (1992, 1994), and Vitasovic et al. (1997). The most complex model was presented by Zhou et al. (1997), in which a three-dimensional clarifier model was used to investigate the effect of structural modifications on the capacity of rectangular clarifiers. Deininger et al. (1998) researched the solids and velocity distributions in circular secondary clarifiers. A two-phase three-dimensional model was applied to gain a better understanding of the flow patterns, although the calculations performed in the study were based on steady state assumptions. Mazzolani and Pirozzi (1997) presented a model for predicting turbulent flowfieldsand the concentration distribution of suspended solids in settling tanks. The model is based on the coupled solution of the turbulent flow equations and the suspended solids transport equation and allows the simulation of the density driven flow induced by concentration gradients.  Two- and three-dimensional models are generally used for analysis of internal flow conditions and the  66  interaction between flow, settling and buoyancy. These complex models often require sophisticated finite element or finite difference methods to solve the complex differential equations describing the behaviour of the settler. Subsequently, these methods require powerful computers to simulate the model behaviour. Thus, the use of such models is still restricted to simulating the behaviour of the clarifier decoupled from the rest of the wastewater treatment plant. Although promising results have been presented, the hydrodynamic models are still too complex to be implemented in commonly used simulation programs, because they require timeconsuming identification and simulation.  2.6  Summary  The literature review confirmed that very little has been done in developing a comprehensive model for predicting the behaviour of activated sludge systems treating pulp and paper process wastewater. Since the secondary clarifier is an important part of activated sludge systems, a literature review on modelling this unit was completed as well.  The ASM1 appears to be a very good basis for developing a model for treating pulp and paper process wastewaters. However, this model cannot be applied directly to pulp and paper applications because of the differences between municipal and pulp and paper process wastewaters.  2.6.1  Process modelling and calibration techniques  The model development and verification process consists of selection of model structure and complexity, model formulation, data collection, and model calibration and verification. To prove the hypothesis made in the model development step, the model has to be tested against an established reference. Before the model outputs are taken for granted, they must be validated on a data set different from the calibration set. The  67  problem of model calibration is a problem of function optimization, so that optimization techniques in general were discussed. Among huge number of optimization techniques, principles of genetic algorithms were discussed in more details, since their features put them at the top of the choice list for the optimization technique suitable for solving the optimization problems faced in the present study.  2.6.2 Activated sludge models  Two major modelling approaches have emerged: traditional and modern. The traditional approach includes only one component for biomass and one for substrate, employing bacterial growth and decay as processes. The modern approach emerged as a significant extension of the traditional modelling approach through the development of complex and sophisticated models such as the Activated Sludge Models No. 1 and No.2. The ASM1 deals with carbonaceous removal, while the ASM2, in addition, incorporates the processes of nitrification-denitrification and biological phosphorus removal. These two models are considered the state-ofthe-art in activated sludge modelling and are thought to cover satisfactorily, all major processes and components accepted as being relevant to the system, although not all processes (eg. those related to biological phosphorus removal or hydrolysis) are well understood. Despite their drawbacks, these models' outputs are considered satisfactory, although it is recognized that there is space for further model improvement.  As opposed to municipal wastewater treatment, relatively little has been done in modelling activated sludge systems treating industrial wastewaters. A few recently reported industrial models are based on the principles of the ASM1 with the addition of components and processes related to the specifics of the industrial application. Those models have been applied with variable success. As far as pulp and paper wastewater treatment is concerned, only two series of modelling attempts have been undertaken, one by the National Council of the Paper Industry for Air and Stream Improvement, Inc (NCASI), the other by the Pulp and Paper  68  Research Organization (PAPRO) of New Zealand. The NCASI models were based on traditional modelling approach and were relatively successful for their time. Some of their elements form a useful basis for developing a modern model. The success of the PAPRO model was limited for the reasons of inadequate model parameters and missing processes occurring in the treatment of pulp and paper wastewater.  The ASM1 is a valuable starting point for the development of industrial wastewater treatment models. Depending on the industry of interest, some components and processes developed for the modelling of municipal wastewater can be directly applied to industrial wastewater treatment. Some components and processes, specific to the application, can be added. Depending on the application, the ASM1 can be simplified by omitting some of its processes and components.  Although a significant effort has been made in model development, there are still many unresolved issues. One way offindingnew avenues for model development is by addressing the existing model weaknesses. Thefirstset of model weaknesses is related to the major drawbacks of the ASM1. The second set of problems is related to model calibration and validation.  According to the findings of the literature review on the existing model problems, modelling of activated sludge systems treating industrial wastewaters has room for development in several areas.  *•  Improvement of mechanistic model response and understanding could be achieved by:  •  assessment of wastewater components related to the specifics of the application,  •  identification and mathematical presentation of the removal mechanisms occurring in the specific process that do not play a part in systems treating municipal wastewaters,  •  introduction of model parameters that vary as a function of temperature and/or pH,  69  •  assessment of kinetic and stoichiometric parameters related to the specific wastewater, and  •  application of formal calibration techniques with full scale plant data to obtain more accurate model outputs and more realistic or application specific parameter values.  •  Improvement of general model response.  Due to difficulties in mathematically describing the biological, physical and chemical processes occurring in the system, the outputs presented by the most sophisticated mechanistic models sometimes do not fit measured effluent data well. Thus, directions to improve the model response can be:  •  developing hybrid models by coupling black-box mathematical models to the mechanistic models to improve the accuracy of the mechanistic model, and  •  using the findings obtained by the black-box model to capture variables affecting the process that are not included in the mechanistic model and to direct research efforts to explore the mechanisms by which the additional variables affect the process.  2.6.3 Clarifier models  After decades of modelling, three major modelling approaches have emerged: solids flux theory, onedimensional models and multi-dimensional models. The initial solids flux models were empirical and steady state models, which ignored or oversimplified the complex hydraulics occurring within a clarifier. The later models had a theoretical basis useful for further research and practical applications. The one-dimensional models are an extension of solids flux models and include some complex hydrodynamic phenomena occurring in clarifiers. They are relatively simple, but provide reasonably good results and are used for  70  simulators consisting of an aeration basin and secondary clarifier. The two- and three-dimensional models can be considered as the state-of-the-art in clarifier modelling. Their description of the complex hydraulics occurring in settlers is the most comprehensive so far. However, their mathematical complexity still requires long computing times on personal computers. In addition to that, these models are complex to define and calibrate. Consequently, these models cannot be used for reasonably fast simulators.  71  3  RESEARCH OBJECTIVES AND  APPROACH  The major research aim was to develop a comprehensive model for predicting the long term behaviour of an activated sludge plant treating pulp and paper wastewater.  To date, comprehensive modelling of activated sludge systems has concentrated on the treatment of municipal wastewaters. The prime example is the ASM1. A review of the literature confirmed that an analogous model was not available for predicting behaviour of a system treating pulp and paper process wastewaters. Due to differences in the characteristics of municipal and pulp and paper process wastewaters, the ASM1 cannot be used directly for predicting the behaviour of pulp and paper WWT systems, but it can be used as a starting point for developing equivalent models for the treatment of pulp and paper wastewaters.  In addition to achieving the major aim, the model was proposed to:  •  improve the accuracy of the mechanistic models and introduce variables related to the process, but which were not included in the existing mechanistic models,  •  gain an insight to the impact of model parameters that vary as a function of temperature and pH to the model predictions,  •  to gain an insight into the composition of bulk variables in pulp and paper activated sludge systems, and  •  emphasize the importance of certain variables to the overall model performance.  The methodology used to achieve the research objectives was the following.  i  To provide appropriate model predictions, the model included components and processes specific 72  to pulp and paper wastewater treatment that were not considered in municipal activated sludge models.  The additional components were: •  phosphorus,  •  a bleaching agent, pH,  •  temperature, and  •  a volatile COD component.  The additional processes were:  •  volatilization of the volatile COD component,  •• •  air stripping of the volatile COD component, and heat exchange.  In an attempt to gain an insight to the impact of model parameters that vary as a function of temperature and pH to the model predictions, a set of model parameters that varied as a function of pH and temperature was introduced. Those temperature- and pH-dependent parameters were:  *•  maximum growth rate, half velocity coefficient and growth yield through the specific uptake rate expression, and  •  decay rate.  To capture the impact of a bleaching agent used in the pulp and paper production process, a  73  bleaching component and bleaching component impact parameter were included.  iv  To efficiently calibrate the model, genetic algorithms were used to help:  •  obtain accurate model responses for long sets of full scale plant input data,  •  establish a parameter set suited to the calibrated pulp and paper activated sludge system.  *•  to determine the scope of the non-measurable and non-measured model variables and gain an insight into the composition of bulk variables,  •  v  assess the importance of certain model variables to the overall model performance.  To extend model validity from lab experiments or short term real plant data sets to full scale plant data and illustrate that the model can be used for long term predictions of the complex dynamic behaviour of a real full scale plant, the model was calibrated and verified against multiple multiannual and multi-monthly full scale facility data sets.  vi  The proposed mechanistic model was connected to a neural network to form a hybrid model that was aimed at:  •  introducing variables not included in the mechanistic model, but related to the process,  •  quantifying the impact of additional variables, and  •  improving the accuracy of the mechanistic model.  The model did not address toxicity, due to a lack of reliable toxicity data.  By developing such a model, several practical aims can be achieved. 74  Establish a model framework for developing computer simulators dealing with wastewater treatment systems treating wastewaters generated from the pulp and paper process.  Quantify the impact of model components, processes and parameters not captured by current mechanistic models.  Introduce an efficient optimization method capable of calibrating the model on long term sets from a full scale plant.  Develop a model that is able to satisfactorily and effectively mimic the long term behaviour of a full scale plant.  Provide an effective research tool to further explore system behaviour.  Assist in design and operation of new systems.  75  4  MODEL DEVELOPMENT  The proposed research aim was to establish a framework for a comprehensive mathematical model for predicting long term behaviour of an activated sludge plant treating pulp and paper wastewater. The main idea for accomplishing the task was to use the Activated Sludge Model No.l as a basis, to adjust it to the specifics of the process of concern and to calibrate the developed model against long term full scale facility data. A one-dimensional layer model was used to model clarifiers. The calibrated mechanistic model was coupled to a black-box model in the form of a neural network to create a hybrid model that might yield a better response than the mechanistic model. The black-box tool was used to model the error function between the real data and the mechanistic model predictions.  Identifying major principles in municipal activated sludge treatment systems and their respective models can help in the understanding of pulp and paper activated sludge systems and, thus simplify efforts to develop corresponding models. Many of the basic processes presented in the ASM1 can be readily applied to developing pulp and paper activated sludge models. For example, biological growth and decay of heterotrophs and autotrophs occurs in activated sludge systems regardless of the nature of the wastewater. As a result, the ASM1 principles for biodegradation of organic material, nitrification of ammonia, and oxygen consumption were the main removal mechanisms included in the pulp and paper model in the present study. Monod growth kinetics were used to model the conversion of soluble organic substrate into heterotrophic biomass, and the conversion of ammonia nitrogen into nitrate via growth of autotrophic biomass. However, the stoichiometry and kinetics of the two processes (model parameters) are likely to differ since the wastewater characteristics of municipal sewage and pulp and paper process effluents are different. The values of the model parameters for the pulp and paper model were determined in the process of model calibration. The observation of the system similarities led to the conclusion that some mathematical expressions used in the ASM1 also could be used in the pulp and paper model. 76  The ASM1 could not be directly applied to pulp and paper applications due to the differences between municipal and pulp and paper process wastewaters discussed in Section 1.2. These differences included chemicals used in bleaching, influent wastewater temperature and pH variations, and volatile organic compounds in the influent COD.  Even though municipal and pulp and paper wastewaters differ in the overall COD composition, these differences would not be expected to affect the general structure of the model, because COD is accepted as a bulk measure of pollution. Consequently, the removal mechanisms were assumed to be similar for both municipal and pulp and paper wastewaters. However, the differences between municipal and pulp and paper wastewaters lead to the addition of some removal processes to the ASM1 structure in order to adjust it to a pulp and paper application. On the other hand, some ASM1 components (for example, alkalinity) can be either removed for their insignificance in pulp and paper WWT systems, or merged to make the model simpler (soluble and particulate nitrogen were considered together as organic nitrogen).  According to the discussion on the model development presented in Section 2.1 and the research objectives and approach presented in Section 3, the following sections describe the activities related to the model development and verification in the present study.  4.1  Activated sludge model  The role of an activated sludge reactor in a wastewater treatment plant is to remove organic compounds, although it can also remove inorganic components from the treated wastewater. The removal is achieved by the action of microorganisms using organics as a food and energy source. Both soluble and particulate organic material is removed in the bioreactor by the action of microorganisms. The following sections describe how the mechanisms related to the activated sludge unit treating pulp and paper wastewaters are  77  transformed into a mathematical model.  4.1.1  Selection of model structure and complexity  The first stage of the model development was to define the model structure and complexity. The task involved identification of model components (state variables), processes which act upon these components, parameters involved and system outputs to be predicted.  State variables and processes identification  To decide what to model in the system, compounds of interest present in the influent wastewater were identified. Since the contaminants control the nature of the removal mechanisms, the behaviour of the activated sludge system depends on the compounds being treated.  The tasks needed to be completed to establish appropriate system variables, processes and parameters describing the system are presented in the following paragraphs.  A set of state variables (system components) in the influent waste and in the biological system that describe adequately the behaviour of the pulp and paper activated sludge system was defined. This set included variables of interest such as:  •  different forms of COD,  •  different forms of biomass,  •  oxygen,  •  nutrients (nitrogen compounds and phosphorus),  78  •  temperature,  •  pH, and  •  bleaching agents.  Phosphorus, temperature, pH, bleaching chemicals and volatile COD are model components that are an extension to the ASM1. They are included and discussed to emphasize the specifics of pulp and paper wastewater treatment. Those components are not a part of the ASM1, or of any pulp and paper activated sludge models.  A pH change mechanism within the aeration basin is not proposed, since pH control at pulp and paper WWT plants is usually performed before wastewater enters the plant, so that the treatment system by itself does not affect pH significantly. Measured pH values were used as model inputs instead.  The biological and physical processes occurring in the system and their relationship with the state variables were identified and mathematically described. The processes common to both pulp and paper and municipal treatment such as biomass growth and decay, hydrolysis and ammonification were described as proposed in the ASM1 basis. The impact of changes caused by pH and temperature variations, as well as bleaching agent spills, were described through changes in the values of the kinetic parameters involved.  The model tracked the fate of the components that undergo changes within the proposed processes. For that reason, it was necessary to quantify the influence of the processes on the model components, i.e. each process incorporated in the model required a mathematical description of the reaction rate and the reaction stoichiometry.  79  4.1.2 Model components  The model used the methodology established in the ASM1 to represent the different types of compounds. Biomass components were represented by the symbol Z. Soluble components were represented by the symbol S and particulate components by the symbol X. The subscripts describe different components within these categories. The model components concentrations were expressed in mg COD/L (soluble and particulate organic components), mg N/L (nitrogen containing components), mg P/L (phosphorus containing components) and degrees C (temperature). The model predictions of particulate components expressed in mg COD/L were converted into mg SS/L for use in the secondary clarifier model by using COD/SS ratios that were determined by model calibration.  Biomass components  In general, activated sludge systems contain different types of organisms which perform various functions. However, in the case of a pulp and paper wastewater treatment system, only two types of active biomass were included: heterotrophic biomass (Z ) resulting from growth on the influent COD and autotrophic biomass bh  (Z „) resulting from growth on ammonia. b  The Z and Z „ refer to active organisms that, along with the growth in the system, undergo decay. The decay bh  b  is described later in this chapter, but for purposes of establishing model components, it is necessary to indicate that death of organisms partially results in an endogenous mass which cannot be degraded completely and readily. It contributes to the solids concentration in the system. This non-biodegradable endogenous mass is represented by the symbol Z . These two classifications constitute the biomass e  components in the system. The biodegradable portion of the decayed biomass contributes to the slowly biodegradable particulate COD.  80  Substrate components  Characterization of the organic components in the influent wastewater is a critical element in modelling any activated sludge system (Dold and Marais, 1984), since the behaviour of the system depends on what the organisms are degrading and in what quantities. Pulp and paper wastewater contains many different components. Due to the number of compounds present, it was necessary to use a bulk parameter such as COD to quantify the carbonaceous components. This simplified the monitoring of transformations of the different components. Within the total influent COD, it was necessary to distinguish between a number of different sub-components when formulating the model. Each compound or group of compounds influences the behaviour of the treatment system in a different manner due to the transformations associated with it. The influent wastewater composition was divided into biodegradable and non-biodegradable portions. The biodegradable part contributed to the growth of organisms while the non-biodegradable portion remained unchanged throughout the process. Within each category, further fractionation into various soluble and particulate components was needed. This fractionation is based on research of pulp and paper wastewaters, completed at the University of British Columbia (Stanyer,1997). As an indication of COD components, Stanyer (1997) reported that more than a half of the influent COD was in a soluble form. Her experiments showed that less than a half of this portion was readily biodegradable matter. Most of the particulate COD was slowly biodegradable in nature.  In terms of model components, the total influent biodegradable COD was divided into groups that are discussed in the following paragraphs.  Readily biodegradable soluble substrate (S ). s  The category of readily biodegradable soluble substrate  included the bulk of the biodegradable soluble compounds. This COD component is easily degradable biologically.  81  Volatile soluble substrate (SJ.  From an environmental point of view, volatile organic compounds (VOC)  generated in the kraft pulping process (foul condensates) are considered to be present in low-volume/ highstrength wastes (Blackwell, 1978). Therefore, they are obvious candidates for treatment. The VOC's associated with condensates can be strippedfromthe activated sludge system and may contribute to the air emissions from these facilities. When COD is stripped from the system it is no longer available for organism growth. Therefore, the amount stripped from the aeration basins influences the amount of oxygen consumed and the mass of organisms formed. In developing the model, it was important to track the volatile COD component. This component is not a standard variable in the ASM1.  Slowly biodegradable particulate (XJ.  A slowly biodegradable component is present in the influent (Stanyer,  1997), and is generated during the process in activated sludge systems through the process of decay.  The non-biodegradable fraction consists of two forms, each of which affects the system in a different way.  Particulate non-biodegradable component (XJ.  Particulate non-biodegradable components may be present  in the influent wastewater in addition to being formed as products of the process of microbial decay.  Soluble non-biodegradable component (SJ.  The soluble non-biodegradable portion of the influent COD  remains in the liquid phase and contributes to the effluent COD concentration. As a result, it was important to include this component in the model in order to predict properly the total effluent COD concentration.  Grouped another way, i.e. fractionated into particulate and soluble components, these fractions might be presented as (Figure 4.1):  82  Particulate  particulate non-biodegradable substrate X.  particulate slowly biodegradable substrate Influent substrate  X Particulate substrate  Soluble substrate  S  v  Volatile biodegradable  S  s  Readily biodegradable  Si  Nonbiodegradable  X  s  Slowly biodegradable  Xi  Nonbiodegradable  Figure 4.1. Substrate components  Soluble  S  volatile soluble substrate  S  readily biodegradable soluble substrate  S;  soluble non-biodegradable substrate  v  s  Each of the fractions was considered to be a key contributor in determining the response of a pulp and paper wastewater activated sludge system and needed to be included in the model. The actual values of the fractions were determined through the process of model calibration.  It is interesting to note that the COD content of biomass differs from that of the particulate substrate components. This fact is important for the transformation of suspended solids concentrations expressed in  83  mg COD/L as used for the calculations related to the aeration basin, to mg/L SS required for the use in the secondary clarifier calculations. The ASM1 simplifies this by using only one coefficient, since it is believed that municipal activated sludge basin suspended solids consist mostly of biomass. However, pulp and paper activated sludge system suspended solids consist not only of biomass, but also a significant fraction of nonbiodegradable or slowly biodegradable components such as lignin or hemicellulose. Therefore, two coefficients were employed in the pulp and paper model presented in the present study. One coefficient was employed to transform biomass COD concentration to a SS concentration, and another to make the same transformation for non-biodegradable particulate and slowly biodegradable particulate substrate.  Nutrients and oxygen  Nitrogen and phosphorus components have an important influence on the behaviour of activated sludge systems. They are required for organism growth. If present in insufficient levels, organism growth is affected and settling problems in the secondary clarifier can occur due tofilamentousorganism growth and extracellular slime production. In addition, excess ammonia and phosphorus must be removed from the wastewater to alleviate eutrophication (Grady and Lim, 1980; Orhon and Artan, 1994; Metcalf & Eddy, 1991).  Ammonia nitrogen (S ). nh  The ammonia nitrogen is supplied from outside the system and serves as a source  of nitrogen for the growth of biomass. It is also produced in the process by ammonification of organic nitrogen.  Organic nitrogen (S ). or  Organic nitrogen is produced in the system through the process of microbial decay  and transformed to ammonia through the process of ammonification.  84  Nitrate and nitrite (S„J. Nitrate and nitrite are produced through the process of autotrophic biomass growth.  Soluble phosphorus (S ) p  is required for synthesis of organism mass in the growth process. Usually, pulp and  paper process wastewaters are deficient in phosphorus, and some form of soluble phosphate must be added to the influent wastewater. A fraction of soluble phosphorus is produced in the system in the process of biomass decay. In many instances, the effluent phosphorus concentration must be maintained below a specified level for regulatory reasons. Soluble phosphorus was incorporated as a model component to enable prediction of the amount of phosphorus required for organism growth for a given set of operating and influent conditions. This will aid model users in correctly estimating the amount of phosphorus which should be added to the influent wastewater to satisfy the system demand while still meeting effluent standards.  Oxygen (S ) 0  is also, as ammonia and soluble phosphorus, supplied from outside the system and is required  by bacteria during the oxidation of organic matter. An inadequate concentration of oxygen decreases removal efficiency. Including the oxygen as a model component enabled calculation of the oxygen utilization rate in the system and, consequently, provided an input required for design of the aeration equipment.  Temperature and pH  Temperature (T ) andpH(pH) m  was included in the model because some model parameters were temperature-  and pH-dependent and because the influent wastewater temperature and pH change. Temperature and pH impacts on maximum substrate uptake rate and decay coefficient were considered. These two components are not standard variables in the ASM1.  85  Bleaching agent  A sudden spill of a bleaching agent (S ) into the activated sludge system could result in a serious upset of the b  process, significantly affectingthe bacterial population. In the present study, the impact of hydrogen peroxide on active biomass was considered. To model the impact of sudden bleaching agent spills on the performance of the activated sludge process, the present study was directed to one of the novel bleaching processes currently in use around the world, hydrogen peroxide bleaching. Since a bleaching agent affects bacterial growth and decay, its impact on maximum substrate uptake rate and decay coefficient was considered. This component is not a standard variable in the ASM1.  Summary of model components  The previous discussion identified the different components involved in the development of the activated sludge model for treating pulp and paper process wastewaters. Table 4.1 summarizes the components and their symbols and units. The concentrations of each of these components were calculated by the model.  4.1.3  Model processes  The next stage in model formulation was to determine the processes which significantly affect system behaviour and to include these in the model. The following processes were considered to be key mechanisms in determining the behaviour of an activated sludge system treating pulp and paper wastewaters.  *•  Microbial growth  Aerobic growth of heterotrophs on readily biodegradable soluble components.  86  Aerobic growth of heterotrophs on volatile organic components. Aerobic growth of autotrophs on ammonia.  *•  Microbial decay  Decay of heterotrophs. Decay of autotrophs.  Table 4.1. Definition of component symbols in pulp and paper activated sludge model Comp.  Symbol  1 2 3 4 5 6 7 8 9 10 11 12 13 14 15  Zbh  z  bn  s x s  s s  v  Xi Si  Snh S  on  s  P  So  T pH m  s  b  Definition  Unit  Active heterotrophic biomass Active autotrophic biomass Endogenous biomass Readily biodegradable soluble Slowly biodegradable substrate Volatile soluble compounds Non-biodegradable particulate substrate Soluble non-biodegradable Ammonia nitrogen Organic nitrogen Soluble phosphorus Oxygen Temperature pH Bleaching agent  g cell COD/m g cell COD/m g cell COD/m g COD/m g COD/m g COD/m g COD/m g COD/m gN/m gN/m gP/m g0 /m °C  3 3 3  3 3  3  3  3  3 3  3  3  2  -  g/m  3  Other  Hydrolysis of slowly biodegradable components. Ammonification of organic nitrogen to ammonia. Volatilization of volatile organic components. Stripping of volatile organic components. 87  Heat transfer.  The processes related to the volatile COD component and the heat exchange process are not a part of the ASM1.  Even though anoxic microbial growth is possible in pulp and paper WWT systems, the model processes and parameters related to anoxic processes were not included, because the oxygen supply was sufficient in the system used for model calibration in the present study. Consequently, anoxic growth was unlikely to occur. However, these processes could be included as a model extension, if oxygen supply is inadequate. The process rates can be based on those reported in the ASM1 (Henze et al., 1987) or by Billing and Dold (1988).  The concept of switching functions and impact of pH and temperature variations, as well as hydrogen peroxide are discussed in the following paragraphs.  Switching functions  The switching function is a tool that was introduced during the development of the ASM1. This provides a mechanism to switch off a particular rate equation if the conditions necessary for the reaction are not present in the system at that time. For example, aerobic growth of heterotrophs requires the presence of oxygen as an electron acceptor and sufficient levels of nitrogen and phosphorus to sustain growth. If insufficient oxygen or nutrients are present in the reactor, the heterotrophs cannot grow. Therefore, the rate equation expressing this growth process should decrease to zero. This scenario can be represented mathematically using a Monodtype expression added to the growth equation such that as the oxygen concentration in the system approaches zero, the function value approaches zero and the process rate also is forced to zero. If the oxygen concentration is sufficient, the function value is close to unity and the growth equation is not affected. The  88  form of the switching function for oxygen is S /(S +K ), where S is the concentration of dissolved oxygen 0  0  0  0  and K is the switching constant of small magnitude. This expression is continuous, which helps to avoid 0  numerical instability problems if "on" and "off switches are used. By using switching functions, the same model can be used to predict the performance of the activated sludge system under different operating environments. Such a model is much more flexible. (The switching function equations are defined in Table 4.2.)  Table 4.2: List of activated sludge switching functions, their definitions and parameters Switching function parameters  Symbol  Description  Unit  K  aerobic-anoxic growth ammonia limit phosphorus limit  gO/ra gN/m gP/m  0  K,„  3  3  3  Switching function definition Function  Definition  Air NH P  S„/(K +S ) 0  3  0  S„/(K,„+S„)  Temperature variation impact  The temperature impact function on the biomass growth and decay used in this research was based on Helle's (1999) research conducted at the University of British Columbia. Helle studied the behaviour of a lab scale activated sludge system treating pulp and paper process wastewaters and concluded that biomass can adapt to relatively broad ranges of temperature and pH and achieve the same activity at each "optimal" state, if enough time is allowed. The order of magnitude of time required for acclimation was one week. However, 89  if the system did not have ample time to recover, the kinetics of the process could be described by temperature- or pH-dependent curves that were obtained experimentally. The variations in the kinetics were observed through changes in the substrate uptake rate and oxygen uptake rate as temperature or pH functions. Helle found that the substrate uptake rate was governed by the same temperature-dependent function, but the decay rate changes were governed by a different one. The temperature impact on the substrate uptake rate was essentially the temperature impact on the maximum growth rate, yield coefficient and half velocity coefficient put together, which was quite convenient for application to the proposed model. A dimensionless coefficient,  was used in the reaction rates for microbial growth (Equations 4.4, 4.5, and 4.6). However,  since the reaction rates are multiplied by the growth yields in the model equations, the dimensionless coefficient actually performed quite nicely as a modifier for both the growth yield and maximum growth rate. The temperature impact on the decay rate was expressed by multiplying the decay rate by temperaturedependent coefficient F^ (Equations 4.7 and 4.8). b  The temperature-dependent functions resulting from the findings of Helle's experimental research could not be applied directly to the model developed here, because the average temperatures differed from the average temperatures at the plant modelled in this study. The proposed curves (temperature functions) had to be adjusted for the present study. Helle's experimental results were related to a biomass acclimatized to 40°C. The original curve presented by Helle was adjusted to 31°C, the average activated sludge aeration basin wastewater temperature in the Pacifica Paper Alberni Specialties pulp and paper mill (Port Alberni Mill), from which the data for calibration and verification of the model were obtained. An assumption was made (Helle, 1999) that the biomass can be adapted to the working temperature of the system and that the shape of the temperature impact function would be the same. Only the optimal temperatures would be different. Thus, the average temperature at the Port Alberni Mill activated sludge unit was assumed as a reference temperature, i.e. the temperature impact coefficient was assigned a value of 1 for that temperature, and the shape of the temperature impact curve reported by Helle, represented in relative terms, was developed for  90  temperatures lower or higher than the reference temperature. The same principle was applied for all temperature-dependent model parameters.  The dimensionless temperature function F,,,, used in the present research to describe the impact of temperature on the reaction rate for biomass growth is tabulated in Table 4.3 and presented as a graph in Figure 4.2. Mathematically, this function was incorporated in reaction rates describing aerobic growth rate of heterotrophs on readily biodegradable soluble substrate (S ), aerobic growth rate of autotrophs on s  ammonia (S^) and aerobic growth rate of heterotrophs on volatile substrate (S ), represented by Equations v  4.4,4.5, and 4.6. The function was used in a tabular form in the model calculations.  Table 4.3: Temperature impact on growth reaction rate Temperature °C 5 10 15 20 25 30 35 40 45 50 55 60  F 0.15 0.37 0.50 0.63 0.78 1.00 1.24 1.55 1.85 1.66 1.00 0.37 tm  The dimensionless temperature function F,,,, used in this research to describe the impact of temperature on b  the decay coefficient is shown in Table 4.4 and Figure 4.3. Mathematically, this function was incorporated in reaction rates describing decay of heterotrophs and autotrophs, represented by Equations 4.7 and 4.8. The tabulated temperature ranges were much wider than the real temperature range at the full scale facility used for model calibration and verification. The Port Alberni Mill WWT Plant measured temperature values varied from 5°C to 37° C. The mathematical placement of the impact of the temperature-dependent functions can be seen through the reaction rates presented in the previous discussion. 91  Table 4.4: Temperature impact function on decay rate  Figure 4.2. Temperature impact on growth rate  Temperature impact on decay rate  Temperature (deg C)  Figure 4.3. Temperature impact on decay rate  pH variation impact  Similarly to the temperature impact discussed above, the pH impact on the growth rate of biomass used in the present study was based on results presented by Helle (1999). In contrast to the effect of temperature, Helle reported that pH did not affect the growth yield coefficient and decay coefficient over the normal range of pH values employed by a wastewater treatment plant. However, above pH=9.5 and below pH=5.5 microbial decay was accelerated (Helle, 1999).  As for temperature, the biomass was observed to be capable of adapting to a new pH and to achieve full activity after an acclimation period. However, if the pH shock was significant in terms of pH changes, the recovery was slower.  93  As for temperature, the findings of the experimental research could not be applied directly to the model developed here. The proposed curves (pH functions) were adjusted for the specific system being modelled. Helle's experimental results were developed for a biomass acclimatized to pH = 7.5, while the average pH value at the Port Alberni Mill WWT Plant was 6.5. Thus, the original curve was normalized to pH = 6.5. An assumption was made that biomass could adapt to the working pH of the system and that the shape of the pH impact function was the same. Accordingly, the average pH at the Port Alberni Mill activated sludge unit was assumed as a reference, i.e. the pH impact coefficient was assigned a value of 1 for that pH value, and the shape of the curve reported by Helle, represented in relative terms, was used to modify the affected model parameters.  The dimensionless pH function F used in the present study to describe the impact of pH on the maximum pH  growth rate is shown in Table 4.5 and Figure 4.4. Mathematically, this function was incorporated in reaction rates describing aerobic growth rate of heterotrophs on readily biodegradable soluble substrate (S ), aerobic s  growth rate of autotrophs on ammonia (S^), and aerobic growth rate of heterotrophs on volatile substrate (S ), represented by Equations 4.4, 4.5, and 4.6, respectively. v  Table 4.5: pH impact function on growth reaction rate pH  FDH  4.00 5.00 6.00 6.50 7.00 7.50 8.00 9.00  0.00 0.52 0.97 1.00 0.93 0.75 0.47 0.05  The tabulated pH range was slightly wider than the measured pH range at the full scale facility used for model calibration and verification. The Port Alberni Mill WWT Plant pH values ranged from 4 to 8.6 (Figures A15.15 and A15.16 presented in APPENDIX 15). The mathematical placement of the pH94  dependency function can be seen in the reaction rate expressions presented previously.  Impact of pH on growth rate  Figure 4.4. pH impact on growth rate  Bleaching compounds impact  In recent years, the environmental impact of the pulp and paper industry has been reduced through the use of improved production technologies. In particular, the negative environmental impact associated with chlorine bleaching has led to the development and implementation of pulp bleaching technologies which eliminate the use of elemental chlorine or any chlorine-based compounds, moving toward the use of environmentally friendly bleaching agents. Commercial implementation of these technologies has occurred over the last decade. However, the research necessary to fully understand the impact of effluents from these new bleaching technologies on the environment and on existing biological treatment processes has lagged  95  behind, and is for many novel bleaching sequences, limited.  To model the impact of sudden bleaching agent spills on the performance of an activated sludge process, the present study focussed on hydrogen peroxide, one of the novel bleaching agents currently in use around the world. Experimental results on hydrogen peroxide impact on activated sludge systems are readily available.  The model implementation of a sudden bleaching agent spill in the present study was based on the experimental research on a lab scale facility conducted by Larisch and Duff (1996) at the University of British Columbia. Larish and Duff measured the loss of biomass activity after a continuous activated sludge reactor treating kraft mill effluent was shocked with varying concentrations of hydrogen peroxide. Oxygen uptake rate was used as a measure of biomass activity and was observed to decrease dramatically when subjected to shock loads of increasing concentrations of peroxide. However, it was also shown that activated sludge which had been acclimated to hydrogen peroxide in the reactor feed was more resistant to the shock loadings, and given a sufficient acclimation period, the microorganisms present in the sludge were able to adapt to receiving such an effluent. The acclimation time was reported to be on the order of tens of hours after a single shock loading. However, if a continuous, increasing load of hydrogen peroxide was applied, a further decrease in the oxygen uptake rate was observed.  Following the experimental research findings, the impact of a sudden spill of hydrogen peroxide on the activity of biomass was modelled in the form of a dimensionless function modifying the biomass growth rate coefficients. The modifying function expressed the fact that the hydrogen peroxide, as a strong oxidant, kills biomass, which is reflected in a decrease in the oxygen uptake rate. The oxygen uptake rate is related to the biomass viability through microbial growth rate coefficient and growth yield. The dimensionless impact function F  H202  on the biomass activity introduced in this way accounted for hydrogen peroxide impact on  substrate uptake rate, since the function captured all those parameters in the final differential equation form  96  for the model components. The peroxide impact function assumed a value of 1 for a non-existent peroxide spill and 0.13 for a shock load of 1,000 mg/L. The intermediate values of F are shown in Table 4.6 and H202  Figure 4.5. Mathematically, this function was incorporated in the reaction rates describing aerobic growth rate of heterotrophs on readily biodegradable soluble substrate (S ), aerobic growth rate of autotrophs on s  ammonia (S^,) and aerobic growth rate of heterotrophs on volatile COD (S ), represented by Equations 4.4, v  4.5, and 4.6, respectively. Although the hydrogen peroxide is consumed in the reaction with biomass, no experimental research data were available on the reaction rates. Thus, a conservative assumption was made that the hydrogen peroxide was only diluted in the aeration basin, but did not undergo any reaction.  Table 4.6: Hydrogen peroxide impact function on growth reaction rate H 0 (mg/L) 2  2  0  .  FH202 1  50  0.85  100  0.74  200  0.62  300  0.51  400  0.46  500  0.41  600  0.36  700  0.31  800  0.24  900  0.19  1000  0.13  The following paragraphs identify the reaction rates and describe the form of the rate equations used in the model to represent each process.  Aerobic growth of heterotrophs on readily biodegradable soluble organic components  Heterotrophic organisms use many different types of soluble organic substrates for growth, with the rate of growth and the yield of organism mass associated with the particular compound being dependent on the substrate characteristics. These characteristics need to be specified for the COD components being 97  considered in the model. As the biomass yield for the growth process (Y) changes, so the electron acceptor demand (1-Y) changes. In an aerobic system, the amount of oxygen consumed in the growth process varies, depending on the organic source. However, the actual form of the growth mechanism on different organic compounds was assumed to be the same. In this model, the growth on readily biodegradable soluble and volatile COD was modelled using the Monod expression for biological growth. The Monod equation for soluble COD was based on the bulk concentration of COD, i.e. mass of the organic compound of concern per unit of system volume.  Hydrogen peroxide impact on growth rate  200  400  600  800  1000  Hydrogen peroxide (mg/L)  Figure 4.5. Hydrogen peroxide impact on growth rate (based on Larisch and Duff (1996))  The form ofthe equation for growth on readily biodegradable soluble substrate is the following:  r, =u •  —-Z-Air-NH-P-F s,h s  -F  F  u  n  (4.4)  98  where [i is the maximum growth rate for readily biodegradable substrate, K is the half velocity coefficient h  sh  for readily biodegradable substrate, Air is the oxygen switching function, NH is the ammonia switching 3  function, P is the phosphorus switching function, F,,,, is the temperature impact function, F is the pH impact pH  function, and the F  H202  is hydrogen peroxide impact function.  A series of switching functions was attached to the rate equation to reduce the process rate to zero if there was not sufficient oxygen (Air), ammonia (NH ) or phosphorus (P) present for bacterial growth. Along with 3  the switching functions, a series of modulating functions was attached to describe the impact of temperature (F,,,,), pH (F ) and bleaching agents (F ) on the bacterial growth. The specifics of temperature, pH and pH  H202  bleaching agent functions were already discussed. These functions were developed specifically for the pulp and paper activated sludge model and are not a part of the ASM1.  Aerobic growth of autotrophs on ammonia  Autotrophic growth of nitrifiers (Z ) is important for the conversion of excess ammonia to nitrate in the bn  system. Growth of nitrifiers was expressed in terms of Monod kinetics with respect to the bulk concentration of ammonia in the reactor:  i=K-j^-- n - - H , - H o  r  z  Air p F  b  s,n  F  P  F  m  2  2  (4.5)  nh  The equation included two switching functions which decreased the nitrifier growth rate to zero if insufficient levels of oxygen and phosphorus were present in the system. Along with the switching function, a series of modulating functions was attached to describe the impact of temperature, pH and bleaching agents on the bacterial growth rate.  99  Aerobic growth of heterotrophs on volatile organic components  For aerobic growth on volatile organic components, an equation similar to that for growth on readily biodegradable substrate was used. The form of the equation is the following:  r  ^ ' T ^ ' S,V  Z  n  '  A  ^  m  ^  p  '  F  ^ '  F  m  '  F  ^  ( 4  -  6 )  V  where p is the maximum growth rate for volatile readily biodegradable substrate and K is the half velocity v  sv  coefficient for readily biodegradable substrate. As in the case for growth on readily biodegradable soluble substrate, a series of switching and modulating functions were attached to the rate equation.  Decay of heterotrophs  The death-regeneration hypothesis introduced in the Activated Sludge Model No.l was used to describe decay of biomass in the reactor. The hypothesis proposed that organisms die at a constant rate and generate a non-biodegradable fraction (f ) which contributes to the endogenous residue (Z ), while the remaining ep h  c  fraction (l-f ) adds to the mass of slowly biodegradable substrate (X ). The second fraction contributes to eP)h  s  biological growth. The proposed behaviour results in a cycling of organic material within an activated sludge system.  The net decay rate is the difference between the rate at which the organisms die and the rate the new organisms grow from the released slowly biodegradable COD. Literature reports (Grady and Lim, 1980; Henze et al., 1987; Metcalf & Eddy, 1991; Orhon and Artan, 1994) suggested that the process was a first order process. The actual form of the decay rate used in the model refers to the overall (true) decay rate of the organisms, as suggested in the ASM1 (Henze et al., 1987). It was also assumed to followfirstorder  100  kinetics with respect to the concentration of heterotrophs in the activated sludge system, with b representing h  the overall decay rate:  4  where b is the decay coefficient, and h  b  bh  h  tm,b  (4.7)  is a temperature impact function acting on the decay coefficient.  The model assumed that there is release of nitrogen (Henze et al., 1987) and phosphorus (Baker, 1994) in parallel with the release of organic material. Along with the definition of decay rate, a function was attached to describe the impact of temperature on the decay rate.  Decay of autotrophs  The decay of autotrophs was represented in a similar fashion to that of heterotrophs: r-=b 5  -Z, -T  t  n  bn  ,  tm,b  (4.8)  where b„ is the nitrifier decay coefficient and F^ is a temperature impact function. b  Hydrolysis of slowly biodegradable components  One of the constituents of the influent COD is the biodegradable particulate fraction. This fraction is degraded in a different manner than the readily biodegradable soluble portion of the influent COD. According to the assumptions made in ASM 1, the biodegradable particulate COD is assumed to be enmeshed in the sludge mass after entering the reactor. Before the material is rendered readily available for biomass, it has to be broken down extracellularly by enzymes produced by the microorganisms. The process produces  101  readily biodegradable soluble substrate that can be used subsequently for biological growth.  To model this hydrolysis/solubilization process, similar methods to those used for development of ASM1 were applied. The rate of hydrolysis was based on the ratio between the concentration of particulate COD (X ) and the concentration of biomass (Z,, ) in the reactor rather than the concentration of the bulk liquid s  h  concentration of COD used in the simple form of the Monod equation. The term X /Z replaces substrate s  bh  (S) in the Monod equation. This form of the equation used in this model is:  r  e=  K  H  K  l  Y  (4-9)  7  x s bh  K  +A  /Z  where K is the maximum hydrolysis specific rate, K is the hydrolysis half-saturation coefficient. h  x  The rate equation was modified by switching functions which decreased the hydrolysis to zero if there was no oxygen in the system, or which reduced the rate if only nitrate was available.  Volatilization of the volatile organic COD  Volatile contaminants may be removed from wastewater by volatilization to the atmosphere, which can occur from the surface of open tanks such as aeration basins or clarifiers. The majority of volatilization however, occurs through air stripping in aerated process vessels (Melcer et al., 1992). Both volatilization from the surface of aeration tanks and stripping in aeration tanks were included in the model.  Volatilization of volatile organic compounds from the wastewater in the present study was based on the results reported by Matter-Muller et al. (1980,1981), as well as research on volatilization of pulp and paper  102  process effluent reported by NCASI (1986b) and by Barton (1987). The process of volatilization was modelled using a two-film model. Liquid phase resistance of the compound was related to oxygen by the transfer proportionality constant T . Derived, the reaction rate for volatilization is: 1  +  1  (4.10)  a  where S is the volatile COD component concentration, Y is the transfer proportionality constant, K ao is v  v  L  2  the mass transfer coefficient at the free surface of the basin, K a is the gas phase mass transfer coefficient, v  g  and H is Henry's law constant. c  Stripping of volatile organic components  Stripping is defined as the transfer of organics at dispersed gas/water interfaces such as the surface of water droplets forming the spray produced by mechanical surface aerators or air bubbles produced by subsurface aeration devices.  The air stripping of volatile organic compounds from the wastewater in the present study was modelled according to the results of air stripping research by Matter-Miiller et al. (1980,1981), as well as research of stripping on pulp and paper process effluent, reported in NCASI (1986b) and Barton (1987). The rate of stripping was defined as: a(c;-c )  (4.11)  !  v  where K a is the overall mass transfer coefficient of volatile compound from the liquid phase, C*v is the s  L  liquid phase concentration of volatile compound in equilibrium with the gas phase, and C is the bulk v  liquid/reactor concentration of volatile compound.  103  For surface aeration, C * was approximated as zero, based on the assumption that sufficient atmospheric v  turbulence existed such that no appreciable buildup of organic compound developed in the overlying air mass (NCASI, 1986b), which is valid only for basins which are not covered.  Accordingly, assuming C*=0, and using accepted notation of the pulp and paper activated sludge model v  (soluble components are noted by "S") the transfer rate for surface aeration is: (4.12)  r =K *a-S g  L  v  where S is the volatile COD component. v  In subsurface aeration, transfer of the compound is into rising bubbles rather than directly to the atmosphere. Due to the small volume of bubbles, partial saturation of gas bubbles can be expected to occur for intermediate to highly volatile compounds. Derived from that assumption, the reaction rate for subsurface aeration is: r Aff;(l-e-V 8  v  (4.13)  where Q is the gas flow rate, H is Henry's law constant for the specific component, and V is the aeration g  c  basin volume. K'a-V 9  —  (4.14)  C  where K a is the overall mass transfer coefficient of volatile compound from the liquid phase. s  L  104  Ammonification  The process of ammonification was incorporated in the model for conversion of organic nitrogen to ammonia. The model assumed that organic nitrogen was a product of microbial decay.  Ammonification was modelled as a first order rate equation in terms of the concentration of organic nitrogen (Henze et al., 1987). The expression rate was also assumed to be first order with respect to the concentration of heterotrophic biomass in the system, as proposed in ASM1. The expression for the reaction rate was the following:  9 r' A  r  =K  S  (4-15)  where K, is ammonification rate.  Heat transfer  The process of heat transfer was modelled using a dynamic model presented by Sedory and Stenstrom (1995). The authors demonstrated very good results in predicting activated sludge aeration basin temperatures with a model which takes into account changes in wastewater temperature, aeration and biological reaction and which was tested using full scale plant data.  The main idea of the heat transfer model was to set up the basic energy balance equation, which is essentially identical to the mass balance equation used for the rest of the processes in the activated sludge model. The reaction rate for the heat transfer process is based on the enthalpy change between influent and effluent streams. The enthalpy change is equivalent to the net heat gain or loss. The net heat transfer is the sum of the components that represent the paths of heat transfer. There were eight components that affected the  105  process of heat transfer: solar radiation (Q  so  ),  long-wave radiation (Q ), surface convection (Q ), evaporation lr  c  (Qe)> power input (Q ), aeration (Q ), biological reactions within the system (Q ), and conduction through p  a  b  the basin walls (Cv). The details on each component are presented in APPENDIX 16. According to the discussion in APPENDIX 16 the heat transfer rate is defined as follows:  _ Qso Qp Qb +  r 10  +  Qlr Qc Qe Qa  D C -V  Qt\  (4.16)  w pw  where D is the density of wastewater, C is the specific heat of wastewater, and V is the aeration basin w  pw  volume.  Processes related to hydrogen peroxide  Since no experimental data were available on the consumption of bleaching agents (hydrogen peroxide) by biomass after its spill to the aeration basin, an assumption was made that no consumption (or production) of the bleaching agent took place in the aeration basin.  Summary of model processes  The previous discussion described the processes that contributed to the overall behaviour of the pulp and paper activated sludge system. The reaction rate equations make a base for creating the differential equations that mathematically describe the process. Thus, the next stage in the model development was to relate the model components and processes in a mathematical structure which reflected the stoichiometry of the processes.  Activated sludge treatment in pulp and paper applications is subject to changes in pH, temperature, or sudden  106  spills of bleaching agents present in the pulp and paper process effluent. The impacts of these variables were introduced into the reaction rates through the temperature, pH and bleaching agent functions. These functions produced dimensionless values that modified the related parameters in the reaction rate expressions.  4.1.4  Model formulation  The information on the model components and processes was used for developing a system of equations which mathematically represented the response of the activated sludge system. This involved determining stoichiometric expressions to describe the effects of particular reactions on the masses of compounds and kinetic expressions to determine the rate of the reactions occurring in the system. Used with the influent wastewater composition and the configuration of the system, these equations calculated the mass balances for the model components. The mass balances formed a set of simultaneous non-linear differential equations which were the basis for simulating the behaviour of the system. The model components, processes and process rates were, as proposed in the ASM 1, presented in a matrix format that is flexible and easy to understand and which allowed the model structure to be changed with few problems.  The matrix representation of a pulp and paper activated sludge model is presented in Table 4.7 and Table 4.8. The components of interest are listed in symbol form across the top of the matrix. The biological and physical reactions occurring within the reactor are tabulated down the left hand side of Table 4.7. The actual rate equations which govern the reactions are tabulated down the right hand side of Table 4.8. and are given the symbol r . The subscript i denotes the biological or physical process the rate equation represents. The y  kinetic parameters used in the rate equations are listed in Table 4.9. Finally, the body of the matrix (Table 4.7) contains the stoichiometric coefficients, v,-,, defining the mass action relationship between the components in the individual processes. The stoichiometric parameters are listed in Table 4.10.  107  In Table 4.7, the stoichiometric coefficient associated with a reaction which consumes the component is negative while the one associated with a reaction that produces the component is positive. All concentrations of model components relating to biomass or organic substrate are expressed in terms of COD equivalents, which simplified many of the stoichiometric coefficients. This provides a check on the continuity of the matrix since the sum of the stoichiometric coefficients across any row in the matrix must equal zero.  The model equations are formulated easily using this format. Multiplication of the rate equation by the stoichiometric coefficient determines the impact of the given process on the particular model component. The combined impact of each of these model processes on each of the model components formed the mechanistic model of this system.  108  Table 4.7: Model matrix for pulp and paper activated sludge model - part 1 component j i  1  process i Aerobic growth of heterotrophs on S  1  2  Zbh  Zbn  3  4  x  s  5 Xi  6 S  v  1  s  2  Aerobic growth of heterotrophs on S  1  -1/Y  V  v  3  Aerobic growth of  1  autotrophs on  4  Decay of heterotrophs  5  Decay of autotrophs  6  Hydrolysis of X  7  Volatilization of S  -1  8  Stripping of S  -1  9  Ammonification  10  Heat exchange  fep.h  -1  f ep,n  Kp,„  -1  s  v  v  -1  109  Table 4.7: Model matrix for pulp and paper activated sludge model - part 2 component j i  1  process /  7  8  10  9  s  Sp  s  Aerobic growth of  -1/Y  h  heterotrophs on S  ~fzbh,n  "fzbh,p  _f  "fzbh,p  s  2  Aerobic growth of  zbh,n  x  heterotrophs on S  v  3  Aerobic growth of -l/Y.-W  autotrophs on  4  Decay of heterotrophs  f  5  Decay of autotrophs  f  6  Hydrolysis of X  7  Volatilization of S  8  Stripping of S  9  Ammonification  10  Heat exchange  -f *f  f  zbh,n ep,h zeh,n  A  -f *f  zbn,n ep,n zen,n  A  -f *f  zbh,p ep.h zeh,p  A  A  f  -f *f  zbn,p ep,h zen,p  x  1  s  v  v  1  -1  110  Table 4.7: Model matrix for pulp and paper activated sludge model - part 3 component j i  1  process i  11  12  13  14  15  S  S  Si  s„  T  no  Aerobic growth of  0  A  m  -(1-Y )/Y h  heterotrophs on S  h  s  2  Aerobic growth of  -(1-Y )/Y V  heterotrophs on S  V  v  3  Aerobic growth of  1/Y  n  autotrophs on  4  Decay of heterotrophs  5  Decay of autotrophs  6  Hydrolysis of X  7  Volatilization of S  8  Stripping of S  9  Ammonification  10  Heat exchange  -(4.57-Y )/Y„ n  s  v  v  111  Table 4.8: Process rate equations  PROCESS RATE COEFFICIENTS r, process /  i  Aerobic growth of  S  1  —-Z-Air-NH-P-F-F  r=\iheterotrophs on S  K  s  H  „ ""  2°i  H  s  Aerobic growth of r  2  —•Z..-AirNHsP-F  v"  = u  „-F, -F„  n  v  Aerobic growth of  r-ii-  3 autotrophs on S  p  s,h s  2 heterotrophs on S  +S  3  "  nh  Decay of heterotrophs  5  Decay of heterotrophs  6  Hydrolysis of X  g  bn  +  s,n nh  * b-Z,-Ftm, 4 H bh  r  4  - Z -AirP-F  h  « fr  r  F 'F  pH tm  H0 2  2  =  b  5 N bn b  r  =b  Z  Ftm  s bh K +XIZ x s bh  6  s  b h  hU  7  Volatilization of S  8  Stripping of S  v  9  Ammonification  10  Heat exchange  r=K-S 1 V  v  r=K,a-S o LS  V  v  QG a {surface), r =—f -H -(1 -e > S {subsurface) o y C V  9 R ON bh  r  =K  S  Z  Q  +  Q  Qu~Q,  ~Q ~Q ~Q ~Q  +  ^•so *^p ^b ^Ir —'c —'e  r  io  D  .  c  -v  ^tw  112  Table 4.9: List of activated sludge kinetic parameters Symbol p K p K p K b b K  Description  .  maximum growth rate of Z on S half-velocity coefficient of Z on S maximum growth rate of Z,, on S half-velocity coefficient of Z on S maximum growth rate of 2\ on S^ . half velocity coefficient of Z on S.J, decay coefficient of Z decay coefficient of Z,,,, maximum specific hydrolysis rate hydrolysis half-saturation coefficient K,. ammonification rate K/a^ mass transfer coefficient at the free surface of the basin K a gas phase mass transfer coefficient H Henry's law constant Y transfer proportionality constant K a overall mass transfer coefficient al solar altitude CC cloud cover in tenths (1-10) E emissivity of the water surface S Stefan-Boltzman constant L reflectivity of water surface B atmospheric radiation factor W wind velocity p air density C air specific heat R,, relative humidity C conversion factor for HP to cai P wire horsepower r) efficiency known from the aeration system design Ko surface conductivity at the air-surface outside the basin Ko surface conductivity at the ground-surface outside the basin K thermal conductivity of the wall material p„ density of wastewater C specific heat of wastewater h  bh  sh  bh  v  h  sv  bh  n  n  sn  bn  h  bh  n  h  v  g  s  s  v  v  Unit 1/day g COD/m 1/day g COD/m 1/day g COD/m 1/day 1/day 1/day 1/day mCOD/g/day 1/day 1/day 3  3  3  3  c  s  L  air  pa  hp  a  g  pw  1/day deg cal/m /day/K 2  m/s kg/m cal/kg/°C % cal/day/hp 3  cal/m /day/°C cal/m /day/°C cal/day/m /°C kg/m cal/kg/K 2  2  2  3  113  Table 4.10: List of activated sludge stoichiometric parameters SymbolDescription f f[ Y Y Y  h v n  ^zbh,!! f zeh,n f *zbh,p f zeh,p  Unit  ratio COD/biomass SS ratio COD/non-biomass SS  g COD/g biomass g COD/g SS  growth yield of Z on S growth yield of Z on S growth yield of Z on S_  g cell COD yield/ g COD utilized g cell COD yield/ g COD utilized g cell COD yield/ g COD utilized  bh  s  bh  v  bn  g N/g COD in active biomass g N/g COD in endogenous biomass g P/g COD in active biomass g P/g COD in endogenous biomass g COD in endogenous biomass/g COD in active biomass g N/g COD in active biomass g N/g COD in endogenous biomass g P/g COD in active biomass g P/g COD in endogenous biomass g COD in endogenous mass/g COD active biomass  nitrogen content in active Z nitrogen content in endogenous Z,, phosphorus content in active Z,, phosphorus content in endogenous Z fraction of Z remaining as endogenous residue bh  h  h  bh  bb  A  fep.h zbn,n A  zbn,p  A  f  zen,p  x  nitrogen content in active Z nitrogen content in endogenous Z_ phosphorus content in active Z phosphorus content in endogenous Z^ fraction of Z remaining as endogenous residue bn  bn  n  bn  Mathematicalformulation  The set of differential equations describing the behaviour of the aeration basin was presented in the form of non-linear mass balance equations::  i_Qinfl i,inJJ~Qout' i  dC  dt  C  C  (4.17)  ±p.  where Q is the concentration of the "i-th" component (system variable), i=l ,2,..., n; Q is the concentration inf  of the component of concern in the influent stream, Q^ is the influent flow rate, Q is the outflow flow rate, out  V is the aeration basin volume, Pj is the production/consumption of the component C-„ t is the time, and n is the number of components.  For the case of the energy balance equation for heat transfer, Q is the temperature of the wastewater in the 114  aeration basin, and Q the temperature of the influent wastewater. If production of the component Q occurs inf  in the system, a plus sign is associated with the equation member Pj, while if consumption occurs, a minus sign is associated with the equation member P . ;  The set of the non-linear differential equations was used in a simulator that modelled the entire system. To make the model workable, a commercial software package capable of solving the set of non-linear first order differential equations was required. The choice of software is discussed in APPENDIX 11. The Simnon package (SSPA Maritime Consulting AB, 1995) was used in the present study. For the purposes of model calibration and verification, the simulator was run with a set of input data from a full scale plant. An activated sludge model unit was assigned to each aeration tank of the full scale system and a clarifier model unit to each real clarifier.  4.1.5 Adequacy of model response  Even though the proposed mechanistic model is known to perform as a dynamic model, it is important to demonstrate that the model coded in the Simnon package generates responses that are reasonable. Since the structure of the model equations provide mass balances, an indication of the correctness of the computer code is if the mass balances are accurate. In the early stages of the computer code development, the mass balance checks were performed regularly to ensure the accuracy of coding. In addition to that, model responses generated by the computer code developed for the present study were compared to those generated by computer code developed for the identical model structure by Praxis (Praxis is a software developing company from Nanaimo, B.C.). The model responses were identical.  In addition to correctness of the computer code, of particular interest were the time constants of dynamic model response. These were determined by simulating the process responses to a series of disturbances in  115  the input variables and assessing the adequacy of the model response. A data set was created with step changes of the following input variables: influent COD, ammonia addition, phosphorus addition, influent flow rate, and recycle flow rate. Since the times to reach steady-state between the changes might be very long, the changes were not designed to force the model to reach steady-state. It was more important to show the rates of the model responses and, later on, in the process of model calibration, to compare these to the sampling frequency of the measured data.  The disturbance patterns shown in Figure 4.6 are relative. They are given in the form of value/initial value in order to compensate for the different scales associated with the input variable values. The initial values were the following: influent flow rate 70,000 m/day, recycle flow rate 30,000 m/day, influent COD 600 3  3  mg/L, ammonia addition 20 mg/L N, and for the phosphorus addition 4 mg/L P. The volume of the aeration basin consisted of four basins each of5,200 m connected to form a plug flow reactor and the average sludge 3  age 7 days. The model parameter values are presented in Table 4.11. The variable values from the first aeration basin were presented.  The pattern shown in Figure 4.6 is one of more than several hundred patterns tested in the course of the model development. All the tests showed consistent model behaviour pointing that the model structure was coded correctly. The model responses to the disturbances presented in Figure 4.6 are shown in Figure 4.7. As Figure 4.7 and the following discussion show, the generated responses are reasonable when assessed against understanding of real process behaviour. All responses quicker than one day were considered 'fast', while the ones that took more than one day to reach steady-state were considered 'slow'. The reason for this differentiation was that the measured data used for model calibration were one-day averages. Practically, the following analysis was used to determine what model variables could be calibrated as dynamic variables and which were steady-state variables.  116  Table 4.11: Values of activated sludge model parameters used for model response analysis Parameter  Value  Y  h  b Y  n  0.58 39 158 0.53 0.3 15 2.7 0.29 7.91 0.5 0.07 0.046 0.064 0.024 0.016 0.523 0.049 0.084 0.036 0.027 0.342 0.08 0.11  h  1*. b„ K K% h  *zbh,n *zeh,n fzbh.p f f*ezpc.h h,p  f f*zbn,n f fzbn,p ZB1.P *ep,n  K»  Variable step changes Aeration Basin 1.25 1.20 O O) 1.15  c  (0  JC  1.10  u o > 1.05  x  •*->  K  O  a:  1.00 0.95 0.90 0.000  ffl10.000  20.000  30.000  40.000  50.000  60.000  70.000  time ( d a y s ) Qinf _  x  -Qrec _ e  COD  NH3  Figure 4.6: Input variable relative disturbances for the aeration basin 117  Figure 4.7 shows model responses for heterotrophic biomass, autotrophic biomass, particulate inert COD, MLSS, readily biodegradable COD, organic nitrogen, ammonia, nitrate & nitrite and phosphorus. The slowly biodegradable COD was not shown, but the MLSS was presented instead. The slowly biodegradable COD component (1) behaved similarly to the inert COD component, (2) its concentration was significantly less than that of the inert particulate COD, and (3) it was included as a part of the MLSS (MLSS=heterotrophs + autotrophs + inert particulate COD + slowly biodegradable COD). While the particulate COD component concentrations were expressed as mg/L COD, the MLSS concentration was expressed as mg SS/L.  In order to avoid graph scale problems in presenting the model responses caused by the long time intervals the model requires to achieve the steady-state, and for the purpose of presenting the graphs in an acceptable scale, the step changes of disturbances were introduced before the model reached the steady-state. However, the model responses to sets of disturbances were also checked for disturbances applied to the model that had reached the steady-state. The presented results and graphs are consistent with the model responses if the disturbances are applied to the model that reached the steady-state. To show that some details are visually lost on the graphs if the input step changes are introduced after the model reached the steady-state, a set of graphs was generated with the same step changes, but introduced every 30 days instead every 10 days. The graphs are presented in APPENDIX 17. As it can be seen from the graphs, some variables did not reach steady-state even after 30 days.  Impact caused by influent COD step change (foodfor heterotrophs)  From day 0 to day 10 the system was on its way to reach the steady-state. The first change was introduced at day 10 at which the influent COD was decreased. The change was maintained until day 20, when the influent COD was returned to its initial value. As expected, the readily biodegradable COD component concentration decreased because the readily biodegradable COD is a part of the influent COD (Figure 4.7).  118  The concentration of heterotrophic biomass readily decreased because the amount of available food was reduced. Similarly, the concentration of the particulate COD components (inert and slowly biodegradable) decreased. The reduction in biomass was also reflected into the MLSS concentration. The reduced amount of heterotrophs also meant less decayed heterotrophic biomass that, in turn, resulted in less organic nitrogen released to the system. Less organic nitrogen resulted in reduced ammonia concentration, because the organic nitrogen was transformed into ammonia. Less ammonia resulted in decreased concentration of the autotrophic biomass, because the ammonia was food for autotrophs.  The phosphorus concentration increased because the lower heterotroph population required less phosphorus, and the influent phosphorus concentration was not reduced.  The reduced influent COD concentration was returned to its initial value at day 20. The system response was in the opposite directionfromthat caused by decreased influent COD concentration, except for the ammonia and nitrite plus nitrate. The reason was that the increased concentration of heterotrophs required more ammonia than that supplied by decaying biomass. As a consequence, the autotrophic biomass was substrate limited (ammonia) and decayed, producing less nitrate and nitrite.  In general, the system was not able to reach steady-state within 10 days after the change was introduced, meaning that the system response time constants are significantly longer than one day. It is interesting to note that the initial response of autotrophs was very quick, and the consequent response was linear (dictated by the shape of the growth rate function), but they required a long time to reach the steady-state.  Impact caused by influent ammonia step change (foodfor autotrophs)  The simulated influent ammonia concentration was increased at day 30. The increase in influent ammonia  119  concentration caused an increase in the concentration of autotrophs (more food), nitrate and nitrite (product of autotrophic growth) and organic nitrogen (increased concentration of decayed autotrophs). Being directly affected by the changes in the influent ammonia concentration, the aeration basin ammonia concentration also increased (Figure 4.7).  A slight drop (1 mg/L) in the readily biodegradable COD was also observed. The higher ammonia concentration resulted in an increase in the value of the ammonia switching coefficient, causing an increase in the heterotrophic growth rate that consequently increased the readily biodegradable COD removal rate.  Impact caused by influent phosphorus step change  The influent phosphorus concentration was increased at day 40, which caused the aeration basin phosphorus concentration to increase. The influent phosphorus concentration also caused an increase in the concentration of heterotrophs because the phosphorus switching function value increased the heterotrophs growth rate. Consequently, more readily biodegradable COD was removed (Figure 4.7). More heterotrophs required more ammonia whose concentration decreased. Less ammonia meant less food for autotrophs, causing the autotrophic biomass concentration to decrease, which in turn, produced less nitrate and nitrite.  The change of the influent phosphorus concentration did not cause significant change of the MLSS because the heterotrophs did not account for a significant part of the MLSS.  As opposed to the rate of the changes caused by influent COD reduction, the changes caused by the increased influent phosphorus concentration were relatively fast. The system behaviour was very similar to that caused by influent ammonia concentration change.  120  Impact caused by influentflow rate step change  The influent flow rate was increased at day 50. This change caused an increase in the food supply (readily biodegradable COD) causing the heterotrophic biomass concentration to increase. The additional volumetric loading caused the inert particulate COD (and consequently the MLSS) to drop. However, both the inert particulate COD and the MLSS recovered later by the build up of the heterotrophic biomass (Figure 4.7).  The influent flow rate increased the mass of ammonia introduced to the aeration basin (ammonia influent concentration was the same, but since the flow was higher, the mass of ammonia was higher too), that in turn increased the ammonia concentration. More ammonia meant more food for the autotrophic population, i.e. increase in the autotrophs concentration. The additional volumetric loading caused the concentration of organic nitrogen to decrease, but it was recovered by the increase in the decayed biomass . However, both the inert particulate COD and the MLSS recovered later by the accumulation of the heterotrophic biomass.  The additional volumetric loading also caused the concentration of nitrate and nitrite to drop, but the response was not as fast as for the readily biodegradable COD or ammonia, because it was offset by a quick response of the autotrophs that quickly produced nitrite and nitrate.  The behaviour of phosphorus was similar to that of the MLSS.  The rate of the model response was significantly slower than one day.  Impact caused by recycle flow rate step change  The recycle flow rate was decreased at day 60. This change caused an increase in the secondary clarifier  121  underflow suspended solids concentration that was reflected in an increase in the aeration basin particulate COD components (inert, slowly biodegradable, and active biomass). More heterotrophs reduced the readily biodegradable COD and more phosphorus and organic nitrogen (Figure 4.7) were used. The applied change of the recycle flow rate change did not cause any significant impact on the remaining variables. Being closely related to the secondary clarifier, the extent of the change can cause changes in different directions.  The rate of the model response was very fast.  Impact caused by sludge age step change  The impact caused by changing sludge age (wastage flow rate) was not presented, because it is well known that variations in the wastage flow rates cause slow system response. However, the model behaviour caused by changes in the wastage flow rates was checked to prove that a proper model coding into a computer program.  Conclusions  The model response demonstrated that the time constants for the dynamic model responses depended on the nature of the imposed step change and/or observed variables. As an example, the model response caused by a change in the recycle flow rate was very quick, while that caused by a change in the influent flow rate was significantly longer than one day for all the variables except the autotrophic biomass. Some model variables initially reacted quickly but required a long time to reach the steady-state (autotrophs, ammonia), while some reacted quickly only to specific changes. For example, the phosphorus response to the increased influent phosphorus concentration was quick, while the response of the same variable was significantly slower to the increase of the influent COD or the influent flow rate.  122  The system response appeared to be less than one day to changes in the influent ammonia and phosphorus concentrations.  It was relatively simple to assess the model responses while only one input variable was varied at a time. If more than one change was applied at the same time (as happens in full scale facilities) it was difficult to