Cost and effluent quality controllers design based on the relative gain array for a nutrient removal WWTP


Раздел науки:

Читать онлайн: 
Текст статьи: 
Vinicius Cunha Machado, David Gabriel, Javier Lafuente, Juan Antonio Baeza* Departament d’Enginyeria Quı´mica, Escola d’Enginyeria, Universitat Auto `noma de Barcelona, 08193 Cerdanyola del Valle `s, Barcelona, Spain a r t i c l e i n f o Article history: Received 12 April 2009 Received in revised form 29 July 2009 Accepted 7 August 2009 Available online 14 August 2009 Keywords: Nitrification EBPR Nutrient removal Control structure design Operating cost control Relative gain array (RGA) a b s t r a c t The main objective of this work was the design of different effluent quality controllers and a cost controller for WWTPs. This study was based on the relative gain array (RGA) analysis applied to an anaerobic/anoxic/aerobic (A2/O) configuration of a simulated WWTP, with combined removal of organic matter, nitrogen and phosphorus. The RGA analysis was able to point out the best pairing amongst the input and the output control variables of the plant to design low order and decentralized effluent quality controllers, such as proportionalintegral controllers for each variable of interest (ammonium, nitrate and phosphate). In a second step, a cost controller to automatically search for the most economic setpoints of the effluent quality controllers was implemented based on the best decentralized control structure tested. The simulated plant was operated under different control modes that chronologically represent control configurations becoming gradually more complex: (i) in open loop; (ii) with dissolved oxygen (DO) control in the last aerobic reactor only; (iii) with the effluent quality controllers active; (iv) with the effluent quality controllers active and automatically receiving the setpoints from a cost controller. The effluent quality controllers alone and the cost control together with effluent quality controllers could save up to 42,000 Euros/year and 225,000 Euros/year, respectively, when compared to the operating costs of the plant operating with DO control (a reduction of 2.5% and 13% of the operating costs, respectively). The cost controller proved to be a good tool for automating the search of the most profitable setpoints of the effluent quality controllers for a given cost setpoint. ª 2009 Elsevier Ltd. All rights reserved. 1. Introduction Organic matter and nutrient removal from wastewater improves the environmental conditions as well as provides health and well-being to the citizens. The most popular technology for wastewater treatment is the activated sludge process. It was developed by Ardern and Lockett (1914) and was named this way because sludge was produced biologically during organic matter decomposition. This sludge contained different kind of microorganisms that stabilized the wastewater with their activity. Nowadays, besides organic matter, nitrogen (N) and phosphorus (P) have to be removed from the wastewater since their presence produces eutrophication. While nitrogen is removed through the nitrification/denitrification process, phosphorus is entrapped by the biomass and it is removed from the system with the sludge wastage stream. The latter is known as Enhanced Biological Phosphorus Removal (EBPR) process (Jenkins and Tandoi, 1991). Throughout the years, the governments imposed on WWTPs even more constrained effluent discharge limits for COD, N and P. The attainment of an effluent quality according to these limits, calls for controlling the biomass concentration * Corresponding author. Tel.: þ34 935811587; fax: þ34 935812013. E-mail addresses: (V.C. Machado), (D. Gabriel), (J. Lafuente), (J.A. Baeza). Available at journal homepage: 0043-1354/$ – see front matter ª 2009 Elsevier Ltd. All rights reserved. doi:10.1016/j.watres.2009.08.011 w a t e r r e s e a r c h 4 3 ( 2 0 0 9 ) 5 1 2 9 – 5 1 4 1 inside the plant, the DO concentration in the aerobic reactors, recycle flow rates (inventory variables), and the concentration of nutrients in the effluent (nitrate, ammonium and phosphate). Since these concentrations and the operating costs depend on the inventory variables, two control layers need to be defined: the inventory control layer and the effluent quality control layer, which is placed above the first one (Steffens and Lant, 1999). Note that the inventory variables are those ones that must be controlled to properly run a process. Several control strategies have been developed to achieve low effluent concentrations in WWTPs (Baeza et al., 2002; Brouwer et al., 1998; Carlsson and Rehnstro ¨m, 2002; Krause et al., 2002; Lindberg and Carlsson, 1996; Samuelsson and Carlsson, 2000). These works make use of different strategies, reporting good performance of the process at reasonable costs. Amongst them, cascade and feed-forward control configurations, PID controllers in the inventory and effluent quality control layers, external addition of organic matter to improve the denitrification process, internal models for describing the nitrification rates, change of the anoxic/aerobic operating volumes or OUR (oxygen uptake rate) monitoring for determining the nitrogen load have been reported. Nevertheless, the control tools and physical–chemical concepts adopted in these works pay attention to individual variables. Nomenclature A2/O Anaerobic, Anoxic and Aerobic (WWTP configuration) AE Aeration energy, in kWh/day ASM2d Activated Sludge Model 2d C j EFF Effluent concentration of pollutant j. The subindex j can be ammonium, nitrate or phosphate C L,j Concentration limit of pollutant j in the effluent COD Chemical Oxygen Demand CSD Control Structure Design DO Dissolved Oxygen concentration EBPR Enhanced Biological Phosphorus Removal EF Effluent Fines, Euros/day FF Feed-Forward action FODT First Order with Dead Time transfer function G(0) Process response at frequency 0 (steady-state) IMC Internal Model Control KC Process gain of a SISO transfer function KFF Feed-forward controller gain of ammonium control loop kLai Oxygen transfer coefficient in reactor i KP Controller gain OC Operating Costs, Euros/day OUR Oxygen Uptake Rate PAO Phosphorus Accumulating Organisms PE Pumping energy, in kWh/day PF Pumping factor to convert flow rate units in energy units PI Proportional-Integral controller PID Proportional-Integral-Derivative controller QIN Influent flow rate, m3 d1 QRAS Recycle of activated sludge (external recycle flow rate), m3 d1 QRINT Internal recycle flow rate, m3 d1 QW Sludge wastage flow rate, m3 d1 RGA Relative Gain Array RGA(0) Relative gain array calculated with steady-state gain Ri Reactor number i Set i Set of control variables i selected from the available outputs Si The best control structure of Set i according to the RGA analysis SNH4R7 Ammonium concentration in reactor 7, gN m3 SNH4R7SP Ammonium setpoint in reactor 7. gN m3 SNO3R4 Nitrate concentration in reactor 4, gN m3 SNO3R4SP Nitrate setpoint in reactor 4, gN m3 SNO3R7 Nitrate concentration in reactor 7, gN m3 SO2R5 DO concentration in reactor 5, gO2 m3 SO2R6 DO concentration in reactor 6, gO2 m3 SO2R7 DO concentration in reactor 7, gO2 m3 SO2R7SP DO setpoint in reactor 7, gO2 m3 SPO4R2 Phosphate concentration in reactor 2, gP m3 SPO4R7 Phosphate concentration in reactor 7, gP m3 SPO4R2SP Phosphate setpoint in reactor 2, gP m3 SRT Sludge Retention Time WWTP Wastewater Treatment Plant XAUT Autotrophic biomass concentration, gCOD m3 XTSSQW Total suspended solids concentration in the sludge wastage stream, gSS m3 XTSSEff Total suspended solids concentration in the effluent, gSS m3 XTSSR7 Total suspended solids concentration in reactor 7, gSS m3 l Internal model control filter l ij ij element of the relative gain array s Process time constant u Frequency Da j Slope of the curve effluent fines per cubic meter of effluent versus pollutant concentration below the effluent discharge limit of pollutant j The subindex j can be ammonium, nitrate or phosphate. Dbj Slope of the curve effluent fines per cubic meter of effluent versus pollutant concentration above the effluent discharge limit of pollutant j The subindex j can be ammonium, nitrate or phosphate. b0,j Increment of the value of effluent fines per cubic meter when the effluent concentration of pollutant j is above the legal limit. The sub-index j can be ammonium, nitrate or phosphate. gE Conversion factor of kWh to currency unit (Euro) sIFF Reset time of the feed-forward controller used in the ammonium control gSP Treatment cost of 1 kg of sludge wastage 5130 w a t e r r e s e a r c h 4 3 ( 2 0 0 9 ) 5 1 2 9 – 5 1 4 1 Since the organic matter removal process and the nutrient removal processes are interconnected, it would be reasonable to consider the WWTP as a multivariate system from a process control point of view. Thereby, a multivariate analysis of the process behaviour is required in order to avoid undesired interactions amongst the controlled variables due to poor tuning of the controllers (Skogestad, 2004). When these interactions occur, a manipulated variable of a certain controller is modified, spending energy and resources, to refuse internal disturbances provoked by actions of other controllers. The most common example of these interactions in WWTPs is the conflict between the nitrification and denitrification capacities. To control the ammonium concentration, the DO concentration in the aerobic basin is usually regulated. High DO values produce high amounts of nitrate in the aerobic zone even if DO may be transported to the anoxic zone because the latter is interconnected to the aerobic zone by the internal recycle line. This fact negatively affects the denitrification process because DO will be first consumed instead of nitrate by heterotrophs and PAOs, concomitantly depleting biodegradable organic matter aerobically and not anoxically. Besides this problem, the lack of enough amounts of biodegradable organic matter to maintain high denitrification rates has been reported in the literature (Brouwer et al., 1998; Lindberg and Carlsson, 1996). Taking into account these processes interactions, a multivariate analysis of the process behaviour could guide the selection of the most suitable input–output pairing to avoid problems as for example not to produce more nitrate than can be denitrified. Although this analysis is recommended by some authors, few literature works dealing with control of WWTPs perform a multivariate analysis of the process. As a consequence, the process controllers used in these works do not achieve the high performance that they could attain because each control action in a single loop is a disturbance for the other ones and new unnecessary actions are generated to minimize the effects of the previous actions (Steffens and Lant, 1999). In addition, a multivariate analysis would allow a systematic control structure design (CSD) for building the effluent quality control layer. The CSD consists of selecting the best input–output pairing (pair of manipulated and controlled variable), the type of controller to be used, usage or not of the feed-forward action, use of decouplers, etc. A possible way to perform the CSD is by the RGA analysis (Bristol, 1966; Skogestad, 2004). The CSD has been experimentally performed for WWTPs in some works (Ayesa et al., 2006; Ingildsen et al., 2006). Samuelsson et al. (2005) systematically performed the CSD for a pilot plant that removed COD and N, not including the P removal processes. Moreover, there is a trade-off between the operating costs of a WWTP and its effluent quality. Balancing both issues has been the most notable challenge in WWTP operation and has received attention of the industrial and scientific communities along the years (Cadet et al., 2004; Zarrad et al., 2004). To overcome this challenge, the evaluation of the plant performance exclusively based on the operating costs was proposed, since the effluent quality was converted into monetary units (Vanrolleghem and Gillot, 2002). Therefore, the performance of all the proposed control strategies for WWTPs developed along the years and commented on above can be assessed only in terms of the operating costs. Taking advantage of this approach, and in order to systematically improve the effluent quality and to reduce the operating costs, effluent quality controllers and a cost controller based on the RGA analysis for an A2/O WWTP plant that simultaneously removes COD, N and P were designed in the present work. 2. Material and methods 2.1. Brief description of the simulated wastewater treatment line for combined COD, N and P removal The A2/O system (Fig. 1) is made up of seven continuous stirred tank reactors and one settler, the latter based on the model of Taka ´cs with 10 layers (Taka ´cs et al., 1991). Such a configuration was chosen due to its extensive application in wastewater treatment modeling and simulation along the decades (Jeppsson, 1996). The biological kinetic model chosen was the ASM2d (Henze et al., 1999). The two anaerobic reactors R1 and R2 yield fermentation products for P removal. Denitrification takes place in the anoxic reactors R3 and R4. It is carried out by ordinary heterotrophs and PAO biomass that convert the nitrate brought by the internal recirculation (QRINT) into molecular nitrogen. Reactors R5, R6 and R7 belong to the aerobic zone, where nitrification of ammonium to nitrate is performed by autotrophic organisms. A settler produces an NO 3 DO DO DO NO3 NH4 Q IN FIC FIC FIC R1 500m3 INFLUENT EFFLUENT QEFF EXTERNAL RECYCLE INTERNAL RECYCLE SLUDGE FOR DISPOSAL PO 4 PO 4 AIR SUPPLY R2 750m3 R3 750m3 R4 750m3 R5 1333m3 R6 1333m3 R7 1333m3 TSS TSS Settler 6000m3 Q W Q RINT Q EFF Q RAS Fig. 1 – Scheme of the A2/O wastewater treatment line for organic matter, N and P removal. w a t e r r e s e a r c h 4 3 ( 2 0 0 9 ) 5 1 2 9 – 5 1 4 1 5131 effluent stream and a biomass enriched stream. This biomass is returned by the QRAS (external recycle flow rate) and a sludge wastage flow rate (QW) that removes the excess of biomass generated in the process. Air flow rates are set by the kLa (oxygen mass transfer coefficient) value in each reactor. Although not realistic from a real process point of view, several online sensors are supposedly available to inspect the process effectiveness. Sensors are installed in R2 (end of the anaerobic zone), R4 (end of the anoxic zone) and R7 (end of the aerobic zone) as follows: nitrate sensors in R4 (SNO3R4) and in R7 (SNO3R7); an ammonium sensor in R7 (SNH4R7); phosphate sensors in R2 (SPO4R2) and in R7 (SPO4R7); a total suspended solids sensor in R7 and in the effluent stream (XTSSR7, XTSSEff); a flow rate sensor to measure the influent flow rate (QIN); and DO sensors in the three aerobic reactors (SO2R5, SO2R6 and SO2R7). Although 5 nutrient sensors are used for process identification, only 3 would be needed for using a selected control structure in a real scenario. XTSSR7 was considered as inventory variable and was kept constant using an independent control loop with QW as manipulated variable. Then, the possible manipulated variables for defining the control structures were QRINT, QRAS and SO2R7SP (setpoint of SO2R7). 2.2. Plant campaigns The plant was simulated using control structures operating under different conditions along the period of study, generating process data like a real WWTP facility would do. The influent flow rate and composition was based on the dry weather input file from Gernaey and Jørgensen (2004), which was a modification of the proposed in Copp (2002). Rain and storm weather input files were also used for assessing whether the best pairing of input and output variables calculated with RGA might depend on input conditions. Before starting the study, the plant behaviour was simulated during 300 days under open loop conditions. Some information about reasonable values of the DO setpoint in R7, external disturbance pattern (QIN and its composition), nitrification and denitrification capacity, the relationship between the suspended solids concentration in R7 and the sludge wastage flow amongst other variables were analyzed. During this period, the flow rates of QRINT, QRAS and QW were kept as long as possible close to the values of 55,338 m3 d1, 18,446 m3 d1 and 400 m3 d1, respectively. These values provided reasonable phosphorus removal and guaranteed a suitable sludge retention time (SRT) (Gernaey and Jørgensen, 2004). The SRT control was performed in all the plant campaigns by controlling the suspended solids concentration in R7. After that, the DO control loop in R7 was closed and the plant was simulated under these conditions for one month to determine the reference values for all measurements. During the next three simulated months, identification tests were performed to generate data rich in information on plant dynamics to allow the identification of the Laplace transfer function model for designing process controllers later on (see Supplementary Content for additional information). During these tests, the changes in the operating variables were high enough to have a low noise-to-signal ratio and hence, obtaining a reliable identification of transfer functions. Analyzer data frequency for the identification tests was set to 15 min. The transfer function model comprised of a 5  4 model (five output variables and 4 input variables). The output variables were: {SNH4R7, SNO3R4, SNO3R7, SPO4R2, SPO4R7} while the input variables were: {SO2R7SP, QRINT, QRAS, QIN}. Different sub-models generated from this 5  4 model were used for designing process controllers depending on the designed control structure. In each case, it was verified that these models provided a proper fit to the experimental data. The input QIN (the influent flow rate) was used for implementing the feed-forward action on the ammonium control. Although the performance of the controller would improve by taking into account the influent ammonium concentration, an additional sensor would be needed. Nevertheless, the analysis of historical plant data proved that QIN was strongly correlated to the ammonium concentration in R7 and therefore, a transfer function between QIN and SNH4R7 was determined based on this data. Four control structures were tested and compared in a tenmonth simulation period. Afterwards, six additional months were simulated to test a cost controller as a supervisory control layer that was working above the effluent quality layer. The latter layer was made up of the best control structure previously selected. 2.3. Relative gain array If availability of a transfer function/state space model of the WWTP in an operating point is supposed, either obtained directly from the plant data or by linearizing a calibrated nonlinear WWTP model, the first step for process control is pairing correctly the manipulated variables with the controlled variables (Skogestad, 2004). A correct pairing implies the use of the manipulated variable that presents the major influence over a controlled variable, avoiding interactions with other output variables. The most classical tool for choosing the more recommended pairing is the RGA method (Bristol, 1966; Grosdidier and Morari, 1986). Commonly, the RGA matrix is calculated at the steady-state frequency using the steadystate gain matrix G(0) of the process. The matrix G(0) is obtained setting the complex variable ‘‘s’’ of the linear process model equal to zero. Subsequently, the RGA(0) is calculated with Eq. (1). RGAð0Þ ¼ Gð0Þ$Gð0Þ1T (1) The RGA matrix represents the influence of the other control loops for a certain output. If the value of a lij, which is the element ‘‘ij’’ of the RGA, is close to one and the other RGA elements of the same row are close to zero, this means that Table 1 – Parameters used to calculate the effluent fines. Effluent variable Da j [V kg1] Dbj [V kg1] b0,j [V m3] CL,j [kg m3] N-NH4 þ 4.00 12.00 2.70  103 4.00  103 N-TN 2.70 8.10 1.40  103 1.80  102 P-PO4 3- 4.00 12.00 2.70  103 1.50  103 5132 w a t e r r e s e a r c h 4 3 ( 2 0 0 9 ) 5 1 2 9 – 5 1 4 1 the output ‘‘i’’ in the pair ‘‘ij’’ is not affected by the other control loops. Then, ideally it is important that the variables involved in the control structure present an RGA matrix diagonally dominant to properly design a control structure with low-order controllers, such as PI (proportional-integral) or PID (proportional-integral-derivative) controllers. Note that the RGA matrix can be calculated at different frequencies (process dynamics), not only for the steady-state frequency (u ¼ 0 radd1). 2.4. Evaluation of the WWTP performance Effluent quality and operating costs are the most important factors that provide information about the effectiveness of the treatment process. Since operating costs and effluent quality have different units, it is difficult to obtain an overall plant performance index. To overcome this inconvenience, some literature works have introduced fines for the effluent discharges (Steffens and Lant, 1999; Copp, 2002; Vanrolleghem and Gillot, 2002; Stare et al., 2007; Volcke et al., 2007). Such an approach allows rewriting effluent quality in terms of monetary units. This concept was adopted in the present work as the main criterion for selecting the best control structure tested to compose the effluent quality layer. The operating cost (OC) of the secondary treatment of a WWTP can be depicted by equation (2). It does not include the cost of addition of an external carbon source(s) since this variable was not studied in the present work. OC½Euros=day ¼ gEðAE þ PEÞ þ gSPSP þ EF (2) where AE and PE are the aeration energy and the pumping energy [kWh/day] respectively, SP is the sludge production [kg/day] and EF is effluent fines [Euros/day]. The conversion factors gE and gSP were 0.1 Euro/kWh and 0.5 Euro/kg, respectively. The aeration energy for R5, R6 and R7 was calculated by equation (3) (Copp et al., 2002). AE½kWh=day ¼ 24" X i¼ 75 0:0007ðkLaiÞ2þ0:3267kLai# (3) where kLai is the oxygen transfer rate [d1] of each aerobic reactor. kLa5 and kLa6 were kept at 10 d1 as defined in the benchmarking model. The pumping energy was calculated by equation (4), where PF is a pump factor to convert flow rate into energy. According to Copp et al. (2002) a value of PF ¼ 0.04 kWh m3 was used. PE½kWh=day ¼ PFðQRINT þ QRAS þ QWÞ (4) Instantaneous sludge production was calculated by the relationship written in equation (5), SP½kg=day ¼ XTSSQW$QW (5) Since the solid content in the sludge wastage flow (XTSSQW) is not measured online with the plant configuration selected, an estimate was calculated based on the solid balance around the settler. Supposing that the suspended solids concentration in the effluent flow stream is negligible and the biomass maintained in the settler is approximately constant, the following relationship can be written: XTSSQWgTSS m3 ¼ Q QIN W þ þ Q QRAS RASXTSSR7 (6) where XTSSR7 is the total suspended solid concentration in the stream that comes from R7 to the settler. Finally, effluent fines were calculated by equation (7) (Stare et al., 2007) for ammonium, total nitrogen (TN) and phosphate. As the TN was not measured online, it was assumed that TN was the sum of ammonium and nitrate in the effluent. EF½Euros=day ¼ X j¼NH4;TN;PO4 QEFFDajCEFF j þ QEFFhb0;j þ CEFF j  CL;jDbj  Daj iHeavisideCEFF j  CL;j (7) where C j EFF and C L,j are the effluent concentration and discharge limit of the pollutant ‘‘j’’, respectively; Daj is the slope of the curve EF versus CjEFF when CjEFF is lower than or equal to CL,j; Dbj is the slope of the same curve when CjEFF is higher than CL,j and b0,j is the increment of fines when CjEFF was higher than CL,j. In this work, the Heaviside function is equal to one when C j EFF is greater than CL,j. Otherwise, its value is zero. The values of all the parameters involved in the EF calculation are given in Table 1. The parameters for ammonium and TN were obtained from Stare et al. (2007). Phosphate-related parameters were assumed equal to ammonium parameters, except for the effluent discharge limit. The limits used herein are the same as found in the literature (Gernaey and Jørgensen, 2004). 2.5. Calculation of optimal operating cost To evaluate the maximum performance achievable for each developed control structure, Equation (2) was minimized. Specifically, the minimum operating cost for each control structure was calculated using a minimization algorithm that modified the setpoints for each controlled variable and Table 2 – Full 5 3 4 transfer function model identified with plant data for calculating the RGA for each control structure. Outputs [g m3] Inputs and measured disturbances SO2R7SP [g O2 m3] QRINT [m3 d1] QRAS [m3 d1] QIN [m3 d1] SNH4R7 2:414e0:01041s=0:018s þ 1 9:901  106 e0:0208 s=0:706 s þ 1 1:922  104 e0:0417 s=2:424 s þ 1 8:443  104 e0:0417 s=0:0817 s þ 1 SNO3R4 0:515e0:01041s=0:151s þ 1 5:603  105 e0:01041 s=0:018 s þ 1 2:366  105 e0:01041 s=0:009 s þ 1 0 SNO3R7 2:809 e0:01041 s=0:151 s þ 1 2:570  105 e0:01041 s=0:171 s þ 1 1:052  104 e0:01041 s=0:970 s þ 1 0 SPO4R2 0 0 4:049  104 e0:02083 s=0:043 s þ 1 8:549  104 e0:0208 s=0:0938 s þ 1 SPO4R7 25:382 e0:01041 s=5:804 s þ 1 0 2:470  104 e0:01041 s=2:000 s þ 1 0 w a t e r r e s e a r c h 4 3 ( 2 0 0 9 ) 5 1 2 9 – 5 1 4 1 5133 evaluated Equation (2) as the cost function for a two-week period of operation. The optimization algorithm employed was the MATLAB ‘‘fminsearch’’ based on the Nelder and Mead Simplex method (Lagarias et al., 1998). Fminsearch is an unconstrained direct method and does not use numerical or analytical gradients of the cost function. 3. Results and discussion 3.1. RGA calculations Table 2 shows the full 5  4 transfer function model (plant model) for subsequent RGA calculations. Each individual transfer function has the form of a FODT (First Order with Dead Time) function as equation (8), where K, s and q are the gain, the time constant and the dead time of the process, respectively. GðsÞ ¼ Keqs ss þ 1 (8) The plant model was obtained by identification tests with dry weather conditions as described in Section 2.2. Each transfer function indicates the relationship between a control input (e.g. DO setpoint) and a control output (e.g. the ammonium concentration in R7). In other words, these functions indicate the magnitude and dynamics of the effect of an input over an output. Table 3 presents the RGA values for different control variable sets, which have the same available manipulated values in common, at three frequencies: the steady-state frequency (u ¼ 0 rad d1), a frequency near weekly variations (u ¼ 1 rad d1) and a frequency to match daily variations in the WWTP (u ¼ 2p rad d1). Observing the values obtained for Set 1, SNH4R7, SNO3R4 and SPO4R2 could be independently controlled by SO2R7SP, QRINT and QRAS, respectively. For this set, it is important to highlight that very low interdependencies were observed at all the frequencies tested. The RGA of Set 2 shows a change of pairing of the input– output variables along the frequency range. On one hand, the recommended pairing would have been SNH4R7–QRAS, SNO3R7–QRINT and SPO4R7–SO2R7SP at the steady-state frequency. On the other hand, the best pairing at u ¼ 2p rad d1 changed to SNH4R7–SO2R7SP, SNO3R7–QRINT and SPO4R7–QRAS. At u ¼ 1 rad d1 the greatest interactions were observed. In this case, a change in SO2R7SP or in QRAS would produce important changes in all three controlled variables. These interactions can be explained by the different dynamics of the variables. When the controller works at high frequencies, DO is kept constant by supplying more air while the Table 3 – RGA matrix of all variable control sets studied at frequencies u [ 0 rad dL1 (static condition), u [ 1 rad dL1 (weekly dynamic conditions) and u [ 2p rad dL1 (daily dynamic conditions). The variables involved in the control structure should present a RGA diagonally dominant to design decentralized low-order controllers. Best parings are shown in bold. Set Controlled variables RGA at u ¼ 0 rad. d1 RGA at u ¼ 1 rad. d1 RGA at u ¼ 2p rad. d1 Manipulated variables Manipulated variables Manipulated variables SO2R7SP QRINT QRAS SO2R7SP QRINT QRAS SO2R7SP QRINT QRAS 1 SNH4 R7 1.0392 0.0392 0.0000 1.0230 0.0230 0.0000 0.9983 0.0017 0.0000 SNO3 R4 0.0392 1.0392 0.0000 0.0230 1.0230 0.0000 0.0017 0.9983 0.0000 SPO4 R2 0.0000 0.0000 1.0000 0.0000 0.0000 1.0000 0.0000 0.0000 1.0000 2 SNH4 R7 0.1997 0.4337 1.6334 0.5669 0.0210 0.4540 0.9287 0.0381 0.0332 SNO3 R7 0.0894 1.4337 0.3443 0.1349 1.0210 0.1558 0.0468 0.9619 0.0087 SPO4 R7 1.2891 0.0000 0.2891 0.2982 0.0000 0.7018 0.0245 0.0000 0.9755 3 SNH4 R7 0.1420 0.0199 1.1620 0.4455 0.0163 0.5709 0.9607 0.0002 0.0394 SNO3 R4 0.0054 1.0199 0.0253 0.0031 1.0163 0.0132 0.0019 1.0002 0.0021 SPO4 R7 1.1367 0.0000 0.1367 0.5577 0.0000 0.4423 0.0373 0.0000 0.9627 4 SNH4 R7 0.6906 0.3094 0.0000 0.7467 0.2533 0.0000 0.9478 0.0522 0.0000 SNO3 R7 0.3094 0.6906 0.0000 0.2533 0.7467 0.0000 0.0522 0.9478 0.0000 SPO4 R2 0.0000 0.0000 1.0000 0.0000 0.0000 1.0000 0.0000 0.0000 1.0000 Table 4 – Calculated parameters for the process controllers of structures S1 and S2. Controlled variable Manipulated variable KC s[d] q [d] KP sI[d] KFF sI[d] Structure 1 SNH4 R7 SO2 R7SP 2.414 0.018 0.01041 0.13 0.018 0.13 0.018 SNO3 R4 QRINT 5.603  105 0.018 0.01041 5646.00 0.018 – – SPO4 R2 QRAS 4.049  104 0.043 0.02083 829.00 0.043 – – Structure 2 SNH4 R7 SO2 R7SP 2.414 0.018 0.01041 0.13 0.018 0.13 0.018 SNO3 R7 QRINT 2.570  105 0.171 0.01041 18 333 0.171 – – SPO4 R7 QRAS 2.47  104 2.00 0.01041 2013 2.00 – – 5134 w a t e r r e s e a r c h 4 3 ( 2 0 0 9 ) 5 1 2 9 – 5 1 4 1 ammonium is depleted. When the controller works at low frequencies and the ammonium concentration is low, the ammonium starts limiting the PAO biomass due to growth of nitrifying biomass and its importance becomes greater. This is probably the reason why the DO concentration affects the ammonium concentration to a larger extent at high frequencies (short times after the controller actuation) and affects the phosphate concentration at low frequencies (long time after the controller actuation). Set 3 provided a change of the best pairing compared to Set 2. Small static coupling between phosphate and ammonium was observed, probably because of the competition between autotrophic and PAO biomasses for ammonium and phosphate as nutrients in the last reactor. The best static pairing of Set 3 was SNH4R7–QRAS, SNO3R4–QRINT and SPO4R7–SO2R7SP. This pairing only could be used without loss of performance of the controllers if they were tuned with low KP values. On the other hand, the best pairing changed at the daily frequency (u ¼ 2p rad d1) to SNH4R7–SO2R7SP, SNO3R4–QRINT and SPO4R7–QRAS. This pairing shows very low off-diagonal interactions and hence good control results could be achieved when the system operates only at this frequency. The recommended pairing for Set 4 was SNH4R7–SO2R7SP, SNO3R7–QRINT, SPO4R2–QRAS. Such pairing could be used for process controller design but the coupling between nitrate and ammonium concentrations would limit their performance. Clearly, it was observed that trying to regulate both concentrations in the same reactor was not the best alternative in terms of process control. This static coupling was expected because ammonium oxidation and nitrate production were similar. Nevertheless, RGA calculations at 2p rad d1 (much higher frequency) of Set 4 indicate a decrease of interactions among all the input–output pairs. It means that, for high controller gain values, one manipulated variable will influence only one controlled variable at the same time. This fact probably occurs because at high frequencies the oxygen transportation to the anoxic reactors has lower effect than at long term operation, resulting in a different dynamic behaviour between ammonium and nitrate in R7. As a consequence, fast controllers will maximize the difference between dynamics and will achieve better performance with less off-diagonal interactions. From the analysis of the four sets under dry weather conditions, the best pairings of controlled and manipulated variables in terms of fewer interactions were SNO3R4–QRINT, SPO4R2–QRAS and SNH4R7–SO2R7SP, which are exactly the best pairings obtained in Set 1. Additionally, RGA analysis under storm and rain weather conditions was performed (Supplementary content, Tables S1 and S2). The results revealed that the best pairing in Set 1 was maintained and was also the best among all the sets. Moreover, the best pairings of the other sets changed with operation frequency and were slightly different to the previously found with dry weather conditions. These results confirmed that Set 1 pairing was the best to build reliable control structures under different operating conditions. 3.2. Design of process controllers The inventory control layer, the effluent quality control layer and the supervisory control layer make use of linear controllers such as PI. This type of controller has two parameters to be determined. Several rules have been developed to perform PI tuning such as the IMC (Internal Model Control) (Ogunnaike and Ray, 1994). Using the IMC equations with a robust choice of l and with the parameters of the identified linear model, process controller parameters were calculated. The selection of a robust l implies that the performance of these PI Table 5 – Performance criteria for all the control structures (Open loop, S0–S4 and Cost controller) tested in the WWTP including the optimal cost obtained for each structure after setpoint optimization. Criterion Open loop S0 (DO control only in R7) S1 S2 S3 S4 Cost controller (based on S1) Average costs [Euros/d] Aeration 623 620 685 683 645 682 670 Sludge production 1699 1707 1655 1748 1717 1613 1462 Pumping 297 297 249 408 347 408 227 Effluent fines 2055 1995 1914 1903 1855 1974 1724 Total cost 4674 4619 4503 4742 4564 4677 4083 Average concentrations [g m3] SNH4 R7 6.92 6.87 3.61 3.60 5.47 3.67 5.27 SNO3 R4 1.99 1.81 2.57 5.73 2.90 5.06 2.33 SNO3 R7 7.63 7.44 10.43 10.92 8.30 10.23 10.57 SPO4 R2 15.19 15.30 15.10 16.99 15.28 15.14 20.73 SPO4 R7 2.42 2.29 4.45 4.40 3.06 4.79 1.86 Optimized setpoints [g m3] SNH4 R7 – – 1.35 4.13 5.10 5.49 – SNO3 R4 – – 2.67 – 0.97 – – SNO3 R7 – – – 8.73 – 9.31 – SPO4 R2 – – 20.01 – – 14.99 – SPO4 R7 – – – 1.60 10.02 – – Optimal operation costs [Euros/d] – – 3800 4227 4245 4394 – w a t e r r e s e a r c h 4 3 ( 2 0 0 9 ) 5 1 2 9 – 5 1 4 1 5135 controllers should not be sensibly affected by a model mismatch provoked by noise or other disturbances during the identification tests. Table 4 presents the controller parameter values used in all the operating campaigns for control structures S1 and S2 including ammonia feed-forward parameters. It is worth reminding that IMC rules are based on the process steadystate gain (KC), on the process time constant (s) and on the process dead time (q). In particular, the process controller gain (KP) was calculated using equation (9). KP ¼ s l$KC (9) 0 2 4 6 8 10 12 14 5 0 10 15 S NH4R7, [g N/m3] 0 2 4 6 8 10 12 14 9 6 3 0 12 S NO3R4, [g N/m3] 0 2 4 6 8 10 12 14 9 6 12 15 S NO3R7, [g N/m3] 0 2 4 6 8 10 12 14 10 15 20 25 S PO4R2, [g P/m3] 0 2 4 6 8 10 12 14 8 6 4 2 S PO4R7, [g P/m3] Time [d] 0 2 4 6 8 10 12 14 3500 4000 4500 5000 5500 X TSSR7, [g SS/m3] 0 2 4 6 8 10 12 14 0 0.3 0.6 0.9 1.2 DOR7SP, [g O 2/m3] 0 2 4 6 8 10 12 14 2.5 5 7.5 10 x 104 Q RINT, [m3/d] 0 2 4 6 8 10 12 14 0.9 1.2 1.5 1.8 2.1 x 104 Q RAS, [m3/d] 0 2 4 6 8 10 12 14 250 300 350 400 450 Time [d] Q W, [m3/d] A B C D E F G H I J Fig. 2 – Closed-loop behaviour of decentralized control structures S1 (SNH4R7–SO2R7SP, SNO3R4–QRINT and SPO4R2–QRAS) and S2 (SNH4R7–SO2R7SP, SNO3R7–QRINT and SPO4R7–QRAS) during the last 14 days of their evaluation period. Solid lines belong to S1, dashed lines belong to S2 and the solid flat lines are the setpoints of the controlled variables. (A) ammonium in R7; (B) nitrate in R4; (C) nitrate in R7; (D) phosphate in R2; (E) phosphate in R7; (F) total suspended solids in R7; (G) DO setpoint in R7; (H) internal recycle flow rate; (I) external recycle flow rate; (J) purge flow rate. 5136 w a t e r r e s e a r c h 4 3 ( 2 0 0 9 ) 5 1 2 9 – 5 1 4 1 with l ¼ 2 (s þ q). In general, the PI integral time was set to be equal to the process time constant. Note in Table 4 that each controller was considered to be independent of the other ones, i.e., each controlled variable was regulated by just one manipulated variable. The setpoint of each controlled variable was defined as the averaged value of the same variable in open loop operation. For DO control in R7, the air flow rate was manipulated by a PI controller with KP ¼ 100 and sI ¼ 0.001 (Copp et al., 2002). Suspended solids in R7 were controlled by a PI (with parameters KP ¼ 0.08 and sI ¼ 1.00) by manipulating QW. 3.3. Overall comparison of the behaviour of the different tested control configurations Based on the RGA analysis, the best control structure for each set was tested: S1 (SNH4R7–SO2R7SP, SNO3R4–QRINT and SPO4R2–QRAS), S2 (SNH4R7–SO2R7SP, SNO3R7–QRINT and SPO4R7–QRAS), S3 (SNH4R7–SO2R7SP, SNO3R4–QRINT and SPO4R7–QRAS) and S4 (SNH4R7–SO2R7SP, SNO3R7–QRINT and SPO4R2–QRAS). These structures were improved by the feed-forward action of the ammonium control loop to help compensating for the external disturbances brought by changes in the influent flow rate and composition. The effect of QIN on SNH4R7 was evaluated with the transfer function between QIN and SNH4R7 and it was partially compensated by a bias action provided to the ammonium controller. Therefore, the ammonium controller changed the DO setpoint in R7 considering not only the ammonium error associated to an erroneous DO setpointbutalso theammonium error caused by the influent flow rate variations. Table 5 shows the results of each performance criterion for all the control structures (period of evaluation: last 7 days of the 56-days operation, except for the open loop case – last 7 days out of 28 days) and for the cost controller developed later. S1 and S2 presented the lowest and highest cost, respectively, amongst all tested configurations and hence, they were selected for an in depth study. S1 decreased the operating costs in comparison to the operation with S0 (single DO control in R7), thus improving the effluent quality in terms of the ammonium concentration but increasing slightly the phosphate concentration in R7. During a year, S1 could reduce the operating costs of the studied WWTP around 42,000 Euros compared to the cost for S0 operation with DO control (a reduction of 2.5%). The ammonium off-sets, on the one hand, point out a higher nitrification capacity of the plant than observed during S0 operation. On the other hand, the denitrification capacity was not sufficient to remove the entire nitrate load produced because higher nitrate concentrations in R7 were found. As a straightforward consequence, phosphate removal was negatively affected by the control actions of S1, since part of nitrate was returned by QRAS to the anaerobic zone, decreasing the production of VFAs. Although the total cost of S2 was higher than the operating cost with S0 the effluent quality was better according to the criteria adopted in the present work (lower effluent fines). S2 provided lower performance than S1 (as expected) because its controlled variables were placed in the same reactor (R7), which produced much more interactions amongst all control loops. As SNH4R7 is an output variable controlled by the DO in R7 in both structures, it was decided to perform the same change in the setpoint of SNH4R7 (from 6.47 to 1.00 g m3) to compare its performance graphically. Both structures were maintained at the same biomass concentration in the reactors by manipulating the sludge wastage flow rate during the experiments. Fig. 2 presents the results of the last 14 days of the evaluation period of each control Table 6 – Performance comparison of different control settings for control structure S4. Criterion Default parameters Faster controller Slower controller Average costs [Euros/d] Aeration 645 640 648 Sludge production 1717 1722 1703 Pumping 347 325 351 Effluent fines 1855 1763 1976 Total cost 4564 4450 4678 Average concentrations [g m3] SNH4 R7 5.47 5.56 5.68 SNO3 R4 2.90 2.53 3.03 SNO3 R7 8.30 8.18 8.33 SPO4 R2 15.28 15.29 15.29 SPO4 R7 3.06 2.62 3.28 Controller parameters {KP, sI} SNH4 R7 {0.13, 0.018} {1.3, 0.018} {0.013, 0.018} SNO3 R7 {18 333, 0.171} {54 999, 0.171} {6111, 0.171} SPO4 R2 {829, 0.043} {2487, 0.043} {276, 0.043} Optimization Layer Slave Controllers Layer Solids (SRT control) Air flow rate control Flow rate control Master Controllers Layer Inventory control Basic operational parameters OBJECTIVES Cost Control Reduction of operating costs CONTROL LOOPS Operating cost controller Ammonia control Nitrate control Phosphate control Effluent Quality Control COD removal Nutrient removal Fig. 3 – Control hierarchy implemented in the A2/O WWTP. w a t e r r e s e a r c h 4 3 ( 2 0 0 9 ) 5 1 2 9 – 5 1 4 1 5137 structure. The solid flat lines in Fig. 2 are the setpoints of the referred control variables. Values of manipulated variables are shown as well in Fig. 2 (G, H, I and J). Results in Fig. 2 clearly show that the WWTP had strong limitations in its manipulated variables, which could not compensate for disturbances provoked by the influent wastewater in both control structures. As a consequence, all controlled variables suffered wide variations and almost did not track the setpoints most of the time. Nevertheless, S1 presented better results, especially because its input variables were not so far from their respective reference values in comparison to the input variables of S2. It means that S1 achieved the control objectives with less input energy than S2. After decreasing the ammonium setpoint, the ammonium controller increased the DO setpoint in R7. As a consequence, larger amounts of nitrate were produced in R7. The nitrate in R7 belongs to S2 and the nitrate controller increased the QRINT to keep the nitrate concentration close to its setpoint (2.5 g m3). Such increment of QRINT was higher than the actions taken by the nitrate controller of S1 (see Fig. 2I). Clearly, it is observed that S2 had to produce larger changes in the manipulated variables to maintain the same effluent quality as provided by S1. Finally, both structures presented similar data of phosphate and ammonium. 3.4. Effect of the operating frequency of the controllers over the operating costs RGA provides an idea of the frequency of the controller action that preserves a diagonal-dominant configuration to avoid undesirable interactions among manipulated variables. To demonstrate the influence of the process controller velocity on the operating costs, suggested by the RGA calculations, three different controller tunings for S4 were tested and their performance and operating costs were compared (Table 6). The default tuning was calculated applying the equations of Section 3.2 to the original transfer functions parameters of Set 4. A slower and a faster tuning were also derived from the default tuning by simply changing the gain of the controllers. Results show that a faster tuning improves the cost reduction compared to the default tuning. Such behaviour is in accordance to the RGA calculations since increasing the performance of the controller makes the RGA more diagonal-dominant, i.e., the competition between the DO setpoint in R7 and the internal recycle flow rate for controlling SNH4 R7 and SNO3R7 no longer exists. When making the controllers slower than the default tuning, total operating costs increase because the operating frequency is changed to a range where both SO2R7SP and QRINT affect the SNH4R7 and SNO3R7 at the same time. 3.5. Effect of measurement noise on operating costs Measurement noise has also effect on the controller performance, which could affect the operating costs. Therefore, the effect of different white noise scenarios on the control structures S1 and S2 was simulated to test more realistic situations (sensor variability). The operating costs were evaluated with noise variance of nutrient sensors from 0.01 to 1.0, while the noise variance of the DO sensors was set to 0.05. The results (Table S3 in Supplementary content) show that S2, which has its controlled variables placed in the last tank of the plant, increases its operating costs 1% when the noise increases from 0.01 to 1.0 (the total costs and the effluent fines increased). On the other hand, the total operating costs of S1 decrease around 1% using the same noise variations. The better performance of S1 reinforces the result pointed out by the methodology, because the RGA of S1 is the most diagonally dominant. Therefore, the controlled variables in S1 could be controlled independently by SISO controllers. This cannot be said about S2, which has strong couplings in their controlled variables. 3.6. Cost optimization of control structures The total costs discussed in Section 3.3 were obtained operating with setpoints calculated as the average value of the same variable in open loop operation. However, selecting better setpoints for the controlled variables should lead to a decrease in these costs. Although the optimal setpoints would be difficult to evaluate when operating a full-scale WWTP, they can be calculated numerically in the tested case. In the present work, as the plant is the model (ASM2d þ hydraulic model þ settler model), it was feasible to determine the optimal setpoint values considering the summation of the ordinary operating costs and the effluent discharge taxes as a cost function to be minimized. Taking into account the RGA methodology, the control structure with lower interactions should have lower optimized costs. To test this assumption, the optimal setpoints for the controlled variables that provided the minimum operation costs were found for each structure (Table 5) following the methodology detailed in Section 2.5. The optimal operating cost of 3800 Euros/day was obtained for S1, while the costs were higher than 4200 Euros/day for the other structures tested. This result does not mean that the minimum operation cost with S1 would be easily achieved in a WWTP; it indicates that the operation with this control structure could lead to higher improvements than any of the other structures tested. Table 7 – FODT models identified for the design of cost controller and cost controller parameters. SNH4 R7SP SNO3 R4SP SPO4 R2SP Cost [V/d] 127 e0:0104 s=0:0183 s þ 1 71:6 e0:0208 s=0:0201 s þ 1 372 e0:0416 s=0:455 s þ 1 Parameter Ammonium in R7 Nitrate in R4 Phosphate in R2 KP 0.0025 0.0034 0.0012 s [d] 0.0183 0.0201 0.455 5138 w a t e r r e s e a r c h 4 3 ( 2 0 0 9 ) 5 1 2 9 – 5 1 4 1 Taking into account the advantages and performance of the tested control configurations, S1 was selected for building the effluent quality layer and was then used for testing the developed cost controller. 3.7. Results of the operating costs controller Bearing in mind the difficulty to obtain the optimal operating point of the control structure in a full-scale WWTP, a cost 0 10 20 30 40 50 60 4000 4500 5000 Time, [d] Daily cost, [€/d] 0 10 20 30 40 50 60 0 10 20 Time, [d] S NH4R7, [g N/m3] 0 10 20 30 40 50 60 5 0 10 Time, [d] S NO3R4, [g N/m3] 0 10 20 30 40 50 60 10 20 30 Time, [d] S PO4R2, [g P/m3] 0 10 20 30 40 50 60 3000 4000 5000 6000 Time, [d] X TSSR7, [g SS/m3] AVERAGED OPEN LOOP COST 0 10 20 30 40 50 60 0 0.5 1 1.5 Time, [d] DOR7SP, [g O2/m3] 0 10 20 30 40 50 60 0.5 1 1.5 2 2.5 x 10 4 Time, [d] Q RAS, [m3/d] 0 10 20 30 40 50 60 8 6 4 2 10 x 10 4 Time, [d] Q RINT, [m3/d] 0 10 20 30 40 50 60 100 200 300 400 500 Time, [d] Q W, [m3/d] A B C D E F G H I Fig. 4 – Closed-loop test of the cost controller. (A) cost setpoint and averaged daily cost; (B) ammonium in R7 and its setpoint; (C) nitrate in R4 and its setpoint; (D) phosphate in R2 and its setpoint; (E) suspended solids in R7 and its setpoint; (F) DO setpoint in R7; (G) QRAS; (H) QRINT; (I) QW. Dashed lines are setpoints and solid lines are measurements in all graphs. w a t e r r e s e a r c h 4 3 ( 2 0 0 9 ) 5 1 2 9 – 5 1 4 1 5139 controller is an interesting tool to search for these values since it is easy to implement. Thereby, a cost controller that periodically sends to the process controllers the recommended setpoints to follow was implemented. As a consequence, a control hierarchy is established as presented in Fig. 3. Few experiments are necessary to determine the dynamical relationships among costs and process controller setpoints. In fact, the straightforward manner to determine these relationships is to perform step tests in the process controller setpoints and dynamically monitor the operation cost measurement. However, if plant data including the costs and the values of process controller setpoints are already available, there is no need to make new tests. In both situations, a FODT transfer function between each process controller setpoint and the total cost is a good starting point to design the cost controller. Thus, a cost setpoint could be simply provided to the operator or/and process engineer to optimize the plant operation. In the WWTP supervisory control layer, the operating cost controller was defined as 3 independent PI controllers having the total operating cost as controlled variable. This variable was filtered using a 7-days time window moving average to smooth daily oscillations. Each PI controller calculated the setpoint of the process controller as manipulated variable. Setpoints were those of local controllers in S1: SNH4R7SP, SNO3R4SP and SPO4R2SP. The immediate advantage of the operating cost controller is to dynamically look for optimal values for process controller setpoints. In particular, each relationship among process controller setpoints and the operating cost was described as a FODT model (Table 7). The 3 PI controllers of the supervisory layer were designed using the IMC method and their parameters are also shown in Table 7. The supervisory control layer sends the calculated setpoints to the process controllers daily. Fig. 4 shows the cost controller action during an experiment in which the cost setpoint was decreased. Such an experiment simulates a probable decision of plant operators/process engineers in a real facility. In Fig. 4, the reduction of the operating cost from the value 4500 Euros/day (approximately the average cost given by the best control structure, S1) to 4000 Euros/day occurred about ten days after changing the cost setpoint. With this new value, around 225,000 Euros/year could be saved in comparison to the operation with DO control. Note that the total cost presented in Table 5 for the cost controller is slightly higher than the cost setpoint of 4000 Euros/day since the averaged operating cost increased to 4080 Euros/day during the last 7 days of the evaluation period of this controller. It is likely that the averaged cost provided by the cost controller oscillates around the value of 4000 Euros/day over a longer period. The presence of these oscillations can be seen in Fig. 4(A). Although the results obtained by the cost controller are better than the results of the structures S0–S4 and the open loop operation, they are far from the setpoints obtained by non-linear least squares optimization of the cost function. Nevertheless, the main advantage of the proposed cost controller is its easier implementation. In addition, plant operators and process engineers can manually change the cost setpoint instead of all the parameters of the effluent quality controllers. It is also observed in Fig. 4 (B) that the cost controller decreased SNH4R7SP if the measured cost was higher than the cost setpoint. Such action is taken to reduce the effluent fines since SNH4R7 was penalized twice in the cost function. Moreover, the cost controller reduced SNO3R4SP trying to respect the limited denitrification capacity of the plant under study. With a low nitrate setpoint, lower QRINT values were necessary and less interaction between the ammonium and nitrate removal processes occurred. As a consequence, the operating costs become lower. On the other hand, SPO4R2SP was not modified after changing the cost setpoint. The control parameters of the cost controller for changing the phosphate setpoint provided slower changes since the effect of QRAS on the plant has slower dynamics than the other processes. With these conditions, the cost controller could achieve the lowest phosphate concentrations in R7 (Table 5), partially compensating for the high values of ammonium in R7. It is worth noticing that the plant operation becomes easier using the cost controller because only the cost setpoint must be provided to the control system by the plant operator. Besides, the cost controller searches for the most economic setpoints of the effluent quality controllers in an automated manner. Such advantage is not found in ordinary decentralized control structures that operate only with static setpoints, which could be far from the optimal setpoints from an economic point of view. 4. Conclusions The present work concludes that the performance of a WWTP can be improved by process control theory tools, such as the RGA for systematic design of control structures. RGA was used for building effluent quality controllers and a cost controller to lower the operating costs and improve the effluent quality. With the multivariate analysis, four control structures were designed and compared. The best control structure selected was a decentralized control structure that had SNH4R7, SNO3R4 and SPO4R2 as controlled variables. Such a control structure presented considerably less degree of interaction among input and output variables than the others, a fact that allows saving energy of manipulated variables since internal disturbances were minimized. The selected control structure could save up to 42,000 Euros/year in comparison to the plant operating with DO control. The benefits brought by the process control to the water line of the simulated WWTP increased by including the cost controller. This controller dynamically sends setpoints to the process controllers to minimize the difference between the cost measurement and the cost setpoint. Such a controller was based on three linear PI controllers and can be considered an important contribution of this work. It was possible to save around 225,000 Euros/year (13% decrease) by reducing the cost setpoint sufficiently taking the plant constraints into account. Acknowledgements Vinicius Cunha Machado has received a Pre-doctoral scholarship of the AGAUR (Age `ncia de Gestio ´ d’Ajuts Universitaris i 5140 w a t e r r e s e a r c h 4 3 ( 2 0 0 9 ) 5 1 2 9 – 5 1 4 1 Recerca - Catalonia, Spain), inside programs of the European Social Fund. The authors acknowledge the financial support provided by the Spanish ‘‘Comisio ´n Interministerial de Ciencia y Tecnologı´a’’ (CICYT), project CTQ2007-61756/PPQ. The authors are members of the GENOCOV group (Grup de Recerca Consolidat de la Generalitat de Catalunya, 2009 SGR 815). Appendix. Supplementary data Supplementary data associated with this article can be found, in the online version, at doi:10.1016/j.watres.2009.08.011. r e f e r e n c e s Ardern, E., Lockett, W.T., 1914. Experiments on the oxidation of sewage without the aid of filters. Journal of the Society of the Chemical Industry 33 (10), 523–539. Ayesa, E., De la Sota, A., GrauP, Sagarna, J.M., Salterain, A., Suescun, J., 2006. Supervisory control strategies for the new WWTP of Galindo – Bilbao: the long run from the conceptual design to the full-scale experimental validation. Water Science and Technology 53 (4–5), 193–201. Baeza, J.A., Gabriel, D., Lafuente, J., 2002. In line fast OUR (oxygen uptake rate) measurements for monitoring and control of WWTP. Water Science and Technology 45 (4–5), 19–28. Bristol, E.H., 1966. On a new measure of interactions for multivariable process control. IEEE Transactions on Automatic Control AC-11, 133–134. Brouwer, H., Bloemen, M., Klapwijk, B., Spanjers, H., 1998. Feedforward control of nitrification by manipulating the aerobic volume in activated sludge plants. Water Science and Technology 38 (3), 245–254. Cadet, C., Be ´teau, J.F., Hernandez, S.C., 2004. Multicriteria control strategy for cost/quality compromise in wastewater treatment plants. Control Engineering Practice 12, 335–347. Carlsson, B., Rehnstro ¨m, A., 2002. Control of an activated sludge process with nitrogen removal – a benchmark study. Water Science and Technology 45 (4–5), 135–142. Copp, J.B., Spanjers, H., Vanrolleghem, P.A., 2002. Respirometry in Control of the Activated Sludge Process: Benchmark Control Strategies. Scientific and Technical Report No. 11. IWA Publishing, London, United Kingdom. Copp, J.B. (Ed.), 2002. The COST Simulation Benchmark – Description and Simulator Manual. Office for Official Publications of the European Communities, Luxembourg, ISBN 92-894-1658-0. Gernaey, K.V., Jørgensen, S.B., 2004. Benchmarking combined biological phosphorus and nitrogen removal wastewater treatment processes. Control Engineering Practice 12, 357–373. Grosdidier, P., Morari, M., 1986. Interaction measures for systems under decentralized control. Automatica 22, 309–319. Henze, M., Gujer, W., Mino, T., Matsuo, T., Wentzel, M.C., Marais, G.V.R., van Loosdrecht, M.C.M., 1999. Activated sludge model no 2d, ASM2d. Water Science and Technology 39 (1), 165–182. Ingildsen, P., Rosen, C., Gernaey, K.V., Nielsen, M.K., Guildal, T., Jacobsen, B.N., 2006. Modelling and control strategy testing of biological and chemical phosphorus removal at Avedøre WWTP. Water Science and Technology 53 (4–5), 105–113. Jenkins, D., Tandoi, V., 1991. The applied microbiology of enhanced biological phosphate removal – accomplishments and needs. Water Research 25 (12), 1471–1478. Jeppsson, U., 1996. Modelling Aspects of Wastewater Treatment Processes, PhD thesis, Lund Institute of Technology, Sweden. Available from Krause, K.,Bo ¨cker, K.,Londong, J.,2002.Simulation ofanitrification control concept considering influent ammonium load. Water Science and Technology 45 (4–5), 413–420. Lagarias, J.C., Reeds, J.A., Wright, M.H., Wright, P.E., 1998. Convergence properties of the Nelder–Mead simplex method in low dimensions. SIAM Journal of Optimization 9 (1), 112–147. Lindberg, C.F., Carlsson, B., 1996. Adaptive control of external carbon flow rate in an activated sludge process. Water Science and Technology 34 (3–4), 173–180. Ogunnaike, B., Ray, W.H., 1994. Process Dynamics, Modeling and Control. Oxford University Press, New York. Samuelsson, P., Carlsson, B., 2000. Feedforward control of the external carbon flow rate in an activated sludge process. Water Science and Technology 43 (1), 115–122. Samuelsson, P., Halvarsson, B., Carlsson, B., 2005. Interaction analysis and control structure selection in a wastewater treatment plant model. IEEE Transactions on Control Systems Technology 13 (6), 955–964. Skogestad, S., 2004. Control structure design forcomplete chemical plants. Computers and Chemical Engineering 28, 219–234. Stare, A., Vrecko, D., Hvala, N., Strmcnik, S., 2007. Comparison of control strategies for nitrogen removal in an activated sludge process in terms of operating costs: a simulation study. Water Research 41 (9), 2004–2014. Steffens, M.A., Lant, P.A., 1999. Multivariable control of nutrientremoving activated sludge systems. Water Research 33 (12), 2864–2878. Taka ´cs, I., Patry, G.G., Nolasco, D., 1991. A dynamic model of the clarification thickening process. Water Research 25 (10), 1263– 1271. Vanrolleghem, P.A., Gillot, S., 2002. Robustness and economic measures as control benchmark performance criteria. Water Science and Technology 45 (4–5), 117–126. Volcke, E.I.P., van Loosdrecht, M.C.M., Vanrolleghem, P.A., 2007. Interaction between control and design of a SHARON reactor: economic considerations in a plant-wide (BSM2) context. Water Science and Technology 56 (9), 117–125. Zarrad, W., Harmand, J., Devisscher, M., Steyer, J.P., 2004. Comparison of advanced control strategies for improving the monitoring of activated sludge processes. Control Engineering Practice 12, 323–333. w a t e r r e s e a r c h 4 3 ( 2 0 0 9 ) 5 1 2 9 – 5 1 4 1 5141