Enhancing material extrusion additive manufacturing with sensor fusion and machine learning
Abstract:
Material extrusion additive manufacturing (MEX-AM) has emerged as a transformative technology with the potential to redefine industrial production; however, persistent challenges remain regarding variability in part quality, the absence of robust in-process defect detection, and limited capacity for process optimization. To address these limitations, an integrated multi-sensor and machine learning (ML) framework was developed to enhance real-time monitoring and defect detection during MEX-AM. Data were acquired from thermocouples, accelerometers, and high-resolution cameras, and subsequently processed through a multi-sensor data fusion pipeline to ensure robustness against noise and variability. A Multi-Criteria Decision Analysis (MCDA) framework was employed to evaluate candidate ML algorithms based on accuracy, computational cost, and interpretability. Random Forest (RF) and Artificial Neural Network (ANN) models were identified as the most suitable approaches for MEX-AM applications. Validation experiments demonstrated a 92\% success rate in corrective interventions, with a reduction of defective components by 38\% compared with conventional monitoring methods. The integration of sensor fusion with advanced learning models provided improved predictive capability, enhanced process stability, and significant progress toward intelligent, self-optimizing manufacturing systems. The proposed methodology advances statistical quality control and reduces material waste while aligning with the objectives of Industry 4.0 and smart manufacturing. By demonstrating the efficacy of multi-sensor fusion and ML in real-world AM environments, this study highlights a pathway toward scalable, autonomous, and sustainable industrial production.1. Introduction
The fourth industrial revolution, often referred to as Industry 4.0, is reshaping modern manufacturing through the integration of cyber-physical systems, the Internet of Things (IoT), big data, and artificial intelligence (AI). One of the key emerging technologies with significant potential to further improve the transition towards this paradigm is AM processes, such as MEX, which facilitates intricate geometries, reduces material waste, and shortens lead times [1]. Nonetheless, AM, particularly MEX, presents several challenges, including fluctuating part quality, a lack of real-time monitoring of the process, and difficulties in defect detection, among others, which could be leveraged to tackle this limitation [2]. These challenges impede its capacity for overall industrial adoption. As the industry moves forward with smarter manufacturing paradigms, the role of AM will continue to expand because of its flexible and innovative capabilities. While AM has great technological potential, it has yet to be used on a large industrial scale, mainly because of significant limitations. Disadvantages of this approach include varying quality of parts, challenges in scalability, no standardized process control, and limited capacity for effective real-time monitoring and removal of defects. Dissimilar thermal history, material properties, and mechanical stresses remain embedded during and after the build process, each uniquely affecting final products and resulting in variability in performance and reliability [3]. Given the desire for consistent quality outputs, transparency, control, and the ability to predict processes are of the utmost importance.
A crucial field of AM investigation that has been underexplored is the performance of real-time multi-sensor monitoring systems [4], which can effectively detect defects and enhance the production process. Existing methodologies mostly rely on sensors developed from a singular source, resulting in constrained data that are frequently influenced by elevated noise levels, especially in uncontrolled environments. ML approaches can autonomously identify patterns, predict future process outcomes, and optimize system parameters, particularly in defect detection, process optimization, and heat management [5]. Nonetheless, challenges still exist, such as the availability of labeled datasets, noisy sensors, limited computational resources, or lack of generalization to new data, and the incorporation of ML within AM pipelines is not free of challenges. Residual stresses may significantly impact the mechanical qualities and performance of components; thus, AM techniques are highly susceptible to them [6]. Investigations [7], such as those concerning residual stress in B91 steel deposition by Wire Arc Additive Manufacturing (WAAM), have elucidated these effects and provided insights for enhancing the AM process. To fill this void, much focus has been placed on utilizing sensor networks, including thermocouples, accelerometers, vision systems, infrared cameras, etc., to monitor the process in situ. Such systems gather live signals of processes, representing a data stream for ML to learn from and respond to. Integrated with ML, such observing frameworks can become innovative feedback loops that adaptively control and predict maintenance [8]. The combination of ML and process monitoring aligns with Industry 4.0, in which intelligent systems improve and correct themselves with little human involvement [9].
This section commences by studying the cutting-edge literature on the integration of ML and process monitoring in AM, with a particular focus on the most prevalent AM method, MEX [10]. This study offers a novel way to integrate real-time sensor polling with ML models to detect errors and optimize the process. It discusses the state of the art, challenges, and opportunities and proposes a decision support model to help select ML approaches according to production needs [11]. These study elements aim to provide a more detailed guide on how AM can advance with innovative, data-driven solutions under the "Industry 4.0" concept. AM, or 3D printing, has been of great interest, as it has potential advantages regarding the ability to produce complex geometries and mass-customized goods and shorten lead times compared to traditional manufacturing processes. Notwithstanding these inherent advantages, issues with AM process complexities, such as variability in materials, geometric deviations, and quality assurance and control, have limited the large-scale industrial implementation of AM technologies. As a response to these issues, the use of ML techniques, which are considered powerful data-driven AM modeling techniques that can deal with and model complex nonlinear relations, has been increasingly investigated by researchers.
ML for defect detection and process optimization in AM has been extensively studied [12], but real-time process monitoring using multi-sensor data is lacking. Diversity in sensor data poses issues such as measurement inaccuracy, data fusion, and model generalization across machine instances and situations, which are usually avoided in the literature. ML models in AM are rare, non-scalable, and non-generalizable due to these constraints. Moreover, the laboratory formatting sought to eliminate external leverages that could distort sensor data, ensuring that the data utilized as input for ML models closely resembled reality. Defiant of the structure introduced by Dahmen et al. [13], which only processes temperature-based defect detection in counting its configuration, the proposed technique in use in this study includes heterogeneous sensor data (e.g., vibration, layer height, and thermal gradients), which would lead to a more exhaustive technique in process optimization. As this comparative analysis highlights, the proposed multi-sensor fusion technique is new. It can be used to improve the precision and flexibility of detecting defects in MEX processes [14]. Support Vector Machines (SVMs), ANNs, and Decision Trees (DTs) are all examples of supervised learning models that have shown promise in predicting mechanical properties and surface quality from process parameters. On top of that, unsupervised learning techniques for anomaly detection and clustering of deviations in the process have been applied to discover defects before they are labeled. These models enable the development of control policies that improve part quality and minimize material waste adaptively.
Process monitoring is critical for repeatability and reliability in AM outputs. Among the various AM technologies, it is MEX that stands to benefit from in-process monitoring, as this process is based on the layer-by-layer deposition of material that is impacted by local variations of temperature, speed of extrusion, and flow of the material. Although recent research (2023-2025) has made impressive progress, it is also important to note the background research that laid the groundwork for current research. Earlier studies, like those by Hassani and Dackermann [15] and El-Shafeiy et al. [16], gave the first insight into how ML can be used in AM, particularly in defect detection and optimization. The previous ones have provided the basis for the more complex models that are used presently. The combination of such information with ML allows for closed-loop control systems that can learn to adapt in real time during the printing process, increasing the process's robustness. Nevertheless, ML application for process monitoring also brings challenges, such as the availability of labeled datasets for training purposes, heterogeneous sensor data, and the requirement of computationally efficient algorithms since they may need to be applied in real time. In recent years, these limitations have led the community to focus on hybrid models coupling physics-based simulations and data-driven ML models [17]. In addition, process monitoring systems also lack a standardization issue, with few protocols for integrating the sensors and data analytics in AM environments being accepted universally.
This investigation aims to address these deficiencies by:
$\bullet$ Developing a novel methodology that integrates multi-sensor fusion (thermocouples, accelerometers, and cameras) with ML for the real-time identification of defects and monitoring of processes in MEX.
$\bullet$ Employing an MCDA model to identify the most suitable ML algorithms by evaluating their accuracy, cost, and accessibility for AM applications.
$\bullet$ Confirming the effectiveness of the suggested technique through controlled experiments, indicating its potential to enhance part quality, minimize defects, and optimize the production process in MEX.
This research presents a novel system that integrates multi-sensor data fusion with ML for real-time monitoring of flaws and optimization of the MEX process in AM. This work, unlike existing alternatives that rely on single-source sensors or offline models, integrates thermocouples, accelerometers, and cameras to capture a broader spectrum of process parameters, thereby enhancing defect detection and adaptive process control capabilities. The system is both scaled and industrialized, employing an MCDA model to select the optimal ML model based on accuracy, cost, and interpretability.
2. Related Work
To provide the experimental results, this study first wants to mention the significant findings of the literature review. Notably, the role of ML in dealing with the tasks of AM, particularly in the MEX processes, is highlighted. This would give a background to the present work and how it contributes to the existing knowledge system. The use of ML within AM processes, including design optimization, material properties, and quality control, has already been widely investigated [18]. ML models, such as supervised and unsupervised learning, have previously been shown to predict part quality and optimize printing parameters [19]. These include defect detection, surface quality optimization, and prediction of material behavior during printing, among others. It has been demonstrated how ML can automate defect detection and increase process repeatability, which are necessary for AM technologies to penetrate production further. Recent advancements have seen the integration of ML and AM in numerous applications aimed at defect detection and process enhancement [20]. The application of ML in forecasting part quality and refining printing parameters in AM processes has been explored in numerous studies [21]. Several studies have highlighted the role of digitalization in enhancing supply chain management and manufacturing quality, mainly in the context of Industry 4.0 technologies [22]. The methods hold potential in identifying real-time anomalies during the manufacturing process; however, they exhibit limitations concerning scalability, generalizability, and sensitivity to variations in environmental conditions.
However, there are important gaps in the literature. Many studies, for example, could not effectively integrate ML with reliable monitoring systems widely used in other sectors. In addition, reliable ML models cannot manage heterogeneous and noisy data coming from different sensor types during AM processes [23]. The present manuscript addresses these gaps by presenting a new decision support model to help choose among various ML techniques according to an MCDA of cost, performance, and application area. This study aims to fill this research gap and provides a framework for manufacturers to enhance their AM processes using data-driven decisions [24]. On top of that, the manuscript covers suggestions for future research, e.g., facilitating the advancement of AI technologies to manage complex data and standardized monitoring systems for AM in Industry 4.0. Furthermore, most of the existing studies have concentrated on supervised learning methodologies for defect detection, such as SVM and RF. Many of these approaches, however, are constrained by their reliance on uniform sensor data and are not suitable for real-time processing in a dynamic manufacturing setting. Despite significant progress in ML methodologies applied to AM, a comprehensive exploration of a solution that integrates multi-sensor data fusion with real-time monitoring capabilities remains to be undertaken.
In the realm of data fusion, there exists a foundation for integrating various sensors (such as thermocouples, accelerometers, and cameras); however, current methodologies appear insufficient in addressing the challenges presented by heterogeneous data and the necessity for real-time, efficient anomaly detection. The concept of Industry 4.0, emphasizing intelligent and adaptable systems, is fostering an increasing interest in more sophisticated methodologies that combine sensor fusion with ML. However, these strategies have not yet been validated for optimizing the MEX process in AM.
3. Methodology
Because of the previous limitations, the review of existing literature suggests that ML presents significant potential for AM. However, it also highlights critical deficiencies, including the absence of multi-sensor data and the necessary systems for real-time process monitoring. This study seeks to build upon existing perspectives by addressing identified gaps through the integration of diverse sensors and the application of an MCDA framework to select the most suitable ML models for MEX.
This study presents a novel method for the real-time observation of processes and the identification of defects in a widely utilized AM technique, MEX. The proposed approach stands apart from earlier methodologies by integrating data from thermocouples, accelerometers, and cameras, thereby offering a more exhaustive and precise representation of the AM technique. Furthermore, this study presents a systematic approach for selecting appropriate ML models for performance in real-time applications. Utilizing the MCDA approach, models were evaluated in this study based on various criteria such as accuracy, computational cost, and interpretability. The resulting decision support model ensures that the selected algorithms are both efficient and practical for implementation on an industrial scale. In addition to presenting enhanced precision in real-time defect identification, the experimental findings detailed in this study distinctly show how the proposed framework contributes to a decrease in the number of defective parts produced when compared to current methods that rely on offline models or single-sensor data.
The process of systematic literature review (SLR) related to the integration of ML and process monitoring in AM ( Figure 1) was carried out by the Preferred Reporting Items for Systematic Reviews and Meta-Analyses (PRISMA) technique, which guarantees its transparent and repeatable character in terms of selection and assessment of the potentially related studies.

