## Abstract

A modelling study is under way in preparation for a planned upgrade of the capacity of the kwaMashu WWTP in eThekwini, South Africa, from 50 to 80 ML/d. When the configuration of an existing plant is to be changed, the most critical part of the model calibration is the influent wastewater fractionation. However, the constantly varying characteristics of wastewater make experimental determination of an adequately representative set of components difficult, time-consuming and expensive, which constitutes significant barriers to the adoption of modelling by many municipalities. Compliance and process monitoring generate large sets of influent measurements of chemical oxygen demand (COD), free and saline ammonia (FSA), total suspended solids (TSS), etc., but these are insufficient for modelling purposes. In particular, biodegradability is not routinely measured. However, since influent fractionation is designed to predict the fate of material in the wastewater treatment process, it should be possible to infer the fractionation from a combination of influent and plant measurements. This case study demonstrates the application of a pair of modelling tools, a probabilistic influent fractionator and a simplified steady‑state plant‑wide model, to estimate the influent fractionation, together with certain unmeasured or unreliable operational parameters.

## HIGHLIGHTS

Estimation of influent COD fractionation from routine plant measurements.

Data reconciliation using a simplified steady-state plant-wide model.

Estimation of unmeasured or unreliable operational parameters.

Methodology for improving a plant monitoring programme.

### Graphical Abstract

## ACRONYMS

- AD
Anaerobic digester

- ADM1
Anaerobic Digester Model No. 1

- AS
Activated sludge

- BOD
Biological oxygen demand

- COD
Chemical oxygen demand

- DAF
Dissolved air flotation

- FSA
Free and saline ammonia

- IS
Inorganic solids

- ISS
Inorganic suspended solids

- MLE
Modified Ludzack-Ettinger

- MLSS
Mixed liquor suspended solids

- OHO
Ordinary heterotrophic organism

- Ortho P
Orthophosphate

- PST
Primary settling tank

- PWM_SA
Plant-wide model – South Africa

- RAS
Return activated sludge

- SNL
Supernatant liquor from the secondary digester

- SRT
Sludge retention time

- SSE
Sum of squared errors

- SST
Secondary settling tank

- TKN
Total Kjeldahl nitrogen

- TP
Total phosphorus

- TS
Total solids

- TSS
Total suspended solids

- UCTADM1
University of Cape Town Anaerobic Digester Model No. 1

- VFA
Volatile fatty acid

- VSS
Volatile suspended solids

- WAS
Waste activated sludge

- WWTP
Wastewater treatment plant

## SYMBOLS

- COD
_{f}Filtered COD

- COD
_{up}Unbiodegradable particulate COD

- COD
_{us}Unbiodegradable soluble COD

- C
_{x}H_{y}O_{z}N_{a}P_{b}Stoichiometric formula for a generic organic compound

- f
_{codf}Soluble (filtered) fraction of influent COD

- f
_{codup}Unbiodegradable particulate fraction of influent COD

- f
_{codus}Unbiodegradable soluble fraction of influent COD

- f
_{cv,i}COD to VSS ratio of component i

- f
_{fsa}FSA fraction of TKN

- f
_{iss}Influent ISS to TSS ratio

- f
_{n}Nitrogen content per gram organic

- f
_{ns,codup}Fraction of influent unbiodegradable particulates in the settled sewage

- f
_{ns,iss}Fraction of influent ISS in the settled sewage

- f
_{nsPST}Fraction of influent TSS in the settled sewage

- f
_{OHO}OHO fraction of influent COD

- f
_{p}Phosphorus content per gram organic

- f
_{tknf}Soluble fraction of TKN

- f
_{tpf}Soluble fraction of TP

- f
_{tss}Influent TSS to COD ratio

- f
_{vfa}VFA fraction of influent COD

**H**Hessian matrix

- N
_{p}No. of fitting parameters

- N
_{d}Number of measured data points

**P**Vector of fitting parameters

- R
_{AD}Hydraulic retention time of the anaerobic digesters

- S
_{F}Soluble fermentable organics

- S
_{NH}Ammonium

- S
_{PO4}Phosphate

- S
_{U}Soluble unbiodegradable organics

- S
_{VFA}Volatile fatty acids

