Introduction

Activated sludge models (ASMs) and models being a combination of ASMs (so-called ASM-based models) belong to the most commonly used approach in modeling of biological wastewater treatment processes. Since the publication of the first activated sludge model ASM1 in 1987, the complexity of these models has increased significantly [1]. It was due to the recognition of new phenomena and introduction of new variables and parameters expressing them into the models. As a result, the application of the models to the specific wastewater treatment plant (WWTP) became a more difficult and time-consuming task. In order to describe the overall behavior of biological processes in a WWTP, the model calibration is necessary.

Model calibration is understood as the estimation of the model parameters to fit a certain set of data obtained from the full-scale WWTP under study [2]. The operational data of WWTP should be checked and carefully introduced into the model as the input data within the calibration process [3]. Different calibration levels can be distinguished and several calibration protocols for the ASMs have been elaborated [47]. Sin et al. [8] summarized and compared in detail four calibration methodologies: Biomath-Calibration protocol, the Dutch Foundation of Applied Water Research (STOWA) calibration protocol, the Hochschulgruppe (HSG) guidelines and Water Environment Research Foundation (WERF) protocol. In spite of differences between these protocols, each of them includes two substantial stages, i.e. a steady-state and dynamic calibrations of the model. The authors of the aforementioned calibration procedures also emphasized the role of sensitivity analysis in the model calibration process. Sensitivity analysis should be performed in the steady-state and dynamic calibration stages to figure out, which parameters of the model are the most influential and need to be calibrated [6, 9]. According to Vanrolleghem et al. [6], sensitivity analysis should be incorporated into the calibration protocol to minimize the efforts and optimize the overall calibration procedure.

Although the ASM-family models are widespread used, the library of studies demonstrating the experiences of their calibration for a full-scale WWTP is relatively inconspicuous [2, 10, 11]. Thus, in this paper, a full-scale WWTP situated in the central Poland is under consideration. Moreover, the previous studies usually concerned one of the ASM-family models, whereas in the contemporary simulation software complex models being a combination of ASMs or an alternative to them are often implemented. So in this study, the new results of the calibration of the complex ASM implemented in BioWin software for the full-scale WWTP were supplied. The calibration procedure comprised sensitivity analysis of kinetic and stoichiometric model parameters as well as the fractions of carbonaceous substrate.

The main aim of this work is to verify the predictability of the BioWin activated sludge (AS) model under the dynamic conditions and select its most influential parameters.

Materials and methods

Description of the WWTP

The WWTP in the city of Zgierz (Poland) treats municipal wastewater from the city and several communes located in the neighborhood and industrial wastewater originating mainly from small and medium enterprises. The average pollutant load to the plant corresponds to approximately 94,000 PE. The contribution of industrial wastewater is usually in the range from 10 to 15%. The average inflow of wastewater is equal to 11,500 m3 day−1, whereas the maximal inflow achieves 20,000 m3 day−1. The treated wastewater is directly discharged to Bzura river. The Zgierz WWTP went into operation in 1995 and since then it has performed mechanical and biological treatment of wastewater. The biological step consists of one three-zone bioreactor and secondary clarifier run in the Phoredox process configuration. The volumes of anaerobic, anoxic and aerobic zone are equal to 857.5, 3,536.4 and 19,730.6 m3, respectively. The surface area of the radial secondary clarifier is 1,018 m2 (diameter equals to 36 m) and its total depth is 4.5 m. The set of measured operational data for the Zgierz WWTP in June 2009 is presented in Table 1 as an example. A schematic flow diagram of the biological step of the Zgierz WWTP is shown in Fig. 1.

Table 1 Operational data of the Zgierz WWTP (June 2009)
Fig. 1
figure 1

Schematic flow diagram of the biological reactor at the Zgierz WWTP

Data collection

Influent, effluent, sludge excess and recirculation flow rates, pH and temperature were measured on-line in the Zgierz WWTP. Chemical oxygen demand (COD), biochemical oxygen demand (BOD5), total nitrogen (Ntot), total Kjeldahl nitrogen (TKN), nitrate (N–NO3 ), ammonium (N–NH4 +), total phosphorus (Ptot), phosphate (PO4 3−), alkalinity, total suspended solids (TSS) were determined with the use of the standard methods [12]. All measurements and analyses were made within the period of data collection for the steady-state as well as dynamic calibration.

