1. Introduction
The integration of the Internet of Things (IoT) and Cloud Computing has accelerated the evolution of Cloud Manufacturing (CM), redefining the connection, monitoring, and optimization of distributed production resources. Currently, CM represents the central pillar of the Industry 4.0 paradigm, enabling production environments driven by real-time decision-making and continuous feedback. In CM, the use of simulation, automation, and data analytics is evolving production processes into interconnected and self-adaptive networks capable of proactive supervision and autonomous optimization.
Additive Manufacturing (AM), fundamentally defined by the layer-by-layer material consolidation principle pioneered by Hull [
1], has evolved from a rapid prototyping tool to a strategic production technology. Characterized by layer-by-layer fabrication of complex geometries, AM ensures material efficiency, design flexibility, and reduced production lead times [
2]. According to ASTM standards [
3,
4], material extrusion processes, particularly Fused Filament Fabrication (FFF), remain among the most accessible and versatile AM technologies, with applications in the aerospace, biomedical, and automotive sectors [
5].
As shown in
Figure 1, FFF operates by feeding a thermoplastic filament into a heated nozzle, melting it, and depositing successive layers to build the printed part. The quality of the final component depends on both machine and environmental variables, such as extrusion temperature, printing speed, and ambient humidity [
6]. However, the quality of FFF parts is highly sensitive to a multitude of process variables. As extensively documented in literature, mechanical properties and dimensional accuracy are strictly dependent on parameters such as layer thickness, infill density, and raster angle [
7]. While these factors induce a characteristic anisotropy in the printed components [
8], the stability of the deposition process itself is the primary prerequisite for structural integrity. Variations in these parameters can lead to defects such as warping, delamination, and porosity, which compromise dimensional accuracy and mechanical performance [
9,
10].
Polylactic Acid (PLA) is one of the most widely used thermoplastics in FFF. However, this material exhibits critical dependencies on environmental conditions owing to its hygroscopic and temperature-dependent viscoelastic behaviors [
11,
12]. For example, a relative humidity (RH) exceeding 50% results in accelerated moisture uptake by PLA, causing several undesired phenomena such as hydrolytic degradation, molecular weight reduction, and altered rheological properties [
13,
14]. These phenomena may result in poor interlayer adhesion, melt instability, and dimensional deformation [
15,
16]. Critically, standard open-loop FFF controllers remain blind to these fluctuations, continuing to operate under the assumption of constant material properties despite active degradation. This ultimately impacts the sustainability of the FFF process through increased waste, energy consumption, and reworking [
17].
Therefore, ensuring repeatable and reliable outcomes in extrusion-based AM requires effective monitoring and control of environmental and process conditions. Establishing robust relationships between process parameters and part quality typically requires large experimental datasets, the acquisition of which can be time-consuming and expensive. Computational modeling and simulation offer efficient and reproducible alternatives, enabling the systematic exploration of parameter interactions and verification of control logic stability under diverse operating conditions without the material constraints of physical experiments.
Despite these advancements, a critical scientific gap persists regarding the integration of material-aware constraints into real-time monitoring pipelines. Although IoT-based data logging and material degradation have been explored independently, these domains remain largely disconnected in practical architectures. Current supervisory systems often lack the computational responsiveness and integration necessary to dynamically couple fluctuating environmental conditions, such as RH, with the physical constraints of the polymer state. This fragmentation results in “blind monitoring” architectures: systems that log sensor deviations without contextualizing their impact on material integrity, thereby limiting the ability to identify process instabilities at the data-ingestion stage before they escalate into irreversible structural flaws.
In this study, we propose a simulation-based computational framework for the early-warning monitoring and supervision of FFF systems. The architecture comprises three main functional layers: (i) a high-throughput data ingestion layer for capturing environmental and machine variables, (ii) a distributed processing layer for real-time computation and analysis, and (iii) an application layer for anomaly detection and preventive warnings. Using simulated data streams, the framework allows for the controlled evaluation of system responsiveness, latency, and scalability before physical deployment.
This simulation-driven verification represents a foundational de-risking step toward full implementation. By strictly isolating architectural performance, specifically throughput and decision latency, from the confounding variables of physical hardware, this study provides a deterministic assessment of the system’s operational readiness. The architecture supports integration with real FFF printers to enable continuous monitoring of key parameters such as nozzle temperature, layer thickness, and printing speed. Our research contributes to the applied study of AM technologies by presenting a reproducible, scalable, and data-driven approach for monitoring and optimization in FFF, ultimately reducing the material and energy costs associated with trial-and-error hardware validation.
The remainder of this paper is structured as follows.
Section 2 reviews current monitoring strategies and related work;
Section 3 describes the main contributions of the proposed framework;
Section 4 details the methodology and computational verification setup;
Section 5 presents the computational performance results; and
Section 6 discusses the implications and future research directions. The conclusions are drawn in the final section, and
Appendix A and
Appendix B provide numerical results and the implementation of the proposed algorithms.
2. Literature Review
The workflow of an FFF system typically comprises Computer-Aided Design (CAD), STL generation, slicing, and physical deposition. Despite the widespread use of FFF systems for rapid prototyping in aerospace, biomedical, and automotive fields [
18], the technology still faces challenges regarding dimensional accuracy, process repeatability, and the structural integrity of printed components.
Machine and environmental parameters play decisive roles in determining process stability. Lendvai et al. [
9] showed that even small variations in ambient temperature and relative humidity can significantly alter the rheological characteristics of polymer melts, affecting extrusion consistency and interlayer bonding. These fluctuations often lead to defects such as warping, delamination, and internal porosity. PLA, a standard thermoplastic, is particularly susceptible to humidity due to its hygroscopic and viscoelastic nature. When exposed to humidity levels above 50%, PLA absorbs moisture, resulting in hydrolytic degradation. This process reduces molecular weight and decreases mechanical performance [
13,
14,
16]. The resulting structural weaknesses, characterized by lower tensile strength and weakened interlayer adhesion [
15,
19], highlight environmental conditioning as a key factor for process robustness and product quality [
17].
While prior studies have provided insights into environmental effects on material performance, the literature remains fragmented regarding the early warning detection of anomalies induced by fluctuating ambient conditions. Specifically, the coupling between environmental variability, filament rheology, and extrusion stability is rarely captured by existing monitoring systems. This limitation hinders the implementation of proactive supervisory architectures capable of identifying anomalies—such as unstable flow, nozzle clogging, and layer deformation—before they impact the final product. To address this gap, the data-rich nature of AM processes supports the integration of real-time sensing and advanced analytics, facilitating anticipatory anomaly detection and adaptive control.
2.1. Literature Search Strategy
To systematically assess existing contributions to environmental monitoring, process optimization, and computational analytics in extrusion-based AM, we conducted a structured literature review. The selection process was guided by the principles of the PRISMA statement [
20], ensuring transparency and reproducibility without the extensive reporting requirements of a standalone systematic review.
The methodology followed a sequential filtering logic comprising identification, screening, and eligibility assessment. Relevant literature was retrieved from major engineering databases, specifically Scopus and ScienceDirect, using predefined search strings and Boolean operators. To ensure relevance of the reviewed studies, strict eligibility criteria were applied.
Table 1 summarizes the inclusion and exclusion parameters used to filter the initial dataset, targeting peer-reviewed developments from 2018 to 2025 that address monitoring, IoT architectures, or environmental effects in polymer AM. Consequently, Metal AM was excluded, as it entails distinct physical dynamics unrelated to polymer extrusion.
As illustrated in the PRISMA flow diagram (
Figure 2), the initial search yielded 95 records. After removing duplicates, the articles underwent a multi-stage screening based on title, abstract, and full-text relevance. Ultimately, 25 articles were selected for the final qualitative synthesis, confirming their alignment with the research objectives regarding sensing integration and data-driven supervision and distinguishing between physical experimentation and computational verification approaches.
2.2. Sensing Architectures and IoT Integration in AM
The literature review identified a distinct group of studies centered on the convergence of sensing technologies, communication protocols, and computational infrastructure for process supervision. These studies emphasize the shift from isolated measurements to integrated IoT architectures.
Mazzarisi et al. [
21] implemented infrared thermography for real-time melt pool observation in directed energy deposition, whereas Borghetti et al. [
22] proposed embedded sensor architectures within polymer components for in situ temperature and strain tracking. Fedullo et al. [
23] examined IoT communication frameworks, such as LoRaWAN, for scalable data acquisition, and Horr et al. [
24] introduced digital twin models bridging the virtual and physical domains to enable dynamic reasoning and control.
Recent advances in artificial intelligence have further enhanced defect recognition capabilities by employing convolutional neural networks and gradient boosting for surface defect and porosity analyses [
25,
26,
27]. However, the integration of environmental monitoring and risk-oriented analytics remains limited, revealing the need for holistic simulation-supported architectures, such as the one proposed in this study, which unifies sensing, data streaming, and anomaly detection in a single computational environment.
2.3. Data-Driven Modeling and Material Degradation
Multiple studies indicate a significant correlation between polymer chemistry, ambient factors, and final part performance [
9,
10,
15,
19]. For PLA, humidity levels above 50% typically induce hydrolytic degradation, leading to reductions of up to 30–70% in melt viscosity and mechanical strength [
14,
16]. These findings confirm the necessity of continuous environmental monitoring, particularly for hygroscopic polymers, to maintain print quality and energy efficiency. Although low-cost sensor networks have been proposed [
28], their effective integration with robust computational frameworks capable of low-latency decision making remains to be achieved.
Parallel developments in computational modeling and hybrid digital frameworks further reinforce the role of data-driven process optimization. Hybrid physics–data models and causal inference approaches have been employed for sustainability analyses and anomaly detection [
29,
30,
31]. Machine learning techniques, such as convolutional and multimodal designs, have shown promising capabilities in defect classification and automated diagnostics [
32,
33,
34,
35,
36]. Despite these advancements, the absence of systems that integrate environmental sensing, virtual verification, and early-warning analytics highlights an ongoing research gap.
Building upon our prior work [
37], this study addresses this gap by proposing a multilayered computational framework for FFF process monitoring. While the verification strategy employs a simulation environment to ensure algorithmic stability, the architecture is designed to align with the applied principles of Industry 4.0, focusing on digital integration, sustainability, and operational readiness validation [
38].
3. Research Innovations and Contributions
Building upon the conceptual basis of the previously established CM framework [
37], this study refines the technical scope to a targeted contribution: the development and computational verification of a low-latency, simulation-driven early-warning framework for FFF. The revised system is engineered to support the monitoring of pre-print and in-process environmental conditions, delivering actionable alerts whenever stability thresholds are exceeded.
The primary advancement over existing approaches lies in the tight coupling of high-frequency environmental sensing, process-specific analytics, and decision logic within a unified architecture. Unlike conventional FFF monitoring systems, which typically function as passive data loggers or post-process diagnostic tools [
39,
40], the proposed framework operates as an active supervisory layer. It continuously evaluates process readiness before and during printing, thereby minimizing decision latency and preventing the propagation of failure modes. By shifting the paradigm from post-process inspection to in-process risk anticipation, this approach aligns with sustainability-oriented AM practices, actively mitigating the material waste and energy expenditure associated with irreversible print failures.
At the architectural level, the general-purpose CM framework introduced in [
37] was reconfigured into an FFF-specific early warning platform. Specifically, the data ingestion schemas and stream processing logic were optimized to align with the characteristic thermal time constants of the extrusion process. This reconfiguration emphasizes parameters known to critically affect extrusion stability and part quality, such as nozzle temperature, printing speed, and ambient humidity. By embedding process-specific physical constraints directly into the computational workflow, the system assesses incoming data against dynamically defined operating windows, allowing for the prompt detection of abnormal trends rather than relying solely on static limit checks.
A distinguishing feature of this work is the adoption of a representative simulation environment for verification. Consistent with Digital Twin methodologies in AM [
41], this study prioritizes architectural validation as a necessary precursor to physical integration. Rather than immediately targeting physical deployment, the use of simulation allows for the rigorous stress-testing of responsiveness and detection performance under controlled disturbances. This approach isolates computational metrics—such as latency and throughput—from the confounding factors of hardware variability, serving as a robust de-risking step prior to experimental implementation.
Material behavior is integrated at a functional level to enhance decision-making. Specifically, humidity-dependent degradation effects in PLA are abstracted into process-relevant stability indicators. While distinct from full multiphysics modeling, this logic ensures that environmental measurements are interpreted based on their practical impact on flow consistency and interlayer bonding. Consequently, alerts are triggered by anticipated process instabilities rather than raw sensor deviations alone.
Finally, the system’s decision logic is explicitly designed to support graded responses. Depending on the severity and persistence of the detected anomalies, the framework can issue warnings to operators, suggest corrective actions, or signal the need for print interruption. By hierarchically categorizing process risks, this approach avoids unnecessary downtime for transient fluctuations while ensuring immediate intervention for critical failures. This dynamic adaptability distinguishes the proposed method from existing monitoring solutions that lack a formalized pathway from sensing to actionable control decisions.
4. Materials and Methods
This section outlines the methodological framework adopted for the design, verification, and performance benchmarking of the proposed architecture for early-warning monitoring. This approach was implemented in a reproducible computational environment using Python-based simulation and analytics modules.
A deterministic seed-controlled data generation routine ensured statistical traceability and formed a reliable basis for algorithmic benchmarking. The system is conceived as a proactive supervision platform; therefore, this study prioritizes the verification of the computational throughput, latency, and detection logic prior to physical deployment.
4.1. Scope and Heuristic Process–Material Integration
The framework is intentionally framed at the computational and algorithmic level, focusing on data throughput, latency, and responsiveness, rather than on the development of explicit physical–mechanical constitutive models.
To support this integration without exceeding the scope of a computational study, we implemented a rule-based logic derived from material science literature. Instead of simulating the chemical kinetics of hydrolysis or solving coupled differential equations—which would require prohibitive computational resources for a real-time supervision test—we adopted a phenomenological approach known as ‘heuristic mapping.’ This method defines specific ‘risk zones’ for PLA processing, allowing the data pipeline to process signals that reflect the logical constraints of the material:
Moisture Sensitivity Logic: Literature indicates that PLA undergoes significant degradation when exposed to humidity. Based on established thresholds, RH values exceeding 50% are tagged as ‘Critical.’ In the simulation, prolonged persistence in this zone triggers a synthetic ‘degradation drift’ in the data stream, mimicking the statistical signature of material quality loss (e.g., bubbling or inconsistent extrusion).
Thermal Window Logic: The system enforces a valid viscoelastic processing window (e.g., 190–210 °C). The data points generated outside this range were correlated with simulated flow instabilities. This ensures that the monitoring logic is validated against data patterns that physically represent the onset of warping or clogging, rather than simple random noise.
4.1.1. Multivariate Conditional Logic
To address the requirement for variable correlation, without the computational overhead of full rheological modeling, we implemented a ‘logic-based coupling’ mechanism. The simulation avoids generating Temperature and Flow Rate as independent stochastic variables. Instead, a heuristic dependency rule is applied:
If the generated Nozzle Temperature falls below a critical flow threshold (e.g., 200 °C), the Printing Speed and resulting extrusion consistency are automatically attenuated via a proportional penalty factor. This simple but effective correlation mechanism allows us to verify that the monitoring system can correctly identify multivariate anomalies where a thermal failure (cause) induces a flow deviation (effect), successfully mimicking the signal signature of a ‘cold extrusion’ or nozzle clogging event.
4.1.2. Synthetic Injection of Anomaly Patterns
To ensure the monitoring algorithms are tested against realistic data behaviors rather than simple random noise, the simulation engine injects structured anomaly patterns derived from the heuristic logic defined in
Section 4.1:
Moisture-Induced Drift Pattern: To represent the risk of hydrolysis/delamination, the generator injects a continuous downward trend in the extrusion stability metric whenever the simulated RH exceeds the 50% threshold. This tests the system’s ability to detect long-term signal drifts.
Thermal Instability Pattern: To emulate the conditions leading to warping, rapid stochastic fluctuations are superimposed on the temperature data stream. These fluctuations are programmed to violate the defined stability window, testing the latency of the ‘warning’ flags in the analytics layer.
4.1.3. Parameter Selection and Classification
In this study, the monitored variables were intentionally categorized into Ambient (environmental) and Process (machine-specific) parameters to reflect realistic FFF operating conditions. Ambient parameters include ambient temperature and relative humidity, which characterize the external exposure of the system and are known to fluctuate in non-climate-controlled environments. The process parameters comprise the nozzle temperature, printing speed, layer thickness, and infill density, which directly govern the material state, extrusion stability, and geometric fidelity of the printed part. These parameters were selected to emulate a production scenario in which environmental disturbances interact with the machine dynamics, requiring distinct supervision logic.
Table 2 details this classification and the specific rationale for monitoring each variable based on its impact on part quality.
4.1.4. Filament Preparation and Pre-Processing Scope
The filament preparation stage, including active drying through controlled heating cycles prior to printing, was intentionally not modeled in the present study. This decision reflects the simulation-based scope of our work, which focuses on assessing the computational feasibility, responsiveness, and architectural performance of the proposed layered monitoring framework rather than capturing the full sequence of material preprocessing steps. While filament drying is a critical and specialized operation for hygroscopic materials such as PLA, explicitly modeling drying profiles, residence times, and moisture diffusion kinetics requires detailed experimental characterization and high-fidelity physical models that are beyond the scope of this initial investigation. These aspects are currently being addressed in our ongoing experimental campaigns, where different drying cycles, temperature profiles, and ambient RH conditions are systematically evaluated to quantify their influence on the filament condition and printed part quality. The outcomes of these experiments will enable future extensions of the framework to incorporate filament preparation as an explicit upstream process variable within a fully integrated cyber–physical monitoring and control loop.
4.1.5. Parameter Selection and Model Parsimony
The monitoring platform’s scope was deliberately limited to a representative set of process and environmental variables (Nozzle Temperature, Printing Speed, Ambient Temperature, RH) to focus on validating architectural metrics like latency and throughput. This strategy prevents over-parameterization and ensures that the computational backbone is rigorously tested under controllable and reproducible disturbance conditions. Specific variables were excluded based on their signal dynamics in relation to the control horizon. For instance, the build plate temperature was not monitored dynamically, as PLA exhibits low thermal shrinkage, and bed heating typically operates as a static, closed-loop state rather than a high-frequency disturbance source [
42]. Similarly, ambient illumination was omitted because photo-oxidative degradation operates on timescales exceeding the active print duration, whereas its immediate thermal effects are captured by the ambient temperature sensors. This parsimony allows for a focused evaluation of the system’s responsiveness to immediate rheological instabilities, while the modular architecture remains natively extensible to include additional sensor modalities in future cyber–physical implementations.
4.2. Architecture of the Computational Framework
The proposed architecture was designed according to a three-layer logic that emulates real-world manufacturing data flows.
Figure 3 illustrates this hierarchical organization and the specific technologies selected to benchmark each layer. To ensure simulation fidelity relevant to supervisory control, the framework operates within a virtualized environment constrained by the physical limitations and data rates of commercial desktop FFF printers.
Data Ingestion Layer: responsible for acquiring synthetic process and environmental variables that reproduce IoT-like sensor streams. The simulated features included ambient temperature, RH, nozzle temperature, infill density, layer thickness, and print speed.
Processing and Analytics Layer: dedicated to data stream analysis, statistical aggregation, and anomaly detection. This layer identifies deviations from the nominal conditions, particularly RH and temperature fluctuations, which affect thermoplastic rheology and print quality.
Application Layer: acts as the user-facing supervisory interface, visualizing monitored signals and issuing early-warning alerts whenever operational limits are exceeded, enabling timely operator response.
Humidity dynamics were prioritized because of their strong influence on the process stability during thermoplastic extrusion. Previous studies have established that PLA degradation accelerates above approximately 50% RH [
9,
14]. This threshold was adopted as the reference point for sensitivity assessment in the proposed framework.
PLA is known to undergo time-dependent changes in its physical and mechanical properties after extrusion, including those associated with thermal and hydrothermal aging [
43]. Empirical studies [
44] have shown that prolonged exposure to ambient conditions can alter PLA’s tensile strength, elastic modulus, and ductility, with statistically significant reductions in the ultimate tensile stress and elongation after accelerated aging periods of weeks to months in controlled environments. Aging processes, including chain rearrangements and hydrolytic degradation, can increase material brittleness and elevate the risk of delamination, particularly when interlayer adhesion is compromised during the printing process. Although these effects are well documented for 3D-printed PLA, the current study deliberately abstracts the material behavior to a functional level, focusing on demonstrating the feasibility and performance of the proposed layered monitoring framework under realistic environmental variability. Explicit modeling of filament aging, interlayer adhesion degradation, and other coupled physical phenomena lies beyond the present simulation scope and will be addressed in future work by integrating experimentally obtained material response data and high-fidelity physical models that capture the influence of aging on part quality.
Designed as a robust digital twin precursor, the architecture currently operates on high-fidelity simulated streams to verify the logic stability. Its modular interfaces are natively ready for future integration with physical sensors (e.g., BME280 modules), cloud dashboards, and adaptive controllers for intelligent and sustainable manufacturing processes.
4.3. Simulation Dataset Generation and Reproducibility
A synthetic dataset was generated to emulate the temporal evolution of key machine and environmental parameters during FFF operation, with the primary objective of evaluating monitoring latency, data throughput, and anomaly detection performance. The simulation environment was not intended to reproduce the full thermo-mechanical physics of extrusion. Instead, it was designed to reflect realistic operational envelopes, data rates, and disturbance patterns relevant to FFF monitoring.
All simulation experiments were conducted on a workstation featuring an Intel Core™ (Tokyo, Japan) i7-11800H CPU @ 2.30 GHz and 16 GB RAM. Data generation, messaging, and analytics pipelines were implemented using Python 3.10 and the Flask framework. Locally, the distributed components were deployed using Apache Kafka v3.1.0 for message streaming and Apache Spark v3.2.1 for real-time analytics. Docker containers (v20.10) encapsulated all the services and dependencies, ensuring environmental consistency and facilitating reproducibility across various computing platforms.
Deterministic reproducibility was ensured by applying a fixed random seed across Python’s random and NumPy libraries. When a previously generated dataset was detected, it was reloaded to preserve traceability; otherwise, a new dataset was generated using identical probabilistic distributions. This seed-controlled strategy ensures both reproducibility (bitwise-identical results) and repeatability, essential for robust benchmarking.
Simulation fidelity was addressed by constraining variables to operating ranges derived from Craftbot Plus printer (Craftbot, Budapest, Hungary) specifications and FFF literature [
9]. To benchmark the computational throughput, a representative subset of the parameters defined in
Section 4.1.3 was used. The specific bounds were selected to encompass both nominal conditions and plausible extreme scenarios:
Ambient Temperature (): 20–35 °C
Relative Humidity (): 10–90%
Nozzle Temperature (): 200–230 °C
Infill Density (): 80–100%
Layer Thickness (): 0.15–0.25 mm
Printing Speed (): 50–70 mm/s
Within these bounds, temporal trends and abrupt excursions were programmatically introduced to emulate disturbance scenarios. Note that parameters such as layer thickness and infill density, typically static in standard G-code, were allowed to vary dynamically in this simulation to represent inter-layer adaptive slicing scenarios and to maximize the entropy of the data stream for stress-testing the ingestion pipeline.
A total of 100,000 synthetic records were generated at fixed 2 s intervals. The data were exported in CSV format for compatibility purposes.
Table 3 presents an illustrative excerpt of the generated telemetry stream.
The resulting dataset functions as a digital testbed for evaluating the computational throughput, responsiveness, and anomaly detection capabilities. Future work will incorporate experimentally acquired signals and transitioning to hybrid cyber–physical datasets, strengthening the link between computational indicators and physical process behavior.
4.4. Performance Evaluation and Computational Benchmarking
The dataset was used to benchmark all system layers under consistent initial conditions, enabling a quantitative assessment of the throughput, latency, and resource efficiency. Each architectural component was evaluated as follows.
4.4.1. Data Ingestion Layer
Simulated IoT data pipelines were established using Apache Kafka and RabbitMQ version 4.0.7 to enable high-frequency message streaming [
45,
46]. Although this enterprise-grade stack is more robust than necessary for the current dataset volume, it was chosen to showcase architectural readiness for extensive parallel scaling across multi-machine server farms. The ingestion modules utilized were as follows:
Batched message buffering to minimize transmission overhead
Adaptive recovery mechanisms for load balancing and fault tolerance
Asynchronous queuing to sustain stable throughput under varying data rates
Consequently, the Data Ingestion Layer is configured to subscribe to a multi-channel telemetry stream. The input vector
is defined to include the core rheological, kinematic, and environmental parameters:
The vector captures the critical interplay between thermal conditions (), extrusion dynamics (), and external disturbances (). These variables are sufficient to diagnose the majority of common failure modes (e.g., thermal instability, layer shift, moisture degradation). The Kafka producers serialize these values into JSON payloads at a frequency of 0.5 Hz.
4.4.2. Processing and Analytics Layer
Data analysis combined real-time and batch-processing paradigms. In particular:
This dual-engine approach demonstrates the architecture’s capability to handle both immediate alert generation and historical trend analysis, a prerequisite for digital twin implementation. The deterministic data ensured that each run produced comparable latency and throughput metrics, allowing for reliable cross-validation of computational efficiency.
4.4.3. Application Layer
The application interface translates analytical outcomes into operator alerts and dashboard visualizations. Two configurations were evaluated.
The distributed implementation achieved higher scalability and robustness, successfully issuing early warning notifications when the RH exceeded the 50% threshold, simulating the onset of PLA degradation [
9,
51].
4.5. Key Performance Indicators
The framework performance was quantified using computational Key Performance Indicators (KPIs) relevant to real-time monitoring environments.
Throughput (messages/s): data-handling efficiency
End-to-End Processing Time (s): latency from ingestion to alert output
CPU and Memory Usage (%): system resource utilization
Data Volume (MB): scalability and storage demand
Average Latency per Batch (s): responsiveness in near-real-time detection
Processing Time per Message (s): per-sample computational efficiency
These indicators provide a quantitative baseline for evaluating the process monitoring performance of FFF. The seed-controlled data generation approach ensures that all analyses are reproducible, allowing for transparent comparisons across configurations and future integration with real-world process data.
Subsequent research will extend this digital verification to physical experimentation, linking digital anomaly patterns to observable defects such as warping, delamination, and surface irregularities.
5. Numerical Results
In this section, we quantitatively evaluate the proposed early-warning monitoring framework using a simulated FFF dataset. Our analysis focuses on the computational performance of the system across its three architectural layers—data ingestion, data processing, and application—under conditions that simulate continuous manufacturing environments.
The obtained numerical results showed the capability of the framework to process telemetry data faster than the thermal characteristic time of the polymer extrusion. This ensures that alerts are triggered before irreversible defects, such as crystallization and hydrolysis, occur in the final part. Hence, the framework provides scalable, data-driven environmental and process supervision, offering early warning insights rather than direct control interventions. At this stage, physical manufacturing indicators such as dimensional accuracy or tensile strength are excluded and will be introduced in the next phase through experimental validation using dedicated sensor hardware.
In the following subsections, we detail the performance of each architectural layer, focusing on the throughput, latency, and resource utilization. The metrics summarized in
Table 4,
Table 5,
Table 6,
Table 7 and
Table 8 collectively affirm the scalability, responsiveness, and reliability of the proposed simulation-based monitoring system, which is designed for integration into data-intensive and sustainable manufacturing infrastructure.
5.1. Evaluation of the Data Ingestion Layer
The data ingestion layer was benchmarked to assess its capacity for high-frequency data capture by replicating the IoT-enabled AM environments. Two industrial messaging systems, RabbitMQ and Apache Kafka, were evaluated under identical operating conditions, each managing 100,000 simulated sensor records containing T, RH, and nozzle parameter data.
Reliable ingestion is essential for real-time monitoring pipelines to ensure uninterrupted data flow toward the analytics and anomaly detection modules. The results summarized in
Table 4 show significant differences in throughput and latency performance between the two systems.
Table 4.
Performance metrics comparison between RabbitMQ (RMQ) and Apache Kafka under identical simulation conditions.
Table 4.
Performance metrics comparison between RabbitMQ (RMQ) and Apache Kafka under identical simulation conditions.
| Metric | RMQ Prod. | RMQ Cons. | Kafka Prod. | Kafka Cons. |
|---|
| Total Time (s) | 29.87 | 34.43 | 7.79 | 16.25 |
| Throughput (msg/s) | 3347.84 | 2904.45 | 12,830.58 | 6155.71 |
| Avg. Latency (s) | 2.1076 | – | 0.0769 | – |
| Avg. Proc. Time (s) | – | 0.000001 | – | 0.0000004 |
In our study, Apache Kafka showed optimal scalability and responsiveness, achieving a producer throughput of 12,830.58 msg/s. This numerical result is nearly four times greater than that of RabbitMQ, along with an average latency of 0.0769 s. In the context of FFF, where a print head moving at 60 mm/s covers almost 5 mm in 0.1 s, minimizing latency is essential. Kafka’s sub-second response time ensures that environmental spikes are detected almost instantaneously, whereas RabbitMQ’s 2-s delay creates a blind spot where transient environmental spikes could be missed or where the machine executes numerous instructions without supervision. Although the experimental sampling rate was conservatively set to 0.5 Hz, the near-zero latency of the ingestion layer is critical to ensure that the monitoring architecture itself introduces no additional lag, keeping the total system reaction time strictly dependent on the physical sensor sampling rather than on computational overhead.
This high performance underscores the suitability of Kafka for near-real-time process supervision, where continuous monitoring of temperature and RH variations is essential to prevent deviations that could affect part integrity.
Figure 4 graphically compares the ingestion performance, highlighting the stability and efficiency of the proposed architecture for IoT-enabled proactive process management.
These results confirm that Kafka’s distributed event streaming model offers the responsiveness and fault tolerance necessary for industrial-grade AM monitoring pipelines, aligning with the principles of smart and sustainable manufacturing.
5.2. Semantic Correlation of System Alerts
While the architectural scope of this study excludes the physical simulation of microstructural damage, the monitoring framework provides significant semantic value by mapping detected signal anomalies to specific defect risks. By leveraging the heuristic logic defined in
Section 4.1,
Table 5 presents the classification schema applied to the alerts generated during the tests.
Table 5.
Logic Mapping between Telemetry Triggers, System Alerts, and Associated Quality Risks.
Table 5.
Logic Mapping between Telemetry Triggers, System Alerts, and Associated Quality Risks.
| Trigger Condition | System Alert Output | Associated Quality Risk |
|---|
| (sustained) | WARN_HUMIDITY_CRIT | Hydrolysis/Porosity Risk |
| ERR_THERMAL_UNDERRUN | Cold Extrusion/Clogging |
| WARN_THERMAL_SHOCK | Warping (Thermal Contraction) |
| CRIT_FLOW_STALL | Deposition Failure (Filament Break) |
This classification demonstrates that the architecture is capable of transforming raw sensor signals into actionable process knowledge. Even without in situ metrology, the system provides operators with an explicit indication of the type of defect likely to occur (e.g., distinguishing between a thermal drift and a flow interruption), thus demonstrating the diagnostic utility of the proposed heuristics.
5.3. Evaluation of the Data Processing Layer
The data processing layer was analyzed by comparing two complementary paradigms: batch analytics (Apache Hadoop) and real-time stream analytics (Apache Spark). This evaluation enables the assessment of the trade-offs between historical data aggregation and continuous process supervision.
Table 6.
Performance metrics of Hadoop batch analytics for simulated FFF process data.
Table 6.
Performance metrics of Hadoop batch analytics for simulated FFF process data.
| Metric | Value |
|---|
| Total Records Processed | 100,000 |
| Processing Time (s) | 4.640 |
| Throughput (records/s) | 21,550.46 |
| CPU Usage (Before/After) | 43.3%/47.0% |
| Memory Usage (Before/After) | 64.9%/64.3% |
| Avg. Temperature (C) | 27.49 |
| Avg. Relative Humidity (%) | 49.93 |
Hadoop efficiently processed all 100,000 simulated records within 4.64 s, achieving a throughput of over 21,500 records/s. Although highly efficient for retrospective analytics, its batch-oriented structure introduces inherent delays, thereby limiting its suitability for real-time anomaly detection and immediate operator feedback. Conversely, Spark Streaming showed the ability to detect process anomalies in near real time while maintaining computational efficiency. The processing metrics of the two consecutive micro-batches are presented in
Table 7.
Table 7.
Performance metrics for Apache Spark Streaming across consecutive micro-batches.
Table 7.
Performance metrics for Apache Spark Streaming across consecutive micro-batches.
| Metric | Batch ID: 0 | Batch ID: 1 | Summary |
|---|
| Record Count | 3000 | 1001 | 4001 |
| Processing Time (s) | 1.897 | 1.247 | 3.145 |
| Throughput (records/s) | 1581.08 | 802.47 | - |
| Latency (s) | 1.897 | 1.247 | 1.572 (avg) |
| CPU Usage (Before/After) | 0.0%/30.1% | 32.0%/20.5% | - |
| Memory Usage (Before/After) | 67.2%/67.1% | 67.1%/67.1% | - |
| Avg. Temperature (C) | 27.59 | 27.73 | 27.66 |
| Avg. Relative Humidity (%) | 49.15 | 49.90 | 49.53 |
With reference to Spark Streaming, this system achieved an average latency of 1.57 s, confirming its adequacy for the continuous supervision of dynamic parameters such as RH and nozzle temperature. By observing that humidity-induced degradation in PLA is a diffusive process that evolves over minutes rather than milliseconds, a 1.5-s detection window provides an ample safety margin for operator intervention in order to prevent defects in the final parts. This responsiveness ensures that deviations beyond the 50% RH threshold can be detected early enough to trigger preventive actions, thereby reducing the likelihood of print defects.
The combination of batch and stream analytics thus provides complementary capabilities: Hadoop supports large-scale historical evaluation and trend identification, whereas Spark enables near real-time decision support for adaptive control in AM processes.
Figure 5 compares the computational performance in terms of processing time for Apache Hadoop and Apache Spark Streaming under identical synthetic workloads. Spark Streaming exhibited a lower processing time (3.145 s) than Hadoop (4.640 s), confirming its suitability for near-real-time analytics tasks, where latency is critical. Moreover, while Hadoop requires the accumulation of the entire dataset (100,000 records) before execution, resulting in a high initial latency barrier, Spark Streaming processes incoming micro-batches (e.g., 3000 records) in just 1.897 s. This demonstrates that Spark provides actionable insights immediately during the process, whereas Hadoop is superior only for post-process aggregated throughput.
However, computational efficiency must be balanced with resource consumption. As illustrated in
Figure 6 and
Figure 7, Hadoop demonstrates a specific resource utilization profile reflecting its optimization for high-throughput batch processing. Specifically,
Figure 6 compares the CPU load before and during the task, showing the distinct operational demands of the two frameworks. Similarly, memory utilization (
Figure 7) indicates that both frameworks are memory-intensive, with Spark requiring substantial allocation to support its in-memory processing architecture.
These results highlight the complementary roles of batch and streaming frameworks within the proposed architecture: Spark Streaming enables the rapid anomaly detection required for the early-warning framework (as further visualized in the anomaly detection case study), while Hadoop supports efficient retrospective analysis and process auditing.
5.4. Evaluation of the Application Layer
The application layer governs the orchestration and alerting functions of the framework. Two implementation strategies were evaluated under identical simulation loads: a monolithic application and a microservice-based architecture deployed using Docker containers. Each configuration processed 100,000 records divided into ten batches. The results are presented in
Table 8.
Table 8.
Trade-off analysis: Monolithic raw speed vs. Microservice resilience.
Table 8.
Trade-off analysis: Monolithic raw speed vs. Microservice resilience.
| Metric | Monolithic | Microservice |
|---|
| Total Batches Processed | 10 | 10 |
| Total Records Processed | 100,000 | 100,000 |
| Avg. Response Time (s) | 1.05 | 1.98 |
| Avg. Throughput (records/s) | 9705.54 | 5040.52 |
| Total Failed Requests | 0 | 0 |
Although the monolithic configuration achieved higher raw throughput and shorter response times, the microservice-based implementation is considered the better choice for industrial scaling. Despite a slight increase in latency (1.98 s), which remains well within the safety margins for environmental monitoring, the microservice architecture effectively eliminates single points of failure (SPOF). In a real-world scenario involving numerous printers, a crash in one analysis module would render the entire farm blind in a monolithic system. In contrast, microservices isolate faults, allowing the rest of the production line to remain under supervision. Consequently, microservice-based implementation offers greater modularity, resilience, and ease of integration, which are essential for enabling CM and Industry 4.0 ecosystems. This distributed architecture supports fault tolerance, independent service scaling, and interoperability with external modules such as digital twins and AI-based controllers.
Overall, the computational evaluation confirmed that the proposed architecture effectively handled large-scale, high-frequency process data while maintaining a responsiveness that was suitable for early warning supervision. The results establish a verified computational foundation for subsequent experimental integration, where simulated anomalies are correlated with actual process outcomes such as warping, interlayer delamination, or mechanical degradation.
5.5. Note on Detection Metrics
It is relevant to address the absence of standard classification metrics (e.g., Sensitivity, False Positive Rate, F1-Score) in this evaluation. These metrics require a labeled ‘ground truth’ dataset that correlates sensor anomalies with confirmed physical defects on printed parts. Since this study focuses on the verification of the computational architecture and data pipeline using simulated process variables, such statistical metrics would be artificial.
In the proposed deterministic framework, detection performance is strictly a function of system reliability: if the architecture successfully transmits the data packet without loss (as indicated by the Latency and Jitter results), the rule-based logic identifies the deviation by definition. Therefore, the architectural benchmarks presented above (Latency < 2 s, Throughput stability) serve as the primary indicators of operational readiness for this phase of research.
6. Discussion
Our experimental findings demonstrate the technical feasibility of a simulation-driven computational framework for early-warning and anticipatory supervision in FFF. Importantly, the findings should be interpreted as a verification of the computational backbone rather than as evidence of fully validated material science predictions. The contribution of this work lies in establishing the data-handling, analytics, and decision-latency characteristics required for near real-time (low-latency) supervision, serving as the necessary architectural precursor to physical deployment.
6.1. Analytics Performance and Semantic Value
Within this scope, the framework demonstrated a dual capability: high-speed data ingestion and semantic interpretation of anomalies. As detailed in the Semantic Correlation analysis (
Table 5), the system goes beyond generic error logging by effectively mapping raw telemetry violations to specific quality risks (e.g., linking humidity drifts to hydrolysis risk). Quantitatively, the architecture supports this logic with high throughput: Apache Kafka processes over 12,830 messages/s with a latency below 0.1 s (0.0769 s). From a supervisory perspective, this confirms that the bottleneck for closed-loop control is not the software stack, but the physical process dynamics, confirming the viability of general-purpose IoT protocols for industrial monitoring.
The comparative analysis between Hadoop and Spark Streaming further clarifies the architectural roles. While Hadoop (approx. 21,550 records/s) serves retrospective auditing, Spark Streaming (1.57 s latency) provides the responsiveness required for the “Intra-layer Intervention Window.” While this latency does not guarantee the prevention of instantaneous failures, it provides sufficient actionable lead time for moisture-sensitive materials, where degradation kinetics unfold over minutes rather than milliseconds.
6.2. Operational Readiness: Latency vs. Physical Dynamics
To justify the system’s early-warning potential, we quantify the operational margin by comparing computational latency against the physical inertia of the FFF process. A critical metric is the thermal time constant of the liquefier assembly, which acts as a physical low-pass filter against rapid temperature changes. As modeled in foundational studies on FFF dynamics [
52], the heating system exhibits a characteristic response time that significantly exceeds the millisecond scale of electronic data transmission.
Comparing this physical inertia (typically in the order of seconds) with our measured system latency ( s) confirms that the monitoring architecture operates within a safe temporal margin. The response ratio remains well below unity, theoretically allowing the detection of thermal drift before the nozzle temperature physically deviates enough to cause rheological instabilities.
6.3. Architectural Resilience and Circular Economy Implications
At the application layer, the trade-off between monolithic and microservice architectures has significant implications for autonomous manufacturing. Although the monolithic configuration achieved marginally lower latency (1.05 s vs. 1.98 s), the microservice architecture offers the fault isolation required for “lights-out” operations. A single service failure in a monolithic block risks halting the entire supervision line, whereas the distributed approach ensures system survivability across diverse operational segments.
Furthermore, the proposed framework aligns with Circular Economy principles by prioritizing resource efficiency and waste minimization. By monitoring environmental parameters such as Ambient Temperature and RH in real time, the platform provides actionable information to prevent irreversible material degradation. This shift from post-process rejection to in-process risk mitigation directly contributes to a more sustainable manufacturing paradigm, reducing polymer waste and optimizing energy usage.
6.4. Limitations and Scope of Validity
It is essential to acknowledge the limitations of this architectural study. First, the verification relies on synthetic data injection rather than physical experimentation. Although the anomaly patterns were derived from heuristic logic (
Section 4.1) and mapped to semantic risks (
Section 5.2), the framework does not yet incorporate a coupled thermo-mechanical model. As a result, the term “predictive” is strictly limited to the data-driven anticipation of risk states, not to the first-principles prediction of final part geometry.
Future work will focus on experimentally validating these architectural findings. This will involve correlating the generated alerts with the physical measurements of dimensional accuracy and interlayer strength on a real FFF testbed. Establishing this ground truth is the critical next step to translate the current “Operational Readiness” into a fully calibrated quality assurance system.
7. Conclusions
This study presented a process-oriented computational framework for monitoring and early-warning supervision in FFF, designed to bridge the gap between high-frequency sensor data and actionable process insights. By prioritizing a microservice-based architecture, the study focused on verifying the computational feasibility of soft real-time supervision under FFF-relevant data rates. Simulation-based results confirmed that high-throughput data ingestion and distributed stream analytics can be effectively integrated to support the low-latency detection of environmentally induced process instabilities.
Benchmarking results indicate that the combined use of Apache Kafka and Spark Streaming enables sub-second to near-real-time responsiveness. This performance ensures that the system can operate well within the thermal time constants of the extrusion process, preventing data transmission delays from bottlenecking the detection logic. These findings demonstrate that the proposed architecture is computationally capable of supporting intervention specifically within the intra-layer deposition window, before adverse environmental conditions escalate into irreversible process failure.
The adoption of a simulation-first methodology serves as a strategic de-risking step. Unlike physical testbeds, which are constrained by material costs and hardware safety, the virtual environment allowed for aggressive stress-testing of the data pipeline under extreme load conditions. While this approach enables a systematic evaluation of throughput and resilience, the conclusions remain confined to the digital domain. The absence of hardware-in-the-loop testing means the current framework provides data-driven anticipation of instability rather than a physically validated prediction of part quality. By shifting the paradigm from post-process inspection to in-process risk mitigation, the system aligns with Circular Economy principles and proactively minimizes material and energy waste.
Future work will focus on a proof-of-concept implementation on an actual FFF system, including integration with physical sensors, end-to-end latency assessment, and the correlation of early-warning indicators with measurable defects such as dimensional inaccuracies, warping, and interlayer adhesion loss. Additional studies will investigate the influence of controlled pre-print RH exposure on filament condition to quantitatively establish the link between environmental history and observable artifacts.
Overall, this work provides a verified computational foundation for early-warning supervision in extrusion-based AM. By delineating verified capabilities alongside current limitations, it provides a structured progression from simulation-based architectural validation toward fully validated, cyber–physical predictive monitoring in FFF systems.