Table 1 summarizes the sensors used for the MEX process monitoring, their measured parameters and sampling rates, and the reasons that are crucial to detecting the defects in real time and optimizing the process.
\bf Sensor Type | \bf Parameter Measured | \bf Sampling Rate | \bf Purpose |
---|---|---|---|
Thermocouple | Melt temperature | 10 Hz | Thermal consistency |
Accelerometer | Vibrations | 1 kHz | Mechanical stability |
Laser profilometer | Layer height | 5 Hz | Geometrical accuracy |
Camera (vision) | Surface defects | Variable (FPS) | Visual defect monitoring |
Microphone | Acoustic emission | 20 kHz | Process anomalies |
In the process monitoring model, data were constantly acquired by a number of sensors. The multimodal sensor data were then pre-processed and merged into a complete dataset. The multimodal data were in the form of a sequence of data pairs $\left(X_t, Y_t\right)$, where $X_t$ is the sensor dimensions at time step $t$, and $Y_t$ is the label of the defect at that time step. The multimodal dataset can be mathematically written as:
where, $D$ is the multimodal dataset consisting of data pairs $\left(X_t, Y_t\right)$, $t$ represents the time step at which the data are collected, $T$ is the total number of time steps during the process, $X_t$ is the vector containing the data from all sensors at the time step $t$, $X_t^{temp}$ represents the temperature data from thermocouples, $X_t^{vib}$ represents the vibration data from accelerometers, $X_t^{cam}$ represents the visual data from cameras, and $X_t^{acous}$ represents the acoustic data from microphones, and $Y_t$ is the defect label at the time step $t$, taking the value 1 if a defect is detected at time $t$ and 0 if no defect is detected.
Table 2 shows the multifold analysis of the different ML algorithms utilized in the study, with their strong and weak features being captured. As an example, RF is an interpretable and non-linear form of data that is appropriate in the MEX process. It is, however, sensitive to imbalances in classes and thus affected during such events. Conversely, although the ANN model is robust in handling complex data, it is a black-box model, which could be problematic as far as interpretation is concerned in industrial applications. It is these qualities that define the appropriate model to use based on the needs of the application.
\bf Algorithm | \bf Learning Type | \bf Strength | \bf Limitation |
---|---|---|---|
RF | Supervised | Handles non-linearity; interpretable | Sensitive to imbalance |
SVM | Supervised | Effective for small datasets | Poor scalability |
ANN | Supervised | Powerful for complex data | Black-box nature |
Isolation Forest (IF) | Unsupervised | Detects anomalies | Less interpretable |
Principal Component Analysis (PCA) | Unsupervised | Reduces dimensionality | Linear assumptions |
The predictive ML model aims to map:
where, X is the sensor input data, and $y$ is the defect label (binary or multi-class).
where, $\widehat{y}_t$ is the predicted defect label for time step $t$, and ${f}\left(X_t\right)$ represents the ML model function that maps the sensor data vector $X_t$ to a predicted defect label based on the learned relationships between the features and defect occurrence.
Unsupervised ML (e.g., IF) learns: $L(\mathbf{X}) \rightarrow$ anomaly score. Defective instances can be identified by thresholding the anomaly score.
To enhance clarity, MCDA was employed in the experimental design, comparing the models based on several preset criteria, including accuracy, computing cost, and interpretability. The selection technique was used by giving weights to the criteria based on expert opinions and the production requirements described in Table 3. The identification of the most appropriate ML model (e.g., RF) for the proposed MEX technique was then performed utilizing the MCDA framework. The most relevant factor when choosing the ML model is accuracy, which has the most significant weight of 0.4 and can guarantee the best possible results in terms of defect detection. This can be observed by computation cost, which addresses the significance of efficiency in the industry, as well as by interpretability, which is significant regarding understanding. Based on these requirements, the most suitable model for the MEX process should be chosen based on its performance and applicability in real-world scenarios.
\bf Model | \bf Accuracy (A) | \bf Computation Time (C) | \bf Cost (K) | \bf Interpretability (I) |
---|---|---|---|---|
RF | $90 \%$ | Medium | Low | High |
SVM | $87 \%$ | Low | Low | Medium |
ANN | $93 \%$ | High | Medium | Low |
The MCDA score is the aggregated score for each ML model, which helps determine the most appropriate deployment model. The score can be calculated using the following equation:
where, $w_i$ is the weight assigned to each criterion $c_i$, where the weights reflect the relative significance of each factor in the decision-making techniques; $c_i$ represents the criteria value for the $i$-th criterion, such as the accuracy, computation cost, or interpretability of the model; and $n$ is the total number of criteria evaluated in the decision process, with four criteria considered in this study. All criteria were normalized to the range [0,1] before aggregation.
The MCDA standards and the associated weighting of those benchmarks are listed in Table 4 as the MCDA framework was utilized to assess and choose the best suitable ML model for the MEX process, according to various essential criteria that correspond with industrial production requirements. The accuracy criterion was assigned the highest weight (0.4), as it directly influences the model's capacity to accurately detect faults. Computation time and cost are essential in industrial environments, where efficiency and cost-effectiveness are critical. Interpretability is deemed the next most significant factor (0.2), as comprehending the model's decision-making process is essential in production settings, particularly for engineers responsible for elucidating model predictions and implementing requisite process modifications.
\bf Model | \bf Accuracy (A) | \bf Computation Time (C) | \bf Cost (K) | \bf Interpretability (I) |
---|---|---|---|---|
RF | 90\% | Medium | Low | High |
SVM | 87\% | Low | Low | Medium |
ANN | 93\% | High | Medium | Low |
The study demonstrates how different features can be used to distinguish between defective and non-defective parts in the MEX process. As shown in Figure 1, the RF classifier, a key model in this study, highlights critical features such as vibration Root Mean Square (RMS) and layer height variation as the most influential factors for predicting defects. This analysis, along with the results in the figure, underscores the importance of sensor data in improving the accuracy of defect detection. As can be seen in Figure 2, the performance assessment of the RF model demonstrates that it is effective in classifying defective and non-defective parts with the help of critical attributes: vibration RMS and layer height variation.