The data for the steady-state calibration were collected twice a week for a period of 1 month (June 2009) and then they were subjected to standard statistical elaboration. The confidence intervals were calculated with the help of t-Student test at the significance level of 95%. Finally, the averaged data were introduced into BioWin. The mean flow was at the level of 11,770 m3 day−1, the mean pH was equal to 7.5, the mean COD 844 mg O2 l−1, the mean TSS 365 mg l−1, the mean Ntot 48.1 mg l−1, the mean alkalinity 8.3 mmol l−1 and the mean Ptot 12.6 mg l−1.

The data for the dynamic simulations were collected for 48 h. Wastewater samples were collected every 2 h from the reactor inlet and every 4 h from the reactor effluent. Three independent measurement campaigns were carried out in the period of June, August and September 2009. As an example, the variations in the total influent flow rate and concentration of total COD during the measurement campaign in August 2009 are presented in Fig. 2.

Fig. 2
figure 2

Variations of flow rate and total COD concentration in the influent during the measurement campaign in August 2009

Model and simulation environment

The simulations of biological wastewater treatment processes were carried out with the help of BioWin v. 3.0 (EnviroSim Associates Ltd., Canada). BioWin 3.0 uses the integrated activated sludge/anaerobic digestion (AS/AD) model, which is referred to as the BioWin General Model. This model is based upon the general model for biological nutrient removal activated sludge systems, which was elaborated by Barker and Dold [13]. The model of Barker and Dold [13] can be divided into two parts: a part for the non-poly-phosphate heterotrophic organisms and autotrophic organisms, and a part for the poly-phosphate heterotrophic organisms. The first part is based on ASM1, whereas the second part describing phosphorus removal kinetics is different than it was proposed in ASMs. The BioWin AS/AD model implemented in BioWin v.3.0 is an extended version of the model described by Barker and Dold [13] with respect to activated sludge (AS) as well as anaerobic digestion (AD) model. In this work, the part of the BioWin integrated AS/AD model concerning activated sludge (AS) model was studied, thus the model was called here the BioWin AS model.

In the BioWin General Model, material balances are written for each species assuming that in the bioreactors the liquid phase is completely mixed, the gas phase is completely mixed and the gas hold-up is constant [14]. At the same time with regard to settling and separation processes, three models are included in the BioWin General Model, i.e. point separation model, ideal separation model and flux-based model [14]. In this study, the ideal separation model was used. In the BioWin General Model, 21 fractions are discriminated to specify the composition of the influent wastewater. They comprise carbonaceous substrate (five fractions), ammonium, particulate organic nitrogen, soluble non-biodegradable TKN, phosphate, nitrogen-to-COD ratio, phosphorus-to-COD ratio and ten fractions representing different kinds of autochthonous biomass [14].

The BioWin AS model includes the following functional categories: (1) growth and decay of ordinary heterotrophic organisms (OHOs), (2) growth and decay of methylotrophs, (3) hydrolysis, adsorption, ammonification and assimilative denitrification, (4) growth and decay of ammonia oxidising biomass (AOB), (5) growth and decay of nitrite oxidizing biomass (NOB), (6) growth and decay of ANaerobic AMMonia OXidizers (ANAMMOX) and (7) growth and decay of phosphorus accumulating organisms (PAOs). Kinetic and stoichiometric parameters of the BioWin AS model are divided into the categories related to the groups of microorganisms taking part in biological wastewater treatment processes, i.e. AOB, NOB, OHO, ANAMMOX and PAO. In case of kinetic parameters, two additional categories are distinguished, i.e. pH parameters and switching functions. Due to the fact that the investigated WWTP system was operated according to the Phoredox scheme, the parameters related to ANAMMOX process had not to be subjected to sensitivity analysis. It was confirmed by the calculations of the normalized sensitivity coefficient S i,j . For all ANAMMOX parameters, S i,j was equal to zero. All in all, 71 kinetic and 46 stoichiometric parameters of the BioWin AS model were analyzed. Additionally, the fractions of carbonaceous substrate expressed as COD were subjected to the sensitivity analysis. In the BioWin AS model, the following fractions of carbonaceous substrate are distinguished: readily biodegradable including acetate, acetate, non-colloidal slowly degradable, non-biodegradable soluble and non-biodegradable particulate.

