2020 - Application of Predictive Maintenance Concepts Using
2020 - Application of Predictive Maintenance Concepts Using
sciences
Article
Application of Predictive Maintenance Concepts Using
Artificial Intelligence Tools
Diogo Cardoso and Luís Ferreira *
Abstract: The growing competitiveness of the market, coupled with the increase in automation driven
with the advent of Industry 4.0, highlights the importance of maintenance within organizations.
At the same time, the amount of data capable of being extracted from industrial systems has increased
exponentially due to the proliferation of sensors, transmission devices and data storage via Internet of
Things. These data, when processed and analyzed, can provide valuable information and knowledge
about the equipment, allowing a move towards predictive maintenance. Maintenance is fundamental
to a company’s competitiveness, since actions taken at this level have a direct impact on aspects
such as cost and quality of products. Hence, equipment failures need to be identified and resolved.
Artificial Intelligence tools, in particular Machine Learning, exhibit enormous potential in the analysis
of large amounts of data, now readily available, thus aiming to improve the availability of systems,
reducing maintenance costs, and increasing operational performance and support in decision making.
In this dissertation, Artificial Intelligence tools, more specifically Machine Learning, are applied to
a set of data made available online and the specifics of this implementation are analyzed as well as
the definition of methodologies, in order to provide information and tools to the maintenance area.
Keywords: predictive maintenance; Industry 4.0; Internet of Things; artificial intelligence; ma-
chine learning
systems for industrial equipment. Simultaneously, the IoT allows real-time transmission
of this information about the conditions of the systems captured by different monitoring
devices. This development offers an excellent opportunity to use condition monitoring
data intelligently within predictive maintenance, combining the ability to collect data with
an effective and integrated analysis of it [5].
In this sense, the potential of Artificial Intelligence tools, more specifically Machine
Learning, allows us to aim for an improvement in the availability of systems, reducing
maintenance costs, increasing operational performance and safety, and the ability to support
decision making in relation to the ideal time and the ideal action for carrying out the
maintenance intervention [4–7].
Machine Learning can be defined as “the field of study that gives the computer
the ability to learn without being explicitly programmed”. It can be said that “Machine
Learning algorithms use computational methods to learn information directly from data
without using predefined equations as a model” [8].
The main objective of this work is to apply Artificial Intelligence tools, more specifically
Machine Learning, to a set of data, coming from different sources, available online [9].
Furthermore, we seek to analyze the specificities of this implementation and the definition
of methodologies, in order to provide information and tools to the maintenance area.
Typical machine learning algorithms, such as the hidden Markov models [17], hidden
semi-Markov models [18], self-organizing neural network [19], SVM [20], multimodal deep
support vector classification [21], deep random forest [22], genetic algorithms [23], blind
source separation [24], fuzzy logic [25], k-nearest neighbor algorithms [26] and Bayesian
algorithms [27], etc., have been applied in fault diagnosis of dynamic equipment. To the
best of our knowledge, there are two main categories of approach for fault diagnosis of
gearboxes: Data-driven and physical model-based methods. Although these methods have
been successfully applied in many applications, it is very difficult to know what is the best
algorithm to apply to a particular data set.
A systematic review of the scientific literature was carried out in [28], from which it is
possible to draw several conclusions. Predictive maintenance strategies are being applied
to the most diverse equipment, in multiple areas. The equipment where these methods are
applied include, but are not limited to, turbines, engines, compressors, pumps. About 89%
of the published papers use a set of real data, with 11% using synthetic data. Regarding the
use of Machine Learning algorithms in scientific publications, the most used is Random
Forest (RF)—33%, followed by methods based on Neural Networks (NN), such as Artificial
Appl. Sci. 2021, 11, 18 4 of 18
NN, Convolution NN, Long Short-Term Memory Metwork (LSTM) and Deep Learning—
27%, Support Vector Machine (SVM)—25% and k-means—13%. There was also a greater
tendency to use vibration signals.
3. Application Example
3.1. Data Applied
Throughout this paragraph, the process of implementing Machine Learning algo-
rithms to a set of maintenance data will be detailed and explained.
First, the data set is presented and the choice is justified. Then, the objectives of this
Machine Learning application are rigorously and clearly established. Subsequently, the
data set is processed through feature engineering, creating new features in order to seek
better performance from the models. The data set used is key to solving Machine Learning
problems. A sensible choice of what data to use and how to handle it is crucial to improving
the performance of the algorithms. According to Domingos [29], feature engineering is the
key to Machine Learning projects and that, often, the measured signals are not suitable for
the learning process, and it is necessary to build features from those that are.
Then, the data set is divided into training, validation and testing subsets and the first
application of Machine Learning models was carried out, where a variety of algorithms
were trained and evaluated. The training process of the algorithms is carried out in the
training subset and the validation subset provides an impartial assessment of the fit of the
models to the training data, while simultaneously fine-tuning the model and its hyper-
parameters in order to seek better performance. Finally, the test set is used to obtain an
estimate of the model’s performance, simulating its behavior for future data.
The implementation described in this chapter will be carried out using the Python pro-
gramming language, using the packages Matplotlib, Numpy, Pandas and Scikit-Learn [30,31].
The second source of information is the error log. These are errors that did not
immediately lead to a failure, as the machine remained operational. There are 5 types of
errors: error1, error2, error3, error4, error5. The date and time are rounded to the nearest
time. Each record consists of a date/time, machine and type of error—Table 3. The total
number of error records over the year 2015 is 3919. In Figure 3 it is possible to observe the
number of errors per type over the year 2015.
The maintenance records contain data of component replacements resulting from
a scheduled or unscheduled maintenance intervention, periodic inspections, or perfor-
mance degradation. In case of maintenance intervention due to the failure of a component,
a fault record is also generated, see next paragraph. For each machine, this data set contains
information about 4 types of components: comp1, comp2, comp3, comp4. The date and
time are rounded to the nearest time. Each record consists of a date/time, machine and the
type of component replaced—Table 4. The total number of maintenance records throughout
2015 is 3286. As previously mentioned, the maintenance records also contain entries for
2014. Figure 4 shows the number of components replaced, by type. It is possible to observe
that in this case the number of substitutions is similar for the 4 types of components.
The fault records contain the component replacement records, resulting from the
maintenance intervention, due to the occurrence of a fault. The data is for the 4 types of
components: comp1, comp2, comp3, comp4. The date and time are rounded to the nearest
time. Each record consists of a date/time, machine and the type of replaced component—
Table 5. The total number of failure records during 2015 is 761. In Figure 5, it is possible
to observe the number of replacements, by type of component, during 2015, due to the
occurrence of a failure.
Appl. Sci. 2021, 11, 18 6 of 18
Figure 2. Evolution of Telemetry data over the first fifteen days of January 2015, for the machine 1.
Appl. Sci. 2021, 11, 18 7 of 18
Figure 5. Representation of the number of components replaced, by type, due to the occurrence of
a failure.
Finally, this data set contains information about the model and number of years of
service for each of the 100 machines—Table 6. Figure 6 shows a histogram showing the
distribution of the number of machines and service time, by model.
Figure 6. Histogram representing the number of machines and service time, by model.
Then, given that a particular and clear objective has already been set, more specific
questions can be asked about Machine Learning itself: (1) Should supervised, unsupervised,
or reinforcement learning models be chosen or, possibly, combinations of learning modes?
(2) Whether supervised learning, classification, or regression? (3) Are models intended to
train immediately as new data is obtained (batch learning or online learning)?
After analyzing the problem, and bearing in mind the proposed objective, we opted
for supervised learning and, in particular, classification. Furthermore, taking into account
the existence of 4 different components under analysis, the problem will be multi-class clas-
sification (“Multiclass Classification”). It was also considered that it will not be necessary,
given the scope of the problem and the nature of the data, for models to train immediately
as new data is obtained. Therefore, we are facing a problem of batch learning.
Thus, two temporal windows were created. The first, of 3 h, in order to allow us to
portray the behavior of telemetry data in the short term (Table 7) and the second, of 24 h,
in order to represent the long-term evolution (Table 8). In each of these time intervals, two
new parameters were calculated every 3 h for each of the features: the moving average and
the standard deviation. Note that, in the case of N = 24 h (Table 8), naturally the two new
parameters are not available for the initial moments (first 24 h).
Table 7. Example of Lag Features for telemetry data in real time, with N = 3.
Table 8. Example of Lag Features for telemetry data in real time, with N = 24.
As with telemetry data, the error log also has a date/time associated with it. However,
these data are categorical and not numerical. In this case, the number of errors of each type
is added, every 3 h, for the time window N = 24 (Table 9). Each line in the table represents
the sum of the number of errors of each type in the 24 h prior to the indicated datetime.
The maintenance log, which contains information related to the replacement of com-
ponents, allows the generation of new potentially important features, such as, for example,
how long ago a component was last replaced—Table 10. It is expected that this feature
relates well to the possible failures of the components, since, the longer the time of use of
a component, the greater the expected degradation.
It is relevant to note that the creation of features based on maintenance data is not as
linear as in the previous cases. However, this type of case-specific feature engineering is
very common in predictive maintenance, where domain knowledge and experience play
a crucial role in understanding and creating relevant features.
Finally, information about the machines can be used without further modifications,
that is, information related to the model and number of years in service of each machine—
Table 6.
Figure 9. Detailed analysis of the correlation between features pressuremean_3h and pressure-
mean_24h.
However, the same is not true for components 2 and 4. It is likewise possible to
observe that most failures for component 3 occur for higher pressuremean_3h and pres-
suremean_24h values, when compared with the other components. Thus, it was decided to
keep both features, since there is a clear relationship between these and the occurrence of
failures in at least some of the components
The main objective of the Machine Learning models used will be to predict the
probability of a failure occurring within this time window. In this case, more specifically,
the probability of a machine failure occurring in the next 24 h (duration of the time window
chosen for this application) related to one of the components (components 1,2,3 or 4). Thus,
a new categorical feature “failure” was created, where all records in the 24 h prior to
the occurrence of a failure in component 1 have the value failure = comp1 and so on for
components 2,3 and 4. Records that do not check these conditions have the value of failure
= none. This leads to the problem turning from a binary problem (stable/pre-unstable) to
a multi-class classification problem (stable/n pre-unstable component). It should also be
noted that, henceforth, due to this redefinition of failure event, when it is mentioned that
a certain algorithm predicts a failure, in fact, what is being mentioned is that the algorithm
predicts the occurrence of a failure within this time window.
Table 11 shows examples of failure in component 2. Note that the first 8 records occur
in the 24 h prior to the occurrence of the first failure of component 2. The next 8 records in
the 24 h prior to another failure of component 2.
Thus, in the present application, the registrations until 08/31/2015 1:00:00 were
assigned to the test set, the registrations between 01/09/2015 1:00:00 and 31/10/2015
1:00:00 to the validation set and registration from 01-11-2015 1:00:00 to the test set. In order
to guarantee that the data in different sets do not share time windows, the records at the
borders, that is, the records of the 24 h preceding the date of division, have been removed.
Thus, Table 12 shows the amount of data that was attributed to each of the sets and the
percentage that corresponds to failures.
Table 12. Amount of data attributed to each of the sets and the percentage corresponding to failures.
Quantity /% Failure/%
Training 66.52 2.02
Validation 16.57 1.89
Test 16.91 1.92
Table 13. Example of the imbalance between the different classes for the ‘failure’ feature in the total
data set.
Failure %
none 285,684 98.06
comp2 1985 0.68
comp1 1464 0.50
comp4 1240 0.43
comp3 968 0.33
Table 14. Performance for the Random Forest model in the validation and test sets, with ’n_estimators = 70.
Table 15. Performance for the Artificial Neural Network model in the validation and test sets, with
100 hidden layers (hidden layers = 100) and min-max scaling normalization.
For both models, there is a drop in the value of Recall (and, consequently, of F1Score)
to values below 90% for component 1 in the test set. In the present application, the four
components were considered to be of equal importance.
In a real application, where it may be possible to know more information about
each one of them (such as cost, importance in the process, location in the equipment,
ease of replacement), the analysis may involve trying to optimize certain metrics that are
considered to be of greater relevance.
4. Conclusions
In this paper, Machine Learning models were applied to a dataset available online. The
data set used was published by Microsoft, in [9], in a Notebook for Predictive Maintenance
and Machine Learning. The use of this data set was justified. In the implementation carried
out in the present project, until the final phase of feature engineering, the steps presented in
that Notebook were followed. However, from that moment on, as it is considered that the
approach presented in [9] is too simplistic (no validation technique is used and only a single
model is applied), it was decided to deepen the analysis with the implementation of the
Holdout validation, which divides the data set into three subsets (Training, Validation and
Test), as well as various Machine Learning models, thus showing how to fine-tune the
models and respective hyper-parameters using the validation set.
The fact that it is a multi-class classification problem added complexity to the analysis
and, perhaps, starting with a binary classification problem may be advisable for a better
understanding of the basic concepts of Machine Learning, fundamental to the success of
any application.
It is possible to address the imbalance between classes, very common in maintenance
applications, since the occurrence of failures is rare during the life cycle of a given machine,
when compared to its normal operation.
At the outset, and knowing that a sensible choice of which data to use and how to
handle it is crucial for the performance of Machine Learning algorithms, good results
would be expected based on the result obtained. However, more important than any result
was the demonstration of a methodology, starting from data of different types and sources
(very common in maintenance applications), that allowed us to show how it is possible
to visualize and treat them in order to apply Artificial Intelligence tools in the analysis of
maintenance data, in this case, Machine Learning.
Although the results obtained compare well with those presented so far in the litera-
ture, the biggest disadvantage in using the presented methodology lies in the definition of
the features. If the selection of features is not the most correct, the results obtained can lead
to wrong predictions. For future work, the application of feature learning concepts will be
considered instead of feature engineering, which appears to be promising to improve the
results obtained [35,36].
Author Contributions: D.C.: developed and performed the work during is M.Sc. thesis; L.F.: super-
vised the work and prepared and edited the manuscript. All authors have read and agreed to the
published version of the manuscript.
Funding: This research received no external funding.
Conflicts of Interest: The authors declare no conflict of interest.
References
1. Gilchrist, A. Industry 4.0: The Industrial Internet of Things; Springer: Berlin/Heidelberg, Germany, 2016; ISBN 978-1-4842-2047-4.
2. Kobbacy, K.A.H.; Murthy, D.N.P. (Eds.) Complex System Maintenance Handbook; Springer Science & Business Media:
Berlin/Heidelberg, Germany, 2008; ISBN 978-1849967006.
3. Kagermann, H.; Lukas, W.-D.; Wahlster, W. Securing the Future of German Manufacturing Industry Recommendations for Implementing
the Strategic Initiative INDUSTRIE 4.0; Final report of the Industrie 4.0 Working Group; Acatech-National Academy of Science and
Engineering: Frankfurt, Germany, 2013.
4. Ribau, J. Afinal, o que é isto da Indústria 4.0? Available online: https://visao.sapo (accessed on 7 June 2020). (In Portuguese)
Appl. Sci. 2021, 11, 18 17 of 18
5. Paolanti, M.; Romeo, L.; Felicetti, A.; Mancini, A.; Frontoni, E.; Loncarski, J. Machine learning approach for predictive maintenance
in industry 4.0. In Proceedings of the 14th IEEE/ASME International Conference on Mechatronic and Embedded Systems and
Applications (MESA), Oulu, Finland, 2–4 July 2018; pp. 1–6.
6. Li, Y.; Wang, K. Modified convolutional neural network with global average pooling for intelligent fault diagnosis of industrial
gearbox. Eksploat. Niezawodn. Maint. Reliab. 2020, 22, 63–72. [CrossRef]
7. Rodrigues, J.; Costa, I.; Torres Farinha, J.; Mendes, M.; Margalho, L. Predicting motor oil condition using artificial neural networks
and principal component analysis. Eksploat. Niezawodn. Maint. Reliab. 2020, 22, 440–448. [CrossRef]
8. Müller, A.C.; Guido, S. Introduction to Machine Learning with Python: A Guide for Data Scientists; O’Reilly Media Inc.: Sebastopol,
CA, USA, 2016; ISBN 1449369901.
9. Microsoft. Predictive Maintenance Modelling Guide. 2018. Available online: https://notebooks.azure.com/Microsoft/projects/
PredictiveMaintenance (accessed on 1 May 2020).
10. Çınar, Z.M.; Abdussalam Nuhu, A.; Zeeshan, Q.; Korhan, O.; Asmael, M.; Safaei, B. Machine Learning in Predictive Maintenance
towards Sustainable Smart Manufacturing in Industry 4.0. Sustainability 2020, 12, 8211. [CrossRef]
11. Cheng, J.C.; Chen, W.; Chen, K.; Wang, Q. Data-driven predictive maintenance planning framework for MEP components based
on BIM and IoT using machine learning algorithms. Autom. Constr. 2020, 112, 103087. [CrossRef]
12. Ran, Y.; Zhou, X.; Lin, P.; Wen, Y.; Deng, R. A Survey of Predictive Maintenance: Systems, Purposes and Approaches. IEEE Commun.
Surv. Tutor 2019, arXiv:191207383R.
13. Florian, E.; Sgarbossa, F.; Zennaro, I. Machine learning for predictive maintenance: A methodological framework. In Proceedings
of the XXIV Summer School “Francesco Turco”—Industrial Systems Engineering, Bergamo, Italy, 9–11 September 2020.
14. Filipe Gomes Pereira, L. Previsão de Falhas em Empanques Mecânicos da Refinaria de Matosinhos Usando Modelos de Machine
Learning. Master’s Thesis, FEUP, University of Porto, Porto, Portugal, 2018.
15. Kanawaday, A.; Sane, A. Machine learning for predictive maintenance of industrial machines using IoT sensor data. In Proceedings
of the 8th IEEE International Conference on Software Engineering and Service Science (ICSESS), Beijing, China, 24–26 November
2017; pp. 87–90, ISBN 1538604973.
16. Ali, Y.H. Artificial Intelligence Application in Machine Condition Monitoring and Fault Diagnosis. Artif. Intell. Emerg. Trends
Appl. 2018, 14, 275–291. [CrossRef]
17. Mba, C.U.; Makis, V.; Marchesiello, S.; Fasana, A.; Garibaldi, L. Condition monitoring and state classification of gearboxes using
stochastic resonance and hidden markov models. Measurement 2018, 126, 76–95. [CrossRef]
18. Li, X.; Makis, V.; Zuo, H.; Cai, J. Optimal bayesian control policy for gear shaft fault detection using hidden semi-markov model.
Comput. Ind. Eng. 2018, 119, 21–35. [CrossRef]
19. Zuber, N.; Bajrićb, R. Gearbox faults feature selection and severity classification using machine learning. Eksploat. Niezawodn.
Maint. Reliab. 2020, 22, 748–756. [CrossRef]
20. Zaeri, R.; Ghanbarzadeh, A.; Attaran, B.; Moradi, S. Artificial neural network based fault diagnostics of rolling element bearings
using continuous wavelet transform. In Proceedings of the 2nd International Conference on Control, Instrumentation and
Automation, Shiraz, Iran, 27–29 December 2011; pp. 753–758. [CrossRef]
21. Li, C.; Zurita, G.; Cerrada, M.; Cabrera, D. Multimodal deep support vector classification with homologous features and its
application to gearbox fault diagnosis. Neurocomputing 2015, 168, 119–127. [CrossRef]
22. Saufi, S.R.; Ahmad, Z.A.B.; Leong, M.S.; Lim, M.H. An intelligent bearing fault diagnosis system: A review. MATEC Web Conf.
2019, 255, 06005. [CrossRef]
23. Chen, F.; Tang, B.; Chen, R. A novel fault diagnosis model for gearbox based on wavelet support vector machine with immune
genetic algorithm. Measurement 2013, 46, 220–232. [CrossRef]
24. Li, Z.; Peng, Z. A new nonlinear blind source separation method with chaos indicators for decoupling diagnosis of hybrid failures:
A marine propulsion gearbox case with a large speed variation. Chaos Solitons Fractals 2016, 89, 27–39. [CrossRef]
25. Cerrada, M.; Li, C.; Sánchez, R.V.; Pacheco, F.; Cabrera, D.; Oliveira, J.V.D. A fuzzy transition based approach for fault severity
prediction in helical gearboxes. Fuzzy Sets Syst. 2018, 337, 52–73. [CrossRef]
26. Lei, Y.; Zuo, M.J. Gear crack level identification based on weighted k-nearest neighbor classification algorithm. Mech. Syst. Sig.
Process. 2009, 23, 1535–1547. [CrossRef]
27. Jiang, R.; Yu, J.; Makis, V. Optimal bayesian estimation and control scheme for gear shaft fault detection. Comput. Ind. Eng. 2012,
63, 754–762. [CrossRef]
28. Thyago, P.; Carvalho, A.; Fabrízzio, M.N.; Soares, R.V.; Roberto Francisco, P.; Basto, S.A. A systematic literature review of machine
learning methods applied to predictive maintenance. Comput. Ind. Eng. 2019, 137, 106024.
29. Domingos, P. A Few Useful Things to Know About Machine Learning. Commun. ACM 2012, 55, 78–87. [CrossRef]
30. Géron, A. Hands-On Machine Learning with Scikit-Learn and Tensor-Flow: Concepts, Tools, and Techniques to Build Intelligent Systems;
O’Reilly Media Inc.: Sebastopol, CA, USA, 2019; ISBN 978-1491962299.
31. Pedregosa, F.; Varoquaux, G.; Gramfort, A.; Michel, V.; Thirion, B.; Grisel, O.; Blondel, M.; Prettenhofer, P.; Weiss, R.; Dubourg, V.;
et al. Scikit-learn: Machine Learning in Python. J. Mach. Learn. Res. 2011, 12, 2825–2830.
32. Cardoso, D. Application of Predictive Maintenance Concepts with Application of Artificial Intelligence Tools. Master’s Thesis,
FEUP, University of Porto, Porto, Portugal, 2020.
Appl. Sci. 2021, 11, 18 18 of 18
33. Microsoft. Azure AI Guide for Predictive Maintenance Solutions. Available online: https://docs.microsoft.com/en-us/azure/
machine-learning/team-data-science-process/predictive-maintenance-playbook (accessed on 20 April 2020).
34. Poosapati, V.; Katneni, V.; Manda, V.K.; Ramesh, T.L.V. Enabling Cognitive Predictive Maintenance Using Machine Learning:
Approaches and Design Methodologies. In Soft Computing and Signal Processing; Springer: Berlin/Heidelberg, Germany, 2019;
pp. 37–45.
35. LeCun, Y.; Bengio, Y.; Hinton, G. Deep learning. Nature 2015, 521, 436–444. [CrossRef]
36. González-Muñiz, A.; Díaz, I.; Cuadrado, A.A. DCNN for condition monitoring and fault detection in rotating machines and its
contribution to the understanding of machine nature. Heliyon 2020, 6, e03395. [CrossRef] [PubMed]