- TKN
_{f}Filtered TKN

- TP
_{f}Filtered TP

- V
_{AD}Anaerobic digester volume

- V
_{AS}Activated sludge reactor volume

- X
_{BInf}Biodegradable particulate influent organics

- X
_{ISS}Inorganic suspended solids

- X
_{OHO}Ordinary heterotrophic organisms

- X
_{UInf}Unbiodegradable particulate influent organics

**σ**Covariance matrix

## INTRODUCTION

When the configuration of an existing plant is to be changed, the most critical part of the model calibration is the influent wastewater fractionation. Furthermore, due to the complexity of the systems involved, model calibration protocols, for example, Reiger *et al.* (2012), typically involve the sequential calibration of the various subsystems starting with the influent characterization. As a result, errors in the influent characterization are propagated through the other calibration steps (Grau *et al.* 2007).

_{F}and volatile fatty acids S

_{VFA}) and unbiodegradable (S

_{U}) organic components, particulate biodegradable (X

_{BInf}) and unbiodegradable organic components (X

_{UInf}) and an inorganic particulate component (X

_{ISS}). Figure 1 illustrates the fractionation of the influent COD and TSS in the PWM_SA model (Ikumi

*et al.*2015) used in this study. PWM_SA (Plant-wide model – South Africa) includes a component for ordinary heterotrophic organisms (X

_{OHO}) in the influent fractionation; however, in practice, it cannot be distinguished from X

_{BInf}, so the two components were lumped together for the purposes of this study.

The constantly varying characteristics of wastewater make experimental determination of an adequately representative set of components, using protocols such as those recommended by the IWA Guidelines (Reiger *et al.* 2012), difficult, time-consuming and expensive, which constitutes significant barriers to the adoption of modelling by many municipalities. Biodegradable organic fractions in raw and settled sewage are typically determined via biological oxygen demand (BOD) measurements (Hulsbeek *et al.* 2002) or respirometric methods (Vanrolleghem 2002). Both of these methods take days to get results for a single sample, and many municipalities simply do not have the equipment or experienced personnel to undertake these types of characterization studies. Furthermore, translating laboratory results to full scale WWTP plants can be quite challenging due to important differences between the two types of systems (Sin *et al.* 2005).

*probabilistic fractionator*tool that we have developed (Brouckaert

*et al.*2016) has proved effective for certain modelling purposes. This combines routine measurements with estimates based on literature and plant experience to determine a probable composition expressed in terms of model components. The probabilistic fractionator, which is included in the PWM_SA model implemented in WEST (Mike powered by DHI 2021), is similar in concept to the over-parametrized influent characterization methodology developed by Grau

*et al.*(2007) but includes only the components required for the PWM_SA model as well as a simpler fitting procedure. Figure 2 illustrates the fractionation of influent wastewater measurements into PWM_SA model components for a plant where routine measurements of influent COD, TSS, FSA, orthophosphate, effluent COD and TSS are available. Note that the probabilistic fractionator can be customized to accommodate whatever set of measurements are available and estimate whichever measurements are missing.

With the exception of the soluble unbiodegradable fraction of the influent (f_{codus}), which is typically assumed to equal the soluble COD in the secondary effluent (Ekama & Wentzel 2008), the probabilistic fractionator has no way of distinguishing biodegradable and unbiodegradable fractions. Therefore, the influent COD fractionation parameters (f_{codf}, f_{codp}, f_{vfa}) are usually best guesses based on the available literature.

In the PWM_SA model (Ekama 2009; Ikumi *et al.* 2015), each of the organic components is assigned an elemental composition C_{x}H_{y}O_{z}N_{a}P_{b}, from which other important component properties can be calculated, including its COD to VSS ratio (f_{cv}), and nitrogen and phosphorus content per gram (f_{n} and f_{p}). The biodegradable influent particulate component X_{BInf} is assumed to represent a mixture of proteins, carbohydrates and lipids. These are separate components in some other models, e.g. Anaerobic Digestion Model No1 (ADM1) (Batstone *et al.* 2002); however, since this type of characterization data is very seldom available, they are lumped together in the University of Cape Town Anaerobic Digestion Model No 1 (UCTADM1) (Sötemann *et al.* 2005), which is used to represent anaerobic digestion in PWM_SA. However, the ratio of proteins, carbohydrates and lipids in raw sewage depends on the diet of the population, how much food waste is entering the sewer, and the impact of industrial and commercial wastewater contributions. Therefore, the average composition of the biodegradable particulate fraction may vary significantly between different treatment works. Table 1 shows the elemental compositions for the X_{BInf} model component for various implementations of the plant-wide model compared with ADM1 components for proteins, carbohydrates and lipids (Batstone *et al.* 2002). The listed compositions were all experimentally determined at some point, but it is often not clear which plants the samples they are based on came from and how representative they are of conditions in other plants.

