**2.2 Benchmark simulation models (BSM)**

The benchmark simulation model No 1 (BSM1) is a model framework for evaluation using performance indexes of an AS process based on simulations of the WWTP [23]. The BSM1 models the bioreactor following the ASM kinetics and dividing the reactor into anaerobic, anoxic, and oxic (aerobic) phases according to the AS model being reproduced. The secondary clarifier is modeled using the Takács settling model [24]. Also, the BSM1 considers recycling flowrates as well as the wastage and return of the activated sludge to the system.

Moreover, the BSM1 framework allows the modeler to assess plant performance by measuring the effluent quality index (EQI, in kg pollution units d�<sup>1</sup> ) and an operational cost index (OCI) [6]. The EQI is a measure of the water quality being discharged to the environment. It sums the main effluent pollutant fluxes (BOD5, COD, TKN, NOx-N, and TSS) by employing weighting factors. Like the EQI, the OCI weights the sum of different costs within the system suchlike energy requirements (aeration, pumping, mixing), sludge disposal, external carbon sources, and methane production (income) if available. Nevertheless, it does not provide an operational cost but could be easily calculated.

The BSM1 limits to assess local control strategies for the AS process, without accounting the interactions with the primary and sludge treatment. Consequently, the benchmark simulation model No. 2 (BSM2) was developed as a plant-wide assessment model [6, 25]. Its framework couples the features of the BSM1 with a primary clarifier model [26], and a sludge treatment including anaerobic digester following the ADM1 kinetics [27], a sludge thickener as a dewatering unit.

Consequently, the BSM2 allows for the evaluation of unit process interaction in a wider context than BSM1.

### **2.3 Membrane bioreactor (MBR) models**

According to Judd [7], membrane bioreactors (MBR)-a promising biologicalphysical technology for WW treatment that couples an AS process with microfiltration (MF) or ultrafiltration (UF)-considerably reduce WWTP footprint and achieve higher effluent quality and reduced sludge yield. Mind that models are fully capable to be simulated within membranes bioreactors (MBR) since both systems are alike from the biochemical engineering aspect [17]. Moreover, it is also possible to modify the BSM frameworks to include membrane bioreactor processes.

However, for modeling the system, the ASMs are compatible with or without modifications. The refinement of the ASMs in MBRs, are extended versions mainly for incorporating the release and degradation of soluble microbial products (SMP) and extracellular polymer substances (EPS) [28–30]. The EPSs are mixtures of organics (proteins, lipids, DNA residuals, etc.) that support bacterial growth in high-density biomass communities (as in MBRs), while SMPs are soluble excreta produced during biomass growth and decay that serve as indicators of substrate consumption and biomass decay rates [17]. According to Hai et al. [17], EPS and SMPs play a major role in membrane fouling as these can adhere to the membrane surface, thus, limiting its permeability.

Moreover, for modeling more precisely the MBR operation, physical sub-models can be coupled. An example of these can be found in Mannina et al. [8], who proposed a physical model for modeling cake deposition, deep-bed filtration, and membrane resistances (to simulate transmembrane pressure and resistance variations, e.g., pore fouling, sludge cake, among others). Mind that the model includes mathematical representations of particles' drag and buoyant forces, particle deposition in membrane probability, biomass and sludge attachment and detachment (including backwashing effect) rates, together with cake deposition, deep-bed filtration, and membrane resistances themselves [8].

### **3. Sensibility analysis**

Sensibility analysis is a tool for modelers for the appreciation of the dependency between input factors and model outputs, allowing them to investigate the relevance of each factor around the outputs [16]. Hence, elucidating which model inputs provoke most of the uncertainty in model outputs according to the studied scenario, usually done via Monte Carlo simulations [15]. Thereby, the SA's scope is factor prioritization together with factor fixing (non-influential), and in some cases, to ascertain factor interactions, for potentially reducing model uncertainty [9].

There are two classifications, local sensitivity analysis (LSA) and global sensitivity analysis (GSA) [13]. However, according to Saltelli et al. [9], local approaches, i.e., varying one factor at a time (OAT), are not recommended when dealing with non-linear models, as this approach does not explore a multidimensional space, thus missing important effects such as factor interaction (FI). While the GSA methods do vary all the factors together like in an analysis of variance (ANOVA), thus, informing the modeler about factors' global influence in model output variance [9]. Therefore, local approaches (LSA) and global ones (GSA) are to be briefly explained as follows.
