You are on page 1of 10

Available online at www.sciencedirect.

com
Available online at www.sciencedirect.com
Available online at www.sciencedirect.com

ScienceDirect
Procedia Computer Science 00 (2023) 000–000
www.elsevier.com/locate/procedia
Procedia
Procedia Computer
Computer Science
Science 00 (2023)
232 (2024) 000–000
3229–3238
www.elsevier.com/locate/procedia
5th International Conference on Industry 4.0 and Smart Manufacturing
5th International Conference on Industry 4.0 and Smart Manufacturing
AI-driven real-time failure detection in additive manufacturing
AI-driven real-time failure detection in additive manufacturing
Mangolika Bhattacharyaa,b,∗, Mihai Penicab , Eoin O’Connellb , Martin Hayesb
a,b,∗ b b
Mangolika Bhattacharya
a Illinois
, Mihai
State University,Penica , Eoin
Normal, Illinois O’Connell
and 61790, USA , Martin Hayesb
b University of Limerick, Castletroy, Limerick and V94T9PX, Ireland
a Illinois State University, Normal, Illinois and 61790, USA
b University of Limerick, Castletroy, Limerick and V94T9PX, Ireland

Abstract
Abstract
The optimisation of 3D printing parameters for manufacturing biomedical devices is an emerging interdisciplinary field that
incorporates artificial intelligence techniques such as machine learning and deep learning. In this particular study, the focus is
The optimisation of 3D printing parameters for manufacturing biomedical devices is an emerging interdisciplinary field that
on the fabrication of biocompatible finger splints using digital light processing 3D printing technology, followed by UV curing,
incorporates artificial intelligence techniques such as machine learning and deep learning. In this particular study, the focus is
to evaluate their quality. By leveraging vibration data from printers, which cannot be captured through visual inspection of layer
on the fabrication of biocompatible finger splints using digital light processing 3D printing technology, followed by UV curing,
defects, this study aims to develop a predictive model for assessing the failures of printed parts. Here, a closed-loop detection
to evaluate their quality. By leveraging vibration data from printers, which cannot be captured through visual inspection of layer
system is proposed to identify failure phenomena in 3D resin printing, combining both cloud and edge computing technologies to
defects, this study aims to develop a predictive model for assessing the failures of printed parts. Here, a closed-loop detection
effectively detect and address potential failures in the printing process.
system is proposed to identify failure phenomena in 3D resin printing, combining both cloud and edge computing technologies to
effectively detect and address potential failures in the printing process.
© 2023 The Authors. Published by Elsevier B.V.
This
© is an open access article under the CC BY-NC-ND license (http://creativecommons.org/licenses/by-nc-nd/4.0/)
© 2024
2023 The
The Authors.
Authors. Published
Published by
by Elsevier
Elsevier B.V.
B.V.
Peer-review
This under
is an open responsibility
access of the scientific
article under CC BY-NC-NDcommittee of the
license 5th International Conference on Industry 4.0 and Smart Manu-
(https://creativecommons.org/licenses/by-nc-nd/4.0)
This is an open access article under the CC BY-NC-ND license (http://creativecommons.org/licenses/by-nc-nd/4.0/)
Peer-review
facturing. under responsibility of the scientific committee of the 5th International Conference on Industry 4.0 and Smart Manufacturing
Peer-review under responsibility of the scientific committee of the 5th International Conference on Industry 4.0 and Smart Manu-
facturing.
Keywords: Edge-Cloud computing; Self-healing systems; Smart manufacturing; Recurrent Neural Network (RNN);
Keywords: Edge-Cloud computing; Self-healing systems; Smart manufacturing; Recurrent Neural Network (RNN);

1. Introduction
1. Introduction
Additive manufacturing (AM) has the ability to print customised objects at a reasonable cost. This is crucial in the
biomedical industry, where unique patient-specific products are needed. The trend in 3D printing is custom functional
Additive manufacturing (AM) has the ability to print customised objects at a reasonable cost. This is crucial in the
goods, with over 70% of 3D printing being used to make commercial products by 2025 [1]. There are many difficulties
biomedical industry, where unique patient-specific products are needed. The trend in 3D printing is custom functional
and restrictions with 3D printing, including the weak stiffness and strength of printed building materials as well as the
goods, with over 70% of 3D printing being used to make commercial products by 2025 [1]. There are many difficulties
printing dimension. Moulds have a number of disadvantages, including their incapacity for recycling, size restrictions
and restrictions with 3D printing, including the weak stiffness and strength of printed building materials as well as the
and time required for manufacturing of any crucial component [2]. Numerous freeform components are cast in-situ,
printing dimension. Moulds have a number of disadvantages, including their incapacity for recycling, size restrictions
making it challenging to maintain excellence. In the current experiment of producing a finger splint, the measurements
and time required for manufacturing of any crucial component [2]. Numerous freeform components are cast in-situ,
are taken from the patient, which is then converted to a printable file and then sent to the printer. In case of defects
making it challenging to maintain excellence. In the current experiment of producing a finger splint, the measurements
arising from the print, the waiting time for patients increases significantly. Most 3D printers lack a dedicated method
are taken from the patient, which is then converted to a printable file and then sent to the printer. In case of defects
to track and monitor the progress of the printing process. Even if the filament/resin ran out or there are any potential
arising from the print, the waiting time for patients increases significantly. Most 3D printers lack a dedicated method
to track and monitor the progress of the printing process. Even if the filament/resin ran out or there are any potential
∗ Corresponding author.
E-mail address: mango.bhattacharya@ul.ie
∗ Corresponding author.

E-mail address:
1877-0509 mango.bhattacharya@ul.ie
© 2023 The Authors. Published by Elsevier B.V.
This is an open
1877-0509 access
© 2024 Thearticle under
Authors. the CC BY-NC-ND
Published license (http://creativecommons.org/licenses/by-nc-nd/4.0/)
by Elsevier B.V.
1877-0509
This is an ©
Peer-review 2023
under
open The Authors.
responsibility
access Published
of the by
CCElsevier
the scientific
article under B.V.oflicense
committee
BY-NC-ND the 5th (https://creativecommons.org/licenses/by-nc-nd/4.0)
International Conference on Industry 4.0 and Smart Manufacturing.
This is an open under
Peer-review access article under the CC
responsibility ofBY-NC-ND license
the scientific (http://creativecommons.org/licenses/by-nc-nd/4.0/)
committee of the 5th International Conference on Industry 4.0 and
Peer-review
Smart under responsibility of the scientific committee of the 5th International Conference on Industry 4.0 and Smart Manufacturing.
Manufacturing
10.1016/j.procs.2024.02.138
3230 Mangolika Bhattacharya et al. / Procedia Computer Science 232 (2024) 3229–3238
2 M Bhattacharya / Procedia Computer Science 00 (2023) 000–000

print flaws, 3D printers may keep printing the component until all the layers have been added. Defects can be found by
running quality checks at different (important) points in the printing process. This not only helps to ensure corrective
action but also reduces waste from printing flawed parts and optimises patient waiting time. Automated process
monitoring is crucial for large-scale 3D printing operations when the same part is produced in bulk quantities using
hundreds of 3D printers. In this study, a method has been proposed where the physical parameters generated during
the printing of a finger mallet/splint are collected, which are then used to assess the quality and predict failures in
the printed part. Deep learning (DL) models are built using two recurrent neural network (RNN) techniques namely,
long short-term memory network (LSTM) and Gated Recurrent Unit (GRU), for fault diagnosis modelling. This paper
provides in-depth guidance on data processing and training of LSTM models for a set vibration time series data,
generated from an AM process. Moreover, a comparison study between GRU and LSTM models concerning their
performance in reducing error rates is performed. The output of the prediction analysis is displayed on the screen of
an edge gateway, and can be used to take corrective action leading to a closed loop failure monitoring system.
The aim of this research is to develop novel failure detection strategies in AM applying machine learning (ML),
using the vibration values collected during the 3D printing process, while achieving the following objectives:
• To identify optimal configurations and controls in 3D printing to predict failures using DL with LSTM and
GRU layers.
• To reduce the time and energy required to print 3D models and optimise the manufacturing process.
• To build a real-time cloud and edge detection system suitable for any AM process.
The remaining of the article is organised as follows. Section 2 presents the existing work on failure detection in dif-
ferent AM techniques. Section 3 presents the work flow of the 3D printer used in this experiment. Section 4 labels
the common causes of failures in AM techniques. Section 5 explains the methodology adopted in this study. Initially
it provides the system architecture built to perform the experiments. Then, it provides the data collection and trans-
mission strategy, followed by data preprocessing and labelling techniques. This is followed by the general framework
of the proposed predictive models; the implementation process; covers the dataset processing description, and failure
diagnosis. Section 6 shows the results analysis and the performance evaluation of the LSTM network in comparison
to the GRU model. Finally section 7 concludes this work.

2. Preliminary work to detect failures

Due to the relatively recent emergence of 3D printing technology in the manufacturing field, there is a scarcity
of literature that specifically focuses on the quality aspects of 3D printing. A significant work is available on the
detection of failures using computational methods, such as the finite element method to assess the characteristics of
the 3D printed part, as detailed in [3]. A complete review of the different ML techniques used for defect detection in
metal laser-based AM processes is given in [4]. In [5] a method is proposed to detect failure defects during the 3D
printing process using a multi-camera system comprised of five camera units. Image processing is carried out using
a C# and Dot Net framework, to assess the quality of the parts. In [6] a fault diagnosis method in FDM printers is
proposed, using an attitude sensor and support vector machines as the classification technique. In [7] a method for
live monitoring of the progress of 3D printing process is proposed based on texture analysis using the Gray-Level Co-
occurrence Matrix (GLCM) and chosen Haralick features. Images obtained by scanning the 3D printed plates have
been used to verify the approach. In [8] the effects of two parameters of layer thickness and binder saturation level on
the mechanical strength, surface quality and dimensional accuracy in the 3D printing process is studied. Experimental
results show that under the same layer thickness, increasing the binder saturation level from 90% to 125% would
result in an increase of tensile and flexural strengths of the specimens and decrease of dimensional accuracy and
surface uniformity of the printed parts. Most of the fault prediction strategies focus on FDM printers and are mainly
based on the use of vision systems to detect defects during the formation of the layers [9, 10, 11]. However, instead
of FDM printers, resin printers, namely stereolithography (SLA) and digital light processing (DLP), are commonly
used to print medical models such as knee cast, tooth implant, etc. Unlike in FDM printers, where the layer-by-layer
formation of an object can be seen as the printer deposits molten filament, in DLP ( and all other resin) printers, the
layer formation is not visible because the liquid resin is contained within a resin tank. The light source projects the
Mangolika Bhattacharya et al. / Procedia Computer Science 232 (2024) 3229–3238 3231
M Bhattacharya / Procedia Computer Science 00 (2023) 000–000 3

pattern of the layer onto the surface of the liquid resin in the tank, and the resin cures only in the areas where the light
touches it (more discussed in section 3). Therefore, the layer-by-layer formation of an object in a DLP printer is not
visible until the printing process is complete. This makes vision-based fault detection strategies extremely challenging
in resin printers. This work is a first of its kind to detect faults in DLP printers solely using vibration generated during
the printing process. DLP printers are mainly used for printing medical models. However, there exists very limited
work to study DLP printers, and even lesser works exist to analyse the failures obtained in DLP printers.
Predictive models can be divided into three categories: statistical analysis, ML and DL. The statistical models include
various methods such as Markov chain (MC) [12], exponential smoothing [13] and autoregressive integrated moving
average (ARIMA) [14]. The ML models consist of three methodologies: Decision Tree (DT), Support Vector Machine
(SVM) and Artificial Neural Network (ANN) [15, 16, 17]. DL approaches automatically perform quite well in treating
highly nonlinear features via a cascade of multiple layers [18]. RNN and Back-Propagation Neural Network (BPNN)
are two popular algorithms used for predicting time series [19]. An approach for forecasting 3D printing failures based
on LSTM networks is provided in this paper. A more straightforward variant of LSTM, the GRU module is exploited
to simulate dynamic changes in the sensor data for better learning potential characteristics in time sequence data.

3. Methodology of the 3D printer

Photo/VAT -polymerisation is an AM technology that customs a liquid polymer resin to create 3D objects. This
method involves curing a photopolymer resin using a UV laser to create prototypes, models, and patterns. SLA and
DLP are two of the most often utilised technology in VAT -polymerisation [20]. In this study, DLP is used as the
technology and UV cure resin as the material for the prints. In this study, we employed the 3D Systems Figure 4
Standalone printer.
To stop the item from deforming, supports created during the print are used. These supports can be removed by
hand or with the use of pointed tools and are constructed from the same material as the rest of the item. After being
washed in a chemical solution to get rid of extra resin, the completed item is cured in a UV oven. The process of 3D
printing to create a bespoke device goes through several steps. These steps depend on a number of variables, including
the material to be utilised, the shape complexity of the product, the environment in which it will be used, as well as
the price and final product size. This process can be generalised and explained in the following steps.
1. Designing: The measurements of the injured finger are taken using a 3D scanner, Einscan. A computer model
of a finger splint is created, where if needed, computer-aided simulation studies can be conducted for detailed
precision.
2. Software workflow: The printer receives the CAD model that has been turned into a buildable stereolithography
(STL) format. This buildable file includes instructions for the printer on how to construct the finger splint layer
by layer, occasionally including directions for any necessary scaffolding materials.
3. Materials used: In this experiment, biocompatible photosensitive resin is used which has shown promising
potential in terms of tunability of physico-chemical and mechano-biological properties. Controlling the viscos-
ity of the photopolymerisable resin used in 3D printing is essential for the success of this technology in the
production of biomedical composites [20]. This has been verified while conducting this experiment.
4. Printing: The instructions are then delivered to the printer in the form of printable software file (most commonly
G Code or AMF).
5. Cleaning & post-processing: After printing, the finished product may undergo post-processing. They include
cleaning up of leftover debris, cooling (also known as annealing), drilling, cutting, polishing, and sterilising if
necessary.
6. Curing: Resin prints are often soft and can break easily. Using UV light, the curing process transforms liquid
photopolymer resins into solid geometries to unlock the full mechanical potential of the print and complete its
polymerisation reaction.
7. Process validation and testing: The finished product is tested to ensure that it has all the desired qualities,
including strength.
3232 Mangolika Bhattacharya et al. / Procedia Computer Science 232 (2024) 3229–3238
M Bhattacharya / Procedia Computer Science 00 (2023) 000–000 1

4. Common causes of failures additive manufacturing and DLP printers

The most common reasons for the failures of resin print are listed as follows:
• Layer height refers to the height of each layer created during printing. Smaller layer heights adds more layers
to reach the same height, improving the part’s quality. It also lengthens the printing process, which raises costs.
• Lifting Speed is the speed in which the build plate moves away from the print surface, peeling the cured resin
off the fluorinated ethylene propylene (FEP) sheet and creating a gap for uncured resin to flow into. A suction
force is applied while the model is ripped away from the FEP material. Consequently, more delicate features
and weaker model areas may be harmed if the pace is too fast.
• The number of supports used increases the stability of the printed product, but this might also lengthen printing
time and use more material. Fewer supports could result in the print failing.
• Print plate adhesion is the most common reason for a print to fail in DLP printers. If the build plate is not
properly prepped, adhesion issues with bottom-up printers like Figure 4 may arise. This could happen if the bed
is not levelled or the printer is exposed to extreme temperatures.
In this study all of the mentioned parameters are varied to induce failures in the printed part as given in figs. 1 and 2.
Due to the limited number of failures in the dataset, the types of failures are not specifically labelled in the failure
data.

Fig. 1: Correctly printed finger splint. Fig. 2: Failures/Faulty parts while printing.

5. Experimental setup & methodology

The 3D printer used for this work is Figure 4 Standalone from 3D systems which uses the DLP technology. It
should be noted that although our suggested ML solution is currently limited to the aforementioned printer and printing
procedure, the technique and algorithm can be deployed for any type of AM printer.

5.1. System architecture

The architecture of the proposed IoT edge and cloud based smart failure detection system in AM is shown in
figure.caption.2Fig. 3, summarised below. 1. Sensors are installed to monitor the physical parameters; 2. An initial
data cleaning process takes place in the in-house designed circuit board; 3. The cleaned data is sent to the cloud using
two techniques, namely WiFi and LoRa, where a backend API verifies the data and stores it in a centralised MySQL
database. 4. The data is viewed in a frontend dashboard and can be sent to any third party app like a smartphone; 5.
NN models using LSTM and GRU process the data and the output is analysed; 6. To implement closed-loop edge
processing, the NN model is executed on an edge gateway and the probability of print failure can be displayed on the
built-in screen, based on which the printer can be stopped; 7. The stopping of the printing process can be done by the
human-in-loop or this model can be extended where the edge gateway can be connected to a third party application,
such as the 3D printer software. A smart plug can be used to stop the printer without human supervision. Therefore,
this experiment is designed to have a hybrid Industry 4.0/5.0 application depending on the type of AM process [21].
Manufacturing medical models, such as the finger splint printed in this experiment, or printing of organs by cells,
needs high accuracy and therefore are suitable with the presence of human-in-loop.
Mangolika Bhattacharya et al. / Procedia Computer Science 232 (2024) 3229–3238 3233
2 M Bhattacharya / Procedia Computer Science 00 (2023) 000–000

Fig. 3: Architecture of the proposed system. Fig. 4: Sensors installed at different locations within the printer.

Fig. 6: Real-time vibration values.


Fig. 5: Real-time temperature and humidity values.

5.2. Data collection, transmission and storage

Sensors monitor the physical parameters generated during the printing process, namely vibration, temperature, and
humidity (
figure.caption.2Fig. 4). The circuit board is designed using the SHT25 humidity/temperature sensor and
ADXL345BCCZ-RL accelerometer sensor. The predefined interval at which the temperature and humidity sensor
transmits data is 1 second and the vibration data is 0.1 seconds. The data is processed using a C script, removing noise
and other parameters such as cleaning duplicates, checking for missing values, validating data types, standardising
data formats etc. [22]. The data is converted to a JSON format and sent to the cloud server. The transmission of the
data is done via two techniques, i.e. WiFi and LoRa. Although LoRa consumes much less power, WiFi has a higher
data rate than LoRa. To deploy LoRa, a gateway is required and a router is used for this purpose.
In the cloud, a backend API verifies the data transmission, and lost packets are retransmitted. The data is stored in
Dell Poweredge cloud servers in form of MySQL database using the necessary credentials and configuration informa-
tion. A common security technique, single-factor authentication layer is provided for the access of the database.
Once the data is stored, it can be viewed on the frontend application or any other third party application. For real-
time monitoring of the parameter values, a custom made dashboard is developed using Javascript as the frontend and
PHP as the backend. Real-time temperature, humidity and vibration values gathered during the printing process can
be viewed on the dashboard as given in figs. 5 and 6. The monitoring of the printing process has been automated
using PYTHON scripts. The same 3D printer configuration is maintained throughout the duration of the experiment.
The scope of this study is limited to the analysis of the vibration data generated during the printing process, as within
the DLP printer used in this study, the variation of temperature and humidity is difficult to obtain. Future work will
investigate the effect of temperature and humidity on the failures in the print process for a different printer.
3234 Mangolika Bhattacharya et al. / Procedia Computer Science 232 (2024) 3229–3238
M Bhattacharya / Procedia Computer Science 00 (2023) 000–000 3

5.3. Data preprocessing and labelling

The dataset consists of approximately 500,000 rows and 3 features. The training process uses the data from 20
finger splints that are printed over a two-week period, with each print lasting 30 minutes. The Tsfresh library in
Python is utilised for feature extraction, which includes various feature extraction methods and a feature selection
algorithm. The extracted feature datasets are then transformed into maximum force profiles by resampling the dataset
at a rate of 50 ms and selecting the maximum value for each sample interval. Figs. 7 and 8 display a portion of the
raw data and the scaled data, both with and without failure.
The next step involves labelling the time series data, which assigns a class to each data point in the time series.
Here, the classes correspond to whether the part is a failure or not. Although failure has been induced by multiple
methods as overviewed section 4, during the labelling process, the types of failures are not classified further. A script
is written in python which checks the time interval and automatically labels multiple sensor readings obtained while
printing the specific part.

Fig. 7: Source vibration data generated during the printing. Fig. 8: Sampled time series data.

5.4. Neural network classification

Leveraging RNNs’ sequential data handling and dependency modeling capabilities, two models are used in this
work for time series failure prediction. The overview of the methodology employed using LSTM and the GRU models,
is given below.
Step 1: Data is collected from accelerometer sensors installed on the moving platform, base, and walls of the 3D printer;

Step 2: The feature extraction is carried out using tsfresh in Python. Using the SQL table which is the concatenation of all of the sample files, ‘MinMaxScaler’ scaling
is implemented to normalise the sensor signals.

Step 3: The data is labelled as per the manufacturing output.

Step 4: The data is divided into train and test data using different split ratios;

Step 5: Training and testing of LSTM/GRU model;

Step 6: Output the labels predicted by the trained LSTM/GRU model;

Step 7: Comparison of the predicted labels with testing labels as given in figs. 9 and 12;

Step 8: Fault diagnosis is performed using the predicted labels;

Step 9: The output of the fault diagnosis is displayed on the edge gateway.

5.5. Training and testing dataset

Three groups—training, validation, and test—are created from the dataset. The training dataset is a collection of
examples utilised throughout the learning process. The validation dataset consists of data withheld from the model’s
training process and used to measure the model’s skill while adjusting the hyperparameters to prevent overfitting.
Finally, the test set is typically what is used to evaluate competing models. In this work, the training set consists
of 80% of the entire dataset. So, the model runs with different ratios and then this percentage is selected because it
Mangolika Bhattacharya et al. / Procedia Computer Science 232 (2024) 3229–3238 3235
4 M Bhattacharya / Procedia Computer Science 00 (2023) 000–000

produces the best accurate predicted values. The prediction model has been constructed based on the training group.
The rest, which represents 20% of the whole dataset, have been allocated as the test set for the model evaluation. Two
optimisers, Adam and Stochastic Gradient descent (SGD) are used.
The evaluation metrics used are mean squared error (MSE) and mean absolute error (MAE), calculated as,

N
1 
MS E = (yi − ŷi )2 (1)
N i=1
N
1 
MAE = (yi − ŷi ) (2)
N i=1

where yi is the real values; ŷi is the predicted value of yi and N is the total number of testing samples.

5.6. Failure diagnosis

The output of the LSTM model is a probability, that the force profile being monitored would or would not result in
the manufacture of a failed part. As given in the output of the LSTM model (figs. 9 and 12), the failed part mostly has
a value of less that 1.5. For a threshold value, τ, here τ = 1.5, the failure can be calculated on the number of values
obtained on either side of τ. However, the failed part also contains some values higher than τ. To determine if a part
is going to fail and thereby stop the printing process, a mean of the values higher and lower than the τ are calculated,
denoted as x̄high and x̄low . If the time taken to complete a print job is t, and the rate at which the data is sent from the
vibration sensor is tv , then it can be said that

x̄high t/tv > x̄low t/tv − Not Fail (3)


x̄high t/tv < x̄low t/tv − Fail (4)

Equations (3) and (4) can be calculated for different values of t, throughout the print job, to determine the probability
of the failure of print.

5.7. Output on edge gateway

The edge gateway is built using the Ubuntu operating system and the Raspberry Pi 4 Model B/4GB that has ARM
Cortex-A72 CPU, powerful enough to sustain model training for the NN and also to retrieve and manage the datasets
received from the sensors and send it to the cloud or display on the edge. A python script runs on the device, which
aggregates sensor readings from the TimescaleDB instance in the cloud. Another script is used to train the LSTM
model to be tested on batches of data, thereby stopping the printing process on accounting higher failure probability.
The edge gateway can be connected to the printer software as a third party application and may have the function to
control the printing process using a smart plug.

6. Results & Discussions

In this work, prediction of the failure analysis is calculated during the printing of layers in an AM model using
the LSTM and GRU models. The vibration data is gathered from multiple printing jobs conducted over three weeks.
Each job is of set duration of 30 minutes. Two DL models of different architectures are constructed, each one is
adapted to its prediction horizon. These networks are able to predict failures after 5 minutes, however depending on
the type of failure encountered, the prediction accuracy may vary over time in different experiments. The parameters
of each network are determined by the process of training on real data. The training dataset is four times larger than
the prediction horizon.
3236 Mangolika Bhattacharya et al. / Procedia Computer Science 232 (2024) 3229–3238
M Bhattacharya / Procedia Computer Science 00 (2023) 000–000 5

Fig. 9: Prediction output of the LSTM and GRU.


Fig. 10: Edge output of job 1. Fig. 11: Edge output of job 3.

Fig. 12: MAE and MSE between LSTM & GRU

6.1. Training and Validation processes

Fig. 9, shows that the validated curve of each algorithm closely aligns the original curve samples at a percentage.
Since the training dataset is constrained by the occurrence of fewer failures, there exists a delay in the capturing of
the failure. Fig. 9 displays the performance of the LSTM and GRU models. Both methods are able to predict failures,
however the GRU is more susceptible to error. If the predicted value is less than 1.5, the model calculates the part as
‘failed’. The probability of the part failing is calculated every minute interval, on the sensor readings obtained. The
output is displayed on an edge gateway, here, the display of a raspberry pie.

6.2. Model effects under different parameters

In this study, the performance of the proposed approaches is evaluated based on two aspects: accuracy and running
time. Three metrics, namely the number of epochs, learning rate, and the type of optimiser used, are utilised for
this evaluation. Table 1 shows the performance of the LSTM models under different parameters. For a fixed learning
rate, the MSE is calculated. The performance of the models varies greatly under different parameters, but the MSE
of most LSTM models are below 0.5. It can be seen from the table that the accuracy of the model can be improved
after parameter selection, however, the training time increases significantly. It is observed that the uncertainty of the
predicted results of the two models and the execution times increase with the increasing prediction horizon. The
statistics of simulation results of the LSTM, and GRU models for the testing dataset, as given in
Mangolika Bhattacharya et al. / Procedia Computer Science 232 (2024) 3229–3238 3237
6 M Bhattacharya / Procedia Computer Science 00 (2023) 000–000

Table 1: Performance of LSTM model under different pararmeters

Algorithm Epochs Learning Rate Optimiser MSE time (minutes)


100 0.02 Adam 0.51 18.34
200 0.03 Adam 0.42 40.43
300 0.04 Adam 0.1 75.18
LSTM
100 0.02 SGD 0.52 19.40
200 0.03 SGD 0.45 41.87
300 0.04 SGD 0.11 74.42
100 0.02 Adam 0.56 10.34
200 0.03 Adam 0.48 30.43
300 0.04 Adam 0.11 72.18
GRU
100 0.02 SGD 0.62 19.40
200 0.03 SGD 0.51 30.17
300 0.04 SGD 0.13 70.27

figure.caption.6Fig. 12 show that the MAE and MSE of LSTM models are smaller than GRU model. The results
show that the LSTM model has better results in terms of accuracy but is constrained by the time taken. The training
time can be improved with the application of early stopping criteria.
The accuracy of both models is around 80%. This can be explained as the Standalone printer is a high-performing
printer and the failure rate is quite low. Therefore the resultant training data is constrained due to insufficient data
on failures which reduces the overall accuracy of the models. To conclude, the two models are able to simulate
failure prediction processes fairly accurately by employing time sequences input. The experimental results show
the effectiveness of the proposed prediction algorithms for medium-time period failure prediction. GRU and LSTM
models predict the faults in the printed parts with good accuracy. Given that GRU has simpler structures and fewer
parameters, and requires less time for model training, it may be the preferred method for short term prediction and
it can be improved by hybridisation with other techniques such as the dropout. Two optimisers, Adam and SGD are
used when training the networks. SGD is a simple and widely used optimiser that updates the model parameters
based on the gradients of the loss function with respect to the parameters. It is relatively computationally efficient
and works well for large datasets. Adam is an advanced optimiser integrating the advantages of both Adagrad and
RMSProp. Adapting the learning rate for each parameter using historical gradients, it is highly effective for NN
models with numerous parameters. As viewed in table 1, the Adam optimiser performs better in both LSTM and
GRU. The prediction report calculated per minute as given in section 5.6 is displayed on the screen of a raspberry pie,
to stop the printing process manually or via a smart plug.

7. Conclusion

This paper presents a cloud and edge based failure prediction system based on the output of LSTM and GRU
networks. Although the current experiment is constrained by the manufacturing data of a finger splint, the proposed
method can be applied to any manufacturing technique. This model is capable of detecting both completion failure
defects such as filament running out or printing stopped in the mid-progress and structural or geometrical defects.
The model initially performs feature extraction and data labelling and then builds the appropriate network structure
to optimise the ability of prediction. A comparative study of the proposed algorithms: LSTM and GRU is presented.
These two techniques are implemented and tested on a set of validation data. The results indicates that LSTM is
superior to GRU, however is constrained by the time taken. Once trained, these networks are able to predict failures
after 5 minutes. However, depending on the type of failure encountered, the prediction accuracy may vary over time in
different experiments. In this work, due to the in-availability of failure data, the types of failures are undistinguished.
Future work will include the variation of prediction time on multiple types of failure. Although, the temperature and
humidity values are stored, the variation of these values is not possible in the specific experimental setting. Future
work may also include the effect of temperature and humidity on the failure rate in a different printer.

References

[1] Nurhalida Shahrubudin, Te Chuan Lee, and RJPM Ramlan. An overview on 3d printing technology: Technological, materials, and applications.
Procedia Manufacturing, 35:1286–1296, 2019.
[2] Ugandhar Delli and Shing Chang. Automated process monitoring in 3d printing using supervised machine learning. Procedia Manufacturing,
26:865–870, 2018.
3238 Mangolika Bhattacharya et al. / Procedia Computer Science 232 (2024) 3229–3238
M Bhattacharya / Procedia Computer Science 00 (2023) 000–000 7

[3] Madhukar Somireddy, Aleksander Czekanski, and Sundar V Atre. Modelling of failure behaviour of 3d-printed composite parts. Applied
Sciences, 12(21):10724, 2022.
[4] Yanzhou Fu, Austin RJ Downey, Lang Yuan, Tianyu Zhang, Avery Pratt, and Yunusa Balogun. Machine learning algorithms for defect detection
in metal laser-based additive manufacturing: A review. Journal of Manufacturing Processes, 75:693–710, 2022.
[5] Jeremy Straub. Initial work on the characterization of additive manufacturing (3d printing) using software image analysis. Machines, 3(2):55–
71, 2015.
[6] Kun He, Zhijun Yang, Yun Bai, Jianyu Long, and Chuan Li. Intelligent fault diagnosis of delta 3d printers using attitude sensors based on
support vector machines. Sensors, 18(4):1298, 2018.
[7] Jarosław Fastowicz and Krzysztof Okarma. Texture based quality assessment of 3d prints for different lighting conditions. In Computer Vision
and Graphics: International Conference, ICCVG 2016, Warsaw, Poland, September 19-21, 2016, Proceedings 8, pages 17–28. Springer, 2016.
[8] Mohammad Vaezi and Chee Kai Chua. Effects of layer thickness and binder saturation level parameters on 3d printing process. The Interna-
tional Journal of Advanced Manufacturing Technology, 53:275–284, 2011.
[9] Mingtao Wu, Vir V Phoha, Young B Moon, and Amith K Belman. Detecting malicious defects in 3d printing process using machine learning
and image classification. In ASME International Mechanical Engineering Congress and Exposition, volume 50688, page V014T07A004.
American Society of Mechanical Engineers, 2016.
[10] Mohammad Najjartabar Bisheh, Shing I Chang, and Shuting Lei. A layer-by-layer quality monitoring framework for 3d printing. Computers
& Industrial Engineering, 157:107314, 2021.
[11] Ling Li, Ryan McGuan, Robert Isaac, Pirouz Kavehpour, and Robert Candler. Improving precision of material extrusion 3d printing by in-situ
monitoring & predicting 3d geometric deviation using conditional adversarial networks. Additive Manufacturing, 38:101695, 2021.
[12] Ayush Shakya, Semhar Michael, Christopher Saunders, Douglas Armstrong, Prakash Pandey, Santosh Chalise, and Reinaldo Tonkoski. Solar
irradiance forecasting in remote microgrids using markov switching model. IEEE Transactions on sustainable Energy, 8(3):895–905, 2016.
[13] Juan F Rendon-Sanchez and Lilian M de Menezes. Structural combination of seasonal exponential smoothing forecasts applied to load
forecasting. European Journal of Operational Research, 275(3):916–924, 2019.
[14] Wei Wu, Jingtao Hu, and Jilong Zhang. Prognostics of machine health condition using an improved arima-based prediction method. In 2007
2nd IEEE Conference on Industrial Electronics and Applications, pages 1062–1067. Ieee, 2007.
[15] Jiechao Gao, Haoyu Wang, and Haiying Shen. Task failure prediction in cloud data centers using deep learning. IEEE transactions on services
computing, 15(3):1411–1422, 2020.
[16] Mangolika Bhattacharya, Pat O’Neill, Mark Southern, and Martin Hayes. Use of artificial neural networks in the design of adaptive fuzzy logic
controllers in the manufacturing of prosthetic knees. Procedia Computer Science, 218:2820–2829, 2023.
[17] Mangolika Bhattacharya, Pat O’Neill, Mark Southern, and Martin Hayes. Training and tuning of neuro-fuzzy control laws for the machining
of prosthetics. Procedia Computer Science, 217:1057–1065, 2023.
[18] Sameh Mahjoub, Larbi Chrifi-Alaoui, Bruno Marhic, and Laurent Delahoche. Predicting energy consumption using lstm, multi-layer gru and
drop-gru neural networks. Sensors, 22(11):4062, 2022.
[19] Jian Qi Wang, Yu Du, and Jing Wang. Lstm based long-term energy consumption prediction with periodicity. Energy, 197:117197, 2020.
[20] Abhijit Vyas, Vivek Garg, Subrata Bandhu Ghosh, and Sanchita Bandyopadhyay-Ghosh. Photopolymerizable resin-based 3d printed biomed-
ical composites: Factors affecting resin viscosity. Materials Today: Proceedings, 2022.
[21] Mangolika Bhattacharya, Mihai Penica, Eoin O’Connell, Mark Southern, and Martin Hayes. Human-in-loop: A review of smart manufacturing
deployments. Systems, 11(1):35, 2023.
[22] Mangolika Bhattacharya, Reenu Mohandas, Mihai Penica, Mark Southern, Karl Van Camp, and Martin J Hayes. Analysis of the message
queueing telemetry transport protocol for data labelling: An orthopedic manufacturing process case study. In IoTBDS, pages 215–222, 2021.

You might also like