The performance of the RF model is further exemplified in Figure 2, which illustrates its effectiveness in correctly classifying parts. With a high number of true positives and true negatives, this figure supports the claim that RF is robust in distinguishing between regular and defective prints. This model’s accuracy is critical for ensuring that AM systems maintain high-quality outputs. Figure 3 demonstrates the confusion matrix of the RF model that allows describing classification performance on a detailed level and thus highlights the distribution of true positives, true negatives, false positives, and false negatives. This matrix highlights that this model shows great potential to divide defective and non-defective components into proper classifications.

Figure 4 illustrates the proposed framework of integrating AM ML and real-time process monitoring, whereby important components in the technique and the flow of data are identified.

Data from various sensors were normalized to a uniform scale to ensure consistency. Specifically, min-max normalization, a technique that adjusts each value to the range [0,1], was utilized to ensure that the model does not disproportionately emphasize any single input.
In order to reduce high-frequency noise, a Gaussian filter was applied to smooth the data, mainly focusing on the accelerometer and microphone data, given their susceptibility to environmental noise. This technique facilitates the removal of unnecessary high-frequency noise, resulting in cleaner input data for the machine models.
Z-score analysis was employed to identify outliers. Data points indicating Z-scores exceeding 3 were classified as outliers and subsequently removed to control undue influence on model training and performance. This represents a crucial advancement aimed at safeguarding the data and mitigating the influence of outlier values on the model's predictions.
Data from all sensors were gathered at different frequencies: Accelerometers at 1 kHz and thermocouples at 10 Hz, among others. Consequently, linear interpolation was employed to synchronize the data across the various sensors. The last step involves resampling all sensors to show common time steps, enabling the smooth execution of the models.
A range of metrics were employed in this study to assess the performance of ML in the realms of defect detection and process optimization within AM. All three metrics were selected deliberately, as they hold significant relevance for practical applications in the industry. Accuracy refers to the overall ratio of correct predictions generated by the model. In industrial environments, precision is paramount to guarantee that defect detection systems can consistently recognize faulty components without overlooking significant flaws, thus preserving production quality and reducing costly errors.
where, $TP$ is the true positive, $TN$ is the true negative, $FP$ is the false positive, and $FN$ is the false negative.
The necessity for accuracy is particularly paramount, as erroneous identifications where non-defective components are incorrectly classified as defective may lead to unjustified interventions, including unnecessary preventive measures in the production process or corrective measures. Reducing false positives is crucial as it leads to minimized downtime, more efficient use of resources, and the avoidance of potential production delays.
The Area Under the Curve (AUC) quantifies the model's ability to differentiate between defective and non-defective components. This proves particularly advantageous when addressing imbalanced datasets or when seeking to comprehend the model's predictive performance across various decision thresholds. This metric ensures that the model adapts effectively to diverse operational conditions and pathways, accommodating different degrees of defect extent in AM processes.
The F1-score achieves a balance between the two metrics, incorporating both precision and recall into its computation. This approach proves to be especially beneficial when dealing with skewed data sets, as it mitigates the risk of the model becoming overly focused on one metric, such as precision, at the expense of another, like recall. This holds significant relevance in industrial uses to achieve an optimal equilibrium between defect detection and cost-effectiveness, avoiding both false alarms and overlooked defects.
It is essential to ensure that ML models can meet the strict demands of real-time defect detection and process optimization in AM, as errors can incur significant costs. Utilizing a blend of these strategies ensures that the model demonstrates both effective defect detection capabilities and efficient operational performance, minimizing excessive interventions.
4. Results and Discussion
Metrics adopted to test the performance of suggested ML models in terms of defect detection and process optimization in MEX-AM are accuracy, precision, recall, F1-score and AUC. Table 5 summarizes the results, comparing the performance of RF, SVM, ANN, and IF models in these respects.
\bf Model | \bf Accuracy (\%) | \bf Precision (\%) | \bf Recall (\%) | \bf F1-Score (\%) | \bf AUC (\%) |
---|---|---|---|---|---|
RF | 93.1 | 91.8 | 90.4 | 91.1 | 95.2 |
SVM | 89.6 | 88.3 | 85.1 | 86.7 | 92.4 |
ANN | 94.7 | 93.2 | 92.0 | 92.6 | 96.8 |
IF (anomaly detection) | 87.3 | 86.1 | 83.0 | 84.5 | 90.7 |
While these evaluations provide a quantitative analysis, it is essential to understand why certain models perform more effectively in specific contexts. This is evident in the case of ANN, which exhibits the highest accuracy and F1-score, likely due to its capacity to represent intricate non-linear correlations between sensor data and faults. It is imperative that it can engage with multi-dimensional data (thermal, vibrational, optical, and audio) to enhance precision in defect detection. ANN is more adept at fitting data, particularly in scenarios with limited data or noise in sensor readings. Techniques such as dropout and early stopping help mitigate this issue.
RF may exhibit marginally worse accuracy than ANN. However, it excels in interpretability, a crucial attribute in industrial applications where engineers need to understand the decision-making process of the model. The ability to identify which factors, such as vibration RMS or layer height fluctuation, most significantly influence defect prediction is a substantial advantage in practice. RF inherently possesses the ability to manage imbalanced data and mitigate overfitting, rendering it robust in the presence of significant data fluctuation. SVM performed well on the smaller dataset but had limited generalization capabilities when applied to a bigger dataset with more diverse sensor data. While the IF model excelled in anomaly detection during the preliminary phases of defect identification, its AUC value was diminished owing to its inadequate ability to recognize intricate defect patterns in the MEX process.
To evaluate the proposed ML-based process monitoring methodology for AM, particularly in the context of MEX, a series of controlled experiments was conducted. The experimental platform featured a discussion regarding the representativeness of the sample size and the noise handling techniques employed in the experiments of this study: thermocouples (temperature), accelerometers (vibration), laser profilometers (layer thickness), high-resolution cameras (surface quality), and microphones (acoustic emissions). Although the sample of 300 prints is beneficial in helping to illuminate the issue, it is insufficient to draw generalized conclusions. Future research can utilize the variability and come up with this dataset size by considering more types of AM machines, different materials, and operating conditions to enhance the representativeness and strength of the results. In future research, additional diversified datasets, including machine models and materials, will help conclude generalizability in different production scenarios.
This section discusses the selection of 38 statistical, 12 frequency-adaptive, and 5 geometry-based characteristics. It would be helpful to explain the reason for selecting these characteristics and why they are important to model performance. In this study, feature selection plays a crucial role in enhancing the model's accuracy by reducing dimensionality and identifying the most important attributes. Vibration RMS was selected as the most influential feature; layer height variation can allow the model to be trained on the most informative data, increasing the accuracy and efficiency of the defect prediction. Moreover, adding domain knowledge into feature selection may increase the generalization effectiveness of the model. Therefore, the model would generalize to new data sources without overfitting. As shown in Figure 5, RF, SVM, ANN, and IF are among the ML models employed in this work. The figure makes clear the performance of these models in terms of accuracy, precision, and recall. From these results, the advantage of using ANN in terms of precision and recall as a better model for real-time anomaly detection of the process under consideration is further reinforced.

