## 5 Case Study
### Detailed Description of the SIRPM Model
The CART algorithm (classification and regression trees) was configured to identify failure patterns from the collected data. Decision trees are a widely used machine learning model that seeks to predict a value or class by constructing a hierarchical structure of decisions, represented by nodes. Each internal node of the tree corresponds to a condition on an attribute of the data, and the leaves contain the final prediction (value or class). The decision tree algorithm performs a series of divisions on the data based on criteria such as the Gini index or the mean squared error, aiming to optimize the homogeneity of the data in each subset generated. In the context of the SIRPM model, the regression tree (CART for regression) was chosen due to the objective of predicting continuous values, such as the time to failure in machines or the severity of component wear, rather than simply classifying a failure condition. The choice for regression was justified by the nature of the data collected (such as vibration, pressure, and temperature of machines), which are continuous numerical values, and the desired prediction was of a quantitative value, representing the probability or time to failure. The regression tree model was trained using historical machine data, after data cleaning and normalization, to accurately predict the occurrence of imminent failures, providing a continuous value that could be used to make preventive maintenance decisions. This approach was applied to the machine learning model with the CART algorithm training, using 80% of the data for training and 20% for validation in order to assess the accuracy of the model before its integration with the RPA system for automatic alert and maintenance actions. * Phase 4: Predictive Model Implementation with RPA Integration  
From the seventh month, the predictive machine learning model was integrated with the automated RPA system. The RPA bot (UIPath) was programmed to collect sensor data hourly, processing the last 24 h of information. The process involved the following:  
1. The RPA bot collected data and stored it in a SQL database. 2. A Python script executed the machine learning algorithm, reading SQL table values, making predictions, and saving results in a new table. 3. A secondary RPA script analyzed predicted values. If anomalies were detected, it generated automated email alerts to the maintenance team, specifying the affected machine and identified value. Automated Workflow:  
1. Data collection: sensors provided data stored in the SQL database. 2. Data processing: the ML model analyzed patterns and made predictions. 3. Alerts: anomalous values triggered automatic email notifications to the maintenance team. Technologies Used:  
\(\circ\)  
UiPath: for data collection and alert automation. \(\circ\)  
Python (scikit-learn): for developing the machine learning model, leveraging libraries such as Pandas, NumPy, and matplotlib for data analysis and visualization. The identification of alert values for each type of sensor in Alpha machines was based on the typical reference values mentioned by the company, with the aim of monitoring machine performance and anticipating imminent failures. The reference values for each sensor were defined to ensure efficient operation of the equipment and minimize failures during the manufacturing process. Below, we explain how alerts were identified for vibration, pressure, and temperature sensors, based on the standard values and established limits. * Vibration sensor (paper cutter): Excessive vibration is one of the first signs of mechanical wear or misalignment of machine parts. The ideal vibration range for the paper cutter was defined between 1.0 and 1.3 mm/s, considering normal machine operation. When vibration exceeded 1.5 mm/s, this indicated a possible imminent mechanical failure, such as a misalignment of parts or excessive wear, which could compromise machine operation.