DOI: 10.3303/CET24112024 Paper Received: 8 March 2024; Revised: 12 May 2024; Accepted: 28 May 2024 Please cite this article as: Prudenza S., Bax C., Capelli L., 2024, Real-time Monitoring of Odour Concentration at the Inlet of an Abatement System by IOMS, Chemical Engineering Transactions, 112, 139-144 DOI:10.3303/CET24112024 CHEMICAL ENGINEERING TRANSACTIONS VOL. 112, 2024 A publication of The Italian Association of Chemical Engineering Online at www.cetjournal.it Guest Editors: Selena Sironi, Laura Capelli Copyright © 2024, AIDIC Servizi S.r.l. ISBN 979-12-81206-13-7; ISSN 2283-9216 Real-time Monitoring of Odour Concentration at the Inlet of an Abatement System by IOMS Stefano Prudenza, Carmen Bax*, Laura Capelli Politecnico di Milano, Departement of Chemistry, Materials and Chemical Engineering “Giulio Natta”, Piazza Leonardo da Vinci, 32, 20133 Milano, Italy carmen.bax@polimi.it This paper describes the implementation of an Instrumental Odour Monitoring System at a wastewater treatment plant for the real-time measurement of the odour concentration at the inlet of a scrubber and the identification of anomalous odour peaks. This paper investigates the potentiality of an approach for odour quantification based on Support Vector Regression, which is suitable to deal with non-linear data and it is also able to account for the uncertainty of the reference method for measuring odour concentration, i.e. dynamic olfactometry. The results of this study prove the feasibility of implementing an IOMS for real-time measurement of odour concentration in a very complex real-life scenario, providing estimations on independent test samples collected after the model training with an accuracy and precision comparable to those of dynamic olfactometry. Further studies should confirm the results by considering a larger number of test samples, thereby finding a trade-off between statistical relevance of the test and cost for the olfactometric analyses. 1. Introduction Instrumental Odour Monitoring Systems (IOMS) are suitable tools for monitoring odours from different activities (Jońca et al., 2022; Khorramifar et al., 2023), especially in the case of variable emissions, discontinuous operations or the presence of diffuse emission sources (Capelli et al., 2014). Among all their possible applications, the most interesting one concern their installation either at plant fencelines (Cangialosi et al., 2021; Lotesoriere et al., 2024) or directly at the emission source (Prudenza et al., 2023) for real-time monitoring odour emissions and promptly identifying the occurrence of anomalous odour emission peaks, to enable immediate interventions and investigate the causes of such critical phenomena. Despite an increasing number of studies discussing the possibility of using IOMS for real-time monitoring of odour concentration, the obtainment of accurate results in complex, real-life scenarios is still very challenging (Burgués et al., 2022; Ratti et al., 2024). In this context, this paper describes the implementation of an IOMS based on a commercial electronic nose (EN) at a wastewater treatment plant (WWTP), with the purpose of real-time measuring the odour concentration at the inlet of a scrubber treating the air sucked from the primary settlers, which represents a very complex scenario. The IOMS had the aim of detecting the occurrence of anomalous odour episodes resulting in particularly high odour concentration values, which were already observed during previous olfactometric campaigns carried out at the plant. As will be described in this paper, odour monitoring directly at the emission source is particularly challenging, because the IOMS is exposed to a harsh environment characterized by the presence of several interferences, thus requiring the optimization of both system hardware and software. When used to estimate odour concentration, the IOMS quantification model should be able to account for the uncertainty (about a factor 2x) of Dynamic Olfactometry (standardized by the EN 13725:2022), which is the reference technique for measuring odour concentration, and the possible presence of unknown interfering compounds in the gas stream. Linear regression models, such as Partial Least Square Regression (PLSR) (Wold et al., 2001) are often proposed for implementing odour quantification models (Lotesoriere et al., 2024). However, in some cases, their use for such scope provides inaccurate estimations, because of their inability of dealing with complex and non-linear relationships between IOMS responses and odour concentration. 139 This paper investigates the potentiality of an alternative approach for odour quantification based on Support Vector Regression (SVR), which is suitable to deal with non-linear data and it is also able to account for the uncertainty of the reference method used for training the model, resulting in more accurate and robust quantification models, focusing on the procedure adopted for developing the regression model to correlate IOMS responses with odour concentration measured by dynamic olfactometry. 2. Material and methods 2.1 Electronic nose and sampling system The IOMS used in this work is the EN WT1 commercialized by Ellona, equipped with 8 sensors: 4 MOX sensors, 3 electrochemical sensors for H2S, NH3 and RSH (mercaptans), respectively, and one Photo Ionization Detector (PID) sensor, providing the total Volatile Organic Compounds (VOC) concentration in equivalent Isobutylene concentration. The instrument has a fast response time of 0.1 Hz, which makes it suitable for continuous odour monitoring and for providing real-time outputs. The MOS sensors response is represented by the sensor resistance in Ohms, while the electrochemical sensors and the PID provide an output in ppm. The instrument includes also sensors for measuring temperature and relative humidity of both inside the sensors’ chamber and in the external environment. Preliminary measurements carried out at the scrubber inlet showed a very aggressive environment with high H2S concentrations combined with high humidity. For this reason, it was decided to install both a dilution system with environmental air (ratio 1:1) and a humidity trap on the line connecting the IOMS with the inlet of the abatement system (Figure 1). Together with the EN, we installed also an automatic gas sampler produced in our lab, consisting of an airtight suitcase of 25 litres that can be activated either manually or automatically by the EN whenever a given alarm threshold is exceeded. As shown in Figure 1, the gas collected by the sampler from the scrubber inlet duct did not undergo any further dilution. Figure 1. Scheme of the sampling and analysis system used for this study 2.2 Data processing 2.2.1 General overview of the data processing pipeline The data processing procedure developed for the training phase consisted of 4 steps (Figure 2), which were performed using R statistical software through its Integrated Development Environment (IDE) Rstudio. Figure 2: Block diagram of the data processing pipeline for the development and testing of the model 140 2.2.2 Training samples The training of the IOMS lasted 1 month and implied the correlation of correlate the sensors’ signals registered continuously by the EN with the odour concentration values measured by dynamic olfactometry of 32 training samples collected at the inlet of the scrubber. Because previous olfactometric assessments carried out on the plant had highlighted high variability of the gas stream entering the abatement system, the 32 training samples were withdrawn on different days and under different operating conditions of the plant, with the purpose of capturing as much variability as possible of the monitored gas stream and build a robust training model. Indeed, the odour concentration of the training samples resulted ranging from 100 to over 30000 ouE/m3. 2.2.3 Signal pre-treatment The raw sensor responses were averaged on a 5-minute time basis to both reduce data dimensionality and remove minor sources of noise in the signal. Since the anomalous odour events occurring at the WWTP usually had a duration in the range of few dozens of minutes, this type of pre-processing was not considered to cause relevant information losses. 2.2.2 Exploratory analysis Principal Component Analysis (PCA) was applied on averaged curves to carry out a preliminary investigation of the training data structure. This analysis pointed out an unexpected and unforeseeable daily periodical trend with “peaks” both in the MOX and electrochemical sensors overnight (typically between 2 and 3 AM). Having first checked that such peaks did not correspond to higher odour concentrations measured by dynamic olfactometry, we started looking for possible sources of interference. However, none of the sources investigated, such as, among others, humidity, temperature, wastewater inlet flow, methane concentration, etc., explained the anomalous behaviour of the sensors, thus we were forced to correct the sensor responses to account for an unknown interference, and we decided to apply a normalization approach with respect to their average hourly resistance values evaluated on the training data. This aspect was particularly critical and gives an idea of the difficulty of carrying out measurements in a real and complex environment, and will be therefore described more in detail in another dedicated publication. 2.2.3 Model training After normalization, the IOMS data were passed to a regression algorithm, with the purpose of correlating them with the odour concentration values obtained from the olfactometric analyses. The algorithm chosen is the Support Vector Regression (SVR), a supervised machine learning model that extends the principles of Support Vector Machines (SVM) to regression tasks (Zhang and O’Donnell, 2020). SVR aims to find a hyperplane function that contains as much training data as possible. In doing so, it employs a loss function that ignores errors within an ε-margin, focusing only on the ones that exceed this threshold. This algorithm characteristic has been considered useful for trying to incorporate in the regressor the intrinsic uncertainty of the reference method for odour concentration measurement, i.e. dynamic olfactometry, which provides odour concentration lying in a 95% confidence approximately equal to 2 times the measured quantity. Indeed, by imposing the ε-margin of the SVR equal or similar to the uncertainty of dynamic olfactometry, one could try to incorporate such information in the algorithm optimization procedure, possibly improving its performances and stability. Besides this, another advantage of the SVR algorithm is that it can efficiently handle high-dimensional datasets and non-linear relationships by using some specific functions for drawing the regression hyperplane, namely the kernel function. Among them, the radial basis function (RBF) kernel is one of the most used and it is particularly suited for capturing non-linear and complex relationships in data. The RBF kernel maps input features into a higher-dimensional space, allowing SVR to model intricate patterns and interactions. The use of the RBF kernel requires the tuning of hyperparameters, such as the regularization parameter C and the kernel width parameter γ, to balance the trade-off between model complexity and prediction accuracy. This flexibility and robustness make the SVR algorithm coupled with the RBF kernel a powerful tool for various regression tasks, including those with non-linear data distributions, typical of complex real-world scenarios application like the one described in this work. As previously mentioned, we used 32 gas samples analysed by dynamic olfactometry for training and tuning the model hyperparameters using an 8-fold cross validation. This odour concentration values were log- transformed before being passed to the SVR, in order to make them linear and easy to interpolate. 2.2.4 Model testing Once developed, the model was uploaded to the IOMS analysing the gas stream entering the scrubber, with the aim of recognizing anomalous odour concentration values entering the abatement system. During this phase, the model was tested using 13 independent samples, collected after completion of the training, again considering different days, times of the days, and plant operation conditions, in order to account as much as possible for the source variability. 141 As indicators of the model performance, besides their RMSEP, expressed as ratio among IOMS and odour concentration values measured by dynamic olfactometry, we used the Limits of Agreement (LoA) evaluated using the Bland-Altman approach (Bland and Altman, 1999), mainly focusing on the bias deviation and limits spreads, which represents the interval inside of which 95% of the difference (or ratios if data are reported in log- scale such in this case) between the output of the two methods rely. 3. Results The results presented in this work focus on the model training and testing. Detailed description of the exploratory data analysis and the normalization for compensation of unknown interferences will be presented in another publication. 3.1 Model training The tuning of the SVR model involved two steps. The first one aimed at defining the value of the hyperplane ε- margin. Here, with the purpose of accounting for the uncertainty of the reference method, i.e. dynamic olfactometry, it was decided to impose such hyperparameter approximately equal to the 95% confidence interval of dynamic olfactometry. For doing so, we considered the expression for evaluating the upper and lower limit of as provided in the technical standard EN13725:2022, which is shown in Eq(1). log10(𝐶𝑜𝑑) − 𝛿𝑤,𝐶𝑅𝑀 − 𝑈 ≤ log10(𝐶𝑜𝑑) ≤ log10(𝐶𝑜𝑑) − 𝛿𝑤,𝐶𝑅𝑀 + 𝑈 (1) In Eq(1), 𝛿𝑤,𝐶𝑅𝑀 is the within laboratory bias of a test method on a Certified Reference Material (CRM), 𝑈 is the expanded uncertainty for the normal distribution at a 95% coverage probability, and 𝐶𝑜𝑑 represents a generic odour concentration obtained from a gas analysis in logarithmic scale. The upper and lower limits limit of the olfactometric analysis are then obtained by either summing or subtracting the contribution of 𝛿𝑤,𝐶𝑅𝑀 and 𝑈 to the logarithmic value of the 𝐶𝑜𝑑. Our olfactometer (an Odournet, TO8) used for this study has a 𝛿𝑤,𝐶𝑅𝑀 equal to 0.049 and 𝑈 equal to 0.311, the following values, i.e. -0.36 and 0.26, were obtained for the lower and upper confidence intervals, respectively. These two values are not equal, making that the amplitude of the confidence intervals are not symmetric around the measured odour concentration value. Since the SVR allows the definition of only one value of ε, it was decided to use an averaged value of 0.31. After this, an 8-fold cross validation on training data was used to determine the optimal values for C and γ, returning values of 2 and 0.3 respectively. The results obtained using these hyperparameters are shown in Figure 3. Figure 3: Results obtained from SVR on training data. The red lines represent the limits of dynamic olfactometry, while the green ones are the ε – margin of the hyperplane The performance obtained with this model provided a Root Mean Squared Error of Prediction (RMSEP) equal to 1.89x, meaning that, on average, on the training data, the prediction made by the model falls within a factor 142 of 1.89 with respect to the odour concentration value measured by dynamic olfactometry. Thus, considering the uncertainty of dynamic olfactometry, this means that large part of the odour concentration values predicted by the model, at least for the training dataset, will fall within the olfactometric uncertainty range. 3.2 Model validation Once developed, the model was tested with 13 new samples collected during the monitoring phase. The results of the model predictions of those 13 samples are displayed in Figure 4. In this case the RMSEP, being equal to 1.96, was a little bit higher than those obtained on the training data, but still resulted comparable with the uncertainty of the reference method. This again means that, also during monitoring, the odour concentration predicted by our model should, on average, fall within the confidence interval of dynamic olfactometry. In order to carry out a more robust and in-depth analysis of our results, we decided to apply the Bland-Altman analysis to the model outputs. In this case the upper and lower LoA resulted to be equal to 4.6x and 0.4x (Figure 4), meaning that an odour concentration predicted by the IOMS has a 95% probability of falling in a range that goes from 0.4 times and 4.6 times the reference odour concentration value measured by dynamic olfactometry. Figure 4: SVR prediction on the independent test dataset. Red lines represent the uncertainty limits of dynamic olfactometry. The upper and lower Limits of Agreement (LoA) from the Bland-Altman analysis are reported in green, while the bias is represented by the continuous orange line The acceptability or not of such LoA is left to the user, based on the final application. However, in order to provide some reference, we decided to make a comparison with the intermediate precision value for dynamic olfactometry, as defined in the reference standard (EN 13725:2022), which corresponds to a value of 3. This means that the ratio between two odour concentration measurements, performed on the same testing material in an olfactometric laboratory, should not be larger than 3 in 95 % of cases. Concerning the Bland-Altman approach, a value with similar properties can be obtained calculating the standard deviation of the differences between each measurement obtained with the two methods, and then multiply it by a factor 1.96, which is the significance level converted to Z. This way, it is possible to assess how large are the differences among the two measurements without considering the bias effect. As a result, the value obtained in a normal scale resulted equal to 3.36, which is only slightly higher than the target value of 3, considered acceptable for dynamic olfactometry. This means that an estimation of the odour concentration made by the IOMS has the 95% probability of being comprised at maximum in a factor 3.36 with respect to the reference odour concentration value measured by dynamic olfactometry, if the bias effect is neglected. Concerning the bias, the value obtained is equal to 1.37, meaning that the IOMS tends to overestimate the odour concentration of about 40%. Again, it was decided to compare this bias value obtained with the overall 143 criterion for accuracy value fixed by the EN13725 for dynamic olfactometry, corresponding to 1.65. Thus, the model developed has a bias that would comply with the target value required for an olfactometer to operate according to the European Standard. The main weakness of the model is that it tends to overestimate the odour concentrations, especially in the lower range, below 500 ouE/m3. This could be related to the low number of samples belonging to this lower odour concentration range included in the training set, but also by the choice made during the SVR hyperparameter selection, since the ε has been chosen knowing that a possible odour concentration overestimation could arise. However, this limitation could still be considered acceptable for the application here presented Indeed, considering that the aim of the model developed is to produce warning to the plant operators whenever anomalous odour events occur at the inlet of the monitored abatement system, a model that tends to overestimate odour concentrations would end up in conservative predictions, i.e. possibly causing some “false positive” alarms. As a matter of facts, this would be better than the opposite, i.e. having a system with high false negative rate, not detecting critical situations when these happen. Moreover, as previously mentioned, the tendency of the model to overestimate odour concentrations is particularly evident in the low odour concentration range (<500 ouE/m3). Based on the olfactometric data acquired on the same plant in the preliminary olfactometric campaigns, this is presumably not the range in which the alarm threshold will be set. Indeed, “anomalous” odour concentration for this plant would rather be in the range >5000 ouE/m3, thus reducing the probability of overestimation. 4. Conclusions This study proves the feasibility of implementing an IOMS for real-time measurement of odour concentration in a very complex real scenario at the inlet of a scrubber dedicated to the treatment of the air sucked from the primary settling area. The implemented SVR algorithm, being able to partially account for the uncertainty of the reference method, proved capable of providing estimations with an accuracy and precision comparable to those of dynamic olfactometry. To confirm the potentiality of this algorithm to provide acceptable estimations, further studies should include a higher number of samples for model testing. On the other hand, it should be considered that in real-life and complex scenarios, the possibility to rely on a large number of representative test samples covering all possible ranges of odour concentrations would be very difficult and extremely expensive. References Bland J.M., Altman D.G., 1999, Measuring agreement in method comparison studies, Statistical methods in medical research, 8, 2, 135-160. Burgués J., Doñate S., Esclapez M.D., Saúco L., Marco S., 2022, Characterization of odour emissions in a wastewater treatment plant using a drone-based chemical sensor system, Science of The Total Environment, 846, 157290. Cangialosi F., Bruno E., De Santis G., 2021, Application of machine learning for fenceline monitoring of odor classes and concentrations at a wastewater treatment plant, Sensors, 21, 14, 4716. Capelli L., Sironi S., Del Rosso R., 2014, Electronic noses for environmental monitoring applications, Sensors, 14, 11, 19979-20007. Jońca J., Pawnuk M., Arsen A., Sówka I., 2022, Electronic noses and their applications for sensory and analytical measurements in the waste management plants—A review, Sensors, 22, 4, 1510. Khorramifar A., Karami H., Lvova L., Kolouri A., Łazuka E., Piłat-Rożek M., Łagód G., Ramos J., Lozano J., Kaveh M, Darvishi Y., 2023, Environmental engineering applications of electronic nose systems based on MOX gas sensors, Sensors, 23, 12, 5716. Lotesoriere B.J., Bax C., Capelli L., 2024, Electronic nose for odor monitoring at a landfill fenceline: training and validation of a model for real-time odor concentration measurement, Heliyon, 10, e31103. Prudenza S., Bax C., Capelli L., 2023, Implementation of an electronic nose for real-time identification of odour emission peaks at a wastewater treatment plant, Heliyon, 9, 10, e20437. Ratti C, Lotesoriere B.J., Bax C., Capelli L., 2024, Towards real-time monitoring of odour emissions from waste treatment plants. A case study, Detritus, 26, 106-113. Wold S., Sjöström M., Eriksson L., 2001, PLS-regression: a basic tool of chemometrics. Chemometrics and intelligent laboratory systems, 58, 2, 109-130. Zhang F., O’Donnel J.L., 2020, Support Vector Regression, Chapter 7 In: A. Mechelli, S. Vieira (Eds.), Machine Learning: Methods and Applications to Brain Disorders, Academic Press, 123-140. 144 56prudenza.pdf Real-time Monitoring of Odour Concentration at the Inlet of an Abatement System by IOMS