The use of Dynamic Mathematical Models for improving the Designs of upgraded Wastewater Treatment Plants

Mathematical models and simulation are becoming increasingly used tools in the optimization of wastewater treatment plants. In this paper, the use of these tools is presented for wastewater treatment plant upgrading. Two case studies are presented, which will be upgraded for tertiary treatment to achieve effluent total nitrogen and total phosphorous concentrations below 10 mg/l and 1 mg/l, respectively. The plant performance after upgrading was assessed by first designing the process model, before upgrading the model for future operation under dynamic influent conditions. Long-term simulations revealed some bottlenecks in the upgraded plant performance and thus helped to improve the plant designs. In one case the total volume of the reactors was increased subsequently, while in the other case tighter denitrification control or additional reject water treatment was proposed. These results indicate that mathematical models can be considered as valuable tools to complement the established wastewater treatment plant design procedures. Advantages are gained by simulating the operation under dynamic operating conditions, precise wastewater characterization, as well as adjustment of stoichiometric and kinetic parameters to a particular wastewater treatment plant operation.


INTRODUCTION
In the last two decades, dynamic mathematical models and simulation are becoming state of the art tools in wastewater treatment [1].The models of wastewater treatment processes are based on modelling elementary biological processes in waste water.Important milestones in modelling Wastewater Treatment Plants (WWTP) are the derivation of Monod nonlinear equation for biomass growth and consumption of substrate [2], the setting of unified Activated Sludge Models (ASM) for degradation of organic matter, nitrogen and phosphorus [3], and the construction of generic Anaerobic Digester Model (ADM1) [4].Models are also available for other process modifications, e.g.sequencing batch reactor [5], fixed biomass processes [6], membrane reactors [7], etc.The design of models and simulation are supported by dedicated software tools.Examples of some more recognised platforms for dynamic simulation of WWTP are for example ASIM, AQUASIM, BioWin, GPS-X, SIMBA, STOAT, WEST, etc. Models are also used within benchmark simulation models to objectively evaluate the performance of control strategies by simulation at the level of the activated sludge unit (BSM1) or at the plant-wide level (BSM2) [8].Dynamic Modelling is coupled with Life Cycle Assessment (DM-LCA) to evaluate new alternatives in wastewater treatment plants for energy efficient operation, indicating the importance of dynamic modelling versus steady-state approach [9].Models for predicting the fate of micro-pollutants in WWTP have been developed to evaluate their removal [10] and impact on the receiving waters [11].
Besides this scientific development, the use of models is also spreading from academia to practice.One of the application areas is the use of models in optimisation and troubleshooting of real wastewater treatment plants.A recent book on applications of activated sludge models [12] encompasses a number of case studies, where models were developed and applied in real-world applications for optimization of nitrogen and phosphorous removal processes, plant hydraulics evaluation, effluent quality optimization, plant wide modelling and cost-effective design and reconstruction of wastewater treatment infrastructure.A membrane bioreactor's case-study performed in [13] confirmed significant improvements on the nitrogen removal efficiency as well as energy reduction that was gained through a model-based approach.Mathematical simulations and additional laboratory tests were used in the study of WWTP with co-precipitation [14] to determine favourable process operating conditions (sludge retention time, dissolved oxygen concentration, effluent nitrate) that enable to achieve the required effluent standards.Shortcomings in model performance due to poor quality of full-scale treatment data can be reduced by efficient data evaluation and reconciliation techniques using mass balances [15].The complex model calibration procedure can be tackled more efficiently by parameter sensitivity analysis and step-wise Monte Carlo-based calibration of the subset of influential parameters [16].
The process of model building is becoming more developed and standardized.In the literature, several practical protocols for modelling wastewater treatment plants can be found that define the steps in model building, i.e., BIOMATH, HSG, STOWA and WERF.A SWOT analysis [17] of these protocols revealed that they have many similarities (e.g, definition of goal that determines the calibration procedure; data collection, verification and reconciliation is considered as very significant; validation is required under different operating conditions than those used for model calibration) as well as differences (design of measurement campaign; experimental methods for influent characterisation and kinetic/stoichiometric parameter estimation; calibration of the model parameters).Recently, the International Water Association (IWA) Task Group on Good Modelling Practice has reviewed the modelling approaches and published a report [18] proposing a unified protocol and guidelines for modelling projects that include the following steps: This paper presents two case studies where models were used for upgrading the two largest WWTP in Slovenia, i.e., Ljubljana WWTP and Domžale-Kamnik WWTP.In both case studies, the existing technological processes facilitate the removal of organic matter and nitrification, while a complete denitrification and phosphorus removal will be possible only after the plants upgrading.For the plants upgrading, a preliminary design of technological solutions was prepared by consulting companies.In addition, the proposed technological solutions for upgrading were also examined by the mathematical process models and simulation as presented in this paper to reveal any potential bottlenecks in plant designs.Simulations of the upgraded Ljubljana WWTP were based on first designing the dynamic model of the existing plant and then including new processes for plant upgrading.Domžale-Kamnik WWTP will be upgraded with a new biological stage using Sequencing Batch Reactor (SBR) technology and was thus simulated with an SBR model.In both cases, simulations were performed with GPS-X simulation software [19].
A measured long-term real-plant influent data was used in dynamic simulations and adjusted for the expected increase of input load.The plant performance was evaluated with regard to compliance with the target effluent concentrations as required by legislation.
This paper adds to the existing literature in the field of WWTP modelling and simulation by presenting two additional real world case studies.As mentioned in several recent publications related to WWTP modelling (e.g., [1] and [12]), "the development of standardized modelling procedures and better knowledge transfer by making available some practical case studies" are considered as "key instruments to address certain obstacles like the complexity of the model procedures, the time consuming steps and the reliability of the models".In this paper the procedure of model design is demonstrated, long-term performance of models compared to real plant operation data is evaluated, and potential improvement of plant designs based on simulation models is demonstrated.