. | Wu (2015) . | Ikumi (2011) Table 8.2 . | WEST PWM_SA Default . | Gaszynski (2021) . | Flores-Alsina et al. (2019) . | |||
---|---|---|---|---|---|---|---|---|

X_{BInf}
. | Protein . | Carbohydrate . | Lipid . | |||||

f_{n} | 0.035 | 0.03 | 0.035 | 0.03–0.05 | 0.06 | 0.15 | 0 | 0 |

f_{p} | 0.005 | 0.01 | 0.012 | 0.001–0.004 | 0.01 | 0 | 0 | 0.03 |

f_{cv} | 1.52 | 1.47 | 1.478 | 1.49–1.52 | 1.79 | 1.35 | 1.07 | 2.81 |

. | Wu (2015) . | Ikumi (2011) Table 8.2 . | WEST PWM_SA Default . | Gaszynski (2021) . | Flores-Alsina et al. (2019) . | |||
---|---|---|---|---|---|---|---|---|

X_{BInf}
. | Protein . | Carbohydrate . | Lipid . | |||||

f_{n} | 0.035 | 0.03 | 0.035 | 0.03–0.05 | 0.06 | 0.15 | 0 | 0 |

f_{p} | 0.005 | 0.01 | 0.012 | 0.001–0.004 | 0.01 | 0 | 0 | 0.03 |

f_{cv} | 1.52 | 1.47 | 1.478 | 1.49–1.52 | 1.79 | 1.35 | 1.07 | 2.81 |

Component compositions are fixed in the probabilistic fractionator, and errors in the composition of X_{BInf} will affect the fitting of the model components to the measured data. In the plant-wide model, the assumed composition of X_{BInf} also affects the predicted release of nutrients in the anaerobic digester, which has implications for nutrient removal.

In this study, we explore the possibility of extending the probabilistic fractionator by including routine process measurements with the routine influent measurements, and coupling the fractionator with a simplified plant-wide steady state model, so as to obtain a more accurate fractionation of the influent. This technique could make wastewater treatment modelling accessible to a wider range of municipalities.

## METHODS

### kwaMashu wastewater treatment works process description

The detailed plant layout is shown in Figure 3. After screening and de-gritting, raw sewage is pumped to two primary settling tanks (PSTs). The raw sludge from the PSTs is pumped to two gravity thickeners and the thickened primary sludge is then pumped to the two primary anaerobic digesters. The five-cell secondary digester separates the digested solids from the supernatant liquor (SNL) under gravity. The digested sludge is pumped to the dewatering plant while the SNL is pumped back to the head of works. The primary settler effluent (settled sewage) flows to a Modified Ludzack-Ettinger (MLE) activated sludge process consisting of a four-lane aeration unit followed by eight secondary settlers (SSTs). The secondary effluent is discharged to a series of three maturation ponds and the pond effluent is chlorinated prior to discharge to the Umhlangane River.

The waste activated sludge (WAS) is drawn from the return activated sludge (RAS line). The WAS is pumped to the DAF units for thickening. The DAF sludge is sent to the dewatering plant while the sub-natant flows back to the head of works.

The dewatering plant consists of eight screw presses with polymer dosing. The filtrate from dewatering is returned to the head of works while the dewatered sludge is supposed to be trucked to offsite disposal. However, during the study period, sludge was not being removed from the site on a regular basis due to problems with the disposal contracts and consequently, the operating staff were forced to reduce the sludge wasting rate. As a result, the plant was often being operated at sludge ages of greater than the 12 to 20 days the plant was designed for. Furthermore, since the wasting rate data had been lost when the data storage system was damaged, the actual SRTs during the study period were not known.