The framework under consideration experienced testing with a sample size of 300 printed components in this investigation. While this quantity of samples represents a considerable dataset for the training and evaluation of ML models, the generalizability of the findings may be influenced by the particular combination of machine models, materials, and environmental conditions in which these experiments were conducted. This value was selected as a balance between practical concerns and the potential for achieving a favorable performance assessment. The printed samples included a diverse array of defect types and variations in process parameters, reflecting what one might encounter in an industrial AM setting. Nonetheless, the dataset could be broadened in future investigations by incorporating a wider variety of machines, materials, or operating conditions to enhance the representativeness of the findings. Furthermore, including a wider array of environments could enhance the applicability of the developed framework across a broader spectrum of industries and contribute to a more generalized understanding of the findings.
To evaluate the effectiveness of the proposed noise handling techniques, models both with and without noise management components were executed and their performance differences were analyzed. The findings indicate that the application of smoothing techniques and the elimination of outliers significantly enhanced the accuracy of defect identification, particularly in the presence of noisy sensor data. The application of sensor fusion techniques significantly advanced defect detection, demonstrating the importance of robust data processing methods for accurate performance in AM.
Paired t-tests and Analysis of Variance (ANOVA) tests were performed to validate the performance of the ML models. These statistical tests were selected for their capacity to compare mean performance disparities among two or more groups (i.e., the ML models) and evaluate the statistical significance of these differences. Paired t-tests, which are a statistical method, were employed to evaluate the performance of two models (e.g., RF versus ANN) on an identical dataset. The paired t-test is suitable in this context as the models were evaluated under identical experimental conditions, enabling us to ascertain whether the performance discrepancies are statistically significant. A $p< 0.05$ suggests that the performance disparities between the two models are likely authentic rather than attributable to random fluctuation. ANOVA was utilized to concurrently assess the performance of all four models (RF, SVM, ANN, and IF). ANOVA is especially advantageous in this scenario since it facilitates the simultaneous assessment of many groups, providing a more thorough comprehension of the comparative performance of the models across numerous criteria (accuracy, precision, recall, etc.). Post-hoc tests, such as Tukey's Honestly Significant Difference (HSD), were utilized to determine which specific models exhibit significant performance differences.
Figure 6 compares the anomaly detection accuracy of the IF model with other performance metrics. It also underscores the fact that the model is successful in detecting defects in the MEX process when the data on labels are limited, demonstrating its effectiveness in detecting defects at an early stage. The higher the value of these metrics, the better the performance and the greater the model’s capacity for defect detection.

