## 3 Results and Discussion  
### Development of PLS Calibration Models  
To study the possibility of using Raman spectroscopy as a monitoring tool in a photo-BNR wastewater treatment process, Raman spectra were acquired from mixed liquor samples harvested along four selected SBR cycles (13 samples/cycle), as described in Section 2.1. Although each spectrum was obtained in the Raman shift range from 2677.68 to \(-\)62.34 cm\({}^{-1}\), the region below 200 cm\({}^{-1}\) corresponded to spectral noise, not being considered in the development of PLS models. The most intense peaks in the Raman spectra were observed within the range of 2000-1000 cm\({}^{-1}\), as observed in the raw Raman spectra of all samples used in this study (Figure 1). Nevertheless, it was difficult to make direct peak attributions through visual inspection due to overlapping vibrational modes of different constituents in such complex samples, confirming the need for multivariate analysis methods such as PLS regression.  
To extract relevant spectral information, PLS model optimization was carried out by testing different spectra pre-processing strategies in combination with various spectral regions using the OPUS software, as described in Section 2.4. The proper selection of spectral ranges is essential to avoid that bands of interfering components are accounted for by the PLS algorithm, consequently deteriorating the quality of the model. The main spectral truncations used as input for this optimization process included the total spectral range without the noise region (2677.68-200 cm\({}^{-1}\)) and two spectral truncations covering the most peak-concentrated areas of the spectra (2000-200 cm\({}^{-1}\) and 2000-1000 cm\({}^{-1}\)). In addition, aiming for a more refined search of relevant spectral data, different spectral regions  
Figure 1: Raw Raman spectra of mixed liquor samples harvested from the SBR on (**a**) cycles A, B and C (samples 1–39; 5 s integration time); and (**b**) cycle D (samples 40–52; 200 ms integration time).  
were considered for each parameter, according to Raman shift attributions described in the literature [39]. Specifically, distinct regions within the Raman shift range 1200-600 cm\({}^{-1}\) were considered in the development of models for PO4 and poly-P for comprising P-O-P and PO2- stretching vibrations [25; 26; 27; 28; 39; 40; 41], whereas the 1450-1200 cm\({}^{-1}\) range was tested for modelling CO2[42]. Similarly, the region 1600-1350 cm\({}^{-1}\) was tested for NH3 models owing to the N-H in plane deformation reported within this range [39], while the 1100-1000 cm\({}^{-1}\) range was tested for NO3 models due to symmetric N-O stretching vibrations [18]. Moreover, the regions 1800-400 cm\({}^{-1}\) and 1200-800 cm\({}^{-1}\) were studied during the construction of PLS models for VFA due to characteristic C-C, C=O, C-H, CH2 and CH3 bands [24; 25; 27; 43; 44], and the regions 1800-1700 cm\({}^{-1}\) + 1000-800 cm\({}^{-1}\) + 500-400 cm\({}^{-1}\) were specifically tested in PHAs modelling for comprising previously associated Raman shifts [24; 26; 43; 44; 45]. Finally, the Raman shifts 500-450 cm\({}^{-1}\) + 1200-800 cm\({}^{-1}\) were used to build calibration models for carbohydrates owing to their specific association with glycogen [24; 25; 39].