Ljubljana WWTP case study
The existing treatment facilities at Ljubljana WWTP consist of mechanical treatment (screens, grit and grease chamber), biological stage with suspended biomass activated sludge process (three parallel aerobic reactors and four parallel secondary settlers) and sludge treatment (anaerobic digestion and sludge drying).The plant is currently operated at 435,000 PE.It efficiently removes carbon and achieves nitrification, but lacks denitrification and P-removal.
The preliminary design for the upgraded plant as prepared by a consulting company defined suitable technological solutions for the expected increase of future input load, efficient removal of N and P components, as well as for the reception and treatment of sludge from other WWTP.To simulate the upgraded plant performance the model was designed in two stages.First, a model of the existing plant was developed since the upgraded plant will rely on current plant configuration.Simulations of the existing plant operation enable to assess the model quality, especially the appropriateness of input wastewater characterization and replication of operating conditions.Second, the model was supplemented with the proposed technological solutions for the plant upgrading and simulated at increased input load.

Simulation model of the existing Ljubljana WWTP
The model was designed in CNP library in GPS-X [19], thus considering the removal of organics, N and P components.The design of the model for the current configuration included the following: • Collection of long-term regular data and additional measurements for the model design; • Selection of modelled objects; • Determination of physical parameters and plant operating parameters; • Influent wastewater characterization and adjustment of model parameters; • Simulation and model evaluation.
Figure 1 shows configuration of Ljubljana WWTP water line with indicated locations where measurements for the purpose of model design were performed.Measurements included regular daily laboratory measurements, on-line measurements, as well as estimated process variables from sample measurements.In addition, an intensive 5-day measurements were performed specifically for influent wastewater characterization.
Following the scheme in Figure 1, the designed simulation model included the following objects: • Influent wastewater from the sewer modelled with "Chemical Oxygen Demand (COD) fractions model" [19]; • Reject water from the sludge treatment line (filtrate from a filter press, centrate from centrifuge, condensate from sludge drying) also modelled with "COD fractions model"; • Grit chamber modelled with "empiric model" [19]; • Aeration tanks modelled as a plug-flow reactor with four tanks using "ASM2d" model for biological reactions [3]; • Secondary clarifier with a "simple1d" model, i.e., 1-dimensional settler model without biological reactions [19].For each object the corresponding physical parameters (tank volume, tank surface, water depth, etc.) and operational parameters were determined.Airflow to aerobic reactors was determined by controlling Dissolved Oxygen (DO) concentration in aerobic tanks at measured values.Return sludge flow was set to low or high value, depending on the inflow as in real plant operation.Excess sludge flow was determined by controlling Mixed Liquor Suspended Solids (MLSS) after aeration tanks at measured values (junction 13 in Figure 1).The performance of the model was improved by more precise influent wastewater characterization and adjustment of model parameters as presented in Table 1.Influent characterization was performed according to STOWA protocol [20] for low loaded WWTP using measurements in intensive 5-day measurement campaign.The estimated fbod and ivt values were higher than the pre-set values in GPS-X, but did not give satisfactory performancetherefore default values were used.Based on parameter sensitivity analysis performed in [6], the three most sensitive model parameters (YA, YH and µmax,A) were adjusted in "ASM2d" model to obtain a better fit.

