An IoT and Machine Learning-Based Predictive Maintenance System for Electrical Motors

An IoT and Machine Learning-Based Predictive Maintenance System for Electrical Motors

Noor A. Mohammed Osamah F. Abdulateef Ali H. Hamad*

Automated Manufacturing Eng. Dept., AlKhwarizmi College of Engineering, University of Baghdad, Baghdad 10071, Iraq

Information and Communication Eng. Dept., AlKhwarizmi College of Engineering, University of Baghdad, Baghdad 10071, Iraq

Corresponding Author Email: 
ahamad@kecbu.uobaghdad.edu.iq
Page: 
651-656
|
DOI: 
https://doi.org/10.18280/jesa.560414
Received: 
21 May 2023
|
Revised: 
13 July 2023
|
Accepted: 
18 July 2023
|
Available online: 
31 August 2023
| Citation

© 2023 IIETA. This article is published by IIETA and is licensed under the CC BY 4.0 license (http://creativecommons.org/licenses/by/4.0/).

OPEN ACCESS

Abstract: 

The rise of Industry 4.0 and smart manufacturing has highlighted the importance of utilizing intelligent manufacturing techniques, tools, and methods, including predictive maintenance. This feature allows for the early identification of potential issues with machinery, preventing them from reaching critical stages. This paper proposes an intelligent predictive maintenance system for industrial equipment monitoring. The system integrates Industrial IoT, MQTT messaging and machine learning algorithms. Vibration, current and temperature sensors collect real-time data from electrical motors which is analyzed using five ML models to detect anomalies and predict failures, enabling proactive maintenance. The MQTT protocol is used for efficient communication between the sensors, gateway devices, and the cloud server. The system was tested on an operational motors dataset, five machine learning algorithms, namely k-nearest neighbor (KNN), supported vector machine (SVM), random forest (RF), linear regression (LR), and naive bayes (NB), are used to analyze and process the collected data to predict motor failures and offer maintenance recommendations. Results demonstrate the random forest model achieves the highest accuracy in failure prediction. The solution minimizes downtime and costs through optimized maintenance schedules and decisions. It represents an Industry 4.0 approach to sustainable smart manufacturing.

Keywords: 

predictive maintenance, machine learning algorithm, Industrial IoT (IIoT), MQTT, cloud computing/platform, random forest, fault diagnosis/detection, prognostics and health management

1. Introduction

The term “Industry 4.0” is a famous word among industries territory. The core of this industrial revolution Internet of Things (IoT) and IIoT, Cyber physical, Artificial intelligence are changing the original industrial automation approach. The transformation in manufacturing is driven by the analysis of data gathered from various sensors installed in textile production facilities [1-3].

Machine maintenance can be classified into four categories: “reactive maintenance (RM)”, “preventive maintenance (PM)”, “predictive maintenance (PdM)”, and “proactive maintenance (PRM)”. Predictive maintenance is the most recent form of maintenance, offering extended equipment lifespan and enhanced reliability. However, it is considered less environmentally friendly and cost-effective compared to other solutions [4]. The main idea of predictive maintenance is to forecast failures just before they happen, preventing unexpected machine downtime and maximizing equipment lifespan. In order to make these forecasts, it is necessary to store and analyze live data, considering different factors and impacts of the gathered signals. There are several mathematical methods used in predictive maintenance, including: Time Series Analysis, Machine Learning, Statistical Process Control (SPC), Reliability Analysis, and Failure Modes and Effects Analysis (FMEA) [5]. The machine learning (ML) algorithms are particularly well-suited for detecting faults by leveraging large datasets. However, selecting the appropriate ML techniques for an industrial system can be a challenging task. Typically, the data used for analysis consists of sensor measurements such as temperature, pressure, vibration, rotation speeds, and current [6].

2. Related Work

A large number of works have been carried out related to predictive maintenance systems which used different modeling methods.

Him et al. [7], utilized an Industrial Internet of Things (IIoT) solution to forecast manufacturing defects. Multiple smart sensors installed on the welding machine collect the necessary data, which is then monitored using statistical process control techniques. Machine learning algorithms are employed to uncover concealed correlations within the datasets and identify abnormal data patterns. Nangia et al. [8], a proposed framework was introduced for predictive maintenance in Industrial Internet of Things (IIoT) systems. The architecture was specifically designed for implementing predictive maintenance in the ancillary automobile industry. A case study was presented as an example, showcasing a predictive model capable of anticipating unexpected machine failures. Martins et al. [9], implemented an automatic forecasting model in a test bench to identify machine failures and contribute to the advancement of algorithms for preventive and descriptive maintenance. This implementation aims to improve the recognition of machine failures and facilitate the development of maintenance strategies that are both preventive and descriptive in nature. Kahiomba and Wang [10], an experimental framework for predictive maintenance was devised specifically for conveyor motors. This framework effectively detects impairments in a conveyor system and significantly minimizes the risk of incorrect fault diagnosis within the plant. The researchers accomplished this by constructing a machine learning model capable of classifying whether observed abnormalities pose a threat to production or not. Al-Naggar et al. [11], employed Internet of Things (IoT) technology to monitor the conditions of four CNC machines located in different places simultaneously. Vibration signals from the four CNC machines were measured using accelerometers, allowing the collection and real-time transmission of signals directly to a database. This enabled continuous monitoring of the machines' vibration data for predictive maintenance purposes. Liu et al. [12], an enhanced deep learning-based method for predictive maintenance (PDM) was proposed to monitor the real-time condition of the machine and to forecast potential faults in advance. Ahmed et al. [13], used ANNs and GA in predictive maintenance of thermo-electric unit. They conclude that the methodology proposed can be applied to all maintenance systems, and it gives an excellent indication on developing appropriate action plans and what is expected. Ahmed et al. [14], designed and implemented an IIoT system to monitor a CNC machine using raspberry Pi as a local server, data were uploaded to cloud server and a web application has been implemented for monitoring.

This work evaluates five prominent ML algorithms - RF, SVM, NB, KNN and LR - on a dataset from an operational AC motor system. Results provide insights into the most promising techniques for predictive maintenance of motors and critical equipment.

3. Preliminaries

Predictive maintenance utilizes IIoT and data analysis to monitor equipment health and forecast failures, enabling proactive maintenance. This work develops an IIoT and machine learning-based predictive maintenance solution.

3.1 Machine learning algorithms

It is a field of artificial intelligence that involves systems learning from data, identifying patterns, and making decisions with little human intervention. Mathematical models are developed using machine learning algorithms, which are based on a training dataset. These models are then used to make predictions or decisions on new data [15]. Five supervised ML algorithms - RF, SVM, NB, KNN and LR - were evaluated. RF and SVM can handle high dimensionality data. NB assumes conditional independence between features. KNN is a simple instance-based learner. LR finds the relationship between variables. Five labels have been used which are: no failure, vibration failure, over current failure, bush failure, and stop rotating failure.

3.2 MQTT IoT protocol

The MQTT protocol enables efficient data transmission between low-power IIoT devices and servers. Its pub/sub architecture allows devices to publish data to a broker, which then distributes the data to subscribers. MQTT's low bandwidth, low latency and minimal resource requirements suit it well for connecting sensors and embedded systems in predictive maintenance [16].

3.3 Sensors

Different types of sensors have been used to collect data from the system, these sensors are:

  • The ADXL345 is a 3-axis accelerometer with a 13-bit resolution, making it suitable for motor vibration measurement. It possesses advantageous characteristics such as its compact size, slim profile, and extremely low power consumption.
  • The current sensor module ACS712 is utilized to monitor the current of the motor. It’s a seamlessly incorporated current sensor that exhibits minimal magnetic hysteresis. It operates on a single 5V power supply, employing the hall effect and providing linear current sensing for both AC and DC currents. Additionally, it utilizes a low-resistance current conductor and an ADS1115 analog-to-digital converter.
  • The temperature sensor selected for this study must possess certain essential properties. The MLX90614 Infra-Red thermometer was chosen as it offers wide temperature range, high accuracy, and non-contact temperature measuring capabilities. Additionally, it is compact in size and cost-effective, making it well-suited for the requirements of this research. Also, a SHT21 digital humidity and temperature sensor was used to measure the ambient temperature.
4. Proposed System Design

The proposed system integrates an AC motor, sensors, Raspberry Pi and MQTT messaging. Vibration, current and temperature sensors monitor the motor in normal and failure conditions. The Raspberry Pi collects and transmits data via MQTT to a cloud server. ML models analyze the data to detect anomalies and predict failures, enabling proactive maintenance.

Minimizing mechanical vibration is a crucial factor in the design of AC motors. Vibrations can lead to negative consequences like reduced lifespan, increased stress, fatigue, and noise. Systems experiencing vibrations are susceptible to significant damage. Therefore, it is important to measure mechanical vibrations in operational systems. These vibrations can manifest in axial, radial, and torsional directions, requiring the collection of vibration measurements from all three axes. The second design criterion for the AC motor involves monitoring its current. Exceeding the motor's specified current rating mentioned on the nameplate can generate excessive heat, which poses a risk to the motor. Promptly addressing this heat is crucial to prevent motor damage. The third design criterion emphasizes the importance of maintaining motor temperatures within specified operating conditions. Temperature increases can result from various factors, including bushing failure or elevated current. To prevent potential problems, it is essential to set temperature alarm and shutdown limits for the motor. Neglecting this precautionary measure can lead to significant issues in the motor.

The data from sensors were collected during normal and fault conditions every 1 second. An unbalance mass was used to simulate the vibration in the motor due to unbalance loading. A larger capacitor was used to simulate the increased in motor current, there was an increased in current and temperature during operation compared to the normal condition. Table 1 shows size and counts of data set for each classification, while Table 2 shows samples of data collected. These data set is then provided to a ML algorithm to build a predictive model which is uploaded to a cloud server for real time monitoring of a system to predict any failure.

The dataset that is gathered is typically split into three distinct groups. The training dataset comprises 80% of the collected data and is used to train the model. The validation dataset constitutes 10% of the data and is employed to evaluate the model's performance and fine-tune its hyperparameters. Lastly, the test dataset also makes up 10% of the data and serves the purpose of testing the model's effectiveness. At the beginning of a project a data scientist must make this division.

Figure 1 shows the proposed system design when the raspberry collect data from sensor and upload then to cloud using MQTT protocol.

Table 1. Size and counts of data set for each classification

Failure Type

File Size (KB)

Count of Data

No failure

654.3

11996

vibration failure

316.1

5946

over current failure

550.7

10092

Bush failure

157.7

2910

Stop rotating failure

254.6

4656

Figure 1. IIoT predictive maintenance model

Table 2. Sample of data collected

 

Accel x

(1g)

Accel y

(1g)

Accel z

(1g)

Amb_Temp

(℃)

Object_Temp

(℃)

Current

(Amp.)

Failure Type

1

3.656

-1.125

-7.156

22.35

51.69

0.586

No Failure

2

0.593

-0.625

-7.187

22.38

51.53

0.587

No Failure

3

-2.5

0.593

-6.687

22.36

51.61

0.610

No Failure

4

2.781

-1.281

-6.812

22.36

51.63

0.519

No Failure

5

2.156

-0.687

-7.343

22.38

51.49

0.558

No Failure

6

-2.25

1.062

-6.937

22.36

51.67

0.606

No Failure

7

-1.906

0.687

-1.406

22.88

53.03

0.569

Vibration Failure

8

4.781

-1.562

-8.031

23.15

55.35

1.339

Over Current Failure

9

0.718

-0.406

-6.875

23.81

65.53

1.041

Bush Failure

10

-16

-16

-11.375

23.74

54.89

0.672

Stop Rotating Failure

5. Results and Discussion

The aim was to evaluate five ML algorithms for failure prediction in an AC motor. Key objectives were to identify outliers, compare performance after resampling, and determine the optimal model based on accuracy and training time.

5.1 Qutliers inspection

The existence of outliers in the acceleration of the x-axis and object temperature is indicated by significantly larger maximum values compared to the third quartile. To gain a better understanding of this observation, boxplots were used to visualize the data, and histograms were employed to analyze the distribution more comprehensively.

The boxplots in Figure 2 highlight possible outliers in the acceleration of x-axis and object temperature, however in the case of acceleration in x-axis there are probably traceable to the way outliers are detected using boxplots, in the case of object temperature the Gaussian distribution is skewed and it is not unrealistic to think that the few observation with medium object temperatures are going to fail. As a result, at the moment, the outliers are retained and reserved the discretion to determine whether to take any action on them after evaluating other factors.

Figure 2. Numeric features histogram

Figure 3. Original features distribution

Figure 4. Features distribution after oversampling

5.2 Comparison after resampling

Figure 3 shows the original features distribution. The first thing cloud be observed is that the data augmentation was performed successfully, as the feature distribution for faulty instances have not been significantly distorted. It should also be noted that in 3 axes acceleration, object temperature, and current the observations relating to failures have a density peak in extreme zones of the distribution.

This implies that the outliers are not to be imputed to mistakes in the dataset building but rather to the natural variance of the same. This observation becomes more evident when examining the distributions in relation to the individual causes of failure: in particular, an almost symmetrical behavior is recognized in 3-axes acceleration while in object temperature and current a clear separation is observed as shown in Figure 4.

5.3 Models validation

In order to determine the optimal model for binary classification and predict machine failure, supervised machine learning classification algorithms were utilized as part of the data mining process. These algorithms rely on labeled data that has already been divided into two or more classes, which is utilized to create a classification model that can be applied to new unlabeled data. The starting dataset is typically divided into three subsets: the training dataset used to fit the model, the validation dataset utilized to evaluate the model while adjusting hyperparameters, and the test dataset utilized to test the model.

Figure 5. Comparison in accuracy between different ML models

Figure 6. Comparison in training time between different ML models

After analyzing the results and assessing the interpretability of the model, it is evident from Figure 5 that RF is most suitable for failure prediction in the motor system. The model can enable timely maintenance decisions and cost savings. Limitations include the small dataset size and focus on a single machine. Future work will expand to additional sensors, motors and manufacturing equipment. Figure 6 shows the estimated training time remains approximately the same for all models, except for SVM that 20th larger.

6. Conclusions

The aim was to design an effective ML-based predictive maintenance solution. Key objectives were evaluating five ML models to determine the optimal technique for failure prediction in an AC motor system. Results show the RF model had the highest accuracy for failure prediction and identification. MQTT enabled efficient communication in the IoT system. The solution can minimize downtime and costs through optimized maintenance. Furthermore, the response time of NB is instant, while SVM takes more time, further increasing when proceeding with the multi-class classification task. The choice of the model depends on the company's needs, where NB can be used for faster applications, and RF can be used for greater accuracy.

  References

[1] Karuppusamy, D.P. (2020). Machine learning approach to predictive maintenance in manufacturing industry - A comparative study. Journal of Soft Computing Paradigm, 2(4): 246-255. https://doi.org/10.36548/jscp.2020.4.006

[2] Ahmed, R.Z., Nadia, A.S., Dina, A.A. (2023). Intrusion detection method for internet of things based on the spiking neural network and decision tree method. International Journal of Electrical and Computer Engineering, 13(2): 2278-2288. https://doi.org/10.11591/ijece.v13i2.pp2278-2288

[3] Al-Jamali, N.A.S., Al-Raweshidy, H.S. (2021). Smart IoT network based convolutional recurrent neural network with element-wise prediction system. IEEE Access, 9: 47864-47874. https://doi.org/10.1109/ACCESS.2021.3068610

[4] Mustafa, C., Mehmet, A.G., Selcuk, M. (2021). The experimental application of popular machine learning algorithms on predictive maintenance and the design of IIoT based condition monitoring system. Computers & Industrial Engineering, 151: 106948. https://doi.org/10.1016/j.cie.2020.106948

[5] Achouch, M., Dimitrova, M., Dhouib, R., Ibrahim, H., Adda, M., Sattarpanah Karganroudi, S., Ziane, K., Aminzadeh, A. (2023). Predictive maintenance and fault monitoring enabled by machine learning: Experimental analysis of a TA-48 multistage centrifugal plant compressor. Applied Sciences, 13(3): 1790. https://doi.org/10.3390/app13031790

[6] Caldana, V.M., Silva, F.D., Oliveira, R.A., Borin, J.F. (2021). Internet of things and artificial intelligence applied to predictive maintenance in Industry 4.0: A systematic literature review. Proceedings of the International Conference on Industrial Engineering and Operations Management Sao Paulo, Brazil.

[7] Him, L.C., Poh, Y.Y., Pheng, L.W. (2019). IoT-based predictive maintenance for smart manufacturing systems. Asia-Pacific Signal and Information Processing Association Annual Summit and Conference (APSIPA ASC), Lanzhou, China, pp. 1942-1944. https://doi.org/10.1109/APSIPAASC47483.2019.9023106

[8] Nangia, S., Makkar, S., Hassan, R. (2020). IoT based predictive maintenance in manufacturing sector. Proceedings of the International Conference on Innovative Computing & Communications (ICICC). https://dx.doi.org/10.2139/ssrn.3563559

[9] Martins, J.P.S., Rodrigues, F.M., Henriques, N.  (2020). Modeling system based on machine learning approaches for predictive maintenance applications. International Congress on Engineering-Engineering for Evolution, KnE Engineering, pp. 857-871. https://doi.org/10.18502/keg.v5i6.7105

[10] Kahiomba, S.K., Wang, Z. (2020). An effective predictive maintenance framework for conveyor motors using dual time-series imaging and convolutional neural network in an industry 4.0 environment. IEEE Access, 8: 121033-121049. https://doi.org/10.1109/ACCESS.2020.3006788

[11] Al-Naggar, Y.M., Jamil, N., Hassan, M.F., Yusoff, A.R. (2021). Condition monitoring based on IoT for predictive maintenance of CNC machines. Procedia CIRP, 102: 314-318. https://doi.org/10.1016/j.procir.2021.09.054

[12] Liu, C., Tang, D., Zhu, H., Nie, Q. (2021). A novel predictive maintenance method based on deep adversarial learning in the intelligent manufacturing system. IEEE Access, 9: 49557-49575. https://doi.org/10.1109/ACCESS.2021.3069256

[13] Ahmed, W.M., Ahmed, A.A., Abdulateef, O.F. (2023). A methodology for evaluating and scheduling preventive maintenance for a thermo-electric unit using artificial intelligence. Al-Khwarizmi Engineering Journal, 19(1): 1-13. https://doi.org/10.22153/kej.2023.10.001

[14] Ahmed, K.K., Ahmed, Z.M.S., Ali, H.H. (2018). Industrial CAD-CAM system based remote manufacturing process using raspberry Pi web server. Journal of Engineering and Applied Sciences, 13: 4193-4197. https://doi.org/10.3923/jeasci.2018.4193.4197

[15] Polat, H., Polat, O., Cetin, A. (2020). Detecting DDoS attacks in software-defined networks through feature selection methods and machine learning models. Sustainability, 12(3): 1035. https://doi.org/10.3390/su12031035

[16] Rashid, A., Elisa, R., Aqsa, A., Ramzan, S., Casillas-Perez, D., Arco, J.M. (2021). A survey on machine learning techniques for routing optimization in SDN. IEEE Access, 9: 104582-104611. https://doi.org/10.1109/ACCESS.2021.3099092