### Data collection

Routine monitoring data for 2018 were provided by eThekwini Water and Sanitation (EWS) from their laboratory information system and plant operating records. June and July were a period of little rain and relatively stable plant operation, so these data were selected for modelling. Table 2 shows the plant sampling schedule for the sampling points shown in Figure 3. Influent flowrate was the only measurement made every day. Additional plant operating data recorded by the SCADA system had been lost when the data storage system was damaged by power disruptions.

Sampling point . | MON . | TUE . | WED . | THU . | FRI . |
---|---|---|---|---|---|

Raw sewage S1 | pH, TSS, TS, NH_{3}, COD | – | TSS, NH_{3}, COD, PO_{4} | – | pH, TSS, NH_{3}, COD |

Settled sewage S2 | TSS, NH_{3}, COD | – | TSS, NH_{3} | – | sett solids, susp solids, NH3, COD |

Aerated basins S11–S13 | pH, TSS, NO_{2}, NO_{3}, NH_{3} | TSS | TSS, NO_{3}, NH_{3} | TSS | pH, TSS, NO_{2}, NO_{3}, NH_{3} |

Secondary effluent S20 | COD, TSS | COD, TSS | – | COD, TSS | – |

Digester feed S3 | %TS | %TS | %TS | %TS | %TS |

Primary digesters S4, S5 | – | %TS, NH_{3} | %TS | %TS | %TS |

Filter cake S22–S29 | %TS, %IS | %TS, %IS | %TS, %IS | %TS, %IS | %TS, %IS |

Sampling point . | MON . | TUE . | WED . | THU . | FRI . |
---|---|---|---|---|---|

Raw sewage S1 | pH, TSS, TS, NH_{3}, COD | – | TSS, NH_{3}, COD, PO_{4} | – | pH, TSS, NH_{3}, COD |

Settled sewage S2 | TSS, NH_{3}, COD | – | TSS, NH_{3} | – | sett solids, susp solids, NH3, COD |

Aerated basins S11–S13 | pH, TSS, NO_{2}, NO_{3}, NH_{3} | TSS | TSS, NO_{3}, NH_{3} | TSS | pH, TSS, NO_{2}, NO_{3}, NH_{3} |

Secondary effluent S20 | COD, TSS | COD, TSS | – | COD, TSS | – |

Digester feed S3 | %TS | %TS | %TS | %TS | %TS |

Primary digesters S4, S5 | – | %TS, NH_{3} | %TS | %TS | %TS |

Filter cake S22–S29 | %TS, %IS | %TS, %IS | %TS, %IS | %TS, %IS | %TS, %IS |

In addition to the data listed in Table 2, sludge cake production data was available as monthly totals.

### Simplified steady state model development

A simplified version of the plant-wide steady state model (Ekama 2009) was set up to track the organic and particulate components through the plant, from the raw sewage to the secondary effluent and sludge filter cake. The purpose of the model was threefold:

- (1)
To estimate the missing internal flows; specifically: the flow to the anaerobic digesters (ADs) and the waste activated sludge (WAS) flow, which determine the hydraulic retention (R

_{AD}) time of the ADs and the sludge retention time (SRT) of the activated sludge (AS) plant, respectively. - (2)
To estimate the biodegradable organic fractions of the influent based on the overall reduction in solids and COD.

- (3)
To estimate f

_{cv}and f_{n}of the biodegradable influent particulate component X_{BInf}.

The influent sub-model for the simplified steady state model includes only COD and particulate components, i.e. the components shown in Figure 1.

In the simplified steady state mode, the PST sub-model lumps together the primary settlers and primary sludge thickeners such that its outputs are the settled sewage and the feed to the anaerobic digesters. The PST sub-model parameters are f_{setsew}, f_{nsPST}, f_{ns,codup} and f_{ns,iss}, where (1 − f_{setsew}) is the flow to the anaerobic digesters as a fraction of the plant influent flow and determines the anaerobic digester hydraulic retention time (R_{AD}), while f_{nsPST}, f_{ns,codup} and f_{ns,iss} are the settled sewage TSS, X_{UInf} and ISS fluxes as a fraction of their corresponding fluxes in the influent.