CIs can give a range in which the actual performance metric is expected to be found, providing a more reliable estimate of model performance.
$\bullet$ Accuracy CI: The 95\% CI around the accuracy of each model was determined using bootstrap sampling. This involved sampling the data with replacement and selecting the model's performance on such samples. This distribution of accuracies was used to estimate the accuracy's variability and construct a CI of the factual accuracy. The RF model achieved an accuracy of 93.1\% (95\% CI: 92.3\%–94.0\%). Similarly, the ANN model reached 94.7\% (95\% CI: 94.0\%–95.3\%).
$\bullet$ F1-score CI: CIs of the F1-score were computed by applying the same bootstrap procedure. This procedure enables consideration of the trade-off between precision and recall and also represents a more complete picture of model performance. For example, the ANN model demonstrated an F1 score of 92.6\% (95\% CI: 91.7\%–93.5\%).
In addition, bootstrap sampling was performed to assess the stability of the models. This involved bootstrapping the data, fitting the model at each resample, and assessing the fit. Measuring the variation in the model's performance when predicting these resamples can provide information about the robustness of the model. IF, for example, achieved a high variance in defect detection accuracy, possibly indicating that it is less stable than the other models. Contrarily, RF had lesser variance on the different samples, indicating a more stable and robust model.
Utilizing real-time defect prediction systems has shown obvious potential for improving print quality and decreasing post-processing costs [25]. Although the latency of defect detection and the success rate of intervention are also unique, real-life variations due to a change in machine calibration, differences in materials and external perturbations might alter model performance. As an additional measure of the applicability of this framework to practice, a real-life case study or sample of how the system can adjust to these variations would offer valuable information on what to expect from its robustness and flexibility in different operating conditions (e.g., machine wear or material variability). If the likelihood of a defect is beyond a threshold, it can automatically initiate correction, such as nozzle temperature adjustment, extrusion speed modification, adjustment of the layer deposition height, and process pause for manual inspection. Such real-time interventions can minimize defect propagation and improve overall yield, directly addressing the productivity bottlenecks faced by AM industries.
During live production, the deployed RF model achieved an average defect detection latency of 1.2 seconds, an intervention success rate of 92\%, and a reduction of 38\% in defective parts compared to baseline production. Automatic on-the-fly corrections were implemented according to the model's predictions, such as correcting the nozzle temperatures or the extrusion speed. This indicates that closed-loop defect control is already a viable strategy in the AM industry.