Simulation model of upgraded Ljubljana WWTP
The validated model of the existing plant was in the second stage upgraded to future configuration as planned in the preliminary design to enhance complete N and P removal.The main changes in water line of the upgraded plant are the inclusion of primary settler and the change of biological stage for denitrification and biological P removal.The simulated layout of upgraded configuration is shown in Figure 2. In the upgraded plant, each of the existing plug-flow aeration tanks in the three parallel lines of the biological stage will be transformed into four consecutive tanks, accounting for 26%, 18%, 34% and 22% of the total aerobic reactor volume, respectively.As shown in Figure 3, the plant will operate in two different configurations, depending on the wastewater temperature.BioP-DN configuration operates at high temperatures and enables biological P removal, nitrification and denitrification.DN configuration operates at low temperatures and enables only nitrification and denitrification.Operation in these two configurations requires the change of the first two zones and the change of the internal recirculation flow.In both cases the still remaining P after the biological stage is removed by the chemical precipitation.To achieve the necessary biological activity after upgrading within the existing plant volumes, the biological stage is planned to operate at increased MLSS concentrations.Final cloth filtration will be included to control the effluent Total Suspended Solids (TSS) below the limit value, but was not simulated in our study.

Domžale-Kamnik WWTP case study
Domžale-Kamnik WWTP was designed for carbon and ammonia nitrogen removal for 200,000 PE.Currently it is treating municipal and industrial wastewater in a conventional mechanical -two stage biological system with anaerobic digestion and biogas utilisation in biogas engines.The plant is considered for upgrading for tertiary treatment to efficiently remove also N and P compounds, and thus comply with stricter legislation requirements.The purpose of this simulation study was to verify (by simulation) whether effluent concentrations below the prescribed limits could be reached.

SBR preliminary design
Preliminary design for the upgrading of Domžale-Kamnik WWTP considers changes of the biological stage, while mechanical treatment and sludge treatment will not be changed and are thus not considered.The biological stage will be upgraded with the Cyclic Activated Sludge Technology (C-TECH) [21], which is an advancement of Sequencing Batch Reactor (SBR) technology.
The proposed plant configuration consists of four equal reactors.Each reactor is divided into two parts.The first part with 10% of the total reactor volume has selectors that provide anoxic and anaerobic treatment conditions.Reactor operates with a recycle leading from the second to the first part of the reactor.The flow of the sludge recycle is approximately 30% of the inflow in dry weather conditions.
Each reactor operates with a four-hour cycle that includes three phases as shown in Figure 4, i.e., filling and aeration, settling, decanting [21].In the first phase, which lasts for two hours, the reactor is filled in through selectors, while the rest of the reactor is aerated.Following is a one-hour settling phase with waste sludge pumping at the end of the phase.The cycle ends with a one-hour decanting phase.The operating cycles in the four reactors are mutually shifted for one hour, meaning that two reactors are always in the filling phase, while one reactor is always in the decanting phase.