*et al.*(2005). The simplified anaerobic digester model lumps together the primary and secondary digester models such that the output of the AD sub-model is the thickened digested sludge fed to the dewatering plant. The retention time (

*R*) of the anaerobic digester is calculated aswhere

_{AD} = digester volume, m^{3}

*Raw flow* = raw sewage flow to the primary settlers, m^{3}/d

where

*SRT* = sludge age, d

= activated sludge reactor volume, m^{3}

*MLSS* = mixed liquor suspended solids, kg/m^{3}

*Wasting rate* = DAF sludge solids flux fed to sludge dewatering, kg/d

*Effluent solids flux* = secondary effluent flux, kg/d

Note that is assumed that the impact of recycling the secondary digester supernatant, DAF underflow and dewatering plant filtrate on the flow and solids fluxes have a negligible effect on the overall flow and solids balances. Since the simplified steady state model does not include nutrient removal, the impacts of these internal recycles on the nitrogen and phosphorus fluxes are not considered.

### Model implementation, fitting and parameter identifiability

The simplified model and optimization were coded in R (R Project 2021). The standard R non-linear optimization routine *optim* was used for the parameter regression.

The plant measurements used in the fitting procedure and initial set of fitting parameters are listed in Table 3. Outliers in the raw measurements were removed using the interquartile range and fences method.

Fitted measurements . | Fitting parameters . |
---|---|

Raw COD flux Raw TSS flux Settled sewage COD flux Settled sewage TSS flux Secondary effluent COD flux Secondary effluent TSS flux Reactor MLSS Digester % TS Digester FSA Primary sludge % TS Dry sludge cake produced (as dry solids) Sludge cake % IS | Overall mass balance:Secondary effluent solids flux, Fitted raw COD |

Internal flows:Activated sludge wasting rate Flow split between AS and AD (f _{setsew}) | |

Influent fractionation:Influent COD/TSS ratio (f _{tss})Unbiodegradable soluble COD fraction (f _{codus})Soluble COD fraction (f _{codf})Unbiodegradable particulate COD fraction (f _{codup}) | |

Settled sewage fractionationFraction of influent solids in the settled sewage (f _{ns,PST})Fraction of influent ISS in the settled sewage (f _{ns,iss})Fraction of influent unbiodegradable particulate COD in the settled sewage (f _{nscodup}) | |

XBinf compositionBiodegradable influent particulate gCOD/g ( _{fcv,XBinf})Biodegradable influent particulate gN/g ( _{fn,XBinf}) |

Fitted measurements . | Fitting parameters . |
---|---|

Raw COD flux Raw TSS flux Settled sewage COD flux Settled sewage TSS flux Secondary effluent COD flux Secondary effluent TSS flux Reactor MLSS Digester % TS Digester FSA Primary sludge % TS Dry sludge cake produced (as dry solids) Sludge cake % IS | Overall mass balance:Secondary effluent solids flux, Fitted raw COD |

Internal flows:Activated sludge wasting rate Flow split between AS and AD (f _{setsew}) | |

Influent fractionation:Influent COD/TSS ratio (f _{tss})Unbiodegradable soluble COD fraction (f _{codus})Soluble COD fraction (f _{codf})Unbiodegradable particulate COD fraction (f _{codup}) | |

Settled sewage fractionationFraction of influent solids in the settled sewage (f _{ns,PST})Fraction of influent ISS in the settled sewage (f _{ns,iss})Fraction of influent unbiodegradable particulate COD in the settled sewage (f _{nscodup}) | |

XBinf compositionBiodegradable influent particulate gCOD/g ( _{fcv,XBinf})Biodegradable influent particulate gN/g ( _{fn,XBinf}) |