The simulations were performed with the assumption of constant process temperature 17 °C and controlled Sludge retention time (SRT) (22 days) for the steady-state model calibration, and 17 °C (June 2009) or 18 °C (August and September 2009) and SRT equal to 21 days for the dynamic model calibration. The value of internal recirculation was set to the constant level of 150% of the influent flow rate. The assumed values of operating parameters reflect the conditions of the Zgierz WWTP at the period, when the data for the steady-state or dynamic calibration were collected. Before each steady-state or dynamic simulation, the correctness of input data was tested with regard to the configuration of the activated sludge system and mass balances using the tools implemented in BioWin v. 3.0.

The BioWin AS model prediction accuracy was checked by the calculation of the average relative deviation (ARD) according to the following equation [15]:

$$ {\text{ARD}} = \frac{1}{N} \times \sum\limits_{i = 1}^{N} {{\frac{{\left| {(m_{i} - p_{i} )} \right|}}{{m_{i} }}}} \times 100\% $$

where m i is the measured value of the output variable, p i predicted value of the output variable and N number of the observations. The ARD values were calculated for the results obtained in the dynamic simulations with respect to four main output variables: COD, BOD5, Ntot, Ptot.

Sensitivity analysis

Sensitivity analysis enables the evaluation of the extent to which the parameters used in the model calibration can influence the model outputs. Two different measures of sensitivity are calculated: the normalized sensitivity coefficient (S i,j ) and the mean square sensitivity measure (δ msqr j ).

The normalized sensitivity coefficient (S i,j ) is defined as a ratio of the percentage change in the output variable (y i ) to a 10% change in the input variable (x i ) [16]:

$$ S_{i,j} = \left| {{\frac{{\Updelta y_{i} /y_{i} }}{{\Updelta x_{i} /x_{i} }}}} \right| $$
(1)

In this work, a 10% increase of the input variable was applied for the purpose of S i,j calculations. For each input variable, i.e. each model parameter calculations were made separately. A parameter is believed to be influential, if the value of S ij is equal or higher than 0.25 [17].

The second sensitivity analysis measure is the mean square sensitivity measure (δ msqr j ) introduced by Brun et al. [18]. This sensitivity measure assesses the individual parameter importance in a least squares parameter estimation context and is defined as:

$$ \delta_{j}^{msqr} = \sqrt {\frac{1}{n}\sum\limits_{i = 1}^{n} {S^{2}_{i,j} } } $$
(2)

A high value of δ msqr j indicates that a parameter has an important influence on the simulation results, whereas the value of zero means that the simulation results do not depend on a parameter.

Seven output variables (y i ) characterizing the quality of the effluent were taken into account in the calculations of the sensitivity analysis measures S i,j and δ msqr j . These were the following variables: COD, BOD5, Ntot, Ptot, N–NH4 +, N–NO3 and TKN.

Results and discussion

Steady-state and dynamic calibrations of the model

The simulations performed with the default values of kinetic and stoichiometric parameters of the BioWin AS model revealed discrepancies between the measured and simulated values of the output variables. In the simple steady-state simulations, these discrepancies concerned mainly the removal of organic carbon substances (COD, BOD5), whereas in the dynamic simulations they also concerned nitrogen and phosphorus compounds removal (Ntot, Ptot, N–NH4 +, N–NO3 , TKN), i.e. almost all output variables. It meant that in both cases the model calibration was necessary.

In Table 2, the values of calibrated parameters for the steady-state and dynamic calibrations are compared. Additionally, the literature values or ranges for these parameters, if available, are included in Table 2. In order to adjust the simulated values of variables characterizing the effluent to the measured ones, four parameters had to be calibrated under the steady-state conditions, while in the dynamic conditions these were ten parameters. Three (K S, Y H, b H) out of four parameters calibrated in the steady-state simulations were associated with growth and decay of OHOs (Table 2). The discrepancies between the measured and simulated values of COD and BOD5 in the effluent made the adjustment of such parameters as K S, Y H and b H necessary. The influent to the Zgierz WWTP contained a significant amount of industrial wastewater (mainly from textile industry) and the affinity of this kind of substrate is lower than for typical municipal wastewater [19]. As a result, the default value of K S had to be elevated to 15 mg COD l−1.