SBR simulation model
The simulation model of SBR preliminary design for Domžale-Kamnik WWTP was designed in GPS-X [19].The model was designed in CN library that takes into account organic and N components, while P components are not considered.
SBR influent was represented with "COD fractions" model.Parameters for influent wastewater characterisation were determined in previous studies [22] and are shown in Table 2. Major adjustment was required for icv parameter to obtain influent TSS values as measured on the plant.The SBR reactors were modelled with "Advanced SBR" blocks with Mantis model [19] for biological reactions and double exponential function for settling velocity of suspended solids.The model parameters values were kept at pre-set values in GPS-X.In this case, a more detailed model calibration could not be performed since the biological stage will be changed from conventional activated sludge process (currently in operation) to SBR, so additional plant measurements for fine SBR model tuning are not at disposal yet.
To model time delays in the operating schedule among the reactors, as well as time delay of methanol addition, the "Timer Based Splitter" blocks were used.For combining the inflow and methanol addition, and for combining the flow from several reactors, the "Combiner" blocks were used.The simulation scheme of SBR plant in GPS-X is shown in Figure 5.
In modelling SBR reactors the selectors and the recycle sludge from the second to the first part of the reactor were not considered since such a model was not available.It was also assumed that the selectors and the recycle sludge mainly affect the quality of the sludge and prevent sludge washout, while they do not affect the effluent quality significantly.
Filling and decanting of reactors was carried out in such a way that simultaneously two reactors are filled with half of the influent flow, while a single reactor is decanting with a constant flow equal to the prescribed maximum influent flow.The lowest water height thus achieved in the reactor equals the prescribed minimum water level.In simulations this is achieved by a control function that prevents lowering the water level below the prescribed height.
The aeration control of reactors was performed with PI controllers controlling DO concentrations in the reactors at a constant reference value.Reactors are aerated only in the filling and aeration phase.
Waste sludge control in the settling phase was performed with PI controllers implemented with "Modelling Toolbox" blocks.The controller controls daily average TSS concentration at the reactor surface at a reference value by adjusting the waste sludge flow.Removal of waste sludge from the reactor is performed only during the last 20 minutes of the settling phase.
During the first half of the filling and aeration phase methanol could be added in the reactor.

Validation of Ljubljana WWTP simulation model
For Ljubljana WWTP, the simulation model of the current plant configuration was first evaluated.The plant was simulated at a total aerobic reactors volume of 39,000 m 3 and total secondary settlers volume of 24,000 m 3 .Simulations were performed on a one-year measured data of Ljubljana WWTP operation.Dynamic simulations with daily average values were performed.Dynamic inputs to the model were measured daily average values of wastewater temperature, inflow, total COD, Total Kjeldahl Nitrogen (TKN), Ammonia nitrogen (NH4-N), Total Phosphorous (TP) and soluble Ortho-phosphate (PO4-P) (estimated as 32% of TP).
In the simulated period the average daily was around 82,500 m 3 /d, average DO concentration in aerobic tanks around 1.5 mg/l, and MLSS concentration after aeration tanks around 3,000 mg/l.The DO concentration in the initial part of the aeration tank (i.e. in the first tank of the plug-flow reactor) was in simulations lowered to 0.5 mg/l to obtain partial denitrification and agreement between modelled and measured effluent Nitrate (NO3-N) and Total Nitrogen (TN) concentrations.Simulations also revealed significant contribution of reject water to input load.During the periods of sludge drying, around 20% of TN and TP input load comes in reject water from the sludge line because of high NH4-N and PO4-P concentrations in centrate.
The performance of the model was evaluated by comparing the measured and modelled data at different plant locations (inlet, after mechanical treatment, aeration tanks outlet, effluent).As an example, Figure 6 shows the quality of the model compared to process measurements for effluent N and P compounds.It can be seen that effluent TN and TP concentrations are well predicted.Some greater deviations between the model and the measurements appear in NH4-N.NH4-N increases in winter conditions (days 230 to 350) because of lower temperatures, which is also well predicted by the model.On the other hand, individual NH4-N peaks could not be reached completely despite the change of model parameters.One of the main reasons for this is that NH4-N peaks very often appear because of the change of operating conditions that are not recorded in daily operation and are thus not simulated.Such conditions are for example unequal flow distribution between the parallel lines, appearance of sludge bulking, insufficient oxygen supply, etc. Difficulties in NH4-N model performance are often reported in the literature, indicating that potential problem of poor model performance is also the model structure.For example, in [23] it was reported that model performance was improved by a better description of the model for the calculation of the oxygen transfer from airflow rates.In our case further adjustment of model structure was not performed.It was assumed that the achieved model performance was sufficient for the purpose of plant upgrading.

