October 20, 2026
Predictive Modeling of Process Variables for Failure Prevention in Chemical Reactors
Predictive Modeling of Process Variables for Failure Prevention in Chemical Reactors
Vitor Dyonisio Coelho Sales; Wagner dos Anjos Carvalho
DOI: 10.22167/2675-6528-202603546
Article derived from a Course Conclusion Work (TCC), with content based on the student’s original work and adapted to the editorial format of the E&S Magazine with the support of the ResumeAI tool, an artificial intelligence solution developed by Instituto Pecege for textual synthesis and organization.
Summary
Polymerization industrial processes, such as the production of Expanded Polystyrene (EPS), operate under dynamic and multivariate conditions, where temperature and pressure are critical for product quality and operational safety. The complexity and variability of these systems make it difficult to anticipate anomalies using traditional approaches. A Machine Learning-based methodology was developed and validated for the analysis and prediction of critical variables in an industrial EPS reactor. For this purpose, a synthetic dataset was used, generated by computational simulation, which reproduced the dynamics of a real industrial process. The methodology comprised Exploratory Data Analysis, preprocessing, temporal feature engineering, dimensionality reduction by Principal Component Analysis (PCA), and application of supervised and unsupervised learning algorithms. Regression models, such as Random Forest Regressor and XGBoost, were employed to predict temperature and pressure, while clustering techniques (K-Means) identified operational regimes. Additionally, anomaly detection methods, such as Isolation Forest, identified atypical behaviors. The regression models achieved high accuracy, with coefficients of determination (R²) close to 1.0000 for both variables. Anomaly detection identified 28 atypical observations, corresponding to 3.01% of the dataset, associated with conditions outside the steady-state regime. The proposed approach demonstrated the ability to capture the system’s temporal dynamics and provide consistent predictions, establishing itself as a robust, interpretable, and transferable framework. It contributes to predictive maintenance strategies, operational optimization, and increased safety in chemical processes.
Keywords: Industrial Automation; Data Science; Industry 4.0; Predictive Maintenance; Process Optimization.
1. Introduction
The Fourth Industrial Revolution, widely known as Industry 4.0, represents a radical transformation in the way industries operate, integrating digital, physical, and biological technologies (SCHWAB, 2016). Unlike previous revolutions, which focused on mechanical and electrical automation, Industry 4.0 is based on the interconnection of systems, intelligent automation, and real-time data analysis (KAGERMANN et al., 2013). The pillars of this revolution include cyber-physical systems, the Internet of Things (IoT), cloud computing, Big Data, and Machine Learning (CARDOSO, 2016).
In the chemical sector, where operational safety, efficiency, and product quality are critical aspects, data analysis emerges as a powerful tool for enhancing process monitoring and controlling (ZHANG et al., 2020). Process digitalization, system integration, and massive real-time data collection have become pillars for operational optimization. Industrial maintenance has evolved from a reactive to a proactive approach, aiming to minimize downtime and operational costs (MOBLEY, 2002). Traditionally, corrective and preventive maintenance can result in unplanned production stoppages or component replacements that could still be utilized (LEE et al., 2014). In this scenario, predictive maintenance emerges as a solution to these problems, using data analysis and predictive models to estimate the future state of equipment (SOPHIE, 2025).
Recent literature highlights the application of Machine Learning algorithms as effective tools for monitoring and predicting critical variables in industrial environments. Multivariate regression models and decision tree-based methods, especially ensemble algorithms like Random Forest Regressor, have demonstrated good performance in modeling nonlinear systems, showing high robustness against data variability and good interpretability of results (BREIMAN, 2001; ZHANG et al., 2020). In parallel, unsupervised learning techniques, such as clustering methods and anomaly detection, have been employed for identifying different operational regimes and for monitoring deviations in complex industrial processes.
Despite advances in industrial digitalization, the application of predictive models for anticipating failures in Expanded Polystyrene (EPS) production processes still faces significant challenges. The high variability of process variables, the complexity of dynamic interactions between system components, and the presence of nonlinear behaviors make precise modeling difficult with traditional control and analysis methods. Anticipating anomalous conditions and potential failures is crucial for optimizing operation and increasing safety in chemical reactors.
Given this context, the following research problem is established: how can Machine Learning techniques be used to predict the behavior of critical variables, such as temperature and pressure, in chemical reactors at EPS, in order to identify anomalous conditions and potential failures in advance, contributing to operational optimization and increased process safety? With the aim of answering this question, this work proposes the development and validation of a Machine Learning-based methodology for predicting temperature and pressure variables in EPS reactors.
2. Material and Methods
The methodology adopted in this work was characterized by a quantitative and exploratory approach, structured in a sequential and systematic flow. The objective was to develop and validate a Machine Learning-based methodology for the analysis and prediction of critical variables in an industrial Expanded Polystyrene (EPS) reactor, aiming for operational optimization and increased process safety. The dataset used was generated by computational simulation, employing the Model-in-the-Loop (MIL) approach with Siemens’ TIA Portal and WinCC Unified software. PID controllers were programmed according to the IEC 61131-3 standard, ensuring fidelity to the behavior of real systems. The dataset consisted of a multivariate time series, with a resolution of 1 minute and a duration of 16 hours, covering all operational stages of an EPS reactor.
The variables present in the dataset were organized into categories, including temporal and contextual, thermal and control, pressure and safety, dosage and production, and mechanical and operational. Noteworthy were the temporal record, the simulated reactor temperature, the internal pressure, the accumulated mass of inputs (PVP and pentane), the agitator rotation, and the reactor fill level.
Initially, an Exploratory Data Analysis (EDA) was performed to understand the dynamic behavior of the process variables. In this step, descriptive statistics, temporal visualizations, and correlation analysis were applied, allowing the identification of operational patterns and relevant relationships between the critical process variables.
Next, the data was preprocessed, which included handling missing values, standardizing numerical variables, and identifying potential outliers. Feature engineering was performed by creating derived variables, such as temporal lags of temperature and pressure, moving averages and rates of change, as well as thermal control attributes and dosage indicators.
To analyze the multivariate structure of the system and identify the main variability patterns, the Principal Component Analysis (PCA) technique was applied. Before PCA, all explanatory variables were standardized by Z-score normalization. The target variables (temperature and pressure) were excluded from the analysis to avoid bias in the construction of the principal components.
Subsequently, unsupervised learning algorithms were applied to identify distinct operational regimes of the industrial reactor. The K-Means algorithm was used to group observations based on the similarity of process variables. The number of clusters was set to four, and initialization was performed with multiple runs (n_init = 10) for greater stability of the results.
In the predictive modeling stage, supervised and unsupervised learning algorithms were employed. For temperature and pressure prediction, Multiple Linear Regression was used as a reference model, in addition to ensemble algorithms such as Random Forest Regressor (300 trees) and Gradient Boosting Regressor (XGBoost, 200 estimators, learning rate of 0.05, maximum depth of 5). For anomaly detection, Isolation Forest (200 estimators, contamination rate of 3%) was applied, without using the target variables in training.
Machine Learning models and analyses were implemented in Python, using consolidated data science libraries. Data manipulation, cleaning, and preprocessing were performed with Pandas and NumPy. Exploratory analysis and graphical visualization employed Matplotlib and Seaborn. Predictive modeling and unsupervised learning techniques were implemented via Scikit-learn, including standardization (StandardScaler), dimensionality reduction (PCA), clustering (KMeans), and anomaly detection (IsolationForest).
3. Results and Discussion
This section details the results obtained from applying the Machine Learning methodology for the predictive analysis of temperature and pressure in an Expanded Polystyrene (EPS) chemical reactor. The findings are discussed from the perspective of the models’ predictive performance, the interpretability of the results, and the industrial applicability of the proposed predictive approach, focusing on failure prevention and process optimization. The analysis ranges from initial data exploration to predictive modeling and anomaly detection, providing a comprehensive view of the system’s behavior and its operational implications.
Exploratory Data Analysis (EDA)
Exploratory data analysis (EDA) revealed the dynamic behavior of the process variables in an industrial batch polymerization reactor, covering a complete production cycle. The dataset, synthetically generated by computational simulation, consisted of 960 observations collected at one-minute intervals over 16 hours, representing a 625 kg batch of PVP K90. This simulation approach, using industrial PID controllers in the TIA Portal and WinCC Unified environments, is crucial for the development and validation of advanced control and data analysis strategies in the context of Industry 4.0, allowing for the testing of Machine Learning methodologies before their implementation in real plants.
The temperature control in the reactor employed a PID strategy in a split-range configuration, where the steam and water valves act exclusively. During the heating and thermal maintenance phases, which extended from 08:00 to 22:00, the steam valve remained active. The water valve, in turn, was activated exclusively in the final cooling phase, between 22:00 and 00:00. The reactor temperature followed the setpoint profile adequately, registering an average value of 106.6 °C and an absolute average error of only 0.24 °C, which demonstrates the high effectiveness of the implemented control system.
The internal reactor pressure started at approximately 0.5 bar, close to atmospheric pressure, and increased progressively as the heating process and reaction evolved. The pressure predominantly stabilized in the range between 8 and 10.5 bar, with an average value of 8.2 bar. The observed oscillations were of low amplitude and were intrinsically linked to the system’s thermal dynamics and dosing events. It is important to note that, throughout the analyzed period, the pressure consistently remained below the established operational safety limits, indicating robust process control.
The dosing events were gradually simulated to replicate industrial operational reality and avoid abrupt pressure and temperature spikes, ensuring process safety. The PVP K90, totaling 625 kg, was added to the reactor over a period of 30 minutes, between 13:21 and 13:50. Pentane, with a total mass of 51.925 kg, was dosed in four distinct stages, which occurred between 17:01 and 18:40. This controlled dosing strategy is fundamental for the stability and safety of operations in chemical reactors.
The agitator rotation was maintained at 120 RPM for most of the process, being reduced to 96 RPM specifically during the dosing steps. This controlled reduction aims to optimize the incorporation of inputs into the reaction medium. The agitator power varied between 16 and 59 kW, reflecting the increased torque required as the reactor level rose and the resistance of the reaction medium increased. The reactor level, which started at approximately 30%, reached about 85% after the completion of dosing, demonstrating the evolution of reactor filling throughout the production cycle.
The performance graphs generated during the AED evidenced the high stability of the control system. The absolute average temperature error of 0.24 °C and the low average temperature variation rate indicate a smooth response and the absence of significant oscillations, desirable characteristics in industrial processes. The analysis of the correlation between temperature and pressure revealed a strong linear correlation coefficient of 0.975, which is consistent with the thermodynamic principles of systems with approximately constant volume. This finding suggests that, in steady state, the increase in temperature is directly linked to the increase in the reactor’s internal pressure.
Despite the strong linear correlation observed, punctual deviations were identified in the relationship between temperature and pressure during specific process events, such as the dosing steps and periods of exothermic reaction behavior. These deviations indicate that pressure is not exclusively influenced by temperature, but also by additional operational and physicochemical factors. Such an observation reinforces the need to develop multivariate predictive models that can adequately represent the complex dynamics of the industrial system, going beyond a simple linear relationship to capture all relevant interactions.
Preprocessing and Feature Engineering
After exploratory analysis, preprocessing and feature engineering were performed to adapt the dataset to Machine Learning algorithms, ensuring temporal consistency, noise reduction, and an accurate representation of the reactor dynamics. The data were organized chronologically based on the DataHora variable, maintaining a one-minute resolution. Infinite and missing values, resulting from operations such as lags and moving averages, were systematically handled, with the removal of initial observations impacted only at the end of the process to preserve the physical and temporal coherence of the system.
Feature engineering included the creation of additional temporal variables, such as Tempo_Processo_min, which records the elapsed time since the start of the process. This variable is fundamental for the models to capture global trends associated with different operational stages, such as heating, reaction regime, dosing events, and cooling. The inclusion of temporal lags (lags) of temperature and pressure, with delays of 1, 5, 10, and 30 minutes, allowed for the representation of the system’s thermal and pressure inertia. Moving averages in 5 and 15-minute windows were calculated to smooth the signal and highlight relevant operational trends.
Variables related to thermal control performance were also incorporated, including the absolute temperature error with respect to the setpoint, the integral of the error over a 10-minute window, and the smoothed rate of temperature change. These attributes provide indirect information about the PID controller’s action, aiding in the identification of steady-state, transient regimes, and conditions of higher control effort. Furthermore, state and operational variables, such as the numerical identification of the operational step and indicators of dosing events (PVP and pentane), were included to allow the models to differentiate operational regimes and capture disturbances associated with input additions.
After the preprocessing stage, the consolidated dataset was free of missing values and comprised temporal attributes, process variables, derived features, and target variables. This final dataset demonstrated physical consistency, industrial interpretability, and compatibility with supervised and unsupervised learning techniques. Table 1, present in the original thesis, details the main attributes used in the modeling, such as Tempo_Processo_min, Erro_Temp_abs, Temp_lag_10m, Press_lag_10m, Temp_mm_15m, Etapa_Num, Evento_PVP, and Evento_Pentano, each with its respective description. The careful construction of these attributes was essential for the robustness and accuracy of the subsequent predictive modeling and anomaly detection steps.
Dimensionality Reduction (PCA)
The Principal Component Analysis (PCA) technique was applied to the pre-processed dataset with the objective of analyzing the multivariate structure of the process and identifying the main variability patterns. PCA was employed as an exploratory tool to reduce data dimensionality and aid in the interpretation of operational regimes. Before application, all explanatory variables were standardized through Z-score normalization, ensuring that attributes with different physical scales contributed equally to the analysis. The target variables, temperature and pressure, were excluded to avoid biases in the construction of the principal components.
The analysis of the cumulative explained variance indicated that the first principal components concentrate most of the system’s information. The first principal component (PC1) explained more than 50% of the total variance, while the first two components (PC1 and PC2) jointly represented more than 80% of the data variability. The first five components were sufficient to capture approximately 97% to 98% of the total process variance, demonstrating a high degree of correlation between the variables, a typical characteristic of controlled industrial processes. This result is crucial for understanding the system’s complexity and for optimizing predictive models.
The projection of the observations in the two-dimensional space defined by PC1 and PC2 revealed an organized and continuous structure, with consistent separation between the different operational stages of the process, as indicated by the variable Etapa_Num used to color the points. The data followed a progressive trajectory in the principal component space, a characteristic behavior of batch processes, where the system’s state evolves continuously over time. This visualization reinforces the capability of PCA to extract significant information about process dynamics.
The physical interpretation of the principal components suggests that PC1 is strongly associated with the overall energy state and thermal dynamics of the reactor, incorporating information from temperature, lagged variables, and moving averages. PC2, in turn, demonstrated greater sensitivity to dynamic variations and operational disturbances, reflecting effects related to pressure, dosing events, and process transients. The clear formation of clusters corresponding to different operational regimes demonstrates that PCA was able to capture, in an unsupervised manner, relevant patterns of the industrial process, validating the consistency of the attribute engineering and the preservation of the system’s physical and operational characteristics in the reduced space.
Clustering – Identification of Operational Regimes
With the objective of identifying operational patterns intrinsic to the polymerization industrial process, the K-Means unsupervised learning technique was applied. This approach allowed for the automatic segmentation of reactor operational states based on the joint behavior of process variables, without the need for explicit labels or prior information about the production cycle stages. The input variables for clustering were the same ones used in predictive modeling, excluding the target variables of temperature and pressure to avoid direct bias in segmentation. All variables were standardized by Z-score, ensuring suitability for distance-based algorithms.
To facilitate the visualization and interpretation of the identified regimes, Principal Component Analysis (PCA) was previously applied, reducing the attribute space to the two main dimensions (PC1 and PC2), which concentrate most of the data variance. The K-Means algorithm was then applied to this reduced space, with the number of clusters defined as k = 4. This value was chosen based on the physical interpretation of the process and the expectation of segmentation of the main operational regimes. Initialization was performed with multiple runs (n_init = 10), aiming for greater stability and robustness of the results.
The application of K-Means resulted in the consistent assignment of observations to four distinct clusters, where each cluster occupied well-defined regions in the PC1 × PC2 space. This clear separation suggests the existence of distinct operational regimes, associated with different combinations of thermal and pressure conditions, and reactor states. The analysis of the identified clusters allowed them to be associated with specific operational regimes of the process, such as a controlled cooling regime, characterized by low temperatures and pressure stability, and transition and input dosing regimes, in which controlled pressure variations occur.
Additionally, a main heating and reaction regime was identified, marked by a high correlation between temperature and pressure and higher energy consumption. It is important to highlight that these associations emerged in an unsupervised manner, without any prior provision of information about the process steps. In general, the results demonstrate that the clustering technique was effective in automatically segmenting relevant operational regimes, validating its application as a tool to support exploratory analysis, understanding process behavior, and monitoring complex industrial systems, contributing to operational optimization.
Predictive Modeling with Multiple Linear Regression
In this stage, the predictive capacity of Multiple Linear Regression models was evaluated for the Temperature (°C) and Pressure (bar) variables of the industrial polymerization process. The objective was to verify if the attributes derived in the pre-processing and attribute engineering stage were sufficient to quantitatively describe the system dynamics. The models were trained using the final consolidated dataset, composed of temporal variables, physical lags, moving averages, control variables, operational states, and process event indicators. The target variables were excluded from the set of predictors and used exclusively as model outputs.
Multiple linear regression was adopted as the baseline model due to its interpretability and ability to assess the degree of linearity between process variables and targets, serving as a comparative basis for more advanced methods. The data were divided into training and testing subsets, corresponding to 80% and 20% of the observations, respectively, to ensure the reproducibility of the results. Initially, a model was fitted for the prediction of system temperature, and the performance obtained was exceptional.
For temperature prediction, the multiple linear regression model achieved a coefficient of determination (R²) of 1.0000, a root mean squared error (RMSE) of 0.00 °C, and a mean absolute error (MAE) of 0.00 °C. These values indicate a practically perfect fit between observed and predicted values, which is visually confirmed by the scatter plot, where the points align perfectly with the identity line. This result highlights a strong linear relationship between temperature and the process control and state variables, in addition to the high stability of the simulated system.
Next, a multiple linear regression model was developed for the prediction of system pressure. The results also indicated high performance, with a coefficient of determination (R²) equal to 1.0000, an RMSE of 0.01 bar, and an MAE of 0.00 bar. These values are practically negligible when compared to the operational range of the pressure. The graphical analysis reinforces the quantitative results, demonstrating strong adherence between the actual and predicted values and confirming the model’s ability to adequately capture the relationship between pressure and the independent variables, even considering the dynamic nature of the process. The high precision of these linear models serves as a robust starting point for comparisons with more complex approaches.
Predictive Modeling with Random Forest Regressor
The results obtained with the application of the Random Forest Regressor algorithm for the prediction of Temperature (°C) and Pressure (bar) variables demonstrated superior performance compared to linear models. Random Forest, an ensemble learning method based on the combination of multiple decision trees, is capable of capturing non-linear relationships and complex interactions between process variables. The same dataset from previous steps was used, ensuring methodological consistency, with the target variables (temperature and pressure) as outputs and the other operational and temporal variables as inputs.
The data were divided into training and testing subsets, corresponding to 80% and 20% of the total observations, respectively, using a fixed seed to ensure the reproducibility of the results. For modeling, the Random Forest Regressor algorithm was configured with 300 decision trees, without a maximum depth limitation, allowing for a full exploration of the existing relationships in the data. Training was performed separately for each target variable, resulting in two independent models, one for temperature and another for pressure.
For temperature prediction, the Random Forest Regressor model presented extremely high performance. The coefficient of determination (R²) reached a value of 0.9995, indicating that practically all temperature variability is explained by the independent variables used. The root mean squared error (RMSE) was 0.59 °C, while the mean absolute error (MAE) was 0.32 °C. These values, considered low compared to the operational range of the variable, demonstrate the high precision and stability of the predictive model. The graphical analysis between the actual and predicted temperature values confirmed the excellent numerical performance, with the points distributed very close to the identity line, indicating strong agreement.
Regarding pressure, the Random Forest Regressor model showed equally expressive performance. The R² value obtained was 0.9997, indicating an almost perfect fit. The RMSE was 0.04 bar, and the MAE was 0.02 bar, demonstrating extremely low average errors. These results show that the model was able to capture the pressure dynamics in the analyzed process with high precision. The scatter plot between the actual and predicted pressure values reinforces the model’s quality, with the points consistently aligned with the reference line, indicating that the Random Forest adequately modeled both the general trends and local variations of the variable, even in a context of possible nonlinearity.
Beyond predictive analysis, the importance of variables in the temperature model was evaluated, providing greater interpretability to the results. The analysis revealed that the Setpoint_Temp (°C) variable showed the greatest relative contribution to temperature prediction, followed by the Temp_lag_1m variable, which represents the temperature value with a one-minute temporal lag. This result is consistent with the physical behavior of the process, in which the current temperature is strongly influenced by both the reference value set by the control system and the immediately preceding thermal state. Other variables, such as moving averages of temperature, showed a secondary contribution, while variables related to pressure and longer temporal lags had a reduced impact on the model. This indicates that Random Forest was able to automatically identify the most relevant variables, discarding uninformative relationships for temperature prediction.
Gradient Boosting Regressor Model (XGBoost)
Predictive modeling with Gradient Boosting Regressor, implemented through the XGBoost library, aimed to evaluate the performance of a sequential ensemble-based model in predicting Temperature (°C) and Pressure (bar) variables. Unlike previous models, XGBoost builds estimators iteratively, allowing it to capture non-linear relationships and reduce residual errors during training. The dataset used was the same as in previous steps, containing process variables, temporal lags, moving averages, and control variables. The target variables considered were temperature and pressure, and the data were divided into training and testing sets in an 80% and 20% proportion, with a fixed seed to ensure reproducibility of results.
The model was configured with 200 estimators, a learning rate of 0.05, and a maximum tree depth of 5, in addition to sampling techniques (subsample and colsample_bytree equal to 0.8), aiming to reduce the risk of overfitting and improve generalization capability. For temperature prediction, the model showed high performance, with a coefficient of determination R² of 0.9998, RMSE of 0.36 °C, and MAE of 0.20 °C, indicating high precision throughout the entire operational range analyzed. Scatter plots between actual and predicted values visually confirm the quantitative results, with strong alignment of points to the identity line, indicating that the model faithfully reproduces the behavior of the variables throughout the process.
Similarly, the model applied to pressure prediction showed even superior performance, with R² equal to 0.9999, RMSE of 0.03 bar, and MAE of 0.02 bar, evidencing high explanatory capacity and low prediction errors. Additionally, the relative importance of the variables in the temperature prediction model was analyzed. It was observed that the 5-minute moving average temperature (Temp_mm_5m) showed the greatest contribution, followed by the temperature setpoint and the temperature lagged by 1 minute, a result consistent with the thermal dynamics and the operation of the control system. The other variables showed smaller contributions, indicating that XGBoost was able to automatically identify the most relevant attributes for prediction, reducing the influence of variables with low explanatory power.
In general, the results obtained confirm the high capability of XGBoost in modeling complex and non-linear industrial systems, presenting performance equal to or superior to previously evaluated methods, with high precision, low error, and good interpretability. The robustness and generalization capability of XGBoost make it a promising tool for the optimization and monitoring of industrial processes, aligning with the principles of Industry 4.0, which seeks to improve efficiency and safety through advanced data analysis (Kagermann et al., 2013).
Anomaly Detection – Predictive Maintenance
In this stage, anomaly detection in industrial processes was performed with a focus on predictive maintenance applications, using an unsupervised approach based on the Isolation Forest algorithm. The objective was to identify atypical operational patterns that could indicate significant deviations from the normal operating regime of the process. The dataset analyzed corresponds to the same one used in the predictive modeling stages, containing 931 observations and multiple process variables. The target variables Temperature (°C) and Pressure (bar) were not directly used in the model training, with detection being conducted exclusively from the explanatory variables, according to the unsupervised approach.
Before model application, the selected variables were standardized using Z-score normalization, ensuring a mean of zero and unit variance. The Isolation Forest model was configured with 200 estimators and a contamination rate of approximately 3%, reflecting the expectation of rare anomalous events. The results indicated the detection of 28 anomalous observations out of a total of 931 records, corresponding to approximately 3.01% of the dataset, a value consistent with the adopted contamination parameter. This automatic identification of abnormal patterns is crucial for predictive maintenance strategies, enabling fault anticipation and data-driven decision-making (Sophie, 2025).
The comparative statistical analysis between the normal and anomalous regimes showed significant differences in the process variables. During normal operation, an average temperature of approximately 111.02 °C and an average pressure of 8.61 bar were observed. In contrast, the anomalous observations presented significantly lower average values, with temperature around 39.72 °C and pressure of 2.86 bar. These results suggest that the anomalies are associated with conditions outside the expected steady-state regime, possibly related to startups, shutdowns, or other operational deviations. The visualization of the relationship between temperature and pressure reinforces this interpretation, showing that the points classified as anomalous are concentrated in specific regions of the variable space, clearly separated from the cluster corresponding to normal operation, demonstrating the Isolation Forest’s ability to isolate atypical patterns in multivariate environments.
Additionally, the temporal analysis of anomalies revealed that these events occur predominantly in specific periods of the process, especially in the initial and final stretches of the time series, considered critical from the perspective of operation and maintenance. This concentration of anomalies in transition phases or at the beginning/end of batches is an important finding, as these are moments of greater variability and potential for deviations. In general, the results confirm the effectiveness of the Isolation Forest-based approach as a tool to support predictive maintenance, allowing for the automatic identification of abnormal patterns without the need for labeled data. This methodology contributes to continuous process monitoring, anticipation of failures, and data-driven decision-making in industrial environments, aligning with the objectives of Industry 4.0 for optimization and safety (Zhang et al., 2020).
In summary, the research results demonstrated the viability and effectiveness of the Machine Learning-based methodology for predicting critical variables and detecting anomalies in EPS reactors. Regression models, especially Random Forest and XGBoost, achieved high accuracy in predicting temperature and pressure, with R² values close to 1.0000 and minimal residual errors. Principal Component Analysis and K-Means clustering allowed for the identification of operational regimes and variability patterns, while Isolation Forest detected anomalies associated with non-stationary conditions. This integrated approach offers a robust and interpretable framework capable of enhancing predictive maintenance, operational optimization, and safety in chemical processes, fulfilling the study’s objective of anticipating anomalous conditions and potential failures.
4. Conclusion
This study aimed to develop and validate a Machine Learning-based methodology for predicting critical variables, such as temperature and pressure, in Expanded Polystyrene (EPS) reactors, seeking the early identification of anomalous conditions and potential failures. Through exploratory data analysis, it was found that the temperature control system operated with high efficacy, registering a mean absolute error of 0.24 °C, while pressure remained stable between 8 and 10.5 bar. A strong linear correlation of 0.975 was identified between temperature and pressure, although punctual deviations during dosages and exothermic events indicated the need for multivariate models. Temporal feature engineering, lags, and moving averages were crucial for representing process dynamics. The application of Principal Component Analysis (PCA) revealed that the first two components explained over 80% of the variance, consistently separating operational stages. The K-Means algorithm automatically segmented four distinct operational regimes, associated with cooling, transition, dosing, and heating/reaction. Regression models, especially Random Forest Regressor and Gradient Boosting Regressor (XGBoost), achieved high accuracy in predicting temperature and pressure, with coefficients of determination (R²) close to 0.9995 and 0.9999, respectively, and minimal residual errors, demonstrating the ability to capture non-linear relationships. Variable importance analysis highlighted the setpoint and temperature lags as the main predictors. Additionally, the Isolation Forest algorithm detected 28 anomalous observations, corresponding to 3.01% of the dataset, predominantly during transition periods or outside the steady state, with significantly lower temperatures and pressures than the normal regime.
The proposed methodology is configured as a robust, interpretable, and transferable framework, offering a significant technical and managerial contribution to enhance predictive maintenance strategies, operational optimization, and increased safety in industrial chemical processes. However, as a limitation, it is highlighted that the data used were from computational simulation, which may reduce the influence of noise and failures typical of real industrial environments. Thus, the generalization of the models for applications in real industrial plants requires additional validation with operational data and possible adjustments to the algorithms’ hyperparameters, which is suggested as future study to consolidate the methodology’s applicability in practical scenarios.
Bibliographic References
BREIMAN, L. Random Forests. Machine Learning, v. 45, n. 1, p. 5-32, 2001.
CARDOSO, Marcelo de Oliveira. Indústria 4.0: a quarta revolução industrial. 2016. 43 f. Monografia (Curso de Especialização em Automação Industrial) Departamento Acadêmico de Eletrônica, Universidade Tecnológica Federal do Paraná, Curitiba, 2016.
KAGERMANN, H.; WAHLSTER, W.; HELBIG, J. Recommendations for implementing the strategic initiative INDUSTRIE 4.0. Berlim: National Academy of Science and Engineering, 2013.
LEE, J.; BAGHERI, B.; KAO, H. A. A cyber-physical systems architecture for industry 4.0-based manufacturing systems. Manufacturing Letters, v. 3, p. 18-23, 2014.
MOBLEY, R. K. An introduction to predictive maintenance. 2. ed. Boston: Butterworth-Heinemann, 2002.
SCHWAB, K. The Fourth Industrial Revolution. Genebra: World Economic Forum, 2016.
SOPHIE, Emily Rose. Machine Learning Applications in Predictive Maintenance and Risk Mitigation. 2025. Disponível em: https://www.researchgate.net/publication/392238562_Machine_Learning_Applications_in_Predictive_Maintenance_and_Risk_Mitigation. Acesso em: 29 ago. 2025.
ZHANG, W. et al. A review of machine learning for industrial fault diagnosis. Journal of Manufacturing Systems, v. 55, p. 182-192, 2020.
Article originating from the Final Course Project of the Specialization in Data Science and Analytics of the MBA USP/Esalq
To learn more about the course, click here and access the MBX Academy platform