914Xun6.pdf INTERNATIONAL JOURNAL OF COMPUTERS COMMUNICATIONS & CONTROL Special Issue on Fuzzy Sets and Applications (Celebration of the 50th Anniversary of Fuzzy Sets) ISSN 1841-9836, 10(6):936-951, December, 2015. PI and Fuzzy Control for P-removal in Wastewater Treatment Plant H. Xu, R. Vilanova Hongyang Xu*, Ramón Vilanova Dept. de Telecomunicació i Enginyeria de Sistemes Escola d’Enginyeria, Universitat Autónoma de Barcelona, Carrer de es Sitges, 08193 Bellaterra, BCN, Spain xu.hongyang@e-campus.uab.cat, Ramon.Vilanova@uab.cat *Corresponding author: xu.hongyang@e-campus.uab.cat Abstract: Due to the complex and non linear character, wastewater treatment process is difficult to be controlled. The demand for removing the pollutant, especially for nitrogen (N) and phosphorus (P), as well as reducing the cost of wastewater treatment plant is an important research theme recently. Thus, in this paper, the benchmark proposed default control strategy and 10 additional control strategies are applied on the combined biological P and N removal Benchmark Simulation Model No.1 (BSM1-P). In addition, according to the results of applying PI controllers, as usual, we also chose the group with the better performance, as well as the default control strategy, to replace the PI controllers with fuzzy controllers. In this way, it can be seen that in all cases the quality of effluent of the controlled process could be improved in some degree; and the fuzzy controllers get a better phosphorus removal. Keywords: wastewater treatment plant, PI controllers, fuzzy control, P removal. 1 Introduction As the human society develops rapidly, the demand for water resources is playing a more and more important role in the civil life and industrial production. Nowadays, stringent legislation for wastewater treatment plants (WWTPs) is currently a top driving force for the development of new treatment technologies and for the optimisation of the existing ones. Meeting stringent concentration requirements for Carbon (C), Nitrogen (N) and Phosphorus (P) discharge with minimal costs has raised the need of a more efficient operation. However, as a large nonlinear system, WWTPs are subject to complex disturbances, where complicated biological and hydrodynamic phenomena are taking place. Thus it is difficult to achieve the aim to meet the standard of WWTPs effluent quality (EQ) and minimize the oper- ational cost (OC) simultaneously. Many control strategies have been proposed in the literature but their evaluation and comparison are difficult, either practical or based on simulation. Differ- ent control algorithms for WWTPs have been introduced over the years. For instance, sufficient nitrification can be maintained by applying a constant aeration flow rate, by controlling the dis- solved oxygen (DO) level at a pre-selected set-point or by using a variable DO set-point controller based on ammonia concentration in the last aerobic reactor of the plant [1, 2]. On the other hand, the denitrification process is usually controlled by manipulating the ex- ternal carbon flow rate or internal recirculation flow rate based on nitrate concentration in the last anoxic reactor or in the last aerobic reactor [3, 4]. Unfortunately, various plant configura- tions, influent characteristics and evaluation criteria have been used in the assessment of control algorithms. As all of these factors influence the choice of a control strategy, it is difficult to say which control algorithm is the most appropriate with respect to minimal OC and best EQ, and whether the implementation of complex control algorithms is really necessary. This is caused by many reasons: the variability of influent (both the volume and the chemical component of Copyright © 2006-2015 by CCC Publications PI and Fuzzy Control for P-removal in Wastewater Treatment Plant 937 influent), the weather condition, and the complexity of biochemical and physical phenomena, the large range of time constants and the lack of standard evaluation criteria, among others. To deal with this problem, in recent years the benchmark simulation model no.1 (BSM1) [5, 6] has been proposed as a standard platform for comparing different control strategies in the community of wastewater treatment processes. This benchmark model can be used for simulating an effective WWTP to reduce the chemical oxygen demand (COD) of the polluted water as well as to remove the nitrogen (N), both of which are key standards for a WWTP. In addition to COD and N, another major concern is P. Since P has been identified as the key element responsible for eutrophication in the aquatic environment, reducing P release to the environment is an important issue for protecting water resource. Among those activated sludge systems for P removal, enhanced biological phosphorus removal (EBPR) system was notable since it was introduced [20]. In the EBPR system, the phosphate accumulating organisms (PAOs ) are responsible for the active of P removal and are enriched to accumulate large quantities of polyphosphate (poly-P) in their cells. In this way the biological P removal is enhanced. However, the PAOs have a stricter requirement of cyclic anaerobic, anoxic and aerobic conditions than N removal and COD removal, thus the process of P removal is more difficult and complex. Although the BSM1 modelling tool has been widely used in the WWTP research community, it has a structural limitation that it does not involve the P removal that should be taken into account for achieving a more realistic simulation model. To fill this gap, Gernaey and Jorgensen [7] developed a simulation benchmark which models the combined biological P and N removal suitable for the anaerobic-anoxic-oxic (AAO) processes, which could be regarded as benchmark simulation model no.1 including P removal (BSM1-P). Two PI controllers have been designed and tested for this process and defined as the default control (DC). But since there are many potential combinations of control variables, in this paper we propose 10 PI control strategies to compare the control performance. Among them, 5 strategies are basic ones with no more than three controllers, whereas the other 5 strategies are combinations of those 5 basic ones. Besides the traditional PI controller, fuzzy logic controller was drawing more attention for improving the performance of WWTPs due to its model free and easily understandable character. Fuzzy control can be regarded as a viable alternative control strategy in comparison with the conventional control in some certain situations, e.g. the control process with nonlinear characters which may lead to difficult mathematical modelling and controller tuning. So in this paper, we also give some examples of applying several fuzzy controllers on the WWTP process, and compare the control performance with these referred PI controllers. 2 Description of BSM1-P The description could be seen in Fig.1. Resembling the BSM1 model, the BSM1-P has a process layout of seven biological reactors and one settler. As it is showed in the Fig.1, the plant lay-out consists of 7 bio-reactors in series followed by a sedimentation tank. Here, Qin means influent, Qe means effluent, Qint means nitrate recycle, Qr means sludge recycle and Qw means waste sludge. The total volume of the biological tanks is 6749 m3, the volumes of tanks 1, 2, 3 and 4 are 500 m3, 750 m3, 750 m3 and 750 m3 respectively, which four of them are fully mixed, but not aerated. Tanks 5, 6 and 7 are fully mixed as well as aerated, and their volumes are 1333 m3. Aeration of tanks 5, 6 and 7 is achieved by using a maximum KLa of 10 h −1, here KLa means oxygen transfer coefficient. In the openloop situation, default KLas of tanks 5 and 6 are equally set to 10 h−1, and that of tank 7 is set to 2.5 h−1. Dissolved oxygen (DO or SO2 ) saturation in arebic tanks is 8 g(-COD)/m3. The volume of sedimentation tank is 6000 m3, with area of 1500 m2 and a depth of 4 m; the sedimentation tank is feed at the point of 2.2 m above the bottom. Two internal recycles are also included: Qintr from tank 7 to tank 3 at a default flow 938 H. Xu, R. Vilanova rate of 300% of the influent flow rate, and Qr from the underflow of the sedimentation tank to the inffluent of tank 1. The default Qr is equal to the Qin. Besides of Qr, the underfolw of the sedimentation tank is also devided to waste sludge Qw, and the default Qw is 400 m 3/d. More detailed explanation about the configuration of combined N and P removal plant can be seen in [7]. Figure 1: Lay-out of the benchmark plant for evaluation of control strategies on combined N and P removal processes 2.1 Influent composition The influent for BSM1-P was generated from the ASM1 influent composition [6, 7]. Besides the concentration of pollutant, another important parameter that will affect the operation of WWTP and should be considered is the volumn of influent, which is affected significantly by weather condition. Thus, in BSM1-P, three weather conditions are taken into account: dry weather, rain weather and storm weather. 2.2 Plant performance criteria It is also necessary to build up a number of indexes to evaluate the performance of the simulated benchmark WWTP studied in this paper. Similar to the original BSM1, the effluent quality index (EQI) for BSM1-P was included P, as calculated by Eqs. (1) and (2). EQI = 1 1000(tf − t0) ∫ tf t0 PU(t)Qe(t) dt (1) PU(t) = PUTSS(t) + PUCOD(t) + PUBOD(t) + PUTKN(t) + PUNO3(t) + PUPtot(t) (2) In Eq. (1), t0 and tf represent the start time and end time of the period of evaluating EQI separately. The pollutant load PUk (kg/d) corresponding to each component k is estimated by Eq. (3). PUk = βkCk (3) The factors βk are weighting factors that are attributed to each effluent component. In this paper, the factors were chosen as follows: βTSS = 2; βCOD = 1; βBOD = 2; βTKN = 20; βNO3 = 20; βPtot = 20. Furthermore, the instantaneous concentrations of the different pollutants Ck are calculated by Eqs. (4)-(10). CTSS = XTSS (4) PI and Fuzzy Control for P-removal in Wastewater Treatment Plant 939 CCOD = SF + SA + SI + XI + XS + XH + XPAO + XPHA + XA (5) CBOD = 0.25(SF +SA+(1−fSI )XS +(1−fXIH)XH +(1−fXIP )(XPAO+XPHA)+(1−fXIA)XA) (6) CTKN = SNH4 + iN,SF SF + iN,SISI + iN,XIXI + iN,XSXS + iN,BM(XH + XPAO + XA) (7) CNO3 = SNO3 (8) CNtot = CTKN + CNO3 (9) CPtot = SP O4 +iP,SF SF +iP,SISI +iP,XIXI +iP,XSXS +iP,BM(XH +XP AO+XA)+XP P +(1/4.87)XMeP (10) Here, fSI means fraction of SI from hydrolysis, fXIA, fXIH, fXIP represent fraction of inert COD from XA, XH and XPAO, respectively. In addition, iN,k and iP,k represent N and P fraction in organic component k (k = SF , SI, XI, XS, XH, XA or XPAO), respectively. The influent quality index (IQ) is calculated in the same way as EQI, but the BOD coefficient in Eq. (6) is modified from 0.25 to 0.65. Similar to BSM1 the limits for certain components should be provided to evaluate the per- formance of WWTP in detail. By comparing the simulation output with these limits, we could calculate the number of times that the effluent concentration of a pollutant exceeded the limit during the evaluation period. The limit for P is based on the Danish WWTP effluent stan- dard [7], whereas other limits are same to the BSM1, i.e., CPtot =1.5 g P/m 3, CNtot =18 g N/m 3, CBOD=10 g/m 3, CCOD=100 g COD/m 3, CTSS=30 g/m 3 and SNH4 =4 g N/m 3. In addition, to quantify the cost of WWTP operation, the operating cost index (OCI) was introduced [21]: OCI = αEQIEQI + αAEAE + αPEPE + αsldgPsldg (11) In Eq. (11), EQI is the effluent quality index caculated by Eq. (1), AE is aeration energy consumption rate which happens in aerobic tanks 5, 6 and 7, PE is pumping energy consumption rate to maintain wastewater flowing. The unit for AE and PE is kWh/d. Psldg is the sludge production rate (kg/d). Values for AE, PE and Psldg are calculated in a similar way to BSM1 [6]. The αi coefficents are OCI weighting factors. In this paper, αi values are suggested in [21], i.e. αEQ=50 (Euro/year)/EQI; αAE = αPE=25 (Euro/year)/(kWh/d); αsldg=75 (Euro/year)/(kg TSS/d). 3 Fuzzy Logic Control Fuzzy control makes use of so-called fuzzy controllers (FCs) or fuzzy logic controllers to ensure a nonlinear input-output static configuration can be designed/changed according to designer’s mind. Compared to the conventional control, fuzzy control could take sufficient advantage of the experience of a human operator, because fuzzy control has the ability to introduce this experience in a more accurate way by applying linguistic variables. The mathematical foundation 940 H. Xu, R. Vilanova of fuzzy logic control was set by Zadeh in his paper about forty years ago [8]. After that, as the computer science and the tools for dealing with mathematical problems were developing rapidly, Madamni and Assilian applied the first fuzzy control application on a small steam engine [9, 10]. Afterwards, in Japan and USA, and later, in Europe, the fuzzy logic control became more and more popular [19]. Until now, fuzzy controllers have been successfully used in the area of process industries [11–17]. This control method based on human’s experience is achieved in FCs by expressing the control requirements and expounding the control signal in terms of the IF-THEN linguistic rules which belong to the set of rules: IF(conditions)THEN(consequent) Where the conditions means the present situation of the controlled process dynamics (com- pared usually with the desired dynamics), and the consequent (conclusion) refers to the action which should be taken - under the form of the control input u - in order to follow the desired dynamics. The set of rules makes up the rule base of the FC. A typical fuzzy control system is as followed (Fig. 2): Figure 2: Typical fuzzy control system In the present study, different forms of fuzzy logic systems for designing FC have been imple- mented: Mamdani fuzzy inference systems and Sugeno fuzzy inference systems. In a Mamdani fuzzy inference systems [18], given fuzzy rules: (1) if X is A1 and Y is B1 then Z is C1, (2) if X is A2 and Y is B2 then Z is C2; and the fact: X is X1, Y is Y1, here X1 and Y1 are crisp inputs. Fig. 3 shows how to determine the fuzzy output (dark aera). Different from the conventional mathematical set, which only has two relationships with a certain element (belong to or not belong to), a fuzzy set could also be partly belonged to by an element. In the theory of fuzzy, to describe the relationship between a fuzzy element and a fuzzy set, a grade of mem- bership µ(x) is introduced, and µ(x) = 1 means that the element x totally belongs to a fuzzy set, while µ(x) = 0 means the element x not belongs to the fuzzy set at all. For example, in the Fig. 3, X1 partly belongs to set A1 and partly belongs set A2, and the grade membership is de- scribed by µ(X1|A1) and µ(X1|A2) separately. Similarly, µ(X1|A1) and µ(Y2|B2) represent the grade of membership for Y1 to fuzzy set B1 and B2. This is how to convert crisp inputs to fuzzy inputs, i.e. fuzzification. Next, we should consider how to determine the conclusions. To do this, we will first consider the recommendations of each given fuzzy rule independently. The membership function for the conclusion reached by rule (1), which we denote by µ(1), is showed in Fig. 3 and is given by µ(1)(Z) = min{µ(X1|A1), µ(X1|A1)} This membership function µ(1)(Z) can be explained as how big part we should take into consider for the fuzzy set C1. And similarly, we can reach the other membership function for the conclusion by rule (2). And as the present situation (X is X1 and Y is Y1) is affected by both rule (1) and rule (2), thus the final decision should be a combination of both membership funcion, as showed in Fig.3. According to centroid way, to defuzzify the fuzzy output, we only need to calculate the centroid point of the gray aera: let bi denote the center of the membership function of the PI and Fuzzy Control for P-removal in Wastewater Treatment Plant 941 sonsequent of rule (i), and let ∫ µ(i) denote the area under the membership function µ(i), the centroid method computes Z1 to be Z1 = ∑ i bi ∫ µ(i)∑ i ∫ µ(i) and Z1 is the defuzzified output, as showed in Fig. 3. Figure 3: Mamdani fuzzy inference systems To design a fuzzy controller, at first the input and output variables of the fuzzy controller should be chosen. Normally the input variables are feedback error and higher order derivatives of feedback error, in this paper the feedback error (E) and first order derivative of feedback error (EC) were chosen as inputs of the fuzzy controller. On the other hand the output variables should be controlled inputs of the controlled plant (U), therefore in this case, the KLa of the aerobic tanks was chosen as output of the DO fuzzy controller, and the internal recycle rate was chosen as the output of the internal recycle fuzzy controller. The next step is to choose the membership functions for input and output variable. The shape of membership functions here we chose the triangle functions both for the input variables and for the output variables. It was concluded that in the case of tank 5 the range of E could be fixed from -1.5 g/m3 to 1.5 g/m3, the range of EC could be fixed from -15g/ (m3d−1) to 15 g/ (m3d−1). The KLa of tank 5 could range from 160 d −1 to 280 d−1. In addition, the number of parameters of the membership function was chosen as 7, which included NB, NM, NS, O, PS, PM, PB. Here N meant negative, O meant zero, P meant positive, B meant big, M meant medium, S meant small. To express in a more clear way, Fig.4 presents the membership function of the feedback error for the fuzzy controller of the tank 5. Similarly, this could also be applied on the DO fuzzy controller of tank 6, tank 7 and that of the internal recycle. But in the case of tank 6 and 7, E and EC range the same way, because 942 H. Xu, R. Vilanova Table 1: Decision table for fuzzy controllers (a) For DO fuzzy controllers NB NM NS O PS PM PB NB PB PB PB PB PM O O NM PB PB PB PB PM O O NS PM PM PM PM O NS NS O PM PM PS O NS NM NM PS PS PS O NM NM NM NM PM O O NM NB NB NB NB PB O O NM NB NB NB NB (b) For internal recycle NB NS O PS PB NB PB PB PB PS O NS PS PS PS O NS O PS PS O NS NS PS PS O NS NS NS PB NS NB NB NB NB according the experiments the range of E and EC did not affect the control performance signif- icantly, and the U ranged from 120 d−1 to 240 d−1 and from 60 d−1 to 180 d−1 separately. In the case of internal recycle, the E ranged from -1 g/m3 to 1 g/m3, the EC ranged from -20 g/ (m3d−1) to 20 g/ (m3d−1) and the U ranged from 5000 m3/d to 45000 m3/d. The number of parameters for U of the internal recycle is adjusted to 5, which means that only exist NB, NS, O, PS and PB. The next step was deciding the fuzzy inference mechanism. In the case of 7 parameters of linguistic terms, there are totally 49 control rules formed by if-then clauses. Table.1(a) shows the detail of control rules, which are same for the entire 3 DO fuzzy controller, whereas Table.1(b) shows the fuzzy control rules for the internal controller. Figure 4: Membership of E of tank 5 4 Control Configurations In this paper, at the first part, a series of control strategies are applied on the BSM1-P. As given in [7], a default control (DC) is simulated as a reference as well as a test for the updated simulation plant. Then 10 additional PI-based control strategies (S1-S10) are applied to compare the performance: the first 5 control strategies (S1-S5) are basic ones, including the DO controller, cascade DO controller, internal recycle flow rate controller, extra carbon resource controller and the waste sludge amount controller, whereas the other 5 control strategies (S6- S10) are generated by combining these basic ones. A detailed description of each control strategy follows below. PI and Fuzzy Control for P-removal in Wastewater Treatment Plant 943 4.1 Default Control (DC) Strategy Similar as with the original BSM1, the DC strategy consists of two PI-based control loops: a DO controller in tank 7 and an internal recycle controller. The measured variables are dissolved oxygen of the tank 7 and the concentration of nitrate nitrogen (NO3) of the tank 3 respectively. The controlled variables are same as measured variables, and the set points are DO=2 g/m3 and NO3=1 g/m 3 respectively. The manipulated variables are KLa7 and internal recycle Qint respectively. As showed in Fig. 5. Figure 5: Configuration of DC 4.2 Control strategies configurations A set of 5 basic control strategies (S1 to S5) has also been implemented by using the following control loops respectively: • S1: PI Controllers of the dissolved oxygen concentration (DO) in the 3 aerobic tanks by regulating the oxygen transfer coefficients (KLa) simultaneously, and the set points are all 2 g/m3.Internal recycle loop is left as in the openloop. The configuration is shown in Fig. 6. Figure 6: Configuration of S1 • S2: Fig.7 shows the cascade PI control of the ammonia nitrogen of the effluent by ma- nipulating the DO set points in all the aerobic tanks. The set point of effluent ammonia nitrogen concentration is 1 g/m3, and the controlled variables are also the KLas of the aerobic tanks. Internal recycle loop is left as in the openloop. • S3: Fig.8 shows the control of nitrate nitrogen concentration (SNO3) in the tank 4 by manipulating the internal recycle flow rate (Qint). The set point is 1 g/m 3. And the KLas of aerobic tanks are left constant as in the openloop. 944 H. Xu, R. Vilanova Figure 7: Configuration of S2 Figure 8: Configuration of S3 • S4: Fig.9 shows the control of SNO3 in the tank 4 by manipulating the extra addition carbon resource (Qcarb) into the tank 3. The set point is also 1 g/m 3. And the internal recycle loop was left as openloop. Figure 9: Configuration of S4 • S5:Fig.10 shows the control of total suspended solids concentration (XTSS) in tank 7 by manipulating the wastage sludge flow rate (Qw). The set point is 4000 g/m 3. And the internal recycle loop was left as openloop. Furthermore, 5 extra PI-based control strategies (S6 to S10) generated by combining these basic control strategies are also tested. In detail, the control strategy S6 is to control the DOs in the 3 aerobic tanks as well as internal recycle flow rate by applying S1 and S3 simultaneously. As can be seen in the simulation result, the performance of S2 is not beneficial for the phosphorus removal, which is mainly considered in this work, consequently in all the combined control strategies, none is included S2. The control strategy S7 is obtained by combining S1 and S4, PI and Fuzzy Control for P-removal in Wastewater Treatment Plant 945 Figure 10: Configuration of S5 which means control the DO in 3 aerobic tanks and the extra carbon resource in tank 3. Similarly, the control strategy S8 is to combine S1 and S5, S9 is to combine 3 control strategies (S1, S4 and S5). Finally, the last control strategy S10 is generated by combining S1, S3 and S5. 5 Results and Discussions The important information of simulation results of PI-based control strategies is showed in the Table.2. For comparison, it included the simulation result of open loop, default control loop and S1 to S10 control strategies. The effluent quality indexes (EQIs) are showed in the table to judge the overall performance. In detail, the mainly considered components of a certain wastewater treatment plant: ammonia nitrogen (NH4), total amount of nitrogen (Ntot), phosphate (SPO4 ), the amount of chemical oxygen demand (COD) and the total suspended solids (TSS) being another main factor to evaluate the performance of a WWTP are showed in the table. In addition, the operation cost index (OCI), as a consequence of consuming aeration energy (AE), pumping energy (PE), sludge production and the added carbon volume and metal volume (in this paper, 0 in all case), is also given in the table to compare the control strategies. Table 2: Results of PI-based control strategies (S1-S5) Average effluent default S1 S2 S3 S4 S5 S6 S7 S8 S9 S10 Concentration component limit (g/m3) SNH4 4 3.16 3.36 2.17 2.84 3.62 2.30 3.36 4.02 2.61 3.68 2.60 Ntot 18 17.15 15.19 15.06 15.47 12.59 15.16 15.36 12.91 14.82 12.66 15.01 SPO4 2 1.86 2.55 3.99 3.150 0.85 2.97 2.27 0.85 2.19 0.82 1.97 COD 125 45.44 45.46 45.58 45.52 45.90 46.17 45.45 45.79 46.04 46.05 46.02 TSS 35 14.15 14.05 13.93 14.01 14.54 14.58 14.08 14.47 14.59 14.66 14.60 Global plant Performance EQI(kg/d 4495 4741 5618 5468 4502 5403 4643 4087 4672 4096 4597 OCI(euro/d) 19919 19664 19779 19343 24858 18954 19774 24231 19532 24373 19648 Since BSM1-P is an updated version of BSM1, from the results it can be seen that in all cases the ammonia nitrogen (NH4), total amount of nitrogen (Ntot) and the chemical oxygen demand (COD) are all under limit amount. In case of S4 and those that included it: S7 and S9, all the limit concentrations for pollutant components concerned are satisfied. The reason is that extra carbon resource can promote the growth and ability of denitrifying organism and phosphorus accumulating organism (PAO) simultaneously. However because of the added carbon resource, the operational cost indexes 946 H. Xu, R. Vilanova (OCI) in these 3 cases are higher than any other case. In the other cases of PI-based control strategies, it is obvious that, by comparing with the case of openloop, a lower level of ammonia nitrogen concentration in the effluent corresponds a higher level of phosphorus concentration. This is because without extra carbon resource, the only way to decrease the ammonia is to increase the explosion of air, but this will lead a higher level of nitrate nitrogen, which is harmful for the accumulation of phosphorus. However, the case S5 is an exception, where both SNH4 and SPO4 are lower than the case of openloop. Although the phosphorus is still above the limitation, but considering the concentra- tion of ammonia nitrogen is relatively lower than many cases, the consequence is also beneficial. This is because by controlling the waste sludge flow rate more suspended solids, including the organisms, remain in the treatment plant circumstance, which is beneficial for both nitrogen and phosphorus removal. Correspondingly, the COD and TSS in the effluent are higher than other cases. Furthermore, the OCI is the lowest. Fig.11 shows the tradeoff among OCI and EQI for the different PI-based control strategies. In Fig.11, the horizontal axis means the operational cost index (OCI) and the vertical axis represents the effluent quality index (EQI). Basically, higher operational cost leads to lower effluent quality, which means that the performance of treatment plant is better. From Fig.11, it is easy to conclude that those strategies including extra carbon flow (S4, S7, S9) cost much more than other ones, but achieve lower effluent pollutant concentration. In fact, the performance of S4 is the best among the 5 basic PI-based control strategies. Among all, S7 and S9 possess the lowest effluent pollutant load without significant difference. However, when analyzing the control strategies combined with the operational cost, the default control, S1, S6, S8 and S10 show a good balance. But the main flaws of them are as followed: the average level of phosphorus in S6 and S8 exceeded the limit amount, and the instant level of phosphorus amount in all the 5 cases violated the limitation for a great partial of the total evaluated time (64.43%, 36.01%, 49.55%, 46.88% and 38.69%, respectively). Figure 11: The OCI against EQI graph of PI controllers In Fig.11, the points that are closer to the origin mean lower effluent quality index with less operational cost, therefor better tradeoff, when choosing the appropriate control, these ones should receive more interest. Hence it is obvious that S10 made the best balance enter OCI and EQI. Fig.12 and Fig.13 show a dynamic plant performance of WWTP for N and P under the PI-based control strategy S10. To make a clear comparison with the fuzzy controller, in these three figures we also added in the time response of certain components of effluent by using fuzzy controllers, which will be anylized below. PI and Fuzzy Control for P-removal in Wastewater Treatment Plant 947 Figure 12: Total amount of nitrogen of effluent of S10 Figure 13: Total amount of phosphorus of effluent of S10 Figure 14: The comparison of OCI to EQI between PI-based and Fuzzy-based controllers 948 H. Xu, R. Vilanova Figure 15: Total amount of nitrogen of effluent of S1 Figure 16: Total amount of phosphorus of effluent of S1 Table 3: Comparison of PI and Fuzzy control strategies average effluent open default S1 S6 S8 S10 concentration loop PI FUZZY PI FUZZY PI FUZZY PI FUZZY PI FUZZY component limit (g/m3) SNH4 4 2.79 3.16 5.77 4.43 6.99 3.36 6.54 2.61 6.55 2.60 7.11 Ntot 18 15.50 17.15 17.04 15.19 15.91 15.36 17.73 14.82 16.42 15.01 18.10 SPO4 2 3.69 1.86 1.52 2.55 1.27 2.27 1.08 2.19 1.46 1.97 1.15 COD 125 45.54 45.44 45.36 45.46 45.40 45.45 45.32 46.04 44.80 46.02 44.83 TSS 35 13.95 14.15 14.12 14.05 14.17 14.08 14.12 14.59 13.62 14.60 13.69 EQI(kg/d) 5596 4496 4314 4741 4224 4643 4141 4672 4226 4597 4121 % of variation - -19.7% -22.9% -15.3% -24.5% -17.0% -26% -16.5% -24.5% -17.9% -26.4% OCI(euro/d) 19175 19920 20047 19665 20057 19774 20203 19532 20283 19648 20416 % of variation - +3.9% +4.5% +2.6% +4.6% +3.1% +5.4% +1.9% +5.8% +2.5% +6.5% PI and Fuzzy Control for P-removal in Wastewater Treatment Plant 949 Fig.12 and Fig.13 show the most concerned component of waste water, nitragen (N) and phosphorus (P) separately. From Fig.12, we can see that although the average amount of Ntot is satisfied with the requirement according to Table.2, in some moments the Ntot of effluent violates the limitation. However, the overall performance is rather good. When come to Fig.13, the outcome is in contrast, the average amount of P of effluent is higher than the desired limit, and neither is there much time satisfying the limitation. So this is the major defect of S10. But considering the overall control performance and the cost of WWTP, S10 still draws a good attention. So in the next step, we focus on replacing the PI controllers of S10 by fuzzy controllers. In addition, since DF, S1, S6 and S8 also get a good comparison of OCI and EQI, as well as a good ability for P removal, as can be seen in the Table.2 and Table.3, it is also necessary to build up a fuzzy-based controller for these control strategies to see the performance. The procedure and important information of designing fuzzy controller are mentioned in the second part. The simulation results of fuzzy control strategy are showed in Table.3, to make a clear comparison, in Table.3 we also repeat the situation of applying PI-based controllers. From this table, we can see that by applying FCs, the average concentration of P in effluent becomes much lower and satisfies with the requirement. But since the favorable condition for P removal is contrary against the one of N removal, by applying FCs the amount of N rises. However, the average concentration of total N in effluent is still under the limitation (except fuzzy-based S10), this means that FCs are able to satisfy with the requirement of total N and total P simultaneously. In addition, from the table we can also see that by applying FCs, the EQI is lower, but the OCI is higher. To make a clear comparison, Table.3 also gives a percent (%) of variation of each control strategy against openloop to see in how much degree OCI enlarged as well as EQI reduced. From Table.3, we can see that in DC by applying fuzzy controllers EQI reduced about 3% more than by applying PI controllers, and OCI only gained 0.6%. In other control configurations, by applying fuzzy controllers, EQI reduced 8%-9% comparing with PI controllers, and OCI gained about 2%-4%. This means fuzzy logic controllers are able to improve the WWPT performance by increasing operational cost, however the degree of improvement is greater than the increase in cost. Fig.14 gives a more clear way to see this conclusion. To see the dynamic plant perform, we can refer to Fig.12 and Fig.13. It can be concluded that by applying fuzzy controllers in every moment P gets a better removal. Another phenomenon that is exihibited in Fig.15 and Fig.16 needs to be mentioned, which show effluent concentrations of N and P of WWTP controlled by S1.Since S1 only contains DO controllers, these two pictures can reveal the effect of DO on N and P removal process, because despite of the same setpoint for both PI-based and fuzzy-based controllers, the regulated instantaneous DO could vary according to different type of controllers. From Fig.15, we can see that the PI controllers are beneficial for the N removal, but in some period (such as Day7 to Day8 and Day13 to Day 14) the concentration of N did not change much, but from Fig.16 we can see that all the time the amount of P by using Fuzzy controllers is below the one by using PI controllers. From this point, the EQI of fuzzy controllers is lower than the PI controllers, as showed in Table.3. It can be assumed that the process of P removal is more sensitive than the N removal. Based on this assumption, the real concentration of DO in the fuzzy-based S1 at the moment that N keeps the same could draw more interest, because under this condition we can get better removal of P and at the same time do not affect the removal of N. From the simulation results, we can see that by applying Fuzzy control strategies the perfor- mance of WWTP is improved, and fuzzy control strategy could get a better operation result for the wastewater treatment process in some degree. 950 H. Xu, R. Vilanova 6 Conclusions In this paper, at first a set of PI control strategies has been applied on the BSM1-P waste water treatment plant to maintain the pollution component of effluent within regulations specified limits. Good performance was achieved; it could be proved that the BSM1-P is efficient to simulate the combined P and N removal WWTP. Among the 10 designed PI control strategies, we chose a group that could make a better balance between OCI and EQI (DC, S1,S6, S8 and S10) to test fuzzy logic controllers. From the results we could conclude that by applying FCs the P removal consequent was enhanced. In this way, the most focused on component (P) of the effluent was controlled under the required limit. The results show FC could be efficiently used to control the WWTP, especially for the P removal. However, in this paper, although a set of fuzzy control strategies was tested on the BSM1- P, the operation was only replacing the FCs to the PI controllers. The control loop was not changed at all and the set points were also the same. But as one of the most studied advanced control strategies, fuzzy logic control could make a better improvement. Therefore, the future work will not only concern to replace the FC to the PI controllers, but also make a combination of fuzzy logic control and PI control. FCs could act as a higher level to make the important decision as a human being, and the basic control loop could be accomplished by PI controller. For example, when we focus on the concentration of P of effluent, it is not necessary to fix the DO of three aerobic tanks to 2 mg/l; high level of DO is beneficial for the P removal, but harmful to the denitrification process which is important for the N removal. Although according to the reference, 2 mg/l of DO is an ideal amount for making the balance between P removal and N removal, however in the real situation there are so many disturbances in the WWTP, it would get a better control performance by adjusting the DO according to the specific situation. In this way, we could get a better balance between P removal and N removal, as well as between OCI and EQI. Acknowledgments This work was supported by the Spanish Ministry of Economy and Competitiveness pro- gram under grant DPI2013-47825-C3-1-R. The work of Xu Hongyang is covered by the China Scholarship Council. Bibliography [1] Ingildsen, P. (2002); Realising full-scale control in wastewater treatment systems using in situ nutrient sensors, Ph.D. Thesis, Department of Industrial Electrical Engineering and Automation, Lund University, Sweden. [2] Vrecko, D., Hvala, N., Carlsson, B. (2003); Feedforward-feedback control of an activated sludge process: a simulation study, Water Sci. Technol., 47 (12): 19 - 26. [3] Lindberg, C.F. (1997): Control and estimation strategies applied to the activated sludge process, Ph.D. Thesis, Department of Systems and Control, Uppsala University, Sweden. [4] Yuan, Z., Oehmen, A., Ingildsen, P. (2002); Control of nitrate recirculation flow in preden- itrification systems, Water Sci. Technol., 45 (4-5): 29-36. [5] Jeppsson, U., Alex, J., Batstone, D., Benedetti, L., Comas, J., Copp, J., Corominas, L., Flores-Alsina, X., Gernaey, K., and Nopens, I. (2011); Quo vadis benchmark simulation models, 8th IWA symposium on systems analysis and integrated assessment, 493-506. PI and Fuzzy Control for P-removal in Wastewater Treatment Plant 951 [6] Copp, J. (2002); The COST simulation benchmark: Description and simulator manual, Office for official publications of the European Community, Luxembourg. [7] Gernaey V., Jorgensen B. (2004); Benchmarking combined biological phosphorus and nitro- gen removal wastewater treatment process, Control Engineering Practice, 12: 357-373. [8] L.A. Zadeh (1965); Fuzzy sets, Information and Control, 8 (3): 338-353. [9] E.H. Mamdani (1974); Applications of fuzzy algorithms for control of a simple dynamic plant, Proceedings of the IEE 121, 12: 1585-1588. [10] E.H. Mamdani, S. Assilian (1975); An experiment in linguistic synthesis with a fuzzy logic controller, International Journal of Man-Machine Studies, 7 (1):1-13. [11] U.-C. Moon, K.Y. Lee (2003); Hybrid algorithm with fuzzy system and conventional PI control for the temperature control of TV glass furnace, IEEE Transactions on Control Systems Technology, 11(4): 548-554. [12] M. Ramirez, R. Haber, V. Pena, I. Rodriguez (2004); Fuzzy control of a multiple hearth urnace, Computers in Industry, 54(1): 105-113. [13] M. Onat, M. Dogruel (2004); Fuzzy plus integral control of the effluent turbidity in direct filtration, IEEE Transactions on Control Systems Technology, 12(1): 65-74. [14] M. Eftekhari, L. Marjanovic, P. Angelov (2003); Design and performance of a rule-based controller in a naturally ventilated room, Computers in Industry, 52(3); 299-326. [15] J.N. Lygouras, V.S. Kodogiannis, T. Pachidis, K.N. Tarchanidis, C.S. Koukourlis (2008); Variable structure TITO fuzzy-logic controller implementation for a solar airconditionint system, Applied Energy, 85(4): 190-203. [16] A. Maidi, M. Diaf, J.-P. Corriou (2008), Optimal linear PI fuzzy controller design of a heat exchanger, Chemical Engineering and Processing: Process Intensification, 47(5): 938-945. [17] Y.-H. Lee, R. Kopp (2001); Application of fuzzy control for a hydraulic forging machine, Fuzzy Sets and Systems, 118(1): 99-108. [18] Ernst, M., Thomas, M.B., Antonio D. (2002); State detection and control of overloads in the anaerobic wastewater treatment using fuzzy logic, Water research, 36: 201-211. [19] Radu-Emil Precup, Hans Hellendoorn (2011); A survey of industrial applications of fuzzy control, Computers in Industrial, 62: 213-226 [20] Wentzel, M. C., Comeau, Y., Ekama, G. A., van Loosdrecht, M.C.M., Brdjanovic, D. (2008); Enhanced Biological Phosphorus Removal, in: Henze, M., van Loosdrecht, M.C. M., Ekama, G. A., Brdjanovic, D. (Eds.), Biological Wastewater Treatment: Principles, Modelling and Design, IWA Publishing, London, UK, 154-220. [21] Vanrolleghem, P. A., & Gillot, S. (2002); Robustness and economic measures as control benchmark performance criteria, Water Science and Technology, 45(4-5): 117-126.