ABSTRACT
This study applies machine learning models to thermoplastic injection molding, focusing on the initial tryout stages. These stages are often overlooked in previous research, which concentrates mainly on steady-state production. By analyzing data on temperature, injection pressure, and mass of the parts, we developed a Decision Tree model to identify processing conditions that result in conforming parts. The research demonstrated that mass and injection pressure are critical quality indicators, and intentional variation of these parameters simulated typical tryout adjustments. The results highlighted the model’s ability to predict part compliance with high accuracy, providing a better understanding for precise adjustment of molding parameters, essential for optimizing production and ensuring the quality of injected parts.
Keywords:
Injection Molding; Decision Tree; Tryout Optimization; Machine Learning in Manufacturing; Process Parameter Adjustment
1. INTRODUCTION
Thermoplastic injection is a process that involves forcing a fluid plastic material into a closed mold, a process distinct from compression molding due to its automation capability and the possibility of creating parts with finer details. This method is widely used across various industrial sectors due to its efficacy and the high quality of the manufactured products. Precise configuration of the process parameters is crucial to achieve these results, ZHENG [1]. For instance, DAMIANI et al. [2] demonstrated that variations in mold temperature significantly influence the mechanical properties and crystallinity of the material, validating the need for strict parameter control.
Machine learning algorithms have been used to predict defects in injection molded parts by analyzing critical process parameters. KE et al. [3] emphasize that techniques such as Artificial Neural Networks (ANN), Support Vector Machines (SVM), and Decision Trees are the most commonly used models to predict the quality of parts, classifying them based on pressure and temperature characteristics. Additionally, quality parameters such as weight, dimensions, and the distribution of residual stresses are often monitored to identify potential defects, such as sink marks, warpage, and filling failures. Regarding stress analysis, VARGAS et al. [4] successfully modeled residual stresses using robust correlations, highlighting that the combination of high mold temperature and low melt temperature is critical to minimize internal stresses. The combination of these models and the careful selection of process parameters allows for a proposal for optimal adjustment of molding processes.
HUANG et al. [5] applied a hybrid learning model that combines multilayer perceptron (MLP) networks and autoencoders (AE) to predict weight, dimensions, and residual stresses in injection molded parts, achieving significant prediction accuracy. OGORODNYK et al. [6] used MLP to predict the quality of thermoplastic parts, achieving an accuracy of 99.375% in identifying defective parts. NAM et al. [7] applied an MLP model with co-training to enhance quality monitoring capability, achieving high accuracy even with limited labeled data. POLENTA et al. [8] employed Support Vector Machines (SVM) to predict the quality of molded products, proving to be an efficient technique in classifying parts. These studies demonstrate the potential of neural networks and SVMs in defect prediction and quality control enhancement in injection molding, providing insights for optimizing process parameters.
OBREGON et al. [9] developed a rule-based explanation model using decision trees to detect sink marks in the injection molding process, enhancing the understanding of the factors influencing these defects. OGORODNYK et al. [6] applied decision trees (J48) to predict the quality of thermoplastic parts, identifying critical parameters such as holding pressure and injection time. PÁRIZS et al. [10] compared various machine learning techniques, highlighting that decision trees outperformed other approaches in predicting the quality of molded parts, even with smaller data sets. These studies demonstrate the effectiveness of decision trees in classification and defect prediction, providing practical insights to optimize molding processes.
The identification of gaps in previous studies revealed that research usually focuses only on steady-state injection molding processes, overlooking the crucial dynamics of the initial tryout phase. This focus is particularly relevant considering the growing shortage of qualified professionals to conduct the tryout, a phenomenon that exacerbates the challenges faced by the molding industry. As noted by MASATO and KIM [11], the industry faces unprecedented challenges, including the need to adapt the workforce and implement data-based automation to maintain productivity and innovation in the face of a lack of skilled labor.
In the traditional industry, the lifespan of AISI P20 steel molds is often extended through welding repairs without compromising the polymer properties, as investigated by JUNKES et al. [12]. However, the integration of new technologies, such as molds made of resin through additive manufacturing, presents additional challenges due to their reduced lifespan and limited repairability. These factors, combined with the entrepreneurial potential of producing small series with injectors operated by less qualified professionals, highlight the economic infeasibility of traditional simulations, as pointed out by CHANG [13], who emphasizes the importance of updating training methods to embrace modern manufacturing technologies in order to reduce costs and improve efficiency.
The objective of this work is to identify the ideal conditions of temperature and injection pressure that ensure the production of conforming parts. To achieve this, intentional variations in these parameters will be evaluated, mimicking the typical adjustments of a tryout, and correlating the mass of the resulting parts with potential filling failures. The final analysis, using decision trees, will predict scenarios in which quality parts are obtained, providing a solid foundation for precise adjustments in the process.
2. MATERIALS AND METHODS
Polypropylene parts were manufactured using the thermoplastic injection process, employing a two-cavity mold, as illustrated in Figure 1. The injection machine used was a Chen Hsong, with a capacity of 178 tons, model JM178-SVP2. The mass (in grams) of all produced parts was measured, followed by a visual inspection conducted by experienced technicians.
The quality of the part was evaluated based on filling criteria, classifying it as fully filled (conforming parts) (1) or inadequately filled (non-conforming parts) (0). Figure 2 compares conforming and non-conforming injection molded polypropylene parts. The conforming part (lower) exhibits complete filling, while the non-conforming part (upper) shows defects resulting from inadequate injection pressure and temperature parameters. The injection parameters selected for the study were adjusted at three distinct levels: 200°C, 212°C, and 241°C for temperature, and 35 bar, 42 bar, and 48 bar for pressure. This setup resulted in nine different experimental conditions. For each condition, ten parts were produced per mold cavity, resulting in a total of 180 parts (90 from each cavity). The mold consists of two geometrically identical cavities that produce mirrored parts. For the final correlation analysis and decision tree modeling, data from both cavities were combined and analyzed jointly, reflecting the practical industrial scenario in which the mold produces a single type of component. The mold corresponds to a commercial component produced by Poloni Moldes and is routinely used in industrial production.
The data were imported into a DataFrame using the Pandas library in the Python environment. For the analysis, the data were divided into independent variables (X), containing the measurements of temperature, injection pressure, and part mass, and the dependent variable (y), indicating the quality of the part. The corr() function from Pandas was used to calculate the Pearson correlation matrix, measuring the linear interdependence between the variables. The correlation coefficients were visualized through a heatmap created with the seaborn and matplotlib libraries, using a ‘coolwarm’ color scheme to distinguish between positive and negative correlations, with numerical annotations detailing the coefficients.
An imbalance was observed in the training set, with a predominance of conforming parts (‘1’) compared to non-conforming parts (‘0’). To mitigate this disparity and reduce model bias toward the majority class, class weights were computed as the inverse of the class prevalence in the training set, i.e., wk = N/nk, where N is the number of training samples and nk is the number of samples in class k. Finally, a Decision Tree, implemented using the DecisionTreeClassifier class from Scikit-learn, was trained with a maximum depth of three and using these class weights. This approach was adopted to improve the model’s sensitivity to the minority class and provide a more balanced assessment of part quality.
The Decision Tree technique was applied for classification, randomly but reproducibly splitting the data into training (70%) and test (30%) sets using the value 35 as the seed for the pseudo-random function. The model was trained on the training set, learning to relate the independent variables to the quality of the parts. An overfitting analysis was conducted by comparing the accuracies of the training data with those of the test data. The model’s performance evaluation was carried out on the test set, using metrics such as accuracy and precision.
In addition to Pearson correlation analysis, model interpretability was assessed using the trained Decision Tree. Feature relevance was quantified using impurity-based feature importance (mean decrease in impurity), and the learned decision thresholds were extracted from the tree structure to support a nonlinear, threshold-based interpretation of the tryout parameter space.
3. RESULTS
Figure 3 shows the correlation matrix generated from the part manufacturing data. The most significant correlation was observed between fill quality and part mass (r = 0.57). This result reaffirms the relevance of mass as a reliable indicator of part quality. Additionally, a substantial direct correlation between fill quality and injection pressure (r = 0.47) was identified, highlighting the role of pressure in part filling. The positive correlation between pressure (bar) and mass (g) (r = 0.53) complements this observation.
Correlation matrix between production variables (temperature, injection pressure, mass, and part quality) represented by a heatmap, where red tones indicate positive correlation and blue tones indicate negative correlation.
In contrast to the influence of pressure, the temperature of the plastic melt showed a lighter positive correlation with fill quality (r = 0.22). The correlation between temperature and injection pressure was nonexistent, which was expected given the independence of these variables in process adjustment. The weak negative correlation between temperature and mass (r = –0.27) suggests a slight influence of temperature on mass variation, which can possibly be explained by the decrease in polypropylene density with increasing temperature. Therefore, these findings emphasize the importance of monitoring mass and injection pressure as critical indicators of the quality of injected parts, while temperature, though having a lesser impact, still provides valuable information about the manufacturing process.
Although Pearson correlation provides an initial linear assessment, the injection molding response and the Decision Tree classifier are inherently nonlinear. Therefore, we complemented the correlation analysis with model-based evidence from the trained tree. The impurity-based feature importance indicated injection pressure as the dominant predictor (0.669), followed by temperature (0.197) and mass (0.134). This ranking is consistent with the learned decision structure, in which pressure is the primary split at 38.5 bar, while secondary thresholds in temperature (226.5°C) and mass (36.75 g) refine the classification, supporting a threshold-driven (nonlinear) behavior in the tryout parameter space.
To apply the Decision Tree technique, it was observed that the training set consisted of 56 conforming parts and 7 non-conforming parts, highlighting a significant class imbalance. Similarly, the test set presented 23 conforming parts and 4 non-conforming parts. To mitigate the effects of this imbalance on the model results, class weights were applied during the training of the predictive model. These weights were calculated to be inversely proportional to the class frequencies in the training set, resulting in a weight of 9.0 for the non-conforming parts class and 1.125 for the conforming parts class. This approach aims to increase the representativeness of the minority class during the learning process, thereby improving the model’s ability to generalize to new data.
The analysis of the results for the Decision Tree model indicates the absence of overfitting, as evidenced by the training accuracy of 0.968 and the test accuracy of 0.963. This small difference between the accuracies signals an appropriate balance between learning and generalization, demonstrating that the model did not excessively learn specific noise from the training data.
Table 1 presents the confusion matrix and precision of the decision tree model, where, from the test data with 27 parts classified as conforming and 4 as non-conforming, 22 true positives and 1 false negative were obtained, reflecting full precision in the classification of conforming parts. There were 4 true negatives, one false negative, and no false positives, resulting in a precision of 0.80 for the classification of non-conforming parts. This detection capability is critical in industrial processes, as it ensures that potential non-conformities are captured to maintain the quality of the final product. Even with the occurrence of some false negatives, which are naturally subject to reinspection, the model demonstrates adequate effectiveness for quality control in a production environment.
Confusion matrix and precision of the decision tree model for conforming and non-conforming injected parts.
Figure 4 displays the Decision Tree developed by the machine learning model, highlighting the parameters of injection pressure, temperature, and mass used to classify polypropylene parts as conforming and non-conforming during the injection process. The parts were classified as conforming under three distinct conditions. First, when the injection pressure was between 38.5 bar and 48 bar (38.5 ≤ p ≤ 48 bar), resulting in 43 samples classified as conforming in this case. Second, for parts produced with an injection pressure between 35 bar and 38.5 bar (35 bar ≤ p ≤ 38.5 bar) and a temperature between 226.5°C and 241°C (226.5°C ≤ T ≤ 241°C), we obtained 7 conforming samples in this case. Third, in the scenario where the injection pressure was between 35 bar and 38.5 bar (35 bar ≤ p ≤ 38.5 bar), with a temperature between 200°C and 226.5°C (200°C ≤ T ≤ 226.5°C), and the mass of the parts exceeded 36.75 g, we identified 4 conforming samples in this case. On the other hand, under the same pressure and temperature limits, but with a mass equal to or less than 36.75 g, we observed 9 samples classified as non-conforming. This structuring of the data allowed for a diagnosis of the conformity of the produced parts, fundamental for the optimization of the thermoplastic injection process. The numerical thresholds (e.g., 38.5 bar, 226.5°C, 36.75 g) were not defined by the authors, but are automatically selected by the Decision Tree algorithm in Scikit-learn, as they maximize impurity reduction based on the information gain criterion. A depth constraint of three levels was applied, serving as a pruning strategy to avoid overfitting and improve interpretability.
Decision tree indicating the criteria of injection pressure, temperature, and mass to classify polypropylene parts as conforming in the injection process.
4. CONCLUSIONS
This study demonstrated that the use of decision trees can optimize the thermoplastic injection process, particularly in the initial tryout stages. We identified that part quality is highly correlated with mass and injection pressure. We verified that injection pressures between 38.5 bar and 48 bar and temperatures between 226.5°C and 241°C result in better part conformity. The decision tree model showed a training accuracy of 96.8% and a test accuracy of 96.3%, with precisions of 100% for conforming parts and 80% for non-conforming parts. Model-based analysis further corroborated these findings, with decision-tree feature importance and threshold rules indicating injection pressure as the primary driver, followed by temperature and mass within the evaluated tryout ranges. By establishing clear parameter ranges, this method helps technicians and engineers make informed decisions that optimize production and reduce defects. Future research should include more variables in the model and explore different machine learning techniques to enhance part quality prediction, promoting continuous improvement in thermoplastic injection processes. It is also important to acknowledge that the present study was conducted with a relatively small experimental dataset of 90 samples produced under controlled laboratory conditions. While this dataset was sufficient for the exploratory tryout-focused analysis, it naturally limits the generalization of the findings. Larger datasets including different molds, machines, and materials would allow for broader validation and industrial scalability of the proposed approach.
5. DATA AVAILABILITY
All data that support the findings of this study are available from the corresponding author upon reasonable request. The dataset has not been deposited in a public repository; however, it will be made available by the authors, together with supplementary information regarding the experimental procedures, for the purpose of verification and reproduction of the reported results.
6. BIBLIOGRAPHY
- [1] ZHENG, R., TANNER, R.I., FAN, X.J., Injection molding: integration of theory and modeling methods, 1 ed., Berlin, Springer-Verlag, 2011. doi: https://doi.org/10.1007/978-3-642-21263-5.
- [2] DAMIANI, R.A., DUARTE, G.W., SILVA, L.L., et al, “Influence of mold temperature associated with glass fiber on the mechanical and thermal properties of a (PA6/GF/MMT) nanocomposite”, Matéria, v. 22, n. 1, e11799, 2017.
-
[3] KE, K.C., WU, P.W., HUANG, M.S., “Multi-quality prediction of injection molding parts using a hybrid machine learning model”, International Journal of Advanced Manufacturing Technology, v. 131, n. 11, pp. 5511–5525, 2024. doi: https://doi.org/10.1007/s00170-023-12329-6.
» https://doi.org/10.1007/s00170-023-12329-6 -
[4] VARGAS, C., SIERRA, J., POSADA, J., et al, “Analysis and modeling of simulated residual stress of mold injected plastic parts by using robust correlations”, Matéria, v. 22, n. 4, e11894, 2017. doi: https://doi.org/10.1590/s1517-707620170004.0228.
» https://doi.org/10.1590/s1517-707620170004.0228 -
[5] HUANG, M.S., KE, K.C., WU, P.W., “A machine learning method for predicting part weight, dimensions, and residual stress during injection molding”, In: Proceedings of the 25th International Conference on Mechatronics Technology (ICMT), pp. 1–4, Kaohsiung, Taiwan, 2022. doi: https://doi.org/10.1109/ICMT56556.2022.9997777.
» https://doi.org/10.1109/ICMT56556.2022.9997777 -
[6] OGORODNYK, O., LYNGSTAD, O.V., LARSEN, M., et al, “Application of machine learning methods for prediction of parts quality in thermoplastics injection molding”, In: Wang, K., Wang, Y., Strandhagen, J., Yu, T. (eds), Advanced Manufacturing and Automation VIII. IWAMA 2018, Lecture Notes in Electrical Engineering, v. 484, Singapore, pp. 237–244, 2019. doi: https://doi.org/10.1007/978-981-13-2375-1_30.
» https://doi.org/10.1007/978-981-13-2375-1_30 -
[7] NAM, D.N.C., VAN TUNG, T., YEE, E.Y.K., “Quality monitoring for injection moulding process using a semi-supervised learning approach”, In: Proceedings of the IECON 2021 – 47th Annual Conference of the IEEE Industrial Electronics Society, pp. 1–6, Toronto, ON, Canada, 2021. doi: https://doi.org/10.1109/IECON48115.2021.9589593.
» https://doi.org/10.1109/IECON48115.2021.9589593 -
[8] POLENTA, A., TOMASSINI, S., FALCIONELLI, N., et al, “A comparison of machine learning techniques for the quality classification of molded products”, Information, v. 13, n. 6, pp. 272, 2022. doi: https://doi.org/10.3390/info13060272.
» https://doi.org/10.3390/info13060272 -
[9] OBREGON, J., HONG, J., JUNG, J.Y., “Rule-based explanations based on ensemble machine learning for detecting sink mark defects in the injection moulding process”, Journal of Manufacturing Systems, v. 60, pp. 392–405, 2021. doi: https://doi.org/10.1016/j.jmsy.2021.07.001.
» https://doi.org/10.1016/j.jmsy.2021.07.001 -
[10] PÁRIZS, R.D., TÖRÖK, D., AGEYEVA, T., et al, “Machine learning in injection molding: an Industry 4.0 method of quality prediction”, Sensors, v. 22, n. 7, pp. 2704, 2022. doi: https://doi.org/10.3390/s22072704. PubMed PMID: 35408318.
» https://doi.org/10.3390/s22072704 - [11] MASATO, D., KIM, S.K., “Global workforce challenges for the mold making and engineering industry”, Sustainability, v. 16, n. 1, pp. 346, 2024.
-
[12] JUNKES, R., HOWARTH, J.L., BECKER, D., et al, “Properties evaluation of semi-crystalline and amorphous polymers injected in AISI P20 molds repaired by welding”, Matéria, v. 25, n. 3, e12786, 2020. doi: https://doi.org/10.1590/s1517-707620200003.1086.
» https://doi.org/10.1590/s1517-707620200003.1086 -
[13] CHANG, T.C., “Teaching design for manufacturing of plastics using computer-aided engineering”, The Journal of Technology Studies, v. 28, n. 2, pp. 101–108, 2002. doi: https://doi.org/10.21061/jots.v28i2.a.7.
» https://doi.org/10.21061/jots.v28i2.a.7








