**3.1 Local sensitivity analysis**

A local sensitivity analysis (LSA) is a simple analysis where only one factor (OAT approach) changes value between consecutive simulations [13]. An advantage of this method is that the modeler can determine the influence of the perturbed parameter under a local range in a rapid manner. According to the author's knowledge, the most common LSA method applied for AS modeling is the normalized sensitivity index (NSI) described in Eq. (2).

$$NSI = \frac{\theta \Delta Y}{Y \Delta \theta} \tag{2}$$

where Δ*θ* and Δ*Y* are the selected are the observed differences of model input and output, respectively. Nevertheless, there seems to be an issue with the NSI method term as sometimes it is called by different names, however, those terms seem to be the same according to Eq. (2). Moreover, some authors have reported other LSA techniques [31–33].

## **3.2 Global sensitivity analysis**

Unlike the LSA, global sensitivity analysis does consider the entire probability distributions of the input factors, thus assessing the entire domain of the input space [16]. Global sensitivity analysis methods most widely used can be classified as elementary effects methods, linear regression models, variance-based, as well as derivative-based sensitivity analysis. Consequently, Morris Screening, Standardized Regression Coefficients, Sobol Sensitivity Indices, Extended-FAST, together with derivative-based global sensitivity measures are discussed below, as these were the GSA methods applied in the sensitivity analysis-activated sludge modeling literature of this review.

### *3.2.1 Morris screening method*

The Morris screening method measures the factor's sensitivity by adding up Elementary Effects (EEs), i.e., averaging local measures. An EE (see Eq. (3)) indicates the variation between model output (*y*) predisposed to a factor (*xn*) perturbation being replicated [29, 30]. Where A is the model output after perturbation, B represents no perturbation, while *Δ* is a factor depending on the number of levels of the n-dimensional p-level grid {*1/(p* � *1), … , 1* � *1/(p* � *1)*}, comparable with the uncertainty range.

$$EE\_i(\mathbf{x}\_1, \dots, \mathbf{x}\_n, \Delta) = \frac{y(\mathbf{x}\_1, \dots, \mathbf{x}\_{i-1}, \mathbf{x}\_i + \Delta, \mathbf{x}\_{i+1}, \dots, \mathbf{x}\_n) - y(\mathbf{x}\_1, \dots, \mathbf{x}\_n)}{\Delta} = \frac{A - B}{\Delta} \tag{3}$$

Morris screening standardizes the model inputs and outputs (*y* and *xn*) according to its mean and standard deviation for measuring the sensitivity indices. The mean (*μ*) measures the influence of the factor in model output uncertainty, whereas the standard deviation (*σ*) determines the factor's influence. For example, high values of σ indicate the output variance is related to non-linearity or interactions. To avoid the effect of opposite signs the EEs are referred to as the absolute mean (*μ\**) [34]. Whenever *μ\* >* mean threshold the factors are considered as influential and vice versa. The mean standard error (*σ<sup>i</sup>* � *r (*�*0.5)*) provides information about the factor effect. Whenever the factor lies above or below the threshold line (*μ\*i = 2 σ<sup>i</sup>* � *r (*�*0.5)*), its effect is involved to model linearity and interactions, respectively [35]. According to Morris [35], the number of simulations (or replicas) is equal to *r*�*(n + 1)*.

### *3.2.2 Standardized regression coefficients method*

The standardized regression coefficients (SRC) are sensitivity measures that fit a first-order linear multivariate model to a scalar output (*b0 … bi*) of the MCS and correlate the model inputs and outputs (*y and θi*, see Eq. (4)). The quantification of the SRCs (*βi*) is done by scaling the regression coefficients (bi) according to the standard deviation of model input and outputs (Eq. (5)).

$$y = b\_0 + \sum\_i b\_i \bullet \theta\_i \tag{4}$$

$$
\beta\_i = \frac{\sigma\_{\theta\_i}}{\sigma\_\gamma} \bullet b\_i \tag{5}
$$