Table 2 Calibrated values of kinetic and stoichiometric parameters

A dynamic calibration is much more complicated than a steady-state calibration because it aims at the description of concentration profiles of output variables in time. In order to perform the dynamic simulations more data, including hydraulic data, need to be introduced to a model [2, 20]. Thus, each step of the dynamic calibration, starting from data collection, is a requiring and time-consuming task.

The calibration of the BioWin AS model was performed upon the data obtained in June 2009 campaign, and then the model was validated on the basis of two independent sets of data obtained in August and September 2009. The parameters, which were calibrated in the dynamic simulations, were associated with different groups of organisms, i.e. OHOs, AOBs and PAOs. However, half of them was associated with PAOs and these were mainly stoichiometric coefficients (Y PAO,aerob, Y PAO,anox, Y P/PHA,seq, Y P/acetic). In the steady-state simulations, the discrepancies between measured and simulated values of Ptot in the effluent were of little importance so there was no need to calibrate parameters related to PAOs. At the same time, in the dynamic conditions, the calibration of these parameters was required in order to reflect the changes of phosphorus concentration in the effluent properly. Four out of five other parameters calibrated under the dynamic conditions, i.e. K S, Y H, b H, b aerob,A were the same as in the steady-state calibration (Table 2). Additionally, maximum specific growth rate of OHOs under aerobic conditions (μ maxH) needed adjustment in the dynamic calibration. Its value was increased from 3.2 to 5.2 day−1; however, it still remained in the range of μ maxH values used in ASMs [1]. At the same time, the calibrated value of b H was higher than the default value (Table 2) as well as its literature value [1]. The relatively high decay coefficients (b H and b aerob,A) were most probably caused by the long SRT (above 20 days). According to Grady et al. [21], biomass decay increases at longer SRTs. The SRT usually varies from 5 to 15 days in the conventional activated sludge systems [22]. Moreover, comparing the calibrated values of parameters with the literature ones (Table 2), it should be noticed that the latter were assumed for wastewater containing total COD of 260 mg O2 l−1, total nitrogen 25 mg N l−1 and TSS 140 mg l−1 [1]. Influent to the Zgierz WWTP contained the mean total COD of 844 mg O2 l−1, the mean Ntot of 48.1 mg l−1 and the mean TSS of 365 mg l−1. The significant differences in the composition between the wastewater studied here and typical municipal wastewater [1] contributed to the discrepancies between the values of some calibrated and literature parameters (Table 2).

The simultaneous changes of b H and μ maxH in the dynamic conditions are mainly connected with the diversity of activated sludge biomass. It was observed that certain conditions, for example, an excess of readily degradable substrate, favor the growth of fast-growing microorganisms (increase of μ maxH), whereas the decay of other microorganisms can be at the same time high (increase of bH) [22, 23].

In order to evaluate the quality of calibration of the BioWin AS model under the steady-state conditions, it was proposed to check, if the simulated value of an output variable was included in the confidence interval estimated for its measured value of the effluent. If it was a case, the simulation was successful because there was no significant statistical difference between the simulated and measured values of the investigated variable [20]. It occurred that each of the simulated output variables was included in the confidence interval estimated for the respective measured variable under the steady-state conditions (Fig. 3).

Fig. 3
figure 3

Measured versus simulated values of the selected variables in the effluent under the steady-state conditions

In the dynamic conditions, the quality of the calibration of the BioWin AS model was differently evaluated. The values of confidence intervals for the output variables in the steady-state calibration illustrated the variation of these variables around the mean, whereas in the dynamic calibration, the confidence intervals of the output variables can express only the accuracy of the analytical methods. It is due to the fact that a dynamic simulation aimed at showing the changes of the actual value of output variables in time. In Figs. 4, 5 and 6, the changes of simulated and measured output variables representing carbon (BOD5), nitrogen (Ntot) and phosphorus substances (PO4 3−) in the dynamic simulations after calibration are presented. In general, the agreement between the measured and simulated values of the output variables in each of three series was achieved (Figs. 4, 5, 6). The discrepancies between the measured and simulated values of the output variables did not exceed 20%. Additionally, the goodness-of-fit for the dynamic simulations was quantified by the ARDs. Their values for COD, BOD5, Ntot and Ptot were, respectively, in the ranges from 7.14 to 14.74, 10.2 to 14.89, 8.9 to 14.87 and 15.12 to 19.18%. These results confirmed that the dynamic calibration was performed correctly.