Since real manufacturing environments can differ significantly, predictions must account for this uncertainty. To evaluate reliability in defect detection, CIs of the model's predictions were plotted against actual defect rates in real time. For example, the RF model showed an average defect detection latency of 1.2 seconds with a 95\% CI of [1.1 s, 1.3 s], confirming its stability and reliability in a real-world manufacturing environment. Figure 7 highlights the real-time closed-loop control system in the AM process. This figure vividly illustrates how the RF model is integrated into the system, allowing for the dynamic adjustment of process parameters based on real-time defect predictions. The successful intervention and defect reduction metrics shown in the figure align with the discussion on process optimization. Figure 5 indicates the real-time embedding of the RF model in the closed-loop AM process control. Parameters of the process can be made dynamic in the model (e.g., nozzle temperature and extrusion speed), adapted to the detection of defects, which helps to achieve a lower level of defects and higher quality of production.
While the presented framework provides a significant advance, several open research questions remain:
$\bullet$ Generalization across machines: ML models often suffer from poor generalizability across different AM machines due to variations in hardware, materials, and control systems [26]. Transfer learning and domain adaptation techniques offer promising avenues for overcoming this issue.
$\bullet$ Label scarcity: Supervised models require labeled defect datasets, which are often limited in industrial settings. Semi-supervised learning, few-shot learning, and synthetic data generation (e.g., through generative adversarial networks) could address this limitation.
$\bullet$ Sensor fusion: Although multi-sensor integration was implemented, the optimal fusion architecture (early vs. late fusion and attention-based fusion) remains an active area of investigation that may further improve defect classification.
$\bullet$ Standardization: The AM industry still lacks universally accepted standards for integrating process monitoring and ML in production environments [27]. International standardization efforts are needed to facilitate widespread adoption.
The feature importance scores based on the RF model are given in Table 6, with vibration RMS and layer height variation being identified as the most critical features that have a significant influence on defect prediction in the MEX process.
\bf Feature | \bf Description | \bf Importance (\%) |
---|---|---|
Vibration RMS | Mechanical stability | 22.5 |
Layer height variation | Geometric accuracy | 18.7 |
Thermal gradient | Temperature fluctuation | 15.2 |
Acoustic spectrum entropy | Process disturbances | 12.9 |
Surface roughness index | Surface defects | 10.4 |
Others | Combined minor features | 20.3 |

