Machine learning-based prediction of mechanical properties and surface roughness of PLA, ABS and PETG specimens
Abstract
Fused Deposition Modelling (FDM) is one of the most popular additive manufacturing techniques for the fabrication of polymer components. However, the process parameters strongly affect the mechanical properties and surface roughness of the printed parts. In this work, an integrated experimental and machine learning framework is proposed to predict the surface roughness, impact strength, tensile strength and hardness of FDM-printed polylactic acid (PLA), acrylonitrile butadiene styrene (ABS) and polyethylene terephthalate glycol (PETG) parts. An L27-run full factorial design was used to systematically investigate the effect of layer thickness, printing speed and infill density on selected response variables. In this study, four supervised machine learning models were built on the experimental dataset, namely Random forest, Gradient boosting, Support vector regression (SVR) and K-nearest neighbours (KNN). The model performance was assessed using the coefficient of determination ( R 2 ), root mean square error, mean absolute error, feature importance analysis and residual analysis, using 5-fold cross-validation. All the developed models showed good prediction capability, with R 2 values above 0.97 for all response variables. The KNN algorithm was the best overall predictor among the tested algorithms, with an average R 2 value of 0.9972, which was higher than SVR (0.9963), Random forest (0.9903) and Gradient boosting (0.9877). This framework provides a practical, low-cost alternative to exhaustive trial-and-error printing, enabling manufacturers to reliably select optimal FDM process parameters for rapid tooling, functional prototyping and low-volume end-use production.