UniCas for Industry A. Miele1,† , H. Mustafa1,† , M. Vitelli1,2,*,† , A. Bria1,† , C. De Stefano1,† , F. Fontanella1,† , C. Marrocco1,† , M. Molinaria1,† and A. Scotto di Freca1,† 1 University of Cassino and Southern Lazio, Cassino, 03043, Italy 2 Sensichips s.r.l., 04011 Aprilia, Italy Abstract Artificial Intelligence (AI) is transforming industries, particularly through Industry 4.0, by integrating technologies such as the Internet of Things (IoT) to optimize production processes and resource management. It addresses challenges such as reducing environmental impact while fulfilling consumer demands. Innovative sensors enable real-time data collection for environmental monitoring. Adopting advanced technologies such as energy cells, particularly lithium-ion batteries, is crucial for sustainable mobility and reducing environmental impact in the automotive industry. It is vital to understand the key parameters of energy cells, including range, energy density, and durability, and implement them while embracing the principles of Second Life effectively. For example, machine learning (ML) algorithms are utilized in industrial contexts to identify air and water pollutants and estimate the State of Charge (SoC) for automotive applications. These methodologies improve efficiency, sustainability, and innovation in various industrial sectors. Keywords Artificial Intelligence, Industry 4.0, AI on the Edge, Smart Sensors, Pollutants Identification, State of Charge estimation 1. Introduction terpret sensor data offers numerous benefits. By utiliz- ing sophisticated algorithms and predictive models, it is Artificial Intelligence (AI) is revolutionizing various sec- possible to identify pollutants accurately, continuously tors including healthcare, finance, education, transporta- monitor air and water quality, and optimize industrial tion, and notably, industry. Its capacity to analyze vast processes to reduce environmental impacts. However, data sets in real-time and generate precise predictive the applications of artificial intelligence in industry are insights is reshaping production processes, enhancing not limited to the environmental sphere. Nowadays, the resource allocation, and boosting operational efficiency automotive industry is facing one of the most significant in industries worldwide. Industry 4.0 [1] represents a challenges in its history: to provide sustainable mobility crucial turning point in the evolution of the industrial and reduce the environmental footprint of transportation landscape, characterized by the integration of advanced on a global scale. One of the key pillars of this trans- technologies and widespread digitization of production formation is the energy cell[7]. Energy cells, notably processes. Inspired by the notion of the "smart factory," lithium-ion batteries, are crucial in revolutionizing vehi- it emphasizes the interconnection of machines, systems, cle energy usage towards zero-emission transportation, and people via IoT, AI, big data, cloud computing, and combating air pollution, and mitigating climate change. advanced robotics[2, 3, 4]. The concept of Industry 4.0 is However, to fully realize it is essential to have a precise based on the idea of automated and connected production, comprehension of key parameters like range, energy den- where machines and systems communicate with each sity, charging time, and durability. Accurate estimation other in real-time to optimize processes and decision- of these parameters is critical for developing large-scale making. In this context, innovative sensors [5, 6] play a zero-emission vehicles and ensuring proper disposal and crucial role by enabling the collection of detailed, real- reuse, aligning with Second Life principles[8]. time data on various environmental and operational pa- The following sections highlight the application of Ma- rameters. Using artificial intelligence to analyze and in- chine Learning (ML) in industrial challenges, focusing on the detection of pollutants in air (2) and water (3), and Ital-IA 2024: 4th National Conference on Artificial Intelligence, orga- on State of Charge estimation in automotive applications nized by CINI, May 29-30, 2024, Naples, Italy (4). * Corresponding author. † These authors contributed equally. $ alessio.miele@unicas.it (A. Miele); hamza.mustafa@unicas.it 2. Pollutant Identification in Air (H. Mustafa); michele.vitelli@unicas.it (M. Vitelli); a.bria@unicas.it (A. Bria); destefano@unicas.it (C. De Stefano); fontanella@unicas.it Our recent study proposes a novel system integrating (F. Fontanella); c.marrocco@unicas.it (C. Marrocco); sensor technology and machine learning to detect and m.molinara@unicas.it (M. Molinaria); a.scotto@unicas.it (A. Scotto di Freca) classify air contaminants effectively and affordably. Cur- © 2024 Copyright for this paper by its authors. Use permitted under Creative Commons License rent monitoring solutions face size, cost, and complexity Attribution 4.0 International (CC BY 4.0). CEUR ceur-ws.org Workshop ISSN 1613-0073 Proceedings issues[9], prompting the development of a more acces- DATA ACQUISITION sible solution. Challenges like low sensitivity and se- Software: SENSIPLUS API Hardware: MCU and/or Host lectivity in miniaturized, low-cost smart solutions are addressed, with comparisons made to CEN (European Committee for Standardization) reference instruments, PREPROCESSING noting lower accuracy and stability but highlighting their Software: EMA filtering and normalization value in data aggregation[10]. Spatial analysis techniques Hardware: MCU and/or Host aid in evaluating pollutant sources, while the limitations of chemical micro-sensors are extensively discussed in CLASSIFICATION the literature, along with methodologies to improve their Software: MLP, CNN or LSTM performance. Hardware: MCU or Host At the core of our proposed system is a sensor array including aluminum oxide for broad-spectrum volatile Figure 2: The proposed integrated system. SDM stands for SENSIPLUS Deep Machine. organic compound detection, a commercial capacitive humidity sensor, and graphene-functionalized sensor for pollutant sensitivity. These selections aim for versatil- ity and sensitivity across contaminant types. Integration This includes phases of baseline air exposure, controlled with the SENSIPLUS platform facilitates precise electrical introduction of contaminants, and subsequent recovery, impedance measurements, crucial for accurate air quality designed to capture the dynamic nature of indoor air assessment. The proposed integrated system is shown quality. This methodological approach is crucial for pro- in Figure 1 and is mainly composed of the following: (1) ducing comprehensive sensor data that reflects the com- SENSIPLUS Chip (henceforth SPC): a microelectronic plexities of real-world indoor environments. measurement device with on-chip sensing capabilities, For the analytical component of our study, we im- jointly developed by Sensichips s.r.l.[11] and the Depart- plemented several machine learning models, including ment of Information Engineering at the University of Multi-Layer Perceptrons (MLP), Convolutional Neural Pisa. Equipped with a versatile analog front end and Networks (CNN), and Long Short-Term Memory (LSTM) various internal and external ports, it enables electrical networks. These models were trained on datasets col- impedance measurements on both internal and exter- lected from our sensor array, to achieve high accuracy in nal sensors. It has already been adopted in other works, classifying different air contaminants. The contaminants as in [12, 13, 14]. (2) SENSIPLUS Deep Machine (SDM): included in our study encompass a range of substances a hardware/software module designed for data acqui- commonly found in indoor settings, such as acetone, al- sition, processing, and analysis. The block diagram in cohol, ammonia, bleach, and various volatile organic Figure 2 illustrates the logical flow of operations, high- compounds (VOCs), along with controls like water vapor lighting the software and hardware components utilized and clean air to facilitate accurate classification between for each task. Data acquisition is enabled by the SPC API, polluted and unpolluted conditions. a software library in C or Java, operating respectively Our findings indicate that the system can classify air on Micro Controller Units (MCUs) and multiple hosts contaminants with an average accuracy surpassing 75%, like Linux/Windows/Android, depending on application showcasing its potential effectiveness in indoor air qual- needs. Classification tasks utilize ML techniques like ity assessment. However, classification accuracy varied MLP, CNN, or LSTM, adaptable to run on MCU or more among different contaminants, with notable challenges powerful devices like PCs, depending on computational in distinguishing similar substances like acetone and al- requirements. cohol. This variation underscores the complexities of air quality monitoring and identifies avenues for future enhancement. In evaluating the system’s operational efficiency, we prioritized minimizing data acquisition times and en- ergy consumption, optimizing for low-power operations ideal for IoT applications. This focus ensures the effec- tiveness and practicality of our solution for real-world deployment, highlighting the importance of efficiency in Figure 1: The proposed integrated system. SDM stands for environmental monitoring technologies. SENSIPLUS Deep Machine. Looking forward, we anticipate several potential en- hancements to our system. These include integrating Our methodology involves a structured measurement additional sensor types to expand the range of detectable protocol to simulate various indoor air quality conditions. contaminants, exploring advanced machine learning SENSIPLUS [15]. The system’s objective is to detect sub- stances in wastewater. However, direct measurements from sewage drains are impractical due to unreliable con- ditions and health risks. To address this challenge, Syn- thetic WasteWater (SWW) is created to simulate sewage composition. The recipe used to create SWW is inspired by previous work, and pH adjustments are made to repli- cate real wastewater conditions. Fourteen substances have been spilled in the SWW background: (1) Acetic Acid; (2) Acetone; (3) Ethanol; (4) Ammonia; (5) Formic Acid; (6) Phosphoric Acid; (7) Sulphuric Acid; (8) Hydro- gen Peroxide; (9) Synthetic Waste Water; (10) Sodium Hypochlorite; (11) Sodium Chloride; (12) Dish Wash De- tergent; (13) Wash Machine Detergent; (14) Nelsen. These substances are divided into two categories: substances to be identified (group 1) and outlier samples (group 2) to be excluded by the system. This method guarantees a safe Figure 3: CNN Global Confusion Matrix. environment for dataset creation without any biological risks. models to enhance classification accuracy, and develop- ing expanded real-time monitoring capabilities. These efforts aim to further improve the comprehensiveness and usability of our indoor air quality monitoring system. In conclusion, our work contributes to environmental monitoring efforts by demonstrating the feasibility of a sensor-based and machine-learning-integrated system Figure 4: Identification system architecture. for indoor air quality assessment. While promising, our results also highlight the challenges in air quality moni- toring and the necessity for continued innovation in this To enhance sensitivity to the substances of interest field. Our study represents a step toward achieving more and the RedOx dynamics, the six IDEs of the SCW were accessible, efficient, and accurate air quality monitoringcoated with six different metals: Gold (M1), Copper (M2), solutions. Silver (M3), Nickel (M4), Palladium (M5), and Platinum (M6). From the resulting sensors, we recorded the resis- tance measured at a frequency of 78 kHz for the Gold and 3. Pollutant Identification in Water Platinum IDEs, while Resistance and Capacitance were measured at a frequency of 200 Hz for Gold, Platinum, Detecting illegal pollutants in wastewater is crucial for Silver, and Nickel. This yielded a feature vector com- public health and security. An End-to-End IoT-ready prising ten values: six resistance and four capacitance node is proposed for sensing, processing, and transmit- measurements. Notably, the experimental campaign did ting wastewater pollutant data. Utilizing Smart Cable not involve the use of Palladium and Copper IDEs. Water with SENSIPLUS chip sensors, the system employs impedance spectroscopy to distinguish pollutants from other substances. Data processing, on a low-cost Micro 3.2. Classification Control Unit, involves anomaly detection, classification, The classification system consists of two phases: Data and false positive reduction through machine learning Preprocessing and Classification. In the Data Preprocess- algorithms. ing phase, raw sensor data is normalized before being sorted and evaluated by a Finite State Machine (FSM) 3.1. Metodology shown in Figure 5. This process determines whether the data should proceed to the Classification phase. The identification system, depicted in Figure 4, utilizes The Data Preprocessing phase involves normalizing the Smart Cable Water (SCW), an IoT-ready smart sensor the raw data from sensors, establishing a robust baseline system developed by Sensichips s.r.l. The SCW com- signal, and determining whether the normalized sample prises InterDigitated Electrodes (IDEs) and is based on should proceed to the anomaly detector or be directly classified using the FSM. 4. Optimization of Battery State of Charge Estimation Accurate monitoring of State of Charge (SoC) is crucial for tasks like battery life estimation and temperature control. Existing techniques like Coulomb counting and Open Circuit Voltage (OCV) face challenges such as mea- surement errors and the flat relationship between voltage and SoC in certain battery types like Lithium Iron Phos- phate (LFP). Electrochemical Impedance Spectroscopy (EIS) emerges as a promising alternative but suffers from Figure 5: Identification system architecture. long measurement times. This work proposes a method to minimize measurement time while ensuring accurate SoC estimation, particularly with EIS and knowledge- In real scenarios, distinguishing between substances based SoC classes. of interest and others in the sewerage network is cru- The proposed approach follows the framework shown cial. The primary aim is to determine if the substance in Figure 1. It starts with the identifying design parame- being investigated is of interest, minimizing subjective ters and constraints, which include: (1) Resolution of SoC evaluations unless specified. performance estimation, (2) Target measurement time, The identification phase involves anomaly detection (3) Target Accuracy, (4) Battery type, and (5) Classifier. and multiclass classification for precise substance identifi- The second step is to characterize the device under test, cation. Anomaly detection excludes common substances, focusing on outliers, while classification employs opti- Constrains Definition mized KNN models trained solely on samples of inter- est. Grid search methods enhance the accuracy of both Characterization of batteries anomaly detection and multiclass classification models. under test NO Is the classifier fixed? 3.3. Results Classifier The study combined anomaly detection with a multi- YES selection class classifier for the final test, as illustrated in Figure 6. However, the multiclass classifier incorrectly identified Feature Selection some outlier substances, leading to false positive alarms. To mitigate this, the anomaly detection system was in- tegrated before the multiclass classifier. Consequently, Selected Frequencies most outlier samples were accurately classified as ’UN- KNOWN,’ achieving an accuracy rate of 79.4%. Notably, Figure 7: The proposed method workflow. 20.6% of outlier samples, primarily sodium hypochlorite, were frequently misclassified as hydrogen peroxide. focusing on achieving the most stringent parameters pos- sible. Then the appropriate classifier from the previous dataset is evaluated. The chosen classifier, demonstrating better accuracy, is then integrated into the feature selec- tion algorithm. The final stage involves feature selection using search algorithms, aimed at minimizing measure- ment time while preserving accuracy above the specified target. 4.1. Metodology In this example, the State of Charge (SoC) estimation problem was addressed using 10-class classification mod- els where each class represents a 10% interval of the SoC. Figure 6: Entire system results shown as Confusion Matrix. The initial dataset comprises all available features, includ- ing 28 impedances (real and imaginary parts) measured at various frequencies, totaling 56 features collected from 7 different cells. These features represent the Nyquist plots of battery impedances at different SoCs, as illus- 1.0 trated in Figure 8. Performance evaluation metrics used 10 0.90 0.10 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.09 0.09 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 are described by Grandini et al[16]. The experiments 20 0.06 0.88 0.06 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.10 0.12 0.10 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.8 30 0.00 0.00 0.00 0.88 0.12 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.07 0.07 0.00 0.00 0.00 0.00 0.00 0.00 40 0.00 0.00 0.06 0.83 0.10 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.10 0.06 0.05 0.00 0.00 0.00 0.00 0.00 251.2 0.6 50 0.00 0.00 0.00 0.00 0.06 0.81 0.12 0.00 0.00 0.00 0.00 0.00 0.00 0.06 0.10 0.07 0.00 0.00 0.00 0.00 TRUE 60 0.00 0.00 0.00 0.00 0.06 0.71 0.17 0.06 0.00 0.00 63.1 SoC = 100 % 0.00 0.00 0.00 0.00 0.10 0.12 0.14 0.06 0.00 0.00 SoC = 95 % SoC = 85 % 0.4 70 0.00 0.00 0.00 0.00 0.00 0.00 0.12 0.79 0.08 0.00 0.00 SoC = 75 % 15.8 SoC = 65 % SoC = 55 % 0.00 0.00 0.00 0.00 0.14 0.21 0.09 0.00 0.00 80 0.00 0.00 0.00 0.00 0.00 0.00 0.10 0.85 0.04 0.00 SoC = 45 % SoC = 35 % 0.00 0.00 0.00 0.00 0.00 0.00 0.11 0.09 0.06 0.00 4.0 SoC = 25 % 0.2 90 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.10 0.83 0.06 SoC = 15 % SoC = 5 % 0.00 0.00 0.00 0.00 0.00 0.00 0.11 0.06 0.06 0.04 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.02 0.94 100 0.06 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.05 0.06 44.1 62.5 88.7 125.7 178.3 252.7 0.0 10 20 30 40 50 60 70 80 90 0 Figure 8: Obtained Nyquist plot of a single battery at different 10 State of Charge. PREDICTED consistently followed the k-fold method, ensuring opti- Figure 9: Obtained confusion matrix of the Support Vector mal dataset utilization by rotating the batteries used. As Machine model, with mean value (top) and standard deviation a result, six trained models were obtained. Evaluation (bottom) for each class. metrics confirm that the Support Vector Machine (SVM) model outperforms others, with a mean accuracy of 0.83 and a standard deviation of 0.04. The resulting confusion imum Accuracy achieved over 50 runs, correlating with matrix shown in Figure 9 illustrates the performance of the weight coefficient, while considering measurement the SVM model. These preliminary classification tests time. The blue star indicates the solution with the highest identify SVM as the most effective ML model among Accuracy. The band represents SoC estimation Accuracy those considered. considering all features with the SVM classifier,showing The problem of identifying the optimal set of frequen- a trade-off between accuracy and measurement time opti- cies for impedance measurement via EIS for battery SoC mization, where higher 𝛼 values prioritize accuracy over estimation has been addressed using optimization algo- time. rithms as search strategies, specifically Particle Swarm Optimization (PSO) [17]. A fitness function is imple- 0D[LPXP$FFXUDF\ $FFXUDF\IRUPLQLPXPPHDVXUHPHWWLPH 0HDVXUHPHQWWLPHIRUWKHPD[LPXP$FFXUDF\ 0LQLPXPPHDVXUHPHWWLPH   mented based on a supervised learning model 1, aiming  to balance accuracy in SoC estimation and measurement  $FFXUDF\ZLWKDOOIHDWXUHV  time. The parameter 2 represents the ratio of correct pre-  1RUPDOL]HGPHDVXUHPHQWWLPH  $FFXUDF\ dictions (CP) to total predictions (TP), while parameter 3 is inversely related to measurement duration. Measure-   ment time (𝑇𝑚𝑒𝑎𝑠 ) is computed as the sum of selected   feature durations, with 𝑇𝑚𝑎𝑥 related to the use of all   features. Parameters 𝐴 and 𝐵 range from 0 to 1, with     ZHLJKWFRHIIFLHQW   𝛼 serving as a weight coefficient between accuracy and Figure 10: Accuracy and measurement time as a function of time contributions. weight coefficient for PSO+SVM combination. 𝑆 = 𝛼 · 𝐴 + (1 − 𝛼) · 𝐵 (1) 𝐶𝑃 𝐴= (2) 𝑇𝑃 Acknowledgments 𝑇𝑚𝑒𝑎𝑠 𝐵 =1− (3) 𝑇𝑚𝑎𝑥 The EU partially supported this work in the NextGenera- tionEU plan through MUR Decree n. 1051 23.06.2022 4.2. Results "PNRR Missione 4 Componente 2 Investimento 1.5" - CUP H33C22000420001, partially through Horizon Eu- This case study establishes a target accuracy of 0.95, re- rope RHE-MEDiation with (GA 101113045). gardless of measurement time. Figure 10 shows the max- References tribute to air quality monitoring and exposure es- timates?, Environment International 99 (2017) 293 [1] R. S. Peres, X. Jia, J. Lee, K. Sun, A. W. Colombo, – 302. URL: http://www.sciencedirect.com/science/ J. Barata, Industrial artificial intelligence in indus- article/pii/S0160412016309989. doi:https://doi. try 4.0 - systematic review, challenges and outlook, org/10.1016/j.envint.2016.12.007. IEEE Access 8 (2020) 220121–220139. doi:10.1109/ [11] Sensichips, ???? URL: www.sensichips.com. ACCESS.2020.3042874. [12] G. Cerro et al., Preliminary realization of a moni- [2] J. Zhang, D. Tao, Empowering things with in- toring system of activated carbon filter RLI based telligence: A survey of the progress, challenges, on the SENSIPLUS® microsensor platform, in: 2017 and opportunities in artificial intelligence of things, IEEE International Workshop on Measurement and IEEE Internet of Things Journal 8 (2021) 7789–7817. Networking (M&N), 2017, pp. 1–5. doi:10.1109/ doi:10.1109/JIOT.2020.3039359. IWMN.2017.8078361. [3] C. Li, Y. Chen, Y. Shang, A review of industrial [13] G. Cerro et al., Metrological characterization of a big data for decision making in intelligent manu- novel microsensor platform for activated carbon facturing, Engineering Science and Technology, filters monitoring, IEEE Transactions on Instru- an International Journal 29 (2022) 101021. URL: mentation and Measurement 67 (2018) 2504–2515. https://www.sciencedirect.com/science/article/pii/ [14] P. Bruschi et al., A novel integrated smart sys- S2215098621001336. doi:https://doi.org/10. tem for indoor air monitoring and gas recogni- 1016/j.jestch.2021.06.001. tion, in: 2018 IEEE Int. Conf. on Smart Computing [4] F. Sherwani, M. M. Asad, B. Ibrahim, Collaborative (SMARTCOMP), 2018, pp. 470–475. doi:10.1109/ robots and industrial revolution 4.0 (ir 4.0), in: 2020 SMARTCOMP.2018.00048. International Conference on Emerging Trends in [15] A. Ria, M. Cicalini, G. Manfredini, A. Catania, M. Pi- Smart Technologies (ICETST), 2020, pp. 1–5. doi:10. otto, P. Bruschi, The sensiplus: A single-chip fully 1109/ICETST49965.2020.9080724. programmable sensor interface, in: S. Saponara, [5] S. C. Mukhopadhyay, S. K. S. Tyagi, N. K. Suryade- A. De Gloria (Eds.), Applications in Electronics Per- vara, V. Piuri, F. Scotti, S. Zeadally, Artificial vading Industry, Environment and Society, Springer intelligence-based sensors for next generation iot International Publishing, Cham, 2022, pp. 256–261. applications: A review, IEEE Sensors Journal [16] M. Grandini, E. Bagli, G. Visani, Metrics for multi- 21 (2021) 24920–24932. doi:10.1109/JSEN.2021. class classification: an overview, arXiv preprint 3055618. arXiv:2008.05756 (2020). [6] G. Manfredini, A. Ria, P. Bruschi, L. Gerevini, [17] M. A. Khanesar, M. Teshnehlab, M. A. Shoorehdeli, M. Vitelli, M. Molinara, M. Piotto, An asic-based A novel binary particle swarm optimization, in: miniaturized system for online multi-measurand 2007 Mediterranean Conference on Control & Au- monitoring of lithium-ion batteries, Batteries 7 tomation, 2007, pp. 1–6. doi:10.1109/MED.2007. (2021). doi:10.3390/batteries7030045, cited 4433821. by: 11; All Open Access, Gold Open Access, Green Open Access. [7] A. Masias, J. Marcicki, W. A. Paxton, Opportunities and challenges of lithium ion batteries in automo- A. Online Resources tive applications, ACS Energy Letters 6 (2021) 621– Public link for downloading the acquired dataset. 630. doi:10.1021/acsenergylett.0c02584. [8] M. Shahjalal, P. K. Roy, T. Shams, A. Fly, J. I. Chowdhury, M. R. Ahmed, K. Liu, A review on second-life of li-ion batteries: prospects, challenges, and issues, Energy 241 (2022) 122881. URL: https://www.sciencedirect.com/science/article/pii/ S0360544221031303. doi:https://doi.org/10. 1016/j.energy.2021.122881. [9] F. Rock, N. Barsan, U. Weimar, Electronic nose: Cur- rent status and future trends, Chemical Reviews 108 (2008) 705–725. doi:10.1021/cr068121q, pMID: 18205411. [10] N. Castell, F. R. Dauge, P. Schneider, M. Vogt, U. Lerner, B. Fishbain, D. Broday, A. Bartonova, Can commercial low-cost sensor platforms con-