Fig. 4
figure 4

Measured versus simulated values of BOD5 in the effluent under the dynamic conditions

Fig. 5
figure 5

Measured versus simulated values of Ntot in the effluent under the dynamic conditions

Fig. 6
figure 6

Measured versus simulated values of phosphate (PO4 3−) in the effluent under the dynamic conditions

It should be emphasized that the aim of a dynamic calibration is not to predict each value of an individual output variable, but to predict a trend of its changes. In this context, the performed dynamic calibration was fully successful. Moreover, the experts claim that it is more important to predict the changes of all key-output variables at the acceptable level of tolerance than to predict the changes of only one or two output variables ideally [5].

Sensitivity analysis

In this study, 71 kinetic and 46 stoichiometric parameters of the Biowin AS model were subjected to sensitivity analysis. So were five fractions of carbonaceous substrate. To the model parameters belonged the ones associated with growth and decay of AOB, NOB, OHOs and PAOs as well as the kinetic parameters responsible for pH inhibition and switching functions. Sensitivity analysis revealed that among 117 kinetic and stoichiometric parameters, which were studied, 20 can be regarded as sensitive. With regard to the fractions of carbonaceous substrate, it occurred that two of them were sensitive. In Table 3, the most sensitive parameters and fractions in the steady-state and dynamic calibrations are presented. Comparing these results, it can be noticed that in both calibrations, the same parameters occurred to be sensitive. The differences concerned only four parameters (Table 3). All parameters, excluding k a, sensitive in the steady-state calibration occurred to be sensitive in the dynamic calibration, too. Additionally, there were three parameters, i.e. K S,hydrolysis, Y H,anoxic, b PAO, which proved to be sensitive under the dynamic conditions (Table 3).

Table 3 List of sensitive parameters and fractions in the steady-state and dynamic calibrations

The sensitive model parameters represented kinetic and stoichiometric parameters associated with growth and decay of AOB, OHOs, PAOs and one of these parameters belonged to switching functions (K PP) (Table 3). Parameters expressing growth and decay of NOB were sensitive neither in the steady-state nor in the dynamic calibration. Nevertheless, when nitrite is incorporated into ASMs as an intermediate product of biological processes, better description of nitrogen compounds removal from wastewater can be obtained [24].

Two fractions of carbonaceous substrate, i.e. readily biodegradable COD and non-biodegradable soluble COD, were sensitive in the steady-state and dynamic calibrations (Table 3). The change of readily biodegradable fraction influenced phosphorus concentration in the effluent. It is connected with the mechanism of biological phosphorus removal from wastewater. Readily degradable compounds are necessary to form poly-hydroxy-alkanoates (PHA). At the same time, the value of COD in the effluent depended on the fraction of non-biodegradable soluble COD. The higher the fraction of F us was, the higher COD of the effluent was.

Most of the parameters indicated as sensitive in this study were associated with growth and decay of PAOs (Table 3). These were kinetic as well as stoichiometric parameters. Several other studies emphasized the influential role of the model parameters related to PAOs in ASMs [15, 18, 25]. In the BioWin AS model, the role of parameters connected with PAOs is even greater than in well-known ASM models. Four of parameters associated with PAOs found in this work as sensitive, i.e. μ maxPAO, K S,PAO, b PAO, Y P/acetic were used in ASM2d and ASM3P models. Some of them, as for example b PAO, were already believed to be very influential parameters [18]. At the same time, other five parameters related to PAOs (Table 3) are characteristic for the BioWin AS model and the knowledge about their interpretation and determination is in shortage.