Simulation of upgraded Ljubljana WWTP performance
In the second stage, the upgraded Ljubljana WWTP was simulated.The WWTP Ljubljana input load after upgrading is expected to increase from 435,000 PE to 555,000 PE.The dry weather influent flow is projected to increase to 106,800 m 3 /d.The maximum wet weather flow to be treated in the plant is 8,000 m 3 /h.The expected input load of the upgraded plant is shown in Table 3. Simulations of the upgraded plant operation were performed by increasing the inflow for 30%, while wastewater characterisation and influent concentrations were the same as in the existing plant simulations.The average inflow thus obtained in one-year plant operation was 110,519 m 3 /d, while input load was 33.6 t BOD/d, 62.6 t COD/d, 5.5 t N/d, 1.07 t P/d and 33.8 t TSS/d for the BOD5, COD, TN, TP and TSS, respectively.Comparison with predicted input load in the preliminary design (Table 3) shows that for TN and TP the load in simulations is higher than in preliminary, since it takes into account also the load from reject water.It was also assumed that because of the inclusion of primary clarifier and the increased influent PE, the amount of sludge digested will increase, imposing also higher amounts of reject water from sludge line to water line.Highly concentrated reject water is returned to water line in the periods of sludge drying and centrifuge operation.These periods currently amount for approximately 64% of total time.Increased amount of sludge will require almost constant sludge drying and centrifuge operation, and therefore also constant return of highly concentrated reject water to water line.
The upgraded plant was simulated at increased MLSS concentration of 4,500 mg/l in the biological stage.The external recycle flow was simulated as 1.6 times influent flow, while internal recycle flow was 4 times influent flow.
With the simulation model of the upgraded plant three different operation scenarios were considered: • Plant operated in BioP-DN configuration; • Plant operated in DN configuration; • Plant operated in both configurations, depending on the temperature.Simulations have shown that in all three cases the effluent COD, BOD5 and TSS are almost the same and below the required limit values as given in Table 4.In simulations, the increase of effluent TSS because of higher TSS values in aerobic reactors (4,500 mg/l) was not noticed, which was most probably due to a limited capability of the settler model prediction.Effluent TN and TP concentrations depend on the simulated configuration as shown in Figure 7. DN configuration gives high TP effluent concentrations, while BioP-DN configuration gives high TN and NH4-N concentrations at low temperatures.A combination of both (third simulation) gives satisfactory plant performance.NH4-N, TN and TP are 99.5%, 90.5% and 65.5% of time below the limit values, respectively.The surplus TP concentrations are eliminated by chemical precipitation.Simulations confirm satisfactory plant performance after upgrading, but also pointed out some potential bottlenecks: • Significant contribution of reject water to input load, which will even increase after upgrading because of larger sludge production.This adds an additional input load to the one predicted from the increase of influent PE; • Slightly higher temperature for switching between the configurations (around 18 °C) compared to expected 15 °C in the preliminary design.This implies a shorter annual period when the plant could operate with biological P removal; • Limited denitrification capacity of BioP-DN configuration.As seen in the first diagram in Figure 7, the average effluent TN concentration in BioP-DN configuration (days 25-175) is higher than in DN configuration (days 175 to 390), and is very close to the limit value.In this period, the 85 th percentile of data exceeds the limit value of 10 mg/l.The reason for this is the course of the internal recycle leading from the penultimate nitrification tank, and thus not returning into denitrification zone the NO3-N generated in the last nitrification tank.The proposed measures to improve this performance are: o Improved denitrification by tighter NO3-N control; o The change of the internal recycle from 4 th to 2 nd tank in BioP-DN configuration; o Or additional reject water treatment, e.g., by deammonification.

