Open Collections

UBC Theses and Dissertations

UBC Theses Logo

UBC Theses and Dissertations

Pulp mill condensate treatment in an automated sequencing batch reactor Woo, Norman 2004

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

Item Metadata

Download

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

Full Text

PULP MILL CONDENSATE TREATMENT IN AN AUTOMATED SEQUENCING BATCH REACTOR by Norman Woo B. A. Sc., The University of British Columbia, 1999 A THESIS SUBMITTED IN PARTIAL FULFILMENT OF THE REQUIREMENTS FOR THE DEGREE OF MASTER OF APPLIED SCIENCE in THE FACULTY OF GRADUATE STUDIES (Department of Chemical & Biological Engineering) We accept this thesis as conforming to the required standard  THE UNIVERSITY OF BRITISH COLUMBIA August 2004 © Norman Woo, 2004  THE UNIVERSITY OF BRITISH COLUMBIA  FACULTY OF GRADUATE STUDIES  Library Authorization  In presenting this thesis in partial fulfillment of the requirements for an advanced degree at the University of British Columbia, I agree that the Library shall make it freely available for reference and study. I further agree that permission for extensive copying of this thesis for scholarly purposes may be granted by the head of my department or by his or her representatives. It is understood that copying or publication of this thesis for financial gain shall not be allowed without my written permission.  NJ n R.M FsKl  Woo  Name of Author (please print)  ? PL P  Title of Thesis:  Automate  Degree:  Department of  Date (dd/mm/yyyy)  M | L.  ft  M fr^Tf. ft. O f C H & H 1 C(\ L  Co|Q DE.M6  BATQH  !\PPL IfcP S c AfO &  frTfc  T|2.eftTMEMT  W  A (\J  £FP<C.TO&  l £  Mc.f r Year:  ftt6UQGlCM  2 0 Q H £  1 N E-fcfrt M S  The University of British Columbia Vancouver, BC Canada  grad.ubc.ca/forms/?formlD=THS  page 1 of 1  last updated: 20-Jul-04  In an effort to both meet more stringent air quality guidelines and to be able to recycle a potential waste water stream, kraft mill evaporator condensate has been identified as a waste water stream that can be reused in other pulp and paper mill operations.  This study involves the treatment of kraft mill combined condensate in a sequencing batch reactor (SBR). It is proposed that an inline SBR can be used to effectively treat a combined condensate waste stream such that all methanol in the stream is rapidly and economically removed by the system. This research was conducted in cooperation with Crestbrook Forest Industries Ltd. Pulp Division, Skookumchuck pulp mill.  Previous work by Milet and Duff (1998) showed that an automated sequencing batch reactor was capable of reducing methanol and chemical oxygen demand (COD) concentrations by 100% and >70%, respectively. However, the reactor operated at or near zero dissolved oxygen (D.O.) concentration through much of the cycle time and had no means to control sludge age.  In order to address some of the deficiencies of the previous work, feedback D.O. control was implemented, such that the reactor could run above zero D.O. concentrations. As well, a solids probe was installed on the SBR such that the mixed liquor suspended solids (MLSS) and sludge age could be monitored and controlled.  One hundred percent methanol removal was achieved, while 77% of the COD was removed from the combined condensate in the SBR. The proportional only PID controller for D.O. control consistently controlled the D.O. to a desired level of 2 mg/L. The MLSS concentration in the reactor was also effectively controlled to within ±100mg/L of the desired setpoints during a 30 day run. Oxygen limitations were discovered to occur for the treatment of methanol, as degradation rate was better by 1,3x to 2x during non-oxygen limited conditions. Sludge age in the SBR ranged from 2 to 8 days during controlled biomass concentrations, while sludge age was 10 to 20 days when the system was allowed to grow.  List of Tables  vii  List of Figures  viii  List of abbreviations and acronyms  x  List of units  xii  Acknowledgements  xiii  1.0  2.0  Introduction . .  1  1.1  The UBC kraft mill condensate treatment system: a project overview  1  1.2  Structure of this report  1  Literature Review  3  2.1  Kraft mill condensate  3  2.1.1  Chemical constituents of kraft mill condensate  4  2.1.2  Pulp mill water system closure  4  Kraft mill condensate treatment technologies  6  2.2.1  Steam strippers  6  2.2.2  Aerated lagoons and activated sludge systems  6  2.2.3  Sequencing batch reactor  7  2.2  2.3  2.4  Operating parameters for biological treatment  9  2.3.1  D.O. and K L a in biological processes  9  2.3.2  Biomass growth rates and sludge age in biological processes  10  Control theory in SBR operation  ;  . . . 12  t  r  2.4.1  D.O. feedback PID control in biological processes  12  2.4.2  Solids concentration and sludge age control systems  12  2.4.3  SBR REACT phase time control system  13  3.0  Research Objectives  15  4.0  Materials and Methods  17  4.1  Process schematic of sequencing batch reactor (SBR)  17  4.1.1  Stirred tank reactor  18  4.1.2  Preheat dosing vessel  19  4.1.3  Pumps, sensors, and controllers  19  4.2  4.3  4.4  4.5  4.6  Condensate, return activated sludge, nutrients, and pure chemicals sources . . . 20 4.2.1  Combined condensate  20  4.2.2  Return activated sludge (RAS)  21  4.2.3 Nutrients  21  4.2.4  22  Pure methanol substrate  Operation of the sequencing batch reactor (SBR): control algorithms  22  4.3.1  Dissolved oxygen control algorithm  22  4.3.3  REACT phase duration control using methanol consumption  27  4.3.4  REACT phase pH control  29  Computer control and monitoring  31  4.4.1  Feedback control systems  31  4.4.2  Self-cycling fermentation (SCF) Pascal program  31  4.4.3  LabVIEW graphical interface  31  Standard wastewater assays  32  4.5.1  Biochemical oxygen demand (BOD5)  32  4.5.2  Chemical oxygen demand (COD)  33  4.5.3  Total suspended solids (TSS)  33  Further wastewater analysis  34  4.6.1  Methanol analysis  34  4.6.2  Respirometry  34  4.6.3 4.7  K La  35  Methods for data analysis 4.7.1  36  COD and methanol degradation rates for oxygen limiting and non-oxygen limiting runs  5.0  6.0  36  Results and Discussion  38  5.1  Combined condensate characterization  38  5.2  Combined condensate methanol stripping tests  39  5.3  Respirometric determination of condensate treatment kinetics  41  5.4  Determination of K L a in the SBR  44  5.5  Sequencing batch reactor operation  46  5.5.1  Methanol and COD degradation tests  47  5.5.2  Solids control experiments  50  5.5.3  Dissolved oxygen control tests  54  Conclusions  56  6.1  Combined condensate treatment in an SBR ."  56  6.2  SBR scale-up and sensor modifications  56  6.3  SBR phase control Pascal program and LabVIEW interfacing software  57  6.4  Reactor performance under oxygen limiting and non-oxygen limiting scenarios 57  6.5 7.0  D.O., REACT phase duration, and solids controller performance  Future Work 7.1  7.2  !  58 59  Control algorithms  59  7.1.1  D.O. control and biological modelling  59  7.1.2  Sludge age control  59  SBR condensate treatment  60  7.2.1  Foul condensate  60  7.2.2  Higher temperature treatment  60  7.2.3  SBR scale-up  60  8.0  References  61  Appendix A - LabVIEW PID controller  66  Appendix B - SBR Pascal program  67  Appendix C - Example LabVIEW sequencing control program  80  Appendix D - Supplementary experimental data  81  Table 4.1: Reactor instrumentation chart  20  Table 4.2: Recommended nutrient concentrations in biological reactor  22  Table 5.1: Combined condensate characteristics: BOD5, CODfiltered and unfiltered, methanol concentrations  38  Table 5.3: COD and methanol degradation rate coefficients  50  Table 5.4: Sludge age for the oxygen and non-oxygen limited cases  52  Figure 2.1 - Skookumchuk kraft pulp mill evaporator train  3  Figure 2.2 - SBR phases during a single treatment cycle  8  Figure 4.1 - Process schematic of the SBR system  17  Figure 4.2 - Feedback D.O. control block diagram  24  Figure 4.3 - Biomass control algorithm  25  Figure 4.4 - REACT phase methanol control algorithm  28  Figure 4.5 - pH control algorithm  30  Figure 4.6 - LabVIEW GUI  32  Figure 5.1 - Average methanol and COD concentrations over 3 hours during air stripping experiments  41  Figure 5.2 - Substrate uptake rates normalized to biomass concentration for a 30 day respirometry run. 42 Figure 5.3 - Maximum substrate uptake rate over a 30 day respirometry run  43  Figure 5.4 - Oxygen re-saturation curve to determine K L a  44  Figure 5.5 - A typical COD degradation curve for combined condensate sequencing batch reactor treatment  48  Figure 5.6 - A typical methanol degradation curve for combined condensate sequencing batch reactor treatment  49  Figure 5.7 - Demonstration of the biomass concentration control system over a 30 day run. .. 51 Figure 5.8 - Sludge age per cycle  53  Figure 5.9 - Reactor sludge age over a 30 day treatment period  53  Figure 5.10 - A typical sequencing batch reactor run  54  Appendix A.l - PID GUI frontend and the PID LabVIEW backend  66  Appendix C.l - Example LabVIEW SBR program interface  80  Appendix D.l - COD degradation kinetic constants at 1000 mg/L biomass  81  Appendix D.2 - COD degradation kinetic constants at 1500mg/L biomass  82  Appendix D.3 - COD degradation kinetic constants at 2000 mg/L biomass  83  Appendix D.4 - Methanol degradation rate at 1000 mg/L biomass  84  Appendix D.5 - Methanol degradation rate at 1500mg/L biomass  85  Appendix D.6 - Methanol degradation rate at 2000mg/L biomass  86  BOD  biochemical oxygen demand  BOD5  5 day biochemical oxygen demand  COD  chemical oxygen demand  DECANT  sequencing batch reactor treated effluent decanting phase  D.O.  dissolved oxygen  DOSE  sequencing batch reactor fill phase  DRAW  sequencing batch reactor treated effluent decanting phase  GC  gas chromatograph  GUI  graphical user interface  HAP  hazardous air pollutant  IMC  internal model control  k  rate constant  K La  oxygen mass transfer coefficient  LVHC  low volume high concentration  MACTI  maximum achievable control technology phase I  MIMO  multiple input multiple output control design  MLSS  mixed liquor suspended solids  ORP  oxidation-reduction potential  OUR  oxygen uptake rate  PPC  Pulp and Paper Centre  RAS  return activated sludge  REACT  sequencing batch reactor reaction / treatment phase  SBR  sequencing batch reactor  SCF  self cycling fermentation  SETTLE  sequencing batch reactor settling phase  ThOD  theoretical oxygen demand  TRS  total reduced sulphur  TSS  total suspended solids  USEPA  United States Environmental Protection Agency  WASTE  sequencing batch reactor sludge wasting phase  +/-  standard error  °C  degrees Celsius  mA  milliamp  MTPD  metric ton per day  mg/L  milligrams per litre  mg*L"' s"1  (milligram per litre) per second  s"'  per second  s  second  SLM  standard litres per minute  |_iL  microlitre  USGPM  US gallons per minute  Xlll  This research could not have been done without the kind cooperation of the Tembec Crestbrook Forest Industries Ltd. Pulp Division Skookumchuck pulp mill, specifically Al Hitzroth, who helped provide the raw combined condensate used in the study and showed much interest in a potential treatment system. Harmac Pacific Inc. pulp mill and Western Pulp Ltd. pulp mill helped this project by kindly donated return activated sludge seed for the biological treatment in the SBR. I would like to thank my supervisors, Dr. Duff and Dr. Kwok in supporting my research. Specifically, I would like to thank them for putting up with my much delayed writing and agreeing to my quick defence date. Without their feedback and rescheduling of their busy lives, this thesis would not have been completed on time. I would also like to thank Dr. Mohseni, my third committee member in rearranging his busy schedule to attend my defence date, as well as providing good insight into possible explanations for some of the thesis results. I would like to thank all the past and present students of the Pulp and Paper Centre Environmental Group and office. Much of the joy in coming to "work" was in large part due to the fantastic people that I have been able to meet during my time at the Centre. Specifically, to Preston, Mike, Chris, and Steve, "diplomacy" is one word I have learned quite well. Finally, this thesis is dedicated to Christine Woodhouse for not giving up on me, even though I had already. I hope some day I can repay you back.  1.1  The UBC kraft mill condensate treatment system: a project overview  This research involving the treatment of kraft mill condensate, was conducted in cooperation with the Crestbrook Forest Industries Ltd. Pulp Division (owned by Tembec Inc.) Skookumchuck pulp mill. The kraft mill is a progressive leader in pro-active solutions to pulp mill environmental waste problems and has shown great interest in using novel technology to address environmental issues. This study revolved around the suitability of using sequencing batch reactor (SBR) technology to treat the combined condensate process stream, from mill evaporators, for potential reuse in downstream mill operations. The primary reason for this research was to minimize water use; with the goal of attaining greater closed loop mill operation. This would lessen biochemical oxygen demand (BOD) on the final end of the pipe wastewater treatment facility. Additionally, by removing methanol (a key condensate contaminant) from the process stream, stricter air contaminant regulations involving methanol vapour releases from the evaporator and pulp washing stages could be met. The use of an SBR could also contribute to cost savings due to lower steam use in the steam stripping unit.  In order to address some of the operating deficiencies of a previous SBR study at UBC (Milet and Duff, 1998), the current study has significantly enhanced the lab scale biological SBR in three key areas. Firstly, a proportional only PID control system for dissolved oxygen (D.O.) control and air flowrate has been implemented to allow for non-oxygen limited operation of the SBR. Secondly, using a new solids sensor, a reactor biomass solids control system has been implemented to control biomass wasting. Thirdly, a new sequencing control interface for the system was designed to allow for easier operation of the sequencing phases (or stages) in the SBR treatment process.  1.2  Structure of this report  The literature review is presented in section 2 of this report. In this section kraft condensate is identified as a waste stream of interest to treat. The traditional sources of, chemical make-up,  and reasons to treat the kraft condensate waste stream are presented. Three particular technologies used to treat kraft condensate are also discussed, specifically steam strippers, aerated lagoons and activated sludge systems, and SBRs. Traditional operating parameters that are monitored and controlled for most processes are identified. The significance of each chosen parameter is reviewed. To conclude this section, traditional control theory used for biological processes, specifically regarding SBR operation, is discussed. The objectives and scope of this project are presented in section 3. Section 4 details the methods and materials used to conduct the research into using an SBR treatment system for kraft condensate. An overview of the reactor system is presented and each of the sensors and pieces of control equipment are described. Additionally, methods to analyse the treatment performance of the SBR system is presented. These include BOD5, chemical oxygen demand (COD), and total suspended solids (TSS) wastewater assays, and a gas chromatograph (GC) method for methanol analysis. Respirometry procedures for activated sludge are also illustrated with respirometric and K L a measurement methods. Control algorithms for sludge age, SBR reaction (REACT) phase duration and pH are also presented.  Results and discussion are presented in Section 5. The initial characterization of the combined condensate from the Skookumchuck pulp mill isfirst presented and compared to other published values. The significance of each of the analysed parameters are also discussed. Oxygen limited and non-oxygen limited runs are presented to explain potential performance benefits for an SBR in non-oxygen limited situations. Biomass concentration and sludge age control is presented. Sequencing operation control is also discussed. Section 6 presents the conclusions derived from this work. Section 7 discusses future work that would further enhance the SBR system, including enhancing the D.O. control and sludge age control design. SBR scale-up calculations and economics for a proposed industrial system at a mill are discussed.  2.0  Literature Review  2.1  Kraft mill condensate  Kraft condensates are condensed process vapours from the digester and evaporator stages of kraft pulp mills (Blackwell et al., 1979). The cleaner, fractionated portion of the kraft condensate is known as combined condensate. The combined condensate from a mill is usually composed of condensate streams from the 2 nd , 3 rd , 4 th , and 5 th effects of the evaporator train (Figure 2.1). The surface condenser of the evaporator system can also contribute to the combined condensate stream.  Figure 2.1 - Skookumchuk kraft pulp mill evaporator train.  2.1.1 Chemical constituents of kraft mill condensate Blackwell et al.'s (1979) review of kraft mill condensate indicated that methanol is one of the primary organic compounds in a condensate stream. Methanol in the condensate stream is a major BOD contributing chemical (Milet and Duff, 1998). The methanol is produced from the alkaline hydrolysis of methoxyl compounds, from the hemicellulose, during the kraft process (Browning, 1975). Specifically, these methoxyl compounds are released during kraft digester cooking operation and end up in the black liquor process vapour stream. Other compounds include acetaldehyde, acetone, and methyl ethyl ketone (NCASI, 1995). Under the maximum achievable control technology (MACT I) US Environmental Protection Agency (USEPA) Cluster Rules, it has been regulated that further reduction in methanol concentrations to 210 mg/L for unbleached pulp mills and 330 mg/L for bleached pulp mills, or 92% of hazardous air pollutants (HAP), must be removed from the kraft condensate stream (Pinkerton, 1998). Another major constituent in the condensate stream is total reduced sulphur (TRS) compounds. TRS describes a group of gaseous sulphur compounds which include dimethyl disulphide, dimethyl sulphide, methyl mercaptan, and hydrogen sulphide. These TRS compounds are a major air quality concern due to their strong odour (Milet and Duff, 1998). As well, TRS compounds have been shown to be very toxic in wastewater effluent (Blackwell et al., 1979). 2.1.2 Pulp mill water system closure As pulp and paper mill effluent and air emissions have come under stricter government regulation, the pulp and paper industry has sought new ways to effectively meet the regulatory standards. A desire to recycle process water streams in subsequent pulp mill operations has led to the identification of wastewater streams that can be reused. Kraft condensates have been identified as a possible candidate for further use in the pulp washing and bleaching stages of a mill (Sebbas, 1988; Annola et al., 1995). There is great potential for condensate reuse in the chemical bleach plant as wash water, particularly in the bleaching stages as well as in the brown stock washing stages (Annola et al., 1995). Currently, 70% of the combined condensate is being  recycled at the Tembec Skookumchuck mill for the brown stock washer stage (Hitzroth, 2000). Potential HAP emissions from reused combined condensate could be a problem, as emissions may occur from the combined condensate in the bleach plant washing stages. There are currently no guidelines for B.C. pulp mills pertaining to HAP emissions limits from the recycling of combined condensate water, but it is assumed that any future guidelines would be likely based upon the well established USEPA Cluster Rule HAP limits. Therefore, a suitable treatment system would be needed for continued and/or increased reuse of the combined condensate stream in the brown stock washer and bleach stages of the mill. The USEPA Cluster Rule allows for the possibility of pre-treatment of methanol in the condensate stream to remove methanol prior to reuse. Therefore, a mill would not need to retrofit the washer stages with a containment or enclosure system to reuse combined condensate (Pinkerton, 1998). Segregation of separate kraft evaporator condensate streams, namely into a high TRS and low TRS stream, has also been recommended (Sebbas, 1988). Due to the possible need for segregation and containment of a kraft condensate, and the desire to reuse the process stream in the wash stages, an inline, biological SBR is proposed by this project. An inline biological SBR system could complement the steam stripping system, used to strip kraft condensate, that many pulp mills already have in operation. This is because existing mills may have a large sum of capital invested into their existing steam stripping system. Thus, the cleaner combined condensate would be offloaded to an inline SBR, while the foul condensate would be sent to the steam strippers. If the pulp mill does not have a steam stripper, the SBR could be used as a replacement for treating kraft condensate waste stream. Berube and Hall (1999a) has estimated that a membrane bioreactor treatment system can be more cost effective than steam strippers.  Biological treatment of the combined condensate stream, using an biological SBR system, could meet the stricter air quality guidelines under the MACTI USEPA Cluster Rules for methanol (Milet and Duff, 1998). As an added benefit, it has been shown that aeration during biological treatment of the combined condensate stream removes much of the TRS in the condensate stream (Milet and Duff, 1998, Barton et al., 1998). Biological treatment of the condensate stream would  also decrease the load on the end of pipe wastewater treatment facilities. Also, Berube and Hall (1999a) have shown that biological treatment of condensate, specifically in a membrane bioreactor (MBR), would lead to a reduction in mill operating costs. 2.2  Kraft mill condensate treatment technologies  2.2.1 Steam strippers A traditional approach to condensate treatment has been the use of a steam stripper. Steam stripping is essentially a multistage distillation separation system using direct steam as the heat source (Smook, 1997). In the steam stripper water is distilled and condensed for potential reuse, while TRS and methanol are collected for disposal. The USEPA has recommended that the TRS and methanol removed be collected in a low volume high concentration (LVHC) system for final oxidation (Pinkerton, 1998). The steam stripped TRS and methanol could then be thermally oxidized in the lime kiln. Due to the energy intensive nature of the system and cost associated with steam stripping, 100% removal of methanol in the system cannot be achieved. While steam stripping has proven to be a reliable approach to lowering methanol concentrations in the condensate stream (Blackwell et al., 1980), attaining levels lower than 210 mg/L as recommended by the USEPA, may be technologically and energy cost prohibitive. Biological treatment may be a more cost effective means to lower the condensate methanol concentration below 210 mg/L and has been recommended by the USEPA (Pinkerton, 1998). However, an advantage of steam stripping is that many mills already have a steam stripping unit in place to handle foul condensates. Thus further use of the steam stripper may be attractive from a capital and operational perspective, depending on the power requirements to reach the stricter guidelines.  2.2.2 Aerated lagoons and activated sludge systems Most pulp mill wastewater treatment systems include a biological treatment system for secondary treatment of mill effluent. Aerated lagoons and activated sludge systems have both been used to treat kraft mill effluent. In both systems biological activity under forced aerobic conditions helps  foster the degradation of undesired organic waste water constituents (Smook, 1997). Traditionally, aerated lagoons have handled high volume, low concentration streams, while continuous activated sludge systems have been used when a higher rate of biological oxidation is required for the waste stream. Treatment of the kraft condensate stream could occur upon mixing with other mill effluent streams and sending the resultant stream to the aerated treatment system (Smook, 1997). One drawback of this scheme, compared to an inline SBR, is that the contaminated condensate cannot be reused in later pulping operations. As well, aerated lagoons may not be able to treat high concentration pollutant streams as efficiently, and sludge bulking may occur. The continuous activated sludge process is also more sensitive to pH and unstable operating conditions. As afinal drawback, a collection system may, in future, need to be put in place in order to collect TRS and methanol off gases, that may volatilize from the effluent during treatment, from a lagoon or activated sludge system.  Advantages for the aerated lagoon / activated sludge system, as compared to an SBR, include: 1) less capital expenditure, as the treatment system is probably already in place to handle final effluent from the mill, and. 2) simpler operation as the condensate stream is treated with other waste streams. 2.2.3 Sequencing batch reactor The SBR system has been widely used in municipal wastewater treatment and even in some pulp mill wastewater treatment systems (Dubeski et al., 2001). During a 3-year period from 1993 to 1996, SBRs were implemented in 10 pulp and paper mills in Canada for the purpose of secondary biological wastewater treatment of final mill effluent (Cocci et al., 1998).  Milet and Duff (1998) completed an investigation into the use of an biological SBR treatment system for combined condensate treatment. Milet and Duff found that the SBR system was quite suitable for condensate treatment in the removal of both TRS and methanol. Specifically, Milet and Duff found that methanol in the condensate was 100% degraded using the SBR system,  while 64% of the 1740 mg/L COD in the condensate was removed. The study found that the SBR stripped 96% of the TRSfrom the condensate. Traditional SBR operation is made up of discrete batch phases occuring in sequential order, such that an SBR effectively duplicates an entire activated sludge treatment system in a single reactor (Cocci et al., 1998). Specifically, a typical SBR cycle consists of a dosing orfill phase (DOSE), an aeration and treatment phase (REACT), a settling phase (SETTLE), and a decanting phase (DRAW or DECANT) (Metcalf and Eddy, 2003). The word phase used here is equivalent to the current discrete batch reactor state. A wasting phase (WASTE) for the SBR biomass was added in this study for the purpose of biomass control. An outline of the entire SBR process is schematically presented in Figure 2.2, with the corresponding input and output streams.  Dose or Fill Phase Condensate In  Decant Phase  React Phase  Treated Condensate Out Air Base. Nutrients In  Settle Phase  Waste Phase Waste Biomass Out  Figure 2.2 - SBR phases during a single treatment cycle (Metcalf and Eddy, 2003). A potential disadvantage of using an SBR as opposed to the steam stripper and aerated lagoon are that a potential upset condition, such as a highly toxic effluent stream, can inhibit biomass  growth and viability in the SBR system, resulting in poor treatment and longer retention times for the particular effluent. Furthermore, at least two SBR systems are necessary, for continuous operation such that there is always one SBR in a DOSE phase, while the second SBR is in a REACT phase (Metcalf and Eddy, 2003). However, Moreno and Buitron (1998) states that the development of a control strategy and implementation of a computer control system would be comparatively easy for an SBR. 2.3  Operating parameters for biological treatment  2.3.1 D.O. and K L a in biological processes D.O. is of great importance to any aerobic biological process, as oxygen drives biomass cell metabolism and growth (Spanjers et al., 1998). A proper supply of D.O. ensures good aerobic activity for the biomass in a treatment system and can enhance treatment efficiency (Nejjari et al., 1999). Nejjari et al. states that insufficient oxygen supply may impact treatment efficiency, while excessive oxygen supply may lead to poor sludge settleability. Excessive aeration can lead to increased operational costs due to increased power use and loss of air to the atmosphere (Nejjari et al., 1999). Thus, a controlled D.O. level in any biological treatment system is desirable. A study (Dangcong et al., 2001) with an SBR at low (0.8 mg/L) D.O. levels has indicated that 98% removal of total organic carbon (TOC) and 75% of ammonium in the feed can be removed from a synthetic municipal waste water stream. The stream contained organic carbon in the forms of sodium acetate and glucose. Furthermore granular sludge with good settleability was formed during the 120 day trial under low D.O. levels. Spanjers et al. (1998) states that since D.O. cannot be measured at the cellular level, D.O. must be measured in the bulk liquid. Therefore, knowing the interphase transport processes, specifically the K L a (oxygen mass transfer coefficient) in the bulk liquid, is very important in determining the system oxygen utilization. The K L a in the bulk liquid will determine the D.O. available to the cell for substrate uptake. Spanjers et al. (1998) have proposed the following  equations (2.1 to 2.4), for different reactor types, to calculate the D.O. in an biological process:  For flowing gas and liquid systems d(V LCo) dt  = QinCojn - Qou,Co + V LK La(Co*  - Co) - V Lro  (2.1)  For static gas and liquid systems dC o dt  = -r o  (2-2)  For flowing gas and static liquid systems dC o dt  = K La(Co"  - Co) - ro  (2.3)  For static gas and flowing liquid systems dCo Qin —— = —Co,indt VL  Where C 0  Qout ——CoVL  r0  =  D.O. concentration in the liquid phase  C 0*  =  saturation D.O. concentration in the liquid phase  C 0 ,„  =  D.O. concentration in the liquid phase entering the system  K,a  =  oxygen mass transfer coefficient (based on liquid volume)  (2.4)  Qin  =  flowrate of the liquid entering the system  Qoul  =  flowrate of the liquid leaving the system  r0  =  respiration rate or oxygen uptake rate (OUR) of the biomass in the liquid  V,  =  volume of the liquid phase.  2.3.2 Biomass growth rates and sludge age in biological processes Equations describing biological growth rates must also be taken into account when modelling the  biological process. Several models have been proposed for biomass growth in an biological process. Three growth models that have been used in control system design and parameter estimation include: the Monod kinetic equation (Moreno, 1999),  < 2 5 >  the Michaelis-Menten kinetic equation (Liao et al., 1996),  Co  ju{S) = //™x-  S  °  iKoxygen  +  LO  /Vs +  X-r»X  (2.6)  O  and the Haldane law kinetic equation (Moreno, 1999).  ju(S) J =  LI max S  K s+S+S 2  5-  / Ki  Where C 0  =  D.O. concentration in the liquid phase  K,  =  inhibition constant  K„xygen  =  oxygen half-saturation coefficient  Ks  =  substrate half-saturation coefficient  S  =  substrate concentration  r 0*  =  endogenous respiration rate of the biomass in the liquid  X  =  biomass concentration  /j.  =  biomass growth rate  fi max  =  maximum biomass growth rate  (2.7) '  7  It should be noted that the Haldane law kinetic equation is solely meant for biomass inhibition due to high concentrations of a highly toxic substrate (Moreno, 1999). Sludge age in an biological process is controlled by the sludge residence time (Metcalf and Eddy, 2003). Dockhorn et al. (2001) have compared two continuous biological systems to an SBR and have shown that increased sludge age resulted in increased COD removal. Dockhorn et al. found that during the operation of the SBR at sludge ages of 4, 8, and 20 days, COD removals of 84.9%, 88.5%, and 94.5%, had been achieved, respectively. 2.4  Control theory in SBR operation  As described in section 2.3, D.O. and sludge age are important operating parameters for biological wastewater treatment systems. This section explains how control systems can be used to optimize these parameters for wastewater treatment in an SBR. 2.4.1 D.O. feedback PID control in biological processes Using PID control can be an effective means of regulating D.O. during biological wastewater treatment. PID controllers offer reliability, robustness, and simplicity in design (Cakici and Bayramoglu, 1995). The PID controller can also be readily integrated and programmed into a computer as part of a larger control system. PID controllers are widely used in industry and much research has been done on the methods to identifying suitable tuning parameters (Ogunnaike and Ray, 1994). Particular tuning methods include the Ziegler-Nichols, CohenCoon, and Internal Model Control (IMC) (Ogunnaike and Ray, 1994). Respirometric and OUR models have been the basis for other D.O. control designs (Spanjers et al., 1998). Spanjers et al. have suggested to building a feedback control law using a multiple input multiple output (MIMO) strategy using aeration intensity and return activated sludge flowrate based on D.O. measurement and respiration rate in an aeration tank.  2.4.2 Solids concentration and sludge age control systems  While treating condensate in an SBR, Milet and Duff (1998) found that biomass solids concentration in the system could not be monitored or accurately controlled. This lead to inconsistent treatment times due to varying concentrations of biomass per condensate batch in the SBR. To compensate, biomass concentration was halved, during a wasting phase, at every SBR cycle. According to Chudoba et al. (1991), halving the biomass concentration would lead to synchronization of biomass growth and better treatment efficiency. Sludge age control has been identified by Krogerus et al. (2002) as having the potential to save 20-25% in annual aeration energy cost. The authors found that sludge age was directly proportional to specific aeration energy consumption in the biological treatment system. Cakici and Bayramoglu (1995) states that sludge age control is a very important control parameter as both biomass growth rate and sludge settleability can be controlled using this one parameter. The authors designed a sludge age PID controller that adjusted wastage rates. The controller consistently maintained a desired sludge age of 6 days throughout the 48 hour treatment period. However, since the controller was used for a continuous reactor system, the applicability of the controller design to SBR operation is somewhat limited. 2.4.3 SBR REACT phase time control system Moreno and Buitron (1998) have indicated that a typical SBR process is distinguished by three characteristics: 1) a sequence of well defined phases, 2) phase durations that are tuned to desired treatment results, and 3) biological treatment reactions that progress over time and not physical space. These characteristics allow for the simulation and estimation of time optimal control strategies based on observer variables, such as D.O., to gauge the completion of the REACT phase (Moreno and Buitron, 1998).  Optimal time phase control has been discussed for SBR operation (Moreno, 1999; Pavselj et al., 2001). Moreno (1999) has stated that the influent flowrate, biomass growth rate (based on Monod) and substrate uptake rate equations for an SBR biological system can be optimized and  solved such that a time optimal control law can be generated using Green's theorem. This control equation was simulated on a hypothetical wastewater SBR treatment system, which displayed increased treatment efficiency by lowering the REACT phase time. The control system was also shown to be robust, and prevented toxic shock load from occurring in the reactor. Pavselj et al. (2001) have indicated that a D.O. versus time profile can be created in order to indicate repeatable patterns in substrate treatment. Using these repeating D.O. patterns, the system can dynamically adjust the REACT phase time in an SBR. Previous work done by Sheppard and Cooper (1990) in their SCF Pascal program has been adapted to this project, as the aeration rate control system is similar in practice to the D.O. cycling setpoint control that was previously used by Milet and Duff (1998) (also based on Sheppard and Cooper's earlier work). The major difference between this current work and Milet and Duffs is that the REACT phase time control is activated on the air flowrate reaching 0 L/min, rather than by responding to a rapid increase in the D.O. concentration. This aeration rate control system is also quite similar to the pH and oxidation-reduction potential (ORP) control mechanism for SBR cycling used in another study (Ra et al., 1998). Effectively, the aeration rate control allows for the controller to decide when a batch is fully treated and then to make the decision to start the DECANT phase in the SBR.  3.0  Research Objectives  Foul and combined condensate has been identified as a waste stream that can be reused in other pulp and paper mill operations. As well, combined condensate methanol releases to the surrounding air will be a concern considering more stringent HAP release limits for the pulp and paper industry (Pinkerton, 1998). SBR technology for the inline treatment of combined condensate is proposed to address more stringent air emissions regulations and system closure. Given that low concentrations of methanol are readily biodegradable, an SBR system using activated sludge has proven to be a viable treatment option for the condensate stream (Milet and Duff, 1998). Further study of the SBR system would be necessary to determine the possible operational criteria for practical use as a stand alone treatment system in a mill. Addition of a control and monitoring system would be crucial as the operation of the system would have to be fully automated. Thus, the following objectives were set at the outset of the combined condensate treatment research project in order to improve upon the design of the existing lab-scale SBR system:  1)  Maintain a desired D.O. concentration setpoint during an aeration stage using a proportional only PID controller.  2)  Identify the rate of methanol and COD degradation in non-oxygen limited operating conditions and determine whether oxygen limited conditions provide for poorer treatment performance.  3)  Maintain a constant concentration of biomass throughout each cycle, such that a constant sludge age is maintained in the system.  4)  Scale-up the reactor vessel from 2L to 5L.  5)  Update the previous sequencing control program and build hardware interface to the solids, air, pH and D.O. sensors.  6)  Install and test the MLSS probe in an SBR system.  7)  Write a LabVIEW data acquisition and control program for D.O., MLSS, pH, and temperature.  4.0  Materials and Methods  4.1  Process schematic of sequencing batch reactor (SBR)  The process schematic of the sequencing batch reactor system used in this research project is given in Figure 4.1. Peristaltic Pump Combined Condensate  t  J 5L Dosing Vesss  _35°C Water from Water Bath  Air Flowmeter/ Control Valve @ 0-15 SLM Instrument Building Air @ 20psi  Solenoid Valve  U Computer Controller  Solids Probe  Impeller Mixer  -v  L Thermocoud  mmtma  ^ Reactor Vessel pH Probe D.O. Probe  L_04___ Solids Wastage  + Condensate Harvest  Figure 4.1 - Process schematic of the SBR system. The reactor consisted of a stirred tank reactor, a vessel for preheating and dosing, as well as pumps and valves. The system was also capable of automated operation and included a data acquisition system to allow analog to digital and digital to analog signal conversion. An IBM compatible 200MHz Pentium Pro PC monitored and controlled the reactor cycling (according to D.O.), pH, MLSS concentration, and temperature.  4.1.1 Stirred tank reactor The dimensions of the plexiglas stirred tank reactor were 29.5 cm in height with an inner diameter of 19.0 cm. The tank had a 2.5 cm external water jacket for reactor heating. A horizontal supernatant outlet port was located at a height of 9 cm from the bottom of the reactor. A horizontal biomass wasting outlet port was located at a height of 2.5 cm from the bottom of the reactor. The reactor had two other side ports to allow for the mounting of pH and dissolved oxygen probes. Mixing of the 5 L (working volume) tank was done by a stainless steel impeller with two 6 cm radius blades driven by a variable speed drive (Cole Parmer 4558, Labcor Technical Sales Inc., Anjou, Quebec). The impeller assembly was mounted through a plexiglas cover at the top of the reactor. The reactor was stirred at 500 rpm as measured by a photoelectric tachometer (Adams Photoelectric Tachometer Model 5205). A "L" shaped stainless steel sparger with sparge hole diameters of approximately 1 mm provided aeration for the reaction vessel. The sparger was connected to an air line by means of a stainless steel tube which ran through the plexiglas reactor vessel top cover. The aerator was connected to an air mass flowmeter/controller (Aalborg GFC17, Cole Parmer 32660-18, Labcor Technical Sales Inc., Anjou, Quebec), which was, inturn, connected to a 5 psig instrument air line. The air pressure to the system was maintained using a pressure regulator. A 1.0 M sodium hydroxide dosing line was used to maintain an optimum pH of 8.0 (Milet and Duff, 1998) during the methanol removal phase of the cycle. This dosing line was inserted through a 2.5 cm hole in the plexiglas top cover of the tank. A 2.5 cm diameter sampling port hole was cut into the plexiglas top cover. This was done to allow pipette sampling of condensate during a reaction run. As well a 4 cm diameter port was also cut into the plexiglas top cover for vertical placement of a solids sensor.  4.1.2 Preheat dosing vessel The initial stage in the sequencing batch reactor treatment operation was an addition of 3.5 L of combined condensate to a dosing vessel for preheating. Preheating of the condensate feed was needed as mill samples were kept at 4°C for storage before being pumped into the vessel. Preheating ensured that the temperature of the condensate entering the reaction vessel would be equivalent to that of the biomass in the reaction vessel. Temperature shocks to the biomass would then be overcome while ensuring a preserved condensate feed. The preheat dosing vessel consisted of a water jacketed plexiglas tank with a height of 26.5 cm and an inner diameter of 19 cm. The residence time in the dosing vessel varied from 1 to 6 hours depending upon the reactor cycle times. Degradation could have been occuring during the preheating, but no assay was done to verify this. 4.1.3 Pumps, sensors, and controllers Peristaltic pump systems (Masterflex pump model No. 7553-80, Masterflex pump speed controller No. 7553-71, Masterflex pump heads No. 7518-00, Labcor Technical Sales Anjou, QC) were used to fill the dosing vessel and the reactor vessel, to maintain a desired solids concentration, and to maintain a desired pH setpoint. The reactor was instrumented to control D.O., pH, MLSS, and air flowrate. The sensors and associated hardware for these functions are given in Table 4.1. A temperature bath (VWR Model 1137) was used to maintain both the reactor and dosing vessels at a temperature of 35°C. Temperature was measured directly in the reactor vessel by using a 100Q thermocouple. Remote setpoint control of the temperature was done through an RS-232 signal from the Pentium Pro computer system.  Table 4.1: Reactor instrumentation chart. Parameter  Sensor  D.O.  CP 05726-00 Electrode  pH  CP 27300-21 electrode  MLSS  Polymetron RD240/242  Air flowrate  Aalborg GFC17  4.2  Controller  Jenco Model 3672, Cole Parmer 05802-00 Polymetron TxPro-2  Transmitter Supplier Labcor Technical Sales Anjou, QC Labcor Technical Sales Anjou, QC Zellweger Analytics, 11  N/A  N/A  Pentium Pro Computer  Sensor Supplier Labcor Technical Sales Anjou, QC Labcor Technical Sales Anjou, QC Zellweger Analytics, 11  Transmitter  Labcor Technical Sales Anjou, QC  Cole Parmer 01971-00  Pentium Pro Computer Jenco Model 3672, Cole Parmer 05802-00 Pentium Pro Computer  Condensate, return activated sludge, nutrients, and pure chemicals sources  4.2.1 Combined condensate Combined condensate was kindly donated for this research by Crestbrook Forest Industries Ltd. Pulp Division (owned by Tembec Inc.), a 573 metric ton per day (MTPD) single line bleached softwood kraft pulp mill near Cranbrook, B.C. Samples were collected in 20 L Nalgene carboys and shipped by courier to UBC on a request basis. Due to mill closures and delays in shipping, a constant supply of combined condensate was unavailable for the treatment system. The delivered untreated combined condensate was kept in the 20 L carboys in either the UBC Pulp and Paper Centre (PPC) cold room or a lab refrigerator at 4°C. This was done in order to minimise any biological growth, and thus degradation of methanol, from occurring. The carboys were kept under these conditions until they were ready to be treated in the SBR system.  The combined condensate produced at the mill is approximately 1400-1600 gallons per minute (USGPM). Approximately 1200 USGPM of the combined condensate is currently being reused in the brown stock washer stages of the bleach plant. A flowrate of approximately 200-400 USGPM of the pulp mill combined condensate is currently sewered. The other separate fraction of the kraft condensate is known as foul condensate. This fraction usually consists of condensate from the 1 st effect of the evaporator train. The foul condensate is quite contaminated as the heavy fractions, such as turpenes and ketones, are concentrated from the total condensate stream at this point in the evaporator train (Blackwell et al., 1979). A flowrate of approximately 300400 USGPM of foul condensate is produced at the Skookumchuck kraft pulp mill (Hitzroth, 2000). 4.2.2 Return activated sludge (RAS) The biological seed for the reactor vessel was RAS taken either from the pure oxygen activated sludge treatment system at Western Pulp Ltd. Partnership's bleached softwood kraft pulp mill in Squamish B.C., or the Harmac Pacific Inc., Harmac Division bleached softwood kraft mill (53% owned by Pope and Talbot) near Nanaimo, B.C. Most of the study was carried out using Western Pulp's seed, however a shutdown of the Western Pulp Ltd. mill necessitated finding an alternate source of sludge. Both RAS seeds were shipped to and stored in the PPC cold room at 4°C prior to use. 4.2.3 Nutrients Adequate supply of nutrients in biological systems is necessary to support microbial growth and activity. The lack of nutrients in the combined condensate waste stream necessitated nutrient addition. This was accomplished by direct addition of nitrogen, phosphorous, and a metal salt solution to the carboys just prior to use. The nutrient concentrations in the condensate were in accordance to a study done by Grau (1991). The iron concentration was halved in order to prevent precipitation in the condensate from occurring. The final concentrations can be seen in Table 4.2. The value of 590 mg/L was used as the baseline BOD value (found from the  combined condensate characterization study).  Table 4.2: Recommended nutrient concentrations in biological reactor. (Grau, 1991) Nutrient concentrations in reactor g/gBOD 5xl0' 2 N lxlO"2 P 3 x 10"3 Fe 62X10"4 Ca 45X10"4 K 30xl0"4 Mg 43xl0"5 Mo 16xl0"5 Zn 15xl0"5 Cu 13xlO"5 Co 5xl0"5 Na  4.2.4 Pure methanol substrate Reagent grade methanol was purchased from Fisher Scientific and was used for two purposes during the research. The first purpose was to use methanol to calibrate the GC. The second purpose was to use methanol to condition the biomass seed before treatment. One thousand mg/L of methanol was added to make up a synthetic combined condensate in order to allow the biomass in the system to acclimate to treating methanol. Methanol was added to the samples of the RAS that seeded the reactor. This was done during the initial growth phase of the microorganisms and during the respirometric study. 4.3  Operation of the sequencing batch reactor (SBR): control algorithms  4.3.1 Dissolved oxygen control algorithm  In the previous study using an SBR system to treat kraft mill condensate by Milet and Duff (1998), D.O. control in the system could not be accomplished due to inadequate aeration, poor  mixing, and poor sparger design for the SBR. By using a larger reactor system with a larger aerator, mixer, and sparger unit, it was hoped that a sufficient D.O. level in the system could be achieved and controlled throughout a REACT phase. In this study the REACT phase control of D.O. was a major focus. This was done in order to ensure that the system was not D.O. limited such that the biomass in the system could be treated at its maximum theoretical substrate uptake rate. It has been suggested by Grady et al. (1999) that a minimum concentration of 2mg/L of D.O. in a treatment system ensures that a suitable amount of oxygen is supplied to biomass during conventional biological processes. Therefore, a setpoint of 2 mg/L was used as a target setpoint for the system. Secondly, using a proper D.O. control system would allow for less air usage during a REACT phase, as the controller would more precisely vary air flowrate to the system, as D.O. varied during substrate degradation. In a larger mill, SBR treatment system cost savings associated with using less air during a REACT phase could be achieved if a proper D.O. control system is implemented. The D.O. control via proportional controller can be best described using a block diagram. The control system for the D.O. control used a feed back mechanism with the measured variable being, y, the D.O. and the controlled variable, u, the aeration rate (Figure 4.2). The setpoint is the desired D.O., ys, in the reactor. Gc is the controller in the system and Gp is an unknown batch reactor process model.  A dissolved oxygen control algorithm was used to set D.O. at 2 mg/L in the reactor vessel. The D.O. control of the system used a discrete feedback parallel PID controller program in Lab VIEW (Appendix A). The program represented a very classical parallel PID controller (equation 4.1).  Mis) E(s)  1 c  T ts  +  t ns ar Ds+\~  (4-1)  The P term in the controller represents the K c or proportional term in the control system, the I term in the controller represented the T; term or in the system, and the D term in the controller  represents the Td term or traditionally referred to in classical control literature (Smith and Corripio, 1997). The M(s) term represents the controller output and the E(s) term is the error. Simple proportional control, with a P term equal to 1, was used throughout the study due to problems of stability with other controller parameters.  ys +  Gc  Gp  Figure 4.2 - Feedback D.O. control block diagram. 4.3.2 Biomass concentration control algorithm By using the new solids sensor for online monitoring of mixed liquor suspended solids (MLSS) in the reactor, a desired level of biomass could be attained at the start of each REACT phase. A LabVIEW control module was written to monitor and control the amount of biomass to waste, as well as provide online calculation of per batch sludge age in the SBR system. The level of MLSS was controlled in order to attain a desired sludge age in the system. It was postulated that this enhanced control of the biomass in the system would lead to better settleability and uniformity of treatment cycle time than had been observed in earlier studies (Milet and Duff, 1998). The biomass control algorithm is presented in Figure 4.3.  (  "x.  Initialize suspended solids control ^  I Suspended solids measurement (averaging last 100 measured points)  Calculate Sludge Age  Figure 4.3 - Biomass control algorithm. The biomass or sludge control algorithm was based on an internal calculation on the known volume of the system, biomass concentration of the reactor before the reaction phase stopped,  and the known volume of new condensate to be pumped into the reactor. The calculated waste MLSS volume could then be pumped out of the system with a calibrated peristaltic pump. The peristaltic pump used for wasting the biomass in the system was calibrated using a graduated cylinder and a stop watch. Equations 4.2 through 4.4 were used to do the internal calculation of the wasting rate.  Mw  Vw-  -  CrVr-  CspVr  Cr I Mw  tw=Vw!Qw  where M w  =  mass of waste sludge (mg)  Vw  =  volume needed to be wasted (L)  tw  =  time needed to waste the required solids (s)  Cr  =  MLSS concentration in currently in reactor (mg/L)  C  =  setpoint MLSS concentration in reactor (mg/L)  Vr  =  reactor volume (L)  Qw  -  waste flowrate (L/s)  (4.2)  (4.3)  (4.4)  From the biomass control algorithm, equation 4.1 would be used to determine if wastage should occur during the run. If the MLSS reactor concentration was less than the setpoint MLSS concentration then no wastage would occur. Mathematically, equation 4.1 would result in a negative value. The sludge age was calculated using equation 4.5.  6s = [V-Cr  / (QwCw  + Ce Vo  / D/) J + previous sludge age if no wastage has occurred  (4.5)  where 6 S  sludge age or mean cell retention time (s) volume of the reactor (L)  K  =  cr  =  MLSS concentration of reactor (mg/L)  Qw  =  waste flowrate (L/s)  ce  =  MLSS concentration in decant effluent (mg/L)  c VD  A  MLSS waste concentration (mg/L) =  =  DECANT volume from the reactor (L) DECANT time (s)  Since this is a batch reactor, if no wastage occurred during a particular reaction run the sludge age was carried over and added in the following sludge age calculation. 4.3.3 REACT phase duration control using methanol consumption During the methanol consumption phase it was necessary to establish a clear end point to mark the end of the reaction phase. The end of the reaction phase was marked by the complete removal of the available methanol substrate in the system. The control algorithm used to determine the end of the methanol consumption phase is given in Figure 4.4.  X  x  V ( Initialize react cycle control )  I Measure air flowrate (averaging last 100 measured points)  I  Stop REACT phase  I Turn off D.O. control  Continue REACT phase and control algorithm  Figure 4.4 - REACT phase methanol control algorithm. The REACT phase control algorithm works by sensing a dramatic decrease in the D.O. requirements of the system (and an associated spike in D.O.) and subsequently the controller would turn off the air flowrate to the system. This cycling end point methodology was also used in previous studies (Sheppard and Cooper, 1990; Milet and Duff, 1998).  4.3.4 REACT phase pH control The pH control of the system was attained using an on-off controller for NaOH addition. Acid was not needed for the pH control of the system as prior findings (Milet and Duff, 1998) indicated that the mixed liquor exhibited a tendency to decrease in pH during a REACT phase. The pH control algorithm is presented is given in Figure 4.5.  Initialize pH control  I pH measurement  • Turn off pH pump • Signal pH exceed alert  I  I Continue pH measurement and repeat control algorithm Continue pH measurement and repeat control algorithm  Figure 4.5 - pH control algorithm.  4.4  Computer control and monitoring  4.4.1 Feedback control systems All data logging of the system was done using an analog to digital board (Strawberry Tree Acjr., Strawberry Tree Inc., Sunnyvale, California) and a 286-12 Mhz computer (IDM PC clone computer). Dissolved Oxygen, pH, MLSS, and temperature data was then passed via a RS-232 serial connection to a 200 Mhz Pentium Pro computer operating a Lab VIEW custom designed control and monitoring program on the Microsoft Windows NT 4.0 workstation operating system. On-off control of the fill and harvesting solenoid valves (Skinner Valve 71215, New Britain, Connecticut) was accomplished using the Strawberry Tree board. Control signals (0-5 volts) for air flowrate were passed via a digital to analog board (PCI-6024E, National Instruments, Austin, Texas) to the mass flowmeter/controller (Aalborg GFC17, Cole Parmer U32660-18, Labcor Technical Sales Inc. Anjou, Quebec). A RS-232 serial signal could also be used to remotely adjust temperature setpoint of a water bath.  4.4.2 Self-cycling fermentation (SCF) Pascal program An earlier Pascal program written by Sheppard and Cooper (1990) was modified for the purposes of recording data and controlling the self-cycling system. This was done through an analog to digital board (Strawberry Tree Inc., Model Acjr, Sunnyvale, California) addressed through the custom Pascal program. Please refer to Appendix B for a copy of the modified Pascal program used.  4.4.3 LabVIEW graphical interface The LabVIEW graphical user interface (GUI) (see Figure 4.6) is based on LabVIEW 5.0 software purchased from National Instruments Inc. This graphical programming environment lets the user build control and monitoring tools using a graphical block structure. This is unlike a "top-down" semantic based programming language and thus allows for greater flexibility and reusability of  the programs created.  £ 5'  —_____  »*l!3gB *3t fotQt± I  •  ri'tl*  r  •  m •  r  m i lft J  ;•» J .  •  >V "ItA *  Figure 4.6 - LabVIEW GUI. A LabVIEW control program was created for the purposes of controlling and monitoring the pH, D.O., MLSS, and system cycling. The LabVIEW system was also used to do online acquisition of the pH, MLSS, and air flowrate. An example graphical layout of the LabVIEW interface program is shown in Appendix C. 4.5  Standard wastewater assays  4.5.1 Biochemical oxygen demand (BOD5) Biochemical oxygen demand (BOD5) tests were done according to procedure 5210 B. 5-Day BOD Test from the Standard Methods for the Examination of Water and Wastewater (APHA, 1989).  The seed used for the BOD5 tests was the same RAS used for the SBR acquired from the two softwood kraft pulp mills (section 4.2.2). The BOD5 of the combined condensate was tested in  order to characterize the starting influent and to serve as a comparison to published values of combined condensate pulp stream BOD5 levels. 4.5.2 Chemical oxygen demand (COD) Chemical oxygen demand (COD) tests were done according to procedure 5220 D. Closed Reflux, Colorimetric Method from the Standard Methods for the Examination of Water and Wastewater (APHA, 1989). A Hach spectrophotometer was used to measure the absorbance at 600 nm. The COD measurement was done in order characterize the starting combined condensate stream. Due to the length of the 5-day BOD test, the COD test was also done as an estimate of the degradation rate of the biochemically oxidizable components of the system during a reaction run. COD degradation rate values from the reaction runs were used as a comparison to the methanol degradation rate values. This was done to indicate if co-degradation of other components in the combined condensate was happening or if methanol was the sole contributor to the COD values. 4.5.3 Total suspended solids (TSS) Total suspended solids analysis was done according to procedure 2540 D. Total Suspended Solids Dried at 103-105°C in Standard Methods for the Examination of Water and Wastewater (APHA, 1989). This was done both to calibrate the solids sensor, as well as to verify online readings of MLSS in the stirred tank reactor vessel. The sensor was calibrated using a 10 L polyethylene bucket with a mixture of combined condensate and RAS. The sensor was submerged into the stirred RAS mixture and allowed to transmit a milliamp (mA) reading for the stirred volume. The TSS test was done for the stirred volume and a concentration for the suspended solids could then be correlated with the transmitted mA reading. Multiple concentrations were then tested in order to build a calibration curve for the sensor. The sensor was calibrated once, at the start of the study.  4.6  Further wastewater analysis  4.6.1 Methanol analysis Methanol analysis was done using a Hewlett Packard Series II 5890 GC. A Supelcowax-10 fused silica capillary column was used for separation of the condensate sample constituents. The GC oven temperature was maintained at 45°C during each of the sample injections. The injector inlet temperature was maintained at 200°C and the Flame Ionization Detector (FID) temperature was maintained at 250°C. Run times for the methanol analysis were typically 8 minutes per injection. A Hewlett Packard 7673 GC/SFC automatic sampler and injector was used for automated sample injections. Iso-butanol was used as an internal standard. Mixed liquor samples were taken during a reaction run, filtered using a glass fibre filter, and immediately prepared for the GC by adding the sampled condensate to lOpL sample vials and adding a lpL iso-butanol standard. Due to the 24 hour operation of the batch reactor system, treatment samples were usually refrigerated over night to allow testing to be done the next morning. 4.6.2 Respirometry Respirometry experiments were done during the initial start-up of the reactor to gauge biomass activity. The goal of this work was to identify a point at which the biomass reached its maximum methanol degradation capabilities. At this point the reactor could be switched to the combined condensate feed. During the respirometric experiments the reactor was dosed once per day with 1000 mg/L of a methanol solution with nutrient addition to the 5L reactor. The reactor was then run in this fashion for 30 days to allow for the biomass to acclimate to the methanol substrate. Condensate biotreatment kinetics were determined through respirometric methods (Cech et al., 1985) and modelled based upon the Monod kinetic relationship. The reactor mixed liquor was sampled from the reactor and placed in a modified sealed and jacketed BOD flask with injection  ports. Injection ports allowed for rapid introduction of untreated effluent, and kinetics were then determined through the measurement of the change in oxygen uptake rate (OUR) after an injection of a known quantity of condensate. The respirometer was equipped with a YSI dissolved oxygen meter and BOD probe (YSI Model 59 and model 5905, Yellow Springs, OHIO 45387, USA). 4.6.3 K L a The oxygen mass transfer coefficient, or K La, was tested for the reactor according to the measurement guidelines in A Standard for the Measurement of Oxygen Transfer in Clean Water  (ASCE, 1984). Direct measurements of the oxygen transfer rate were done during the reactor setup to gauge the effect of the reactor geometry on K La. The K L a was estimated by the sulphite oxidation method. Before any measurements were taken, 5 L of water was dispensed into the reactor and pre-heated to 35°C. The stirring speed was set to the desired value of 500 rpm and the D.O. probe was introduced into the reactor at the mid-depth of the fluid. After aerating the reactor for 20 minutes, the D.O. probe was calibrated and the airsaturation equilibrium concentration of D.O. was measured. After the air-saturation value was determined, the air pump was turned off and sodium sulphite was added to the water at a concentration 20% in excess of that required to remove the saturation concentration of D.O. (7.88 mg/mg D.O.). After the water was deoxygenated, aeration was started at the maximum flowrate of 15 standard litres per minute (SLM). A D.O. reading was taken at 1/10th second intervals and logged by the computer until full air-saturation value was reached. By integrating  dC ~ = K La  where C C*  * (Cr-Q  (4.6)  concentration of oxygen in bulk liquid (mg/L) saturation concentration of oxygen in the bulk liquid (mg/L)  K,a  oxygen transfer coefficient (s"') time (s)  equation 4.6, one can derive equation 4.7.  K La =  1  In  C* -C,  (4.7)  From the above equation, it can be seen that K L a can then be determined from a plot of the natural logarithm of oxygen values versus time. In this study, K L a was determined over a range of C, and C 2 values between 20% and 80% of saturation. 4.7  Methods for data analysis  4.7.1 COD and methanol degradation rates for oxygen limiting and non-oxygen limiting runs For COD degradation, the average COD values were calculated for each of the sample times during the degradation run. The values were logarithmically transformed to attain a straight line plot. Only the points lower than and up to 7300 s were used to calculate the degradation rate constant due to a flattening of the COD degradation curve. This flattening of the degradation curve is caused by COD fractions that are not readily biodegradable. As well, this was done so that the slope could be consistently calculated and directly compared between each oxygen and non-oxygen limited run. The slope of the straight line is reported as the degradation rate constant, k.  The methanol degradation rate was calculated using a best fit line to the data points between the starting methanol concentration and the complete methanol degradation value of 0 mg/L of methanol during each run. As the methanol was fully degraded only data points above 0 mg/L  were used to assess the degradation rate constant. Corresponding average standard error values were also calculated. The 95% confidence interval, with standard errors was calculated from a multiple linear regression statistical software package contained within Corel Quattro Pro 11. The linear regression package was used to give the standard error for each methanol degradation rate and COD degradation rate constant. When degradation rate (constant) values were calculated, the corresponding standard error values were also averaged.  5.0  Results and Discussion  5.1  Combined condensate characterization  During mill operation, process variability due to parameter changes, as well as mill startup and shutdown, is inevitable. Due to these concerns BOD5, COD, and methanol analyses were done on the combined condensate prior to treatment. The combined condensate from the Skookumchuck mill contained BOD5, COD, and methanol concentrations as shown in Table 5.1. Table 5.1: Combined condensate characteristics: BODs, COD filtered and unfiltered, methanol concentrations.  BOD s (mg/L) COD Filtered (mg/L) COD Unfiltered (mg/L) Methanol (mg/L)  Average values  (±) 95% confidence  Range  735 1450 1815 590  interval 26 140 30 16  711-798 1246-1649 1795-1847 554-625  This characterization of the BOD5 and the unfiltered COD concentrations in the combined condensate was done only at the beginning of the study. Two sample batches from the mill were used to measure BOD5 and three sample batches were used to measure the unfiltered COD of the combined condensate. Methanol values for pulp and paper evaporator condensate were reported to range from 263 mg/L to 960 mg/L by Berube and Hall (1999a). The values listed in Table 5.1 are within this reported range. Milet and Duff (1998) had an average COD value of 1740 mg/L. This is higher than the filtered COD listed in Table 5.1, but lower than the unfiltered COD. Given the range found in the small sample set, and accounting for the error, the COD found in this study is very similar to the COD found by Milet and Duff (1998).  From the unfiltered andfiltered COD values in Table 5.1, one can deduce that approximately 20% of the COD of the combined condensate was associated with suspended solids. The suspended solids could be due to black liquor blow off into the evaporator and condenser lines. Based on the average methanol concentration present (590 mg/L), 885 mg/L of oxygen would be required to fully oxidize the methanol, as calculated by the theoretical oxygen demand (ThOD). The BOD5 concentration is 83% of the ThOD. The BOD5 is less than the ThOD and that should be expected, as the ultimate BOD concentration, rather than the BOD5, would more closely approach the ThOD. The difference between the ThOD and BOD5 is 151 mg/L, this is a good indication that most of the BOD in the combined condensate stream is methanol. Milet and Duff (1998) reported that methanol accounted for 54% of the influent COD in this study. The percentage of oxygen demand unaccounted for as indicated by the filtered COD value may be due to other soluble fractions in the combined condensate waste stream. These soluble COD fractions may not be suitable for biochemical degradation and end up in the reactor effluent (Dockhorn et al., 2001). The average methanol concentration of 590 (± 35) mg/L is above the 210 mg/L limit specified by the USEPA Cluster Rule for process water reuse (Pinkerton, 1998). This methanol concentration would make the stream unsuitable for further reuse under MACT I regulations without further treatment. 5.2  Combined condensate methanol stripping tests  In any open aerobic treatment system, stripping of volatiles, such as methanol, TRS, and other organics, is of potential concern. This is of particular concern in the treatment of condensate due to two specific reasons: 1) stripping of methanol could introduce a potential HAP into the atmosphere, and 2) stripping of TRS could cause odour concerns in and around the mill. During the treatment of combined condensate in the SBR system, methanol stripping could occur. In order to quantify methanol removal through stripping, air stripping tests were conducted in the  SBR at 35°C with untreated combined condensate without any microbial inoculum. Sulphur and other volatile compounds have been shown to be stripped out of the condensate using different treatment technologies (Milet and Duff, 1998; Blackwell et al., 1980). Previous work by Milet and Duff (1998) over an airflow rate of 0.1 to 3 SLM showed that in an SBR stripping accounted for removal of less than 1% of the initial methanol concentration. Since higher airflow rates (up to 15 SLM) and a different aerator configuration were used in the current study, stripping experiments were conducted. The results of methanol and COD analysis done during the two stripping runs for the combined condensate are presented in Figure 5.1. There was a sampling volume error for the 30 minute data point and there was not enough sample to conduct both a COD and methanol assay. Thus, only the methanol value was done for the 30 minute data point.  1400 •  < $g 1000-  oa u  u  800 •  »  600 •  400 -  200 •  20  40  60  80  100  120  140  160  180  200  Time (min) * averaged methanol concentration  • averaged COO concentration  Figure 5.1 - Average methanol and COD concentrations over 3 hours during air stripping experiments.  COD values fluctuated during the stripping tests, but the error bars present for the largest fluctuation would lead one to conclude that there may have been sampling error. A slight drop in the COD could be due to TRS being stripped from the system. Milet and Duff (1998) in their stripping tests indicated most of the TRS may be stripped within a period of 30±27minutes. It should be noted that increased times may start to show methanol stripping, but for this study 3 hours was deemed as the largest per batch time acceptable for treatment.  5.3  Respirometric determination of condensate treatment kinetics  At the onset of the condensate treatment study, it was found that no treatment was occurring with the RAS seed in the SBR. Milet and Duff (1998) indicated that metal and nutrient addition increased average specific COD removal by three-fold as compared to a no addition scenario.  Therefore, a nutrient solution was added to the process stream (as detailed in section 4.2.3) and was found to solve the poor treatment.  In addition to the nutrients, a month-long respirometric study was done in order to verify the activity of the biomass in the reactor. Previous respirometry studies have indicated that the use of respirometric techniques in an biological reactor can provide a good indication of biomass activity and growth (Cech et al., 1985). As well, respirometric models can also be used to design control parameters for aerated sludge systems (Spanjers et al., 1998). The results of the respirometric study are shown in Figure 5.2.  Q0Q25  • ...  | QCCE 0 m 1 JQ0015 CO _J OJ in (8 I O  S £  • +  s  •  Q0CT1  gaoore  +  +  -I  S  $  + •  *  • s  .  3  • •  •  •  x  X  2  3 WlHiiOiuiliilkji(ii0l)  Figure 5.2 - Substrate uptake rates normalized to biomass concentration for a 30 day respirometry run.  X  <o 0.0025  CO E o m  0.002  B> 0.0015  a:  |  0.001  o> E  co  0.0005  .  «  E  tr 3  m  0  0  1  2  3 10 Days  15  22  30  Figure 5.3 - Maximum substrate uptake rate over a 30 day respirometry run.  From Figure 5.3, the biomass activity in the system seems to have increased as the system acclimated over time to the methanol substrate. It is unclear why the substrate uptake rate is decreasing at the end of the run or to why the substrate rate is .  The respirometry test used here is a good indicator of biomass acclimation and may prove to be useful in future work to control and monitor biomass treatment efficiency in the SBR system. An in situ respirometric test could be done in the reactor, such that a per batch biomass activity could be measured in order to provide for better control of biomass wasting and combined condensate treatment times (Yoong et al., 2000). If the sludge activity were to decrease, and correlated with the sludge age, then a larger wasting of the biomass population could increase the biomass activity for the next batch.  Fine tuning of the combined condensate treatment time could be achieved with knowledge gained from realtime measurement of biomass activity (Sotomayor et al., 2002). Biomass activity from respirometric tests would allow for cost savings through more efficient aeration particularly in the scale-up of the SBR design.  During a previous treatment study, half the biomass in a reactor was wasted during (Milet and  Duff, 1998). This was done to provide a biomass halving time, which was supposed to allow for greater treatment performance due to cell synchronization (Chudoba et al., 1991). 5.4  Determination of K L a in the SBR  In the earlier study done by Milet and Duff (1998), the size of the SBR system was approximately 2 L. In this study, scale up to a larger system was done to smooth out any disturbances that could occur in a smaller system. Scale up of the sequencing batch reactor to a 5L reactor was accompanied by larger air flowrate and a more efficient sparging and mixing system. In order to characterize the new geometry and process variable effects, tests were done in order to verify the K La of the 5L sequencing batch reactor. Figure 5.4 shows data from a typical K L a experimental run.  Time (s) • Dissolved Oxygen Measurements • Model Predicted Values  Figure 5.4 - Oxygen re-saturation curve to determine K L a.  The average K L a found from three consecutive experiments was 0.0249 (± 0.0021) s"'. Using the K L a of the reactor, a respirometric control system can be designed to monitor the air flowrate and to control the dissolved oxygen levels (Spanjers et al., 1998). The following was suggested by the authors for a feed forward control design equation:  K La = aFin+j3  dSo  — = K,  1 Fin  = a  (5.1)  .  a(So  (Q ww +  - So) -  Qras  (Qww — Qras) {  j  V  -  ro  (5.2)  Vo  J  .  _ )So  ]Sos P  „  + [  1(So  -  P )  (5.3)  Sosp)  Where F,„  =  air flowrate  Sa  =  D.O. concentration in the liquid phase  S (*  =  saturation D.O. concentration in the liquid phase  S osp  =  D.O. concentration in liquid phase setpoint  Qww  =  flowrate of influent  Qras  =  flowrate of RAS  r0  =  respiration rate  V  =  volume of reactor  a  =  user controlled variable for the disturbance model in the system relating K L ato F in  (5  =  user controlled variable for the disturbance model in the system relating K L a to F in  Depending on the accuracy of the disturbance measurement, the respirometric rate, the online  feed forward control can adjust the air flowrate to compensate for the biomass activity and substrate concentration in the combined condensate during a FILL phase on a per batch basis. This could provide enhanced treatment of the combined condensate and decreased REACT times. 5.5  Sequencing batch reactor operation  Throughout the operation of the SBR system there were many operational lessons learned. Three main problems were identified: 1) Slow biological growth with little to no degradation of the substrate of interest. 2) pH control difficulties leading to biomass inhibition when incorrect pH signals were read. 3) An overflow of combined condensate due to clogged valves and feed lines. The first issue was addressed with the addition of a nutrient mixture, which corrected the sludge growth and treatment problems. Industrial waste streams typically are nutrient deficient and need nutrient addition for suitable biological treatment (Grady et al., 1999). The second operational difficulty occurred when the pH in the system became extremely basic. This effectively inhibited the biomass in the reactor and required addition of new seed to the SBR, and a new biomass growth period. The pH problem was caused by incorrect readings from the pH sensor and was addressed by adding control parameter safeguards to the system to eliminate pH signal errors from occurring during SBR operation. Finally, the third difficulty included overflow of combined condensate from both the pretreatment and reactor vessels. This would only occur when solenoid valves and feed lines in the system were clogged and in need of cleaning. This problem could be addressed more thoroughly by the addition of pressure or visible light sensors used for level control in the  pretreatment and reactor tanks. These would be wired into the control system to allow for cutoff points and alarms when liquid levels had either exceeded or undershot the specified liquid levels. An operator would be alerted and suitable actions could be taken. There were two major studies done on the SBR system, the first being a 30-day methanol and COD degradation test, and the second a 30-day solids and dissolved oxygen control study. During the 30-day methanol and COD test, observations included: 1) A steady increase in suspended solids settleability as the number of treatment runs increased. 2) A steady pH of 8 in the reactor, as the pH control system was stable during the treatment runs. 3) An increase in foaming that occurred during the start of each of the runs, but quickly subsided. During the 30-day solids control test, settling solids had increased granularity and quicker settling times. Further microscopic tests and a settling test would need to be done to accurately verify this qualitative assessment. 5.5.1 Methanol and COD degradation tests Methanol and COD concentrations were monitored during the REACT runs. Two typical degradation curves for the COD and methanol degradation can be seen in Figures 5.5 and 5.6, respectively. The graphs used to calculate the oxygen limited and non-oxygen limited rates can be found in Appendix D.  0 0  . 1000  I 2000  t 3000  t 4000  ,  r  5000  6000  T 7000  r  ,  8000  9000  Time (s)  Figure 5.5 - A typical COD degradation curve for combined condensate sequencing batch reactor treatment.  10000  3D 3D |25D c |ZD c 5 o §1£D o «tD i  SD —i  2000  •  400D  • •  i—  GOOD  8000  1QD0D  "GOOD  KID  10300  1800D  2000D  Tne(s)  Figure 5.6 - A typical methanol degradation curve for combined condensate sequencing batch reactor treatment. Overall removal efficiencies indicated a 100 ± 0 % removal of methanol and a 77 ± 3 % removal of COD in the system. Figure 5.6 resembles methanol degradation plots reported by Berube and Hall (1999b). Degradation tests done for oxygen limited and non-oxygen limited runs indicated that methanol uptake rates by the biomass were greater during non-oxygen limited conditions, as shown in Table 5.3. The COD degradation rates for oxygen limited and non-oxygen limited conditions were not statistically different (Table 5.3), as the standard error values for the COD degradation rate constants overlapped.  Table 5.3: COD and methanol degradation rate coefficients.  Biomass  Oxygen  COD degradation rate constant, k (s 1 ) Non-Oxygen Standard error Standard error  Concentration limited case  (±)  limited case  (±)  2.30xl0"° 5 1.96xlO" 0 5 4.57x10" 0 5  2.39xl0" 4 3.42xl0" 4 2.55X10" 4  2.08x10" 0 5 3.30xl0"° 5 9.65 xlO" 05  (mg/L) 1000 1500 2000  Biomass  2-lOxlO" 4 2.92x10' 4 3.35X10" 4  Oxygen  Methanol degradation rate (mg*L"' O Non-Oxygen Standard error Standard error  Concentration limited case  (±)  limited case  (±)  1.21xl0" 3 1.26xl0" 2 9.27x10" 3  7.14xl0" 2 1.42x10"' 4.32x10"'  5.53xl0" 3 1.71 xlO" 2 2.62x10" 2  (mg/L) 1000 1500 2000  5.26x10' 2 8.99xl0'2 2.24x10"'  It should be noted that the values found in Table 5.3 are only a measurement of the REACT phase performance. The initial DOSE phase of the reactor is not taken into account. This increased residence time in the reactor may pretreat the combined condensate, before the REACT phase occurs. Due to the nature of substrate utilization by the biomass for cell energy and growth, increased residence time in an SBR can lead to increased operational performance. Dubeski et al. (2001) have indicated that increasing the settling time within the reactor can increase performance because of the plug flow characteristics of the SBR during the DOSE and SETTLE stages of SBR operation. Dockhorn et al. (2001) have also shown that increased plug flow leads to a decrease in COD in the effluent from an industrial SBR wastewater treatment system. The SBR treatment system used in the study showed approximately 7 to 12% less COD in the effluent, as compared to continuous flow systems.  5.5.2 Solids control experiments Biomass solids control in the reactor was a primary goal in this research. By controlling solids in  the system, a desired sludge age could be attained. This would ensure positive biomass settling characteristics and consistent degradation performance in the reactor system. To measure solids control performance between inter-run samples, three solids setpoints in the system were chosen: 1000 mg/L, 1500 mg/L, and 2000 mg/L (Figure 5.7). The averaged controlled biomass results were 1050 ± 65 mg/L, 1556 ± 63 mg/L, and 2032 ± 30 mg/L respectively.  2500  2000  a>  /  E  1500  o "  1000  f S t f  Setpoint prematurely adjusted to 1500 mg/L  v Biomass Growth  * I  E  o m  „ Biomass Growth  500  10  15  20  25  30  35  Time (d)  • Sludge Concentration • Setpoint Sludge Concentration  Figure 5.7 - Demonstration of the biomass concentration control system over a 30 day run. Each of the days in which the biomass was controlled consisted of 3 to 4 complete SBR cycles. From Figure 5.7, the desired solids setpoints were accurately met. This result indicates that the solids control program worked well. The sudden jump in the biomass concentration on day 4 was due to a premature adjustment to 1500 mg/L, but it was quickly adjusted back to 1000 mg/L as can be seen from the decreasing biomass on days 5 and 6. The 500 mg/L increase was most likely due to the fact that 4 cycles had taken place during that single day and therefore biomass growth had occurred before the setpoint was lowered.  The solids control program can be readily adapted to future SBR studies. Also, the sludge ages for the system can be calculated online using the solids sensor and LabVIEW sludge age control system. The sludge ages of the non-oxygen limiting and oxygen limiting graphs are presented in Table 5.4. Table 5.4: Sludge age for the oxygen and non-oxygen limited cases. Biomass Concentration 1000 mg/L Setpoint 1500 mg/L Setpoint 2000 mg/L Setpoint  (±) Standard Reactor Condition Oxygen limited non-Oxygen limited Oxygen limited non-Oxygen limited Oxygen limited non-Oxygen limited  Deviation Sludge Age (d) 9.00 2.75 5.61 3.24 9.95 7.26  2.80 2.00 1.81 0.86 6.17 0.53  The SBR system tended to have higher sludge ages during oxygen limited runs. This is intuitively correct as non-oxygen limited cases would potentially allow the biomass to achieve a better biomass growth rate, thus increasing the biomass concentration. As a result, the control system would waste more of this newly grown biomass in the next cycle. Sludge ages in the system seem to cycle both during cycles runs and during per day samples as can be seen in Figures 5.8 and 5.9, respectively. This can be explained by the fact that even though the biomass concentrations could be controlled, the sludge age itself would tend to cycle during inter-run times of biomass growth under oxygen limited and non-oxygen limited conditions. When the biomass was allowed to grow, the sludge ages in the system were much larger (10 to 20 days) than during the controlled runs. During the controlled runs sludge ages tended to vary between 2 to 8 days.  S l u d g e Age p e r Cycle  -  •  //  / 1.  • •  •  /  \  /  A  \  V  \  •  /  /  \  .  \  /  v  •  0  S  /  1  "\  •K"  i  »  /  \\  /  j  •  10  15  20  25  Cycle j •  Sludge Age (cycle)  »  Sludge Age Moving Average (4 cycle) |  Figure 5.8 - Sludge age per cycle.  Sludge Age per Day  • •  .  *  •  •  jT  Jk  \  4 /  /  •  \  \  —  V 0  5  /  •  > \  4 / •f  \ V \  •  .  ,•  *  .  •  v:  •  10  15  |  •  Sludge Age (d)  Day* »  20  25  30  Sludge Age Moving Average (4d) |  Figure 5.9 - Reactor sludge age over a 30 day treatment period.  35  Suspended solids in the effluent was measured to be 110 mg/L by the solids probe. This residual suspended solids may need to be removed if the water is to be reused in later washing stages. Qualitative observations of the system during each run did indicate that biomass settling was good throughout the run cycles and during the 30-day trial period.  5.5.3 Dissolved oxygen control tests Dissolved oxygen tests were done in order to verify two main goals of the system: 1) to maintain the dissolved oxygen in the system at a setpoint of 2.0 mg/L, and 2) to cycle the system when methanol in the reactor was fully degraded. Both of these goals seem to have been met, as shown in Figure 5.10.  Sequencing Batch Reactor Runs T 4000  1  •i— •  1 •  a.  u  k o i  L/-]  /  Wl / \! w  -A  V1  \  •• •  V/  y  L.  K  I  iE  . .  1500  1000  -  500  f  5000  15000  Time (si - Dissolved Oxygen  Air Flowrate  pH  Solids  Figure 5.10 - A typical sequencing batch reactor run. The PID controller was kept at a proportional control value of 1 for most of the experiment runs. Addition of integral and derivative values resulted in the system acting in an unstable fashion.  The proportional control of the reactor should have developed an offset in setpoint, but this not seen in the runs. This may be due to the fact that any offset value was too small to be detected by the D.O. sensor.  The system cycled at the prescribed times as indicated by the drop in the air flowrate. The dissolved oxygen in the system is also kept at a setpoint of 2.0 mg/L and the pH and the suspended solids were kept at setpoints of 8.0 and 3000 mg/L, respectively.  6.1  Combined condensate treatment in an SBR  Combined condensate received from the Skookumchuck pulp mill BOD 5 , COD, and methanol concentrations were 735 mg/L, 1450 mg/L, and 590 mg/L respectively. The COD and methanol values.found from the characterisation study agreed with past published values for kraft condensate values (Milet and Duff, 1998).  An SBR treatment system for kraft mill evaporator combined condensate is effective in treating methanol in the condensate stream. The aeration of the SBR during a REACT phase did not lead to stripping of methanol from the combined condensate during a 3 hour study. The system removes approximately 100 ± 0 % of the methanol and lowers COD by 77 ± 3 % in the treated combined condensate stream. The system would prove to be an effective online treatment system that could be used to meet USEPA MACT I criteria for pulp mill HAP emissions.  One problem that may need to be addressed is the suspended solids in the reused effluent from the SBR. The reused effluent would need to be passed through a filter system in order to not contaminate pulp washing stages.  6.2  SBR scale-up and sensor modifications  The SBR scale-up and sensor modifications proved to be quite successful. The increased volume to the system did not hamper performance or the overall operation during condensate treatment, as compared to the smaller SBR system used by Milet and Duff (1998). One drawback of the increased size of the SBR was that the increased volume of condensate treated led to problems of condensate running out during prolonged treatment runs. A further consequence of the quick depletion of condensate was that there were problems maintaining the reactor biomass activity levels due to inconsistent delivery times of combined condensate from the mill.  The installation of the air flowrate metre and controller proved successful, as the SBR system could now metre in air, as needed, to the match the desired D.O. levels during a treatment phase. The air flowrate metre also allowed the data-logging of the air in the system for further analysis and modelling of air and D.O. dynamics in the reactor.  Operation of the solids sensor allowed for an online calculation of sludge age in the system, as well, the biomass concentration was controlled at a consistent level throughout the SBR cycles. The implementation of an online sludge age control system could be done in the future using the solids sensor.  6.3  SBR phase control Pascal program and LabVIEW interfacing software  By rewriting the Pascal control program the existing system of controls and sensors, in the study conducted by Milet and Duff (1998), could be reused. The modifications and development of a LabVIEW GUI frontend to interface with the Pascal backend allowed for the modernization of much of the SBR system, so that one could seamlessly add the modern air flowrate, solids sensors and D.O. proportional controller, to the existing valves, D.O., and pH sensor, datalogging, and computer equipment.  The LabVIEW datalogging program allowed for realtime display of the data logged during the REACT phase. As well, the LabVIEW programming environment allowed for the rapid programming and implementation of the SBR control and monitoring software.  6.4  Reactor performance under oxygen limiting and non-oxygen limiting scenarios  During the oxygen and non-oxygen limited study, it was found that the oxygen limitations did not have a statistically significant impact on COD treatment efficiency. However, methanol degradation rate increased by 1.3 to 2 times in non-oxygen limited conditions.  6.5  D.O., REACT phase duration, and solids controller performance  A desired D.O. level of 2 mg/L in the reactor was maintained throughout the REACT cycle runs. The proportional controller consistently controlled the D.O. The REACT phase control again worked by monitoring air flowrate into the system.  Solids controller performed quite well in controlling the solids concentration in the SBR system. The solids controller consistently maintained the desired solids concentration of 1000 mg/1, 1500 mg/L, and 2000 mg/L at 1050 ± 65 mg/L, 1556 ± 63 mg/L, and 2032 ± 30 mg/L, respectively. The system was able to calculate an online sludge age. Sludge ages varied from 2 to 8 days during the controlled biomass concentration runs, but increased to 10 to 20 days when the solids controller allowed the biomass to grow.  7.0  Future Work  The research to date has indicated that an biological SBR system can be used for the treatment of kraft mill combined condensates. The SBR unit would be able to meet the USEPA MACT I limits in regards to methanol HAP emissions. This research has shown that with added automation, control, and monitoring, an industrial scale inline SBR system could be placed in a kraft mill to treat combined condensate. The resulting clean water stream can then be reused in brownstock and bleached pulp wash water within the mill. A large scale industrial implementation for a kraft mill is still far away though as much work still needs to be done.  7.1  Control algorithms  7.1.1 D.O. control and biological modelling The feedback proportional D.O. controller in this system is highly rudimentary and needs to be more properly tuned. By using a model based approach to control design the control system can made to be more flexible to changing operating parameters and influent conditions. Ultimately, the goal of this work is to understand the model underlying the biological respirometric activity in the SBR system and provide for adequate D.O. control in the system. As a result of this further work, an advanced controller (or steps in achieving the controller) could be used to better control air flowrate in any industrial SBR treatment installation.  7.1.2 Sludge age control The application of a sludge age control system would merit more study, as it has been demonstrated that controlling sludge age leads to settlable sludge and treatment efficiency. Improvements to this system could include a programmable sludge age controller, which would allow the SBR system to self adjust the per batch sludge wasting rates, in order to attain a desired sludge age. This type of treatment control is ideally suited to SBR operation, as the sludge age control system can more readily control the wasting flowrate given the fixed decanting volume in  an SBR. This discretization of a continuous waste stream allows for more effective control to be applied, as the influent can be analysed and modelled as a batch system.  7.2  SBR condensate treatment  7.2.1 Foul condensate Foul condensate treatment could be treated in the SBR to see if the SBR could efficiently treat a much more contaminated waste stream. This could ultimately lead to capital saving measures by replacing stream stripping systems as a kraft condensate treatment alternative (Berube and Hall, 1999a) or in allowing for more reuse of mill system water.  7.2.2 Higher temperature treatment Combined condensate would be received by an SBR at a higher temperature than 35°C. Since temperature control has been implemented in the lab scale SBR, a study in which stepwise increases to temperature occurred while measuring biomass treatment efficiency could be conducted. As well, an acclimation study, with biomass activity measurements, could be done to mimic an SBR start-up situation to see how the biomass could handle the initial high temperature load.  7.2.3 SBR scale-up Scale-up calculations and an energy balance for the SBR system should be done, so that a precise costing of the SBR system could address the potential industrial application of this treatment system in a kraft mill.  American Public Health Association (APHA) (1989), American Water Works Association,  Clesceri, L.S., Greenberg, A.E. and Trussel, R.R., Standard methods for the examination of water and wastewater 17 th ed., Water Pollution Control Federation, Washington, D.C.  American Society of Civil Engineers (ASCE) (1984), A Standard for the measurement of oxygen transfer systems. New York: Am. Soc. of Civ. Eng., Oxygen Transfer Standards Committee.  Annola, T.L., Hynninen, P. and Henricson, K. (1995), Effect of condensate use on bleaching, Paper and Timber, Vol. 77, No. 3.  Barton, D., Mathews, K., Hickman, G. and Tielbaard, M. (1998), Stand-alone biological  treatment of kraft mill condensates - pilot plant studies, 1998 International Environmental Conference & Exhibit, Tappi Proceedings, pp. 521-537.  Berube, P.R. and Hall, E.R. (1999a), Treatment of evaporator condensate using high  temperature membrane bioreactor: determination of maximum operating temperature and system costs, Sustainable Forest Management Network - Project Report 1999-31.  Berube, P.R. and Hall, E.R. (1999b), Effects of kraft evaporator condensate matrix on methanol removal in a high temperature membrane reactor, Water Science and Technology, Vol. 40, No. 11-12, pp. 327-335.  Blackwell, B.R., MacKay, W.B., Murray, F.E. and Oldham, W.K. (1979), Review of kraft foul  condensates - sources, quantities, chemical composition, and environmental effects, Tappi Journal, Vol. 62, No. 10, pp. 33.  Blackwell, B.R., Murray, F.E. and Oldham, W.K. (1980), Vapor/Liquid equilibrium  relationships for kraft foul condensates, Tappi Journal, Vol. 63, No. 2, pp. 151. Browning, B.L. (1975), The chemistry of wood, R.E. Krieger Pub. Co., Huntington, NY.  Cakici, A. and Bayramoglu, M. (1995), An approach to controlling sludge age in the activated sludge process, Water Research, Vol. 29, No. 4, pp. 1093-1097. Cech, J.S., Chudoba, J. and Grau, P. (1985), Determination of kinetic constants of activated sludge microorganisms, Water Science and Technology, Vol. 17, No.2/3, pp. 259-272.  Chudoba, P., Chang, J. and Capdeville, B. (1991), Synchronized division of activated sludge microorganisms, Water Research, Vol. 25, No. 7, pp. 817-822. Cocci, A.A., Almost, S. and McCarthy P.J. (1998), Sequencing batch reactors in the pulp and paper industry a benchmarking study, 1998 International Environmental Conference & Exhibit, Tappi Proceedings, pp. 1203-1208.  Dangcong, P., Bernet, N., Delgenes, J. and Moletta, R. (2001), Simultaneous organic carbon  and nitrogen removal in an SBR controlled at low dissolved oxygen concentration, Journal Chemical Technology and Biotechnology, Vol. 76, No. 6, pp. 553-558.  Dockhorn, T., Dichti, N. and Kayser, R. (2001), Comparative investigations on COD-removal  in sequencing batch reactors and continuous flow plants, Water Science and Technology, Vol. 43, No. 3, pp.45-52.  Dubeski, C.V., Branion, R.M.R. and Lo, K.V. (2001), Biological treatment of pulp mill wastewater using sequencing batch reactors, Journal of Environmental Science and Health Part A Toxic/Hazardous Substances and Environmental Engineering, Vol. 36, No. 7, pp. 1245-1255.  Grady, Jr., C.P.L., Daigger, G.T. and Lim, H.C. (1999), Biological Wastewater Treatment 2 n d edition, Marcel Dekker Inc., New York, NY.  Grau, P. (1991), Criteria for nutrient balanced operation of activated sludge process, Water Science Technology, Vol. 24, No. 3/4, pp. 251-259.  Hitzroth, A. (2000) Personal communication via email.  Krogerus, M., Hynninen, P., Westergren, L. and Vatka, S. (2002), Increased energy efficiency  by improved control of the biological wastewater treatment process, Paperija puu. Papper och tra. Paper and timber, Vol. 84, No. 4, pp. 253-255.  Liao, Y.C. and Lee, D.J. (1996), Estimation of oxygen transfer rate in sequencing batch reactor, Water Science and Technology, Vol. 34, No. 3-4, pp. 413-420.  Metcalf and Eddy (2003), Wastewater Engineering, Treatment and Reuse 4 t h edition, McGraw Hill, Toronto.  Milet, G. and Duff, S.J.B. (1998), Treatment of kraft condensates in a feedback-controlled sequencing batch reactor, Water Science and Technology, Vol. 38, No. 4-5, pp. 263-271.  Moreno, J. (1999), Optimal time control of bioreactors for the wastewater treatment, Optimal Control Applications & Methods, 20, pp. 145-164, 1999.  Moreno, J. and Buitron, G. (1998), Respirometry based optimal control of an aerobic bioreactor for the industrial waste water treatment, Water Science and Technology, Vol. 38, No. 3, pp. 219-226.  NCASI (1995), Acetaldehyde, acetone, methanol and methyl ethyl ketone contents of kraft mill condensate, Technical Bulletin No. 702. Nejjari, F., Roux, G. and Dahhou, B. (1999), Estimation and optimal control design of a biological wastewater treatment process, Mathematics and Computers in Simulation, Vol. 48, No. 3, pp. 269-280.  Ogunnaike, B.A. and Ray, W.H. (1994), Process Dynamics, Modeling, and Control, Oxford University Press Inc., New York, NY.  Pavselj, N., Hvala, N. and Kocijan, J. (2001), Experimental design of an optimal phase  duration control strategy used in batch biological wastewater treatment, ISA Transactions, 40, pp. 41-56.  Pinkerton, J.E. (1998), MACT portion of the Cluster Rule, Tappi Journal, Vol. 81, No. 2, pp. 99.  Ra, C.S., Lo, K.V. and Mavinic, D.S. (1998), Real-time control of two stage sequencing batch reactor system for the treatment of animal wastewater, Environmental Technology, Vol. 19, pp 343-356.  Sebbas, E. (1988), Reuse of Kraft Mill Secondary Condensates, Tappi Journal, Vol. 71, No. 7, pp. 53.  Sheppard, J.D. and Cooper, D.G. (1990), Development of computerized feedback control for the continuous phasing of bacillus subtilis, Biotechnology and Bioengineering, Vol. 36, pp. 539-545.  Smith, C.A. and Corripio, A.B. (1997), Principles and Practice of Automatic Process Control 2 n d Edition, John Wiley & Sons, Inc., Toronto, Canada.  Smook, G.A. (1997), Handbook for Pulp & Paper Technologists 2 n d Edition, Angus Wilde Publications Inc., Vancouver, Canada.  Sotomayor, O.A.Z., Park, S.W. and Garcia, C. (2002), Software sensor for on-line estimation  of the microbial activity in activated sludge systems, ISA Transactions, Vol. 41, No.2, pp. 127-143.  Spanjers, H., Vanrolleghm, P.A., Olsson, G. and Dold, P.L. (1998), Respirometry in control of  the activated sludge process: principles, Scientific and Technical Report Series no. 7, International Association on Water Quality, London, England.  Yoong, E.T., Lant, P.A. and Greenfield, P.F. (2000), In situ respirometry in an SBR treating  wastewater with high phenol concentrations, Water Science and Technology, Vol. 34, No. 1, pp. 239-245.  Appendix A - LabVIEW PID controller  Student Edition PID.vl C:>Program Files > Nation a I Instruments .lab VIEW LEARN ING ,Noim T he ois-PID.vl last modllied on 10/09/01 at 2 40 PM Printed on 23'08'04 at 9 57 AM  Student Edition PID vi C.Program Flies, National Instruments Lab VIEW1. LEARN ING Nor m_Thesis\PID. v  Page '  •©r  Tgr  Printed on 23'0S'O4 at 10:00 AM  Appendix A.l - PID GUI frontend and the PID LabVIEW backend (top and bottom respectively).  Appendix B - SBR Pascal program SCBRN3.PAS  {$G+,N+}  PROGRAM Self_Cycling_Bioreactor;  USES Dos, CRT, ASYNC, Strings;  VAR Activated Output: Byte; {l=fill valve, 2=antifoam/nutrient pumps, 4=wasting pump, 5=influent pump, 7= drain valve, 8=impeller, air and pH control}  {Include files must appear in this order} {$1 c:\norman\PHASING3.INC}  BEGIN ComSetup; InitializeBoard; Writeln('Welcome to the Serial Strawberry Tree ACPC jr. Board Parameter Setup Program'); Writeln('Setting up StrawBerry Tree ACPC jr. Board Parameters'); Writeln('Waiting for Input...'); REPEAT Chooser; UNTIL KeyPressed; CloseAllComs; Halt; END. {program Self Cycling Bioreactor}  PHASING3.INC  CONST Chan Limit =15;  TYPE stng = String[10]; intar = Array[O..Chan_Limit] of Integer; fltar = Array[O..Chan_Limit] of Real;  VAR J : Integer; {these four} AA : intar; {variables used} BB : fltar; {in conjunction} CC : stng; {with function AMI} Command Signal: Char; {signal to activate ports}  FUNCTION AMI (VAR argl:intar; VAR arg2:fltar; VAR arg3:stng): Integer; EXTERNAL; {this is a mysterious external function situated in PCALL.OBJ which deals with the digital ports and the DO readings}  {$L c:\norman\PCALL.OBJ}  PROCEDURE Initial Setup; {checks for errors} BEGIN {ClrScr;} CC:='Fn'+char(0); J:=AM1(AA,BB,CC); IF J=-l THEN BEGIN Writeln('Driver or Card not installed'); Halt; END  ELSE BEGIN IF (AA[0]=0) AND (AA[2]=0) THEN BEGIN Writeln('Driver, GDRV.COM, was not installed'); Halt; END; IF (AA[0]=0) AND (AA[2]oO) THEN BEGIN Writeln('No analog card selected. BRD SEL switch set to 0.'); Halt; END; IF ( A A [ 0 ] o 0 ) AND (AA[6]=0) THEN BEGIN Writeln('CALIB.DAT and/or CALOUT.DAT files are not correct', ' or GFIND.EXE was not run.'); Halt; END; IF (AA[0]>AA[6]) THEN BEGIN Writeln('Calibration numbers are not correct.'); Halt; END; IF (AA[0]>(Chan_Limit+l)) OR (AA[2]>(Chan_Limit+l)) THEN BEGIN Writeln('Too many channels installed. Change array variable', ' definitions in heading.'); Halt; END; END; {else}  END; {procedure Initial Setup}  PROCEDURE SetDigitalPorts; {sets the digital ports} BEGIN FOR J:=l TO 12 DO AA[J-1]:=1; {sets the digital I/Os to output} CC:-S'+char(0); J:=AM1(AA,BB,CC); FOR J:=l TO 12 DO AA[J-1]:=1; {closes valves and turns pumps off} CC:='0'+char(0); J:=AM1(AA,BB,CC); END; {procedure Set Digital Ports}  PROCEDURE Set Analog Ports; {sets the analog ports} BEGIN CC:='N'+char(0);  {samples 8 analog input channels}  AA[0]:=4; J:=AM1(AA,BB,CC); CC:-a'+char(0);  {sets the resolution to 18-bits (low noise mode)}  AA[0]:=18; J:=AM1(AA,BB,CC); CC:-rc"+char(0);  {sets the range}  AA[0]:=2;  {sets range for DO Probe as 10V}  AA[1]:=2;  {sets range for Mass Flow Controller as 10V}  AA[2]:=7;  {sets range for Solids Sensor as 20 mA}  AA[3]:=7;  {sets range for pH controller as 20 mA}  J:=AM1(AA,BB,CC); END; {procedure Set Analog Port}  PROCEDURE Check Setup Errors; {checks if the board set up is correct} BEGIN  {and if valves are open or pumps are on}  ClrScr; CC:='B'+char(0); J:=AM1 (AA,BB,CC); IF (AA[0] o 4864) OR (AA[1] o 0) THEN BEGIN Writeln('The board set-up is incorrect. Verify that ACjr board1, ' is at it"s right address'); Halt; END; CC:=T+char(0); J:=AM 1 (AA,BB,CC); IF (AA[0] o  1) THEN  BEGIN Writeln('The fill valve is open.', ' Please try re-entering the program'); Halt; END;  IF (AA[1] o 1) THEN BEGIN Writeln('The antifoam and nutrients solution pumps are on.', ' Please try re-entering the program'); Halt; END;  IF (AA[2] o 1) THEN BEGIN Writeln('Port 3 is activated. Please try re-entering the program'); Halt; END;  IF (AA[3] o 1) THEN BEGIN  Writeln('The wasting pump is on. Please try re-entering the program'); Halt; END; IF (AA[4] o  1) THEN  BEGIN Writeln('The feed pump is on. Please try re-entering the program'); Halt; END; IF (AA[5] o  1) THEN  BEGIN Writeln('The air valve is open. Please try re-entering the program'); Halt; END; IF (AA[6] o  1) THEN  BEGIN Writeln('The drain valve is open.', ' Please try re-entering the program'); Halt; END;  IF (AA[7] o 1) THEN BEGIN Writeln('The impeller, air and pH control are on.', ' Please try re-entering the program'); Halt; END; END; {procedure CheckSetupErrors}  PROCEDURE ComSetup; VAR Test Coml, Test_Com2 : Boolean; Testl : array[0..4] of Char;  Test2 : String[5]; BEGIN ClrScr; TestCom 1 :=OpenCom( 1,1000,1000); Test_Com2 :=OpenCom(2,1000,1000); IF Test Coml THEN BEGIN ClearCom(l,'B'); Writeln('Communications Port 1 is Open'); ComParams(l,l 15200,8,'N',1); Writeln('The True Baud Rate is', ComTrueBaud(l 15200)); SetCTSMode(l,TRUE); SetDTR( 1 ,TRUE); SetRTSMode( 1 ,TRUE, 1000,1001); IF DSRStat(l) THEN BEGIN Writeln('Data Set Ready'); END ELSE BEGIN Writeln('Data Set Not Ready'); END; END ELSE BEGIN Writeln('Communieations Port 1 is not Open'); END; IF Test_Com2 THEN BEGIN ClearCom(2,'B');  Writeln('Communications Port 2 is Open'); ComParams(2,l 15200,8,'N',1); Writeln('The True Baud Rate is', ComTrueBaud(l 15200)); SetCTSMode(2,TRUE); SetDTR(2,TRUE); SetRTSMode(2,TRUE, 1000,1001); IF DSRStat(2) THEN BEGIN Writeln('Data Set Ready'); END ELSE BEGIN Writeln('Data Set Not Ready'); END; END ELSE BEGIN Writeln('Communications Port 2 is not Open'); END; END;  PROCEDURE Read Com; {reads the com port} VAR Code : Integer; BEGIN CommandSignal :=ComReadChW( 1); Val(Command_Signal,Activated_Output,Code); {Writeln(CommandSignal);} END;  PROCEDURE ReadComS; {reads the com port}  BEGIN Command_Signal=ComReadCh(l); {Writeln(CommandSignal);} END;  PROCEDURE ActivateDigitalOutput; BEGIN  {activates a digital port}  ReadCom; CC:-I'+char(0); J:=AM1(AA,BB,CC); AA [ Acti vatedOutput-1 ] :=0; CC:-0'+char(0); J:=AM 1 (AA,BB,CC); END; {procedure Activate Digital Output}  PROCEDURE DeactivateDigitalOutput; BEGIN  {deactivates a digital port}  ReadCom; CC:=T+char(0); J:=AM1(AA,BB,CC); AA [ ActivatedOutput-1 ] :=1; CC:='0'+char(0); J:=AM1(AA,BB,CC); END; {procedure Deactivate Digital Output}  PROCEDURE Read AnalogW; VAR Test DO, Test Airflow, Test Solids, Test_pH, Test Temp : Real; Test StringP : array[0..4] of Char; Test_String : String[5]; SP : array[0..37] of Char;  S : String[38];  BEGIN CC:='h'+char(0); AA[0]:=1; J:=AM1(AA,BB,CC); Test_DC):=BB[0]; {Writeln(Test_DO);} CC:='h'+char(0); AA[0]:=2; J:=AM1(AA,BB,CC); TestAirFlo w:=BB [0]; {Writeln(TestAirFlow);} CC:='h'+char(0); AA[0]:=3; J:=AM1(AA,BB,CC); TestSolids:=BB [0]; { Writeln(Test_S olids);} CC:-h'+char(0); AA[0]:=4; J:=AM1(AA,BB,CC); Test_pH:=BB[0]; {Writeln(Test_pH);} StrCopy(SP,'DO'); Str(Test_DO: 5:3 ,Test_String); StrPCopy(Test_StringP,Test_String); StrCat(SP,Test_StringP); StrCat(SP,AirFlow'); Str(Test_Airflow: 5:3 ,Test_String); StrPCopy(Test_StringP,Test_String); StrCat(SP,Test_StringP);  StrCat(SP,'Solids'); Str(Test_Solids: 5:3 ,Test_String); StrPCopy(Test_StringP,Test_String); StrCat(SP,Test_StringP); StrCat(SP,'pH'); Str(Test_pH: 5:3 ,Test_String); StrPCopy(Test_StringP,Test_String); StrCat(SP,Test_StringP); S:=StrPas(SP); {Writeln(SP);} {Writeln(S);} ComWrite(l,S); ComWaitForClear(l); END;  PROCEDURE Deactivate_Analog_Input; VAR S : String[38]; BEGIN {S:-DOO.OOOAirFlowO.OOOSolidsO.OOOpHO.OOO';} ReadAnalogW; END;  PROCEDURE Read Analog; BEGIN REPEAT ReadAnalogW; ReadComS; IF Command_Signal='0' THEN BEGIN ReadComS;  IF Command_Signal='D' THEN BEGIN ActivateDigitalOutput; END; END; IF Command_Signal='C' THEN BEGIN ReadComS; IF Command s ignal='D' THEN BEGIN DeactivateDigitalOutput; END; END; UNTIL Command_Signal='A'; Deactivate_Analog_Input; END; PROCEDURE Activate_Analog_Input; BEGIN CC:='c'+char(0); J:=AM1(AA,BB,CC); ReadAnalog; END;  PROCEDURE Open Signal; {opens either digital or analog port} BEGIN ReadCom; CASE Command Signal OF 'A': Activate_Analog_Input; 'D': Activate Digital Output;  END; END;  PROCEDURE Close Signal; {opens either digital or analog port} BEGIN ReadCom; CASE CommandSignal OF 'A': Deactivate_Analog_Input; 'D': Deactivate Digital Output; END; END;  PROCEDURE Chooser; {decides what port the user wants to open or close} BEGIN ReadCom; CASE Command Signal OF 'O': Open Signal; 'C': Close_Signal; END; END; PROCEDURE Initialize Board; {sets the board and the ports} BEGIN  {and checks for errors}  {ClrScr;} InitialSetup; SetDigitalPorts; Set_Analog_Ports; CheckSetupErrors; END;  Appendix C - Example LabVIEW sequencing control program  Appendix C.l - Example LabVIEW SBR program interface.  Appendix D - Supplementary experimental data  Time (•) •  July 20/01  •  July 21/01  •  July 26/01  •  July 26/01  A July 22/01 —  linear (July21/01) — L i n e a r (July 20/01) —Linear)July 22/01)  Time (s) July 29/01 ——Linear (July 29/01)  Linear (July 26/01) —  Linear (July 26/01)  Appendix D.l - COD degradation kinetic constants at 1000 mg/L biomass (oxygen limited top), (non-oxygen limited bottom).  T«l»(«)  •  July 31(01  •  Aug 1«1 — L i n e a r (July 31/01) —  LinearfAug 1/01)  Appendix D.2 - COD degradation kinetic constants at 1500mg/L biomass (oxygen limited top), (non-oxygen limited bottom).  y • -0.0004X • 6.6093 R ! = 0.9446 y = J3 00Q3* « 6 6675 R 1 = 0.9649 y - -0 0004* • 6.6284 R 2 - 0 9565  2500 Time (*) •  Aug. 11/01  •  Aug 12/01  Aug 13/01 —  Linear (Aug 13/01) — L i n e a r (Aug 11/01) —  Linear (Aug 12AJ1)  Appendix D.3 - COD degradation kinetic constants at 2000 mg/L biomass (oxygen limited top), (non-oxygen limited bottom).  Appendix D.4 - Methanol degradation rate at 1000 mg/L biomass (oxygen limited top), (nonoxygen limited bottom).  Tin™ ( • )  Appendix D.5 - Methanol degradation rate at 1500mg/L biomass (oxygen limited top), (nonoxygen limited bottom).  Appendix D.6 - Methanol degradation rate at 2000mg/L biomass (oxygen limited top), (nonoxygen limited bottom).  

Cite

Citation Scheme:

        

Citations by CSL (citeproc-js)

Usage Statistics

Share

Embed

Customize your widget with the following options, then copy and paste the code below into the HTML of your page to embed this item in your website.
                        
                            <div id="ubcOpenCollectionsWidgetDisplay">
                            <script id="ubcOpenCollectionsWidget"
                            src="{[{embed.src}]}"
                            data-item="{[{embed.item}]}"
                            data-collection="{[{embed.collection}]}"
                            data-metadata="{[{embed.showMetadata}]}"
                            data-width="{[{embed.width}]}"
                            async >
                            </script>
                            </div>
                        
                    
IIIF logo Our image viewer uses the IIIF 2.0 standard. To load this item in other compatible viewers, use this url:
http://iiif.library.ubc.ca/presentation/dsp.831.1-0058957/manifest

Comment

Related Items