This analysis confirms that multi-sensor fusion captures the nature of defect formation in MEX processes, validating the necessity of real-time monitoring with heterogeneous sensors. The feature importance analysis of the RF model ( Figure 8) shows the most significant factors during the prediction of defects when using the MEX process, including vibration RMS, layer height variation, and error magnitude.
Table 7 compares the results of previous studies on similar projects with those of the present study on ML applications for defect detection in MEX. This helps to understand the significance of the proposed RF and multi-sensor fusion solution relative to other solutions reported in earlier studies.
\bf Study | \bf Method | \bf Accuracy (\%) | \bf Real-Time Deployment |
---|---|---|---|
\citep{28} | Convolutional Neural Network (CNN) on vision data | 91.2 | No |
\citep{29} | SVM on vibration data | 88.5 | Partial |
Proposed method | RF + multi-sensor fusion | 93.1 | Fully deployed |
The proposed framework enables real-time closed-loop control, minimizes defect propagation and scrap rate, reduces inspection overhead, and aligns with the intelligent manufacturing goals of Industry 4.0. Industries such as aerospace, biomedical implants, and automotive components, where dimensional accuracy and structural integrity are critical, can immediately benefit from this system.
Despite the promising results, some limitations exist:
$\bullet$ Dataset size remains moderate; larger-scale studies are needed.
$\bullet$ Transferability across different printers requires domain adaptation.
$\bullet$ Integration with reinforcement learning could further automate parameter tuning.
Therefore, future research should focus on cross-platform model generalization, transfer learning approaches, and Explainable Artificial Intelligence (XAI) techniques for process transparency.
5. Reproducibility
The study is replicable due to the technique, but providing access to the dataset and model code would make it significantly more reproducible and allow other researchers to build on this work. To enable this, the trained model code and experiment dataset will be made available. Using GitHub to make these resources public allows others to reproduce the study, validate the findings, and maybe adapt the framework to different materials, equipment, or production environments.
6. Ethical Considerations
Even though the central core of this study is associated with the computational and engineering processes, it is worth keeping in mind the industrial use of sensor data and its ethical treatment. In particular, issues related to data privacy and intellectual property (IP) may arise, particularly when sensors are used to collect proprietary data. In an industrial environment, having an efficient data protection system is vital to prevent sensitive data from falling into the wrong hands. In addition, all non-standard manufacturing systems ought to spell out who owns the data, thus covering the IP of the manufactory and the privacy where applicable. By paying attention to these concerns, it is possible to guarantee that industry standards will be met and that the use of ML models in the real manufacturing area will become a reality.
7. Conclusions
An innovative paradigm for the combination of multi-sensor data fusion and ML was proposed in this study to allow for real-time defect detection and process optimization within MEX-AM. The synergistic fusion of thermocouple, accelerometer, and camera data within the suggested framework enhanced both the accuracy of defect detection and process optimization. Using MCDA, the proposed framework identified the most appropriate ML models according to criteria of accuracy, cost, interpretability, etc., and thus, it applies to an industry setting. It was found that during real-time applications, the system was able to reduce parts rejection by 38\% while achieving a 92\% successful intervention rate, highlighting the potential of the framework to further improve AM processes and improve the quality of products. This shows the highly disruptive opportunity that the integration of sensor fusion and ML is for the development of innovative, self-optimizing manufacturing systems that could define Industry 4.0. Such a framework is a large part of the future for aerospace, biomedical, and automotive manufacturing, where precision and quality control are of utmost importance. It has the potential to decrease defects and waste, which is a material opportunity to increase efficiency and cost-effectiveness in these industries.
Scaling the framework-one of the challenges consists of applying the framework to different materials, machine models and environments. Its applicability in large-scale production should be further studied. The reliance on a labeled dataset constrains the model. Semi-supervised or unsupervised learning could also be explored in the future to tackle problems of data shortage in real industrial settings. The integration of the framework within the established production lines remains a challenge. It should be aimed at seamless integration with online control systems and automation packages. The framework should incorporate some form of transfer learning or domain adaptation to better adapt to new materials and AM processes and remain useful over time. The existing model might not perform well with more complex and larger datasets. Research in model optimization and edge computing may help with speed and efficiency for high-throughput environments.
Conceptualization: T.A.; Methodology: T.A., M.S.; Software: M.S.; Validation: T.A., M.S., R.U.J.; Formal analysis: T.A., M.S.; Investigation: T.A., M.S.; Data curation: M.S.; Writing—Original draft preparation: T.A.; Writing—Review and editing: T.A., R.U.J.; Visualization: T.A.; Supervision: R.U.J.; Project administration: T.A.All authors have read and agreed to the published version of the manuscript.
The authors would like to thank all individuals and institutions who contributed to the successful completion of this research. Special thanks to the authors for the guidance and support throughout the study. The authors also acknowledge the helpful feedback and suggestions provided by colleagues and peers.
The authors declare no conflict of interest.
Appendix A. Sensor data acquisition and parameters
undefined
undefined
\bf Sensor Type | \bf Parameter Measured | \bf Sampling Rate | \bf Purpose |
---|---|---|---|
Thermocouple | Melt temperature | 10 Hz | Thermal consistency |
Accelerometer | Vibrations | 1 kHz | Mechanical stability |
Laser profilometer | Layer height | 5 Hz | Geometrical accuracy |
Camera (vision) | Surface defects | Variable (FPS) | Visual defect monitoring |
Microphone | Acoustic emission | 20 kHz | Process anomalies |
Appendix B. MCDA model
undefined
undefined
\bf Model | \bf Accuracy (\%) | \bf Computation Time | \bf Cost | \bf Interpretability |
---|---|---|---|---|
RF | 90 | Medium | Low | High |
SVM | 87 | Low | Low | Medium |
ANN | 93 | High | Medium | Low |
Appendix C. Algorithm performance metrics
undefined
undefined
\bf Model | \bf Accuracy (\%) | \bf Precision (\%) | \bf Recall (\%) | \bf F1-Score (\%) | \bf AUC (\%) |
---|---|---|---|---|---|
RF | 93.1 | 91.8 | 90.4 | 91.1 | 95.2 |
SVM | 89.6 | 88.3 | 85.1 | 86.7 | 92.4 |
ANN | 94.7 | 93.2 | 92.0 | 92.6 | 96.8 |
IF | 87.3 | 86.1 | 83.0 | 84.5 | 90.7 |