According to Saltelli et al. [13], *β<sup>i</sup> <sup>2</sup>* are deemed as output variance contributors or as a first-order sensitivity index (*Si*) as long as the coefficient of determination is high enough to imply model linearity (*R<sup>2</sup>* ≥ *0.7*). They also mentioned *β<sup>i</sup>* values range between �1 and + 1, where a high absolute value indicates a large effect in output variance (sign indicates positive and negative effects, and close-to-zero values indicate negligible effects). However, the SRC method does not measure the effect of factor interactions in output variance diminishing the reliability of the results. Still, it is a rapid method useful for first approximations on sensitivity measures. Sampling is usually done by Latin hypercube sampling (LHS).

### *3.2.3 Sobol sensitivity indices method*

Sobol indices is a variance decomposition method for quantifying the input factor individual effects together with the effect due to factor interaction (FI) [13]. It decomposes the output variance in first-order sensitivity indices (*Si*) and the total sensitivity indices (*STi*). Si is the amount of variance extracted from total output variance. It is measured as the conditional variance over the unconditional variance according to the factor uncertainty range (see Eq. (6)). The *Si* represents the factor's contribution to the model output variance. The model will be deemed as linear whenever *ΣSi = 1*, a sum different to 1 indicates model non-linearity. This indicates there is a contribution in output variance due to FI, which can be highlighted by the difference between *1* � *ΣSi*.

$$S\_i = \frac{V[E(Y|X\_i)]}{V(Y)}\tag{6}$$

Total sensitivity indices (*STi*) quantify the total effect of the input factor on model output variance (including FI, see Eq. (7)) [13]. Therefore, the strength of the interactions can be assumed by the difference between *STi and Si*, as both indices follow the same linearity or non-linearity principles.

$$S\_{Ti} = 1 - \frac{V[E(Y|X\_i)]}{V(Y)}\tag{7}$$

Estimating *Si and STi* requires approximately 2000 Monte Carlo simulations per factor [14]. The MCS requires a design of experiments, thus, space-filling sampling methods are recommended to improve estimators' accuracy (e.g., Latin Hypercube sampling or Sobol sequences sampling).

### *3.2.4 Extended FAST*

Like the Sobol method, the Extended Fourier Amplitude Sensitivity Test (E-FAST) is a variance decomposition method. It decomposes the variance in first sensitivity indices (Si) and total sensitivity indices (STi) and determines the influence of FI by the difference between these indices (see Eqs. (6) and (7)). However, E-FAST differs from Sobol as the numerical simulations (around 500–1000 per factor) for computation of the indices are based on a spectral method rather than MCS [36]. It is also, less computationally expensive than the Sobol method given the lesser number of simulations per factor.

## *3.2.5 Derivative-based global sensitivity analysis (1241)*

Derivative-based global sensitivity measures (DGSM) is a method that exhibits strong similarities between the Morris screening method and Sobol sensitivity indices, with the advantage of its ease for implementation and numerical evaluation [16]. Previous reasons have not gone unnoticed from practitioners, thus, recently becoming a popular GSA method.

DGSM method combines Morris screening and Sobol capabilities, but attending its major drawbacks [16]: (1) the EEs are added by using a random sampling of the n-p grid and measuring the finite differences when incrementing Δ (see Morris method above), thus, EEs cannot be accounted in a range lesser than delta, limiting is accuracy, and (2) Sobol indices are computationally expensive to measure. While DGSM shows a higher convergence rate and more accuracy than Morris, and a lower computational cost in various magnitude orders compared to Sobol [37].

Essentially, DGSM is based on local derivatives suchlike NSI (see Eq. (2)), but as an average of the sensitivity measures evaluated by Quasi-Monte Carlo sampling methods, rather than by point from a fixed grid [16, 37]. For detailed information about the derivative-based global sensitivity measures please refer to Ghanem et al. [16].