Parameters associated with PAOs found themselves on the top of the lists of ten most sensitive parameters. Two lists based upon the mean square sensitivity measure δ msqr j calculations were prepared. One of them referred to the steady-state calibration, while the second to the dynamic calibration (Table 4). In both rankings, the stoichiometric coefficients related to PAOs were on the first places. These were Y P/PHA,seq, Y P/acetic and Y lowPP (Table 4). The stoichiometric coefficient Y P/acetic is defined as the amount of phosphorus released for 1 mg of acetate sequestrated in the form of PHA. Its default value is equal to 0.49 mg P mg COD−1. Y P/acetic corresponds with the yield of phosphorus release to substrate uptake \( Y_{{{\text{PO}}_{4} }} \), which was used in ASM2, ASM2d and ASM3P models [1, 26]. Y lowPP expresses the fraction of phosphorus stored in the releasable poly-phosphate-P and its default value is equal to 0.94 mg P mg P−1. The rest of phosphorus is stored as the high molecular weight non-releasable poly-phosphate-P. This stoichiometric coefficient is characteristic for the BioWin AS model. Its value cannot exceed 1 and seems to be relatively stable for PAOs. The last of three most influential parameters Y P/PHA,seq expresses the amount of PHA stored when 1 mg of acetate or propionate is sequestrated and, similarly to Y lowPP is characteristic only for the BioWin AS model.

Table 4 Top ten kinetic and stoichiometric parameters importance rankings: (1) for the calibrated model under the dynamic conditions, (2) for the calibrated model under the steady-state conditions

Out of kinetic and stoichiometric parameters of ASMs and ASM-based models, the parameters related to PAOs are less recognized than these related to OHOs or AOBs [2729]. It is the most probably due to the fact that biological phosphorus removal was later incorporated in wastewater treatment technology and modeling. Although several attempts have been made in order to elaborate the procedures to determine the parameters for PAOs, these procedures still need significant corrections and complementation [30, 31].

Comparing the two rankings of the most sensitive parameters, it must be stated that half of the top ten parameters represented kinetic parameters and the other half stoichiometric parameters (Table 4). What is also important, the stoichiometric coefficients were exactly the same in both lists of the top ten most sensitive parameters and they outclassed kinetic parameters. The fractions of carbonaceous substrate occurred not to belong to the top ten sensitive parameters either in the steady-state or the dynamic calibration. The small discrepancies between the rankings just concerned the kinetic parameters (Table 4). In the steady-state calibration, kinetic parameters associated with AOBs (b aerob,A, \( K_{{{\text{NH}}_{4} }} \)) occurred to be more sensitive, while in the dynamic calibration these were the parameters related to PAOs (μ maxP-limited, K PP). However, three kinetic parameters μ maxA, μ maxH and b H were present in both rankings (Table 4). Similar results of the rankings indicate that the identification of the most sensitive parameters in the simpler steady-state calibration would be very helpful in the calibration of the BioWin AS model under the dynamic conditions.

Conclusions

The calibration of the BioWin AS model performed in this study occurred to be successful. The steady-state calibration required the adjustment of only four parameters, whereas the dynamic calibration ten parameters. In both calibrations a successful agreement between the measured and simulated values of the output variables expressing the concentrations of carbon, nitrogen and phosphorous compounds in the effluent was achieved. Sensitivity analysis of the BioWin AS model parameters revealed that upon the calculations of normalized sensitivity coefficient (S i,j ) 17 (steady-state) or 19 (dynamic conditions) kinetic and stoichiometric parameters, and 2 fractions of carbonaceous substrate are sensitive. What is more important, the parameters sensitive in the steady-state calibration also occurred to be sensitive in the dynamic calibration. Most of them are associated with growth and decay of heterotrophs (OHOs and PAOs).

The rankings of ten most sensitive parameters established on the basis of calculations of the mean square sensitivity measure (δ msqr j ) show the agreement in the sensitivity of parameters in the steady-state and dynamic conditions. It means that sensitivity analysis for the steady-state conditions can significantly support the dynamic calibration. This work proves that stoichiometric coefficients stronger influence the results of modeling than kinetic parameters. Apart from the yield coefficient of OHOs under aerobic conditions (Y H), these are mainly yield coefficients related to PAOs. For some of them, the methods of their evaluation should be elaborated.