Some of the parameters listed in Table 3 can be estimated directly from the available raw plant data, using simple mass balances on individual treatment units where necessary, specifically, the fitted raw COD, secondary effluent solids flux, f_{setsew}, f_{tss}, f_{codus} and f_{ns,PST}. However, the results obtained this way may be subject to errors and systemic biases, e.g. due to data sparsity, how and when samples are collected and how averages are calculated. Furthermore, uncertainties increase when parameter values are interdependent. For the above mentioned parameters, the raw data was used to calculate the initial estimates and expected ranges. The initial estimates for the fitted raw COD and effluent solids flux were calculated as the average of the available measurements. The fraction of the raw flow going to the activated sludge plant (f_{setsew}) was estimated from a solids balance on the PST using the average raw and settled TSS and thickened primary sludge %TS. The initial estimate of f_{tss} was the ratio of the average measured raw COD and TSS. The initial estimate of the soluble unbiodegradable COD fraction (f_{codus}) was calculated from the average secondary effluent COD and TSS as described by Ekama & Wentzel (2008). The non-settlable influent solids fraction (f_{ns,PST}) was estimated as the ratio of the average measured settled sewage and raw TSS.

The upper and lower fitting bounds of the wasting rate corresponded to SRT values of 12–30 days. Initial estimates and ranges for the settled sewage fractionation parameters f_{ns,codup} and f_{ns,iss} were specified based on typical values of 0.2–0.3 and 0.1–0.2, respectively, reported by Wentzel *et al.* (2006). Initial estimates and bounds for the other fractionator parameters were selected based on values in Henze & Comeau (2008) and typical values for various South African wastewater treatments included in a plant-wide steady state design (PWSSD) tool developed by Wu (2015).

*wi**=* weight of measurement *i*

*x _{i,j}* = jth observation of measurement

*i*

*X _{i}* = predicted steady state value of measurement

To estimate the significance of the regressed parameters ** P**, the parameter covariance matrix was calculated from the inverse of the Hessian matrix

**at the optimum point where (Vanrolleghem**

*H**et al.*1995).

**is a measure of the local model sensitivity to the parameters at the optimum point, and is an output of the**

*H**optim*routine

*,*and , where

*N*is the number of measured data, and

_{d}*N*is the number of regressed parameters. The significance of parameter

_{p}*i*was expressed as its standard error : the ratio of its estimated standard deviation to its value. This approximate procedure implies linearizing the model in the vicinity of the optimum point.

## RESULTS AND DISCUSSION

The results of the parameter regression are summarized in Tables 4 and 5. Where a parameter was found to be identifiable in the analysis, the best-fit value is listed. Table 4 also shows the % change from the initial values calculated from the raw plant data.

Parameter . | Initial estimate . | Range . | Best estimate . | % adjustment . | Standard deviation . |
---|---|---|---|---|---|

Secondary effluent solids flux, kg/d | 730 | 464–1,158 | 738 | 1% | 36 |

Fitted raw COD, mgCOD/L | 830 | 753–908 | 850 | −2% | 43 |

(1 − f_{setsew}) | (1 − 0.993) | (1 − 0.97)–(1 − 0.995) | (1 − 0.994) | −1% | 0.00040 |

f_{tss} | 0.62 | 0.4–0.65 | 0.58 | −7% | 0.034 |

f_{codus} | 0.026 | 0.01–0.05 | 0.020 | −23% | 0.0034 |

f_{ns,PST} | 0.267 | 0.2–0.4 | 0.315 | 18% | 0.025 |

Parameter . | Initial estimate . | Range . | Best estimate . | % adjustment . | Standard deviation . |
---|---|---|---|---|---|

Secondary effluent solids flux, kg/d | 730 | 464–1,158 | 738 | 1% | 36 |

Fitted raw COD, mgCOD/L | 830 | 753–908 | 850 | −2% | 43 |

(1 − f_{setsew}) | (1 − 0.993) | (1 − 0.97)–(1 − 0.995) | (1 − 0.994) | −1% | 0.00040 |

f_{tss} | 0.62 | 0.4–0.65 | 0.58 | −7% | 0.034 |

f_{codus} | 0.026 | 0.01–0.05 | 0.020 | −23% | 0.0034 |

f_{ns,PST} | 0.267 | 0.2–0.4 | 0.315 | 18% | 0.025 |

Parameter . | Initial estimate . | Range . | Best estimate . | Standard deviation . |
---|---|---|---|---|

Activated sludge wasting rate, kg/d | 3,600 | 1,300–4,500 | 2,709 | 283 |