SBR simulation tests at total volume of 19,000 m 3
For the Domžale-Kamnik WWTP, the upgraded plant configuration with SBR was designed for an average daily inflow of 25,000 m 3 /d and maximum dry weather influent flow of 1,500 m 3 /h (36,000 m 3 /d).The maximum hourly flow that can be treated in the plant is 1,644 m 3 /h (39,456 m 3 /d).Any flow higher than that overflows to the plant discharge.The maximum values of the influent to be treated in SBR (after the mechanical stage) are shown in Table 5. Operation of Domžale-Kamnik upgraded plant was first simulated for the total SBR volume of 19,000 m 3 as planned in the preliminary design.The height of the reactors was 5.5 m, while the lowest water level in the reactors was predicted as 4.13 m.In simulations the influent daily average values were used as measured at the Domžale-Kamnik WWTP after the mechanical stage.Only the days with no major failure of sensors were included.In total 316 days of operation were collected with the following measurements: wastewater temperature, flow, COD, TKN and NH4-N.The measured average flow at the plant (around 19,200 m 3 /d) was lower than that used in preliminary design (25,000 m 3 /d).Therefore the inflow was increased by about 30%.The input load thus obtained was still slightly lower than the planned one in Table 5.
Because of the increase of influent flow, the minimum water level in the reactor was lowered from 4.13 m to 3.7 m.In this way the plant is able to treat larger amount of wastewater without overflow.SBR plant operation was simulated for three different waste flows, i.e. 500 m 3 /d, 900 m 3 /d and 1,000 m 3 /d, to potentially obtain better plant performance at higher biomass concentrations.In the filling and aeration phase the set point for dissolved oxygen concentration of PI controllers was set to 2 mg/l.During the filling phase, the methanol was added in the reactor with the flow of 30 l/h.Methanol was added as an external carbon source to complete the denitrification and thus not limit total nitrogen removal because of low denitrification rate.The obtained simulation results for the effluent are shown in Figure 8.
From the figure it can be seen that effluent TN and NH4-N concentrations exceed the limit values of 10 mg/l and 5 mg/l for tertiary treatment, respectively, as also given in Table 4.At high waste sludge flow, the amount of sludge in the reactors is lower, resulting in high effluent NH4-N concentrations.On the other hand, at low waste sludge flow, the effluent TN and TSS concentrations are too high.Hence it was concluded that for the efficient SBR operation it was necessary to use larger reactor volumes.

SBR simulation tests at total volume of 26,400 m 3
The operation of SBR was simulated also at increased total reactor volume of 26,400 m 3 as proposed in the revised preliminary design.For the inflow new measurements from the real plant operation were collected.Again, average daily measurements were taken after the mechanical stage for 365 days of plant operation.For the missing data, the annual average measured values were used.The influent flow was also in this case, lower than that used in the preliminary design.Therefore the inflow was increased for 27% to reach the design daily average flow of 25,000 m 3 /d.Also in this case, the input load was still slightly lower than the one planned in Table 5.
The set point for the DO concentration of PI controllers was set to 2 mg/l.The set point for the average daily TSS concentration at the reactor surface was set to 2,750 mg/l to adjust the waste sludge flow by PI controller.Methanol was not added in this case.
Simulated effluent SBR concentrations are shown in Figure 9.For the effluent parameters with the legislation limit values also the percentages of time below the limit values were calculated.They are given in Table 6.Simulation results show that with the increased reactor volume of 26,400 m 3 , the average daily COD, TSS in NH4-N concentrations meet the legislation limits in more than 80% of time during one year of plant operation.BOD5 and TN are below the limits approximately 80% of time.Effluent BOD5 exceeds the limit value especially because of the high soluble biodegradable matter in the effluent, while TN exceeds the limit value because of high values of NO3-N and soluble organic nitrogen.The average concentration of soluble organic nitrogen in the effluent is around 4 mg/l.

