4.3. Detail in the Relation to Model
The model, outlined in
Figure 2, is a four-phase framework designed to enhance operational efficiency in plastic packaging production within a Peruvian SME. It integrates Change Management, TPM, SMED, and Machine Learning to address inefficiencies such as unplanned downtime, extended setup times, and defect-related challenges (e.g., flash). Each phase is structured to systematically develop and implement strategies that build upon one another, targeting a comprehensive improvement in production processes.
Component 1: Planned Maintenance
Step 1: Critical Equipment Analysis
A preliminary critical analysis was carried out for the injection and blow molding machines as a first step to propose a planned maintenance plan. A multidisciplinary team, made up of operators, technicians, supervisors, and engineers, applied the FMEA method (Analysis of Failure Modes and Effects) to identify potential failures. This analysis evaluated severity (S), occurrence (O), and detection (D), calculating a risk priority number (RPN) to prioritize interventions. In the injectors, leaks in hydraulic systems and wear of key components were observed, while in the blowers, thermal deviations and mechanical misalignments were detected, affecting operational continuity (
Table 2).
Step 2: Strategic planning and maintenance scheduling
A maintenance plan was developed for the injection and blow molding machines, based on the findings of Step 1, where critical failure modes such as hydraulic leakage, component wear, thermal deviations, and mechanical misalignments were identified. The aim is to prevent these failures, ensure the operational continuity of the production line and optimize the performance of the equipment.
Maintenance activities focus on the main components of each piece of equipment, with frequencies defined by both calendar times (daily, weekly, monthly, quarterly, yearly) and hours of use, to ensure flexible and effective scheduling. Below are the maintenance tables for each type of machine (
Table 3).
Table 4 shows the maintenance schedule for blow molding machines.
Step 3: Standardization of maintenance tasks
Maintenance tasks for injection and blow molding machines were standardized, with the aim of ensuring that all activities are carried out consistently, safely, and efficiently
Figure 3. Standardization is crucial in the manufacturing industry, as it reduces human error, improves operational safety, and facilitates staff training.
Step 4: Implementation of maintenance and real-time monitoring
To ensure continuous control over equipment performance and maintenance activities, a real-time monitoring KPI dashboard was developed. This tool provides immediate visibility of key performance indicators, allowing quick decision-making and prompt corrective actions when deviations occur
Figure 4.
To measure the efficiency of the proposed maintenance plan, a real-time monitoring system is proposed to supervise it.
The implementation of TPM required an investment of $65,912. This amount includes staff training in maintenance routines, the purchase of machinery components, maintenance labor, the design and printing of manuals and operating guides, as well as the implementation of the planned maintenance control panel, which includes system development and the acquisition of support materials. These activities are essential to improving the availability of critical equipment in injection and blow molding machines, one of the main sources of efficiency loss identified.
Component 2: SMED
Step 1: Take time
In this initial phase, detailed measurement of the times associated with the setup activities, including cleaning, mold change, and configuration, was carried out for the injection and blow molding machines. This step is essential to establish a baseline that allows identifying opportunities for improvement in rapid change processes. A time study summary sheet format was designed, based on the best practices of the SMED methodology, to record each activity, its duration, and its preliminary classification as internal (performed with the machine stopped) or external (executable before or after the stop). The summary of the time quantification is presented in the following table (
Table 5).
Step 2: Separation of internal and external tasks
In this second stage, the classification of the setup activities recorded in Phase 1 was carried out, dividing them into internal tasks, performed while the machine remains stopped, and external tasks, executable outside the idle period. This process is key to minimizing downtime, fostering more agile and efficient operations on the production line. A detailed analytical approach, based on previously measured times, was used to evaluate each activity and define its nature, considering the availability of resources and the operational sequence.
Step 3: Turn internal activities into external ones
Internal tasks, performed during machine shutdown, were transferred to external activities executable before or after shutdown, with the aim of reducing setup times. To this end, the recorded operations were analyzed in detail, evaluating whether each task could be executed outside the idle period, considering the availability of tools and the coordination of the team. Practical solutions, such as quick-connect systems and pre-assembled kits, were implemented based on the previous analysis.
The activities selected for this conversion were chosen for their feasibility to be prepared in advance or to be carried out at non-productive times. For example, hose handling and tool collection became external using quick-coupling equipment and pre-configured assemblies, eliminating interventions during shutdown. Similarly, the preparation of the new mold and the verification of the refrigeration systems were relocated as external by being organized before the stoppage, minimizing the dependence on the idle machine. In addition, the discharge of excess material and the cleaning of ventilation areas were delegated to periods of low activity, optimizing the workflow.
Step 4: Refine Activities
Work was done to perfect the setup tasks that remained after the previous stages, focusing on eliminating redundant actions and adjusting processes to achieve greater efficiency. Specific improvements were implemented, such as the use of quick-anchor systems to disassemble molds, soft-bristled brushes to clean cavities, and specialized cleaning agents for the nozzles, reducing setup times by 35%.
Table 6 presents a comparison of times before and after these improvements.
For the implementation of the SMED methodology, an investment of $534 was presented. This amount mainly covers the training of operational and maintenance personnel in techniques to reduce setup times, the standardization and redesign of mold change procedures, and the adaptation of the layout of tools and materials to facilitate quick changes. This investment aims to reduce downtime during machine setup, especially in injection molding and blow molding processes.
Component 3: Machine Learning
Step 1: Data collection and preparation
The data utilized for the machine learning model were extracted from the historical production records of the company under study, stored in a CSV file. These records were loaded into a Python 3.11.16 notebook using the pandas library for preprocessing. The dataset for injection molding machines comprises 4502 records, while the dataset for blow molding machines includes 1855 records. Preprocessing steps included cleaning null values by replacing them with zeros and removing duplicate records to ensure data quality. The variables collected for injection molding machines are presented in
Table 7, while those for blow molding machines are detailed in
Table 8.
Below are the variables of blow molding machines (
Table 9).
Step 2: Model Selection and Evaluation
To identify the most effective machine learning model for predicting Percentage Flash and Percentage Defective in injection molding and blow molding processes, a rigorous evaluation of regression algorithms was conducted. These target variables were selected due to their critical role in assessing quality, as they quantify excess material (flash) and defective products, both of which significantly influence production efficiency and cost in plastic manufacturing.
For injection molding, five regression models were evaluated: Linear Regression, Random Forest Regressor, XGBoost Regressor, Support Vector Regressor (SVR) with a radial basis function (RBF) kernel, and a Multi-Layer Perceptron (MLP) Neural Network with two hidden layers (100 and 50 neurons). The evaluation was performed using Python with scikit-learn and XGBoost libraries. For each machine, the dataset was partitioned into training (80%) and testing (20%) sets, employing a random seed of 42 for reproducibility. Features were standardized using StandardScaler to ensure model consistency. Performance was assessed using Mean Absolute Error (MAE), Root Mean Square Error (RMSE), and R
2 score, with MAE as the primary selection criterion due to its direct relevance to prediction accuracy. Machines with fewer than 15 records were excluded to ensure robust model training (
Table 10).
For blow molding machines, the same five regression models (Linear Regression, Random Forest, XGBoost, SVR, and MLP Neural Network) were evaluated using Python with scikit-learn and XGBoost libraries. The dataset for each machine was split into training (80%) and testing (20%) set with a random seed of 42, and features were standardized using StandardScaler. Performance was assessed using MAE, RMSE, and R
2, with MAE as the primary metric. Machines with fewer than 10 records were excluded to ensure reliable modeling (
Table 11).
The target variables, Percentage Flash and Percentage Defective, were prioritized as they directly address critical quality issues in plastic manufacturing, impacting production costs and product quality. XGBoost was selected as the sole model for both injection and blow molding due to its exceptional predictive performance, as evidenced by low MAE values (0.0000–0.0082 for injection molding, 0.0000–0.0027 for blow molding) and high R2 scores (0.9992–1.0 for injection molding, 0.9256–1.0 for blow molding). Its gradient boosting framework excels at capturing complex, non-linear relationships between process parameters and quality outcomes, making it ideal for modeling the intricate dynamics of both manufacturing processes. For injection molding, XGBoost’s consistent performance across all machines ensured reliable predictions. For blow molding, Bayesian hyperparameter optimization further enhanced XGBoost’s ability to model diverse machine behaviors, providing a robust and unified approach. This selection supports subsequent optimization efforts to meet quality targets of less than 5% for Percentage Flash and less than 3% for Percentage Defective.
Step 3: Model training optimization
Following the selection of the XGBoost Regressor in Step 2 for predicting Flash Percentage and Defective Percentage, this step details the mathematical formulation, training, and optimization of machine-specific XGBoost models for injection molding and blow molding processes. These target variables, representing excess material (flash) and defective products, are critical quality metrics that impact production efficiency and cost in plastic manufacturing. The process involved training models, optimizing hyperparameters using Bayesian optimization, and simulating optimal operating conditions within physically realistic parameter ranges to minimize quality defects.
The XGBoost Regressor constructs an ensemble of decision trees to predict continuous outcomes, such as Flash Percentage and Defective Percentage. For a dataset with n observations
, where
is the feature vector
is the target variable, the prediction is given by:
where
is the output of the
decision tree, and K is the number of trees. The model minimizes a regularized objective function:
where the loss function for regression is the squared error,
, and the regularization term is:
with
as the number of leaves in tree
,
as leaf weights,
controlling tree complexity,
as the L2 regularization parameter, and α as the L1 regularization parameter. The optimization proceeds iteratively via gradient boosting, where each tree fits the negative gradient of the loss:
For injection molding machines, XGBoost models were trained separately for each machine to predict Flash Percentage and Defective Percentage. The dataset was filtered to include only machines with at least 15 records to ensure robust training. The feature set
included process parameters (e.g., injection pressure, holding pressure, melt temperature, mold temperature, cycle time, cooling time, ejection time, holding time, injection speed, mold cavities) and production variables (e.g., product weight, required production, total production, average gross weight, polypropylene consumption, pigment consumption, reprocessed material percentage). The target variable were
. The dataset was split into training (80%) and testing (20%) sets:
Features were standardized to zero mean and unit variance:
where
and
are the mean and standard deviation of feature j. Non-numeric features were converted to numeric, and rows with missing values were removed.
Hyperparameter optimization was conducted using BayesSearchCV from the scikit-optimize library, maximizing negative Mean Absolute Error (MAE):
over a search space Θ:
Number of estimators: nestimators ∈ [100, 500],
Learning rate: η ∈ [0.01, 0.2] (log-uniform),
Maximum depth: dmax ∈ [3, 10],
Subsample ratio: s ∈ [0.6, 1.0],
Column sample by tree: ctree ∈ [0.6, 1.0],
L1 regularization: α ∈ [0, 1.0],
L2 regularization: λ ∈ [0, 1.0].
The optimization performed 40 iterations with 5-fold cross-validation to select
Optimal operating conditions were identified using a Monte Carlo simulation with 5000 iterations. For each iteration t = 1, ….. 5000, adjustable parameters were sampled from uniform distributions within physical ranges:
for parameters: injection pressure (800–2000 bar), holding pressure (300–1200 bar), melt temperature (180–300 °C), mold temperature (20–90 °C), cycle time (5–60 s), cooling time (2–40 s), ejection time (0.5–5 s), holding time (1–15 s), injection speed (50–150 mm/s), and mold cavities (1–16). Non-adjustable features were fixed at their mean values:
The simulated feature matrix
was standardized, and predictions were computed:
Viable conditions satisfied:
Feature importance was computed as the gain in loss reduction per feature.
For blow molding machines, XGBoost models were trained similarly, with datasets filtered for at least 10 records. The feature set included process parameters (e.g., parison extrusion time, mold closing time, blowing time, cooling time, ejection time, blowing pressure, airflow rate, mold cavities) and production variables (e.g., product weight, required production, total production, average gross weight, polypropylene consumption, pigment consumption, reprocessed material percentage). Data preprocessing, splitting, and standardization followed the same methodology. Hyperparameter optimization used BayesSearchCV with the same search space and settings.
Monte Carlo simulation sampled parameters within physical ranges: melt temperature (170–250 °C), mold temperature (15–70 °C), cycle time (8–60 s), parison extrusion time (1–12 s), mold closing time (0.5–6 s), blowing time (0.5–12 s), cooling time (2–25 s), ejection time (0.5–6 s), blowing pressure (30–150 psi), airflow rate (100–200 L/min), and mold cavities (1–8, fixed to the mode). Predictions identified viable conditions meeting quality targets, and feature importance was analyzed.
The training process produced robust XGBoost models, with Bayesian optimization ensuring optimal hyperparameters by maximizing negative MAE. Monte Carlo simulations identified viable parameter settings, enabling practical adjustments to minimize Flash Percentage and Defective Percentage. Feature importance analysis highlighted critical parameters, such as injection pressure for injection molding and blowing pressure for blow molding, guiding process optimization.
Step 4: Evaluation Metrics
To evaluate the XGBoost models for predicting the proportion of flash and percentage of defective products in injection and blow molding machines, mean absolute error (MAE), coefficient of determination (R
2), and mean squared error (MSE) from 5-fold cross-validation were calculated on the 20% test set, with performance metrics for injection molding machines summarized separately from those for blow molding machines (
Table 12).
The XGBoost model for injection molding machines demonstrates excellent performance, with a mean absolute error (MAE) of 0.1272 for the proportion of flash and 0.0596 for the percentage of defective products, indicating highly accurate predictions, while the coefficient of determination (R
2) values of 0.9813 for flash and 0.9936 for defective products reflect a near-perfect fit to the data, further supported by mean squared error (MSE) values from 5-fold cross-validation of 0.4647 for flash and 0.0379 for defective products, confirming strong generalizability and robustness for both metrics (
Table 13).
For blow molding machines, the XGBoost model shows acceptable to good performance, with an MAE of 0.3068 for the proportion of flash indicating moderate error and an R2 of 0.8657 suggesting a reasonable fit with some variability, while the MAE of 0.0953 and R2 of 0.9719 for the percentage of defective products demonstrate high accuracy and a superior fit, reinforced by a low MSE from cross-validation of 0.0195, highlighting the model’s particular effectiveness for predicting defective products.
The implementation of the machine learning model had a budget of $3 436, distributed across three main components: training technical staff in data science and the use of predictive models, contracting the development of the machine learning model based on XGBoost, and implementing the system to predict and monitor critical variables in the plant. This tool allows for the optimization of operating parameters in real time to minimize defects and waste, complementing the physical actions developed with TPM and SMED.