f_{codf} | 0.255 | 0.1–0.5 | – | – |

f_{codup} | 0.13 | 0.07–0.2 | 0.108 | 0.020 |

f_{ns,iss} | 0.03 | 0–0.3 | – | – |

f_{ns,codup} | 0.18 | 0.1–0.4 | – | – |

f_{cv,XBinf} | 1.5 | 1.47–1.79 | 1.54 | 0.11 |

f_{n,XBinf} | 0.035 | 0.03–0.05 | 0.033 | 0.0075 |

Parameter . | Initial estimate . | Range . | Best estimate . | Standard deviation . |
---|---|---|---|---|

Activated sludge wasting rate, kg/d | 3,600 | 1,300–4,500 | 2,709 | 283 |

f_{codf} | 0.255 | 0.1–0.5 | – | – |

f_{codup} | 0.13 | 0.07–0.2 | 0.108 | 0.020 |

f_{ns,iss} | 0.03 | 0–0.3 | – | – |

f_{ns,codup} | 0.18 | 0.1–0.4 | – | – |

f_{cv,XBinf} | 1.5 | 1.47–1.79 | 1.54 | 0.11 |

f_{n,XBinf} | 0.035 | 0.03–0.05 | 0.033 | 0.0075 |

It was possible to obtain best fit values for the wasting rate, flow and solids flux split between the anaerobic digesters and AS plant ((1 − f_{setsew}) and f_{ns,PST} in Table 4) and the X_{BInf} composition parameters (f_{cv,XBinf} and f_{n,XBinf} in Table 5). The best fit values for f_{cv,XBinf} and f_{n,XBinf} corresponded most closely to biodegradable particulate compositions reported by Gaszynski (2021) and these were used to estimate the X_{BInf} stoichiometry used in the probabilistic fractionator and WEST model. The SRT corresponding to the best fit wasting rate was 20 days, which was at the limit of the design range of 12–20 days.

For the raw sewage fractionation, f_{codus} and f_{codup} (Table 4) were identifiable, but f_{codf} (Table 5) was not. This means that the multi-parameter regression could not estimate a unique ratio of soluble and particulate biodegradable COD that explained the observed data. For the settled sewage fractionation, f_{ns,iss} and f_{ns,codup} (Table 5) were not identifiable. Inorganic solids (%IS) were measured only in the dewatering filter cake at kwaMashu, and the regression could not determine in which ratio the organic and inorganic inert particulates follow the two flow paths available in the simplified model.

Parameters that were excluded from the regression were fixed at their initial estimates, and these fixed values will affect the best-fit values of the identifiable parameters, and the subsequent calibration of the detailed model (Brun *et al.* 2002). However, the results of the analysis also point to a simple and practical solution to the problem: of the three parameters that were not observable from the available data, only f_{ns,codup} requires specialized analytical techniques for its measurement. Any wastewater laboratory should be able to conduct measurements for filtered COD to reduce the uncertainty in the estimation of the parameter f_{codf}. Similarly, the estimation of f_{ns,iss} can be improved by measuring the %IS of the primary, digested or waste sludge or the ISS of the settled sewage. In fact, it is quite common to measure the inorganic or ash content of sludge fed to anaerobic digesters.

_{AD}or SRT). For example, the mass of inert organic particulates in the activated sludge reactor is given by:where

*=* mass of X_{Uinf} in the reactor

= flux of X_{Uinf} fed to the reactor

While the wasting rate and effluent solids flux, which are used in calculating the SRT, are identifiable in the regression, the corresponding flux of X_{Uinf} calculated by the model will be very sensitive to variability in the regressed values of these parameters. In fact, when the value of the wasting rate was manually fixed in the regression, the parameter f_{ns,codup} became identifiable. Since the SRT is a critical operating parameter, the sludge wasting rate ought to be part of routine plant records, but was not available in this case. The results of the identifiability analysis suggest that with reliable sludge wasting rate data and some additional inorganic solids measurements, even the fractionation of the settled sewage at kwaMashu WWTP can be estimated using the simplified steady state model.