CONCLUSIONS
This paper presents simulation models that were designed for Ljubljana WWTP and Domžale-Kamnik WWTP for the purpose of plants upgrading for tertiary treatment.The future plant configurations were simulated for expected increase of input load.In simulations the upgraded plant treatment efficiency and compliance with new stricter legislation requirements for tertiary treatment were verified.
For the Ljubljana WWTP the simulation results have not revealed any significant problems or deviations from the results expected in the preliminary design.The simulations did show, however, that at some operating conditions the plant is operated close to limit conditions.The most challenging is to achieve TN concentrations below the limit value during biological P removal.In this case, the plant has lower denitrification potential due to the course of internal recirculation flow.These operating conditions could be enhanced by different measures, e.g. the change of recirculation flow, improved control of operating parameters, or introduction of additional processes (e.g.ammonification) to treat reject water from sludge treatment.
Simulation tests of Domžale-Kamnik WWTP operation after upgrading have shown that larger total volume of SBR reactors than initially designed, i.e. in total 26,400 m 3 , is required to achieve average effluent concentrations below the permitted limit values at least 80% of time, which is required by legislation.Hence, with larger total reactor volume satisfactory treatment performance and compliance with legislation requirements is obtained even if influent load is increased for up to 30% compared to present load.The most demanding is the achievement of effluent TN and BOD5 concentrations.Higher effluent TN concentrations are due to the higher effluent NO3-N and soluble organic nitrogen concentrations, while higher BOD5 concentrations are due to the soluble biodegradable organic matter present in the effluent.
Besides obvious advantages of using the models for plant upgrading, the models have shown also some weaknesses in predicting some events that are well known for process experts.The two most notable weaknesses of the models are the prediction of higher plant nitrification potential than usually obtained at the real plant, and simplified modelling of the settler, which does not give reliable results for TSS concentrations in the effluent.In both cases the weaknesses need to be overcome by the improvement of the state-of-the-art WWTP models.

•
Project definition; • Data collection and reconciliation; • Plant model set-up; • Calibration and validation; • Simulation and result interpretation.

Figure 1 .
Figure 1.The scheme of Ljubljana WWTP water line with indicated locations of measurements for the purpose of model identification and validation

Figure 2 .
Figure 2. Simulation scheme (water line) of upgraded Ljubljana WWTP in GPS-X

Figure 3 .
Figure 3. Biological stage in the upgraded plant with four tanks operated as BioP-DN or DN configuration

Figure 6 .
Figure 6.Validation of the designed plant model for existing plant configuration at Ljubljana WWTP: effluent N and P concentrations for one year of plant operation

Figure 7 .
Figure 7. Upgraded Ljubljana WWTP operation with effluent concentrations in three different configurations: (1) DN, (2) BioP-DN, (3) switching between DN and BioP-DN, depending on the wastewater temperature.Top three diagrams show effluent TN, NH4-N and TP, respectively.Bottom two diagrams show simulated wastewater temperature (for all cases), and the switching between DN and BioP-DN for the third simulation case, respectively

Figure 8 .
Figure 8. SBR effluent concentrations at increased influent flow and total volume of 19,000 m 3 .Simulations for different values of waste sludge flow: 1,000 m 3 /d (blue), 900 m 3 /d (red) and 500 m 3 /d (green).From top to bottom: soluble COD, TN, NH4-N and NO3-N

Figure 9 .
Figure 9. SBR effluent concentrations at increased influent flow and total volume of 26,400 m 3 .The red lines represent the legislation limit values

Table 1 .
Influent wastewater characterization and adjustment of model parameters for Ljubljana WWTP * Pre-set values for influent characterization for raw wastewater

Table 2 .
Influent wastewater characterization for Domžale-Kamnik WWTP * Pre-set values for influent characterization for wastewater after primary treatment

Table 3 .
Input load for Ljubljana WWTP upgrading as predicted in the preliminary design

Table 4 .
Effluent limit values for tertiary treatment * At wastewater temperature ≥ 12 °C

Table 5 .
Preliminary design for Domžale-Kamnik WWTP upgrade: maximum input load after mechanical treatment to be treated in SBR plant

Table 6 .
Simulated performance of Domžele-Kamnik WWTP after upgrading when increasing the total volume to 26,400 m3