Note that, in principle, the multivariate parameter estimation could be carried out in WEST using the full plant-wide model; however, it is computationally intensive, and will take many hours to converge to a solution. The simplified steady state model provides a convenient and much faster way (a few minutes at most) to find the best fit parameters for the COD and solids balances. This then reduces the number of parameters that require tuning in the detailed model, for example, relating to the nitrogen removal model.

As noted above, inorganic solids (IS) were only measured in the belt press filter cake at kwaMashu WWTP. While ISS is usually only a small fraction of the TSS of raw wastewater, it makes up a substantial part of the overall filter cake production (∼40% in Figure 8), which is why including ISS in the raw wastewater characterization is important.

In Figure 9, the influent COD (S1 in Table 2 and Figure 3), effluent (S20) and sludge cake (S22–29) plus the oxygen uptake and methane production represent the overall plant COD balance, while the primary (S3), digested (S6–7) and DAF thickened waste activated sludge (S18–19) are internal streams. The potential for solids and COD reduction is determined by the biodegradable content of the plant influent, while the extents of the reductions are functions of the sludge age of the AS plant and the hydraulic retention time of the anaerobic digesters, which is why the R tool is able to estimate their values from the observed solids and COD reduction.

As shown in Figure 9, all of the soluble biodegradable COD is consumed while the unbiodegradable soluble fraction mostly exits in the effluent. The bulk of the biodegradable influent particulate is fed to the anaerobic digester in the primary sludge and consumed while the unbiodegradable influent particulate plus some unbiodegradable residue of biomass endogenous respiration ends up in the sludge cake. The biodegradable particulate fraction of the DAF sludge consists of biomass (OHOs) rather than influent organics but makes up only 43% of the COD compared to 68% in the influent.

Particulate COD in the effluent is a small fraction of the total COD balance in Figure 9 but makes up 53% of the secondary effluent COD. This was due to the accumulation of solids in the reactor as a result of the long solids retention time leading to the overloading of the secondary clarifiers.

## CONCLUSIONS

We have developed a modelling tool which estimates COD fractionation and other mass balance parameters from plant data using a simplified steady state model of a WWTP. This can greatly facilitate setting up models of treatment plants using routine monitoring data even when some critical operating data, such as the sludge wasting rate, is missing or unreliable. While not all the fractionation parameters investigated were identifiable from the available data in this case study, the results of the significance analysis pointed to practical ways in which data collection could be improved to provide data that is useful for modelling, process optimization and design. Thus, for kwaMashu, it was concluded that all the parameters investigated would likely have been identifiable if the sludge wasting rate records had been available and the routine plant measurements had been augmented by some measurements of filtered raw COD, settled wastewater ISS and/or the IS of the primary, digested or waste activated sludge, as detailed in the discussion. The influent fractionation and calibrated plant model of kwaMashu WWTP will be used by the eThekwini municipality as a benchmark against which the current plant performance is evaluated, and in the design of the proposed upgrade.

## ACKNOWLEDGEMENTS

This research was funded by the DANIDA fellowship center through the project ‘Evaluation of Resource Recovery Alternatives in South African Water Treatment Systems (ERASE)’ (Contract-No: 18-M09-DTU) and by eThekwini Water and Sanitation.

## SOFTWARE AVAILABILITY

The probabilistic influent fractionator code and the R implementation of the simplified steady state WWTP model is available on request. To express interest please contact Chris (brouckae@ukzn.ac.za) and Barbara Brouckaert (barbara.brouckaert@gmail.com) at the WASH R&D Centre at the University of KwaZulu Natal (South Africa).

## DATA AVAILABILITY STATEMENT

Data cannot be made publicly available; readers should contact the corresponding author for details.

## CONFLICT OF INTEREST

The authors declare there is no conflict.

## REFERENCES

*Identification of Wastewater Primary Sludge Composition Using Augmented Batch Tests and Mathematical Models*

*PhD Thesis*

*Biological Wastewater Treatment, Principles, Modelling and Design*(Henze, M., van Loosdrecht, M. C. M., Ekama, G. A. & Brdjanovic, D., eds). IWA Publishing, London, UK.

*Development of a Plant-Wide Steady-State Wastewater Treatment Plant Design and Analysis Program*

*MSc Thesis*