Universal cyber physical system, a prototype for predictive maintenance

Keh-Kim Kee1, Simon Lau Boung Yew2, Yun Seng Lim3, Yip Ping Ting4, Ramli Rashidi5 School of Engineering and Technology, University of Technology Sarawak, Sibu, Sarawak, Malaysia UNITAR International University, Tierra Crest, Petaling Jaya, Selangor, Malaysia 3 Department of Electrical and Electronic Engineering, LKC Faculty of Engineering and Science, Universiti Tunku Abdul Rahman, Kajang, Selangor, Malaysia


INTRODUCTION
The principal idea behind implementing industry revolution 4.0 (IR4.0) solutions is to empower manufacturing companies to enhance collaboration among various departments, making the good information available to the right people on a real-time basis. The goal is to facilitate appropriate decision-making time, thereby increasing efficiency and productivity. As one of enabling technologies of IR4.0, a cyber-physical system (CPS) is essentially an intelligent system that includes engineered interacting networks of physical and computational components [1]. Based on the internet of things (IoT), CPS is connected to the cloud to carry out specialized functions with real-time computation in the cyber world to monitor, sense, and actuate physical components in the real world [2]. One such application is the asset management.
The asset maintenance cost is typically between 15% and 40% of total production costs [3]. Many asset maintenance processes in the industry are still carried out manually or conventional approaches that are not cost-effective, inefficient and labour-intensive. Predictive maintenance (PdM) is essentially a strategic maintenance policy used for IR4.0 that can foresee the breakdown of the monitored device by early detection of failure signs and ensures smooth operation for maximizing profits and reducing energy consumption. Therefore, PdM has many advantages of improving reliability, availability, efficiency, safety, quality and environment [4]. Although the industry has high expectations of PdM implementation, the factors such as high  [5], [6]. Therefore, the PdM solution is not widely adopted by small and medium (SMI) industries. This work aims to design a universal, cost-effective and IoT-based cyber-physical system to support different uses cases of IR4.0 for predictive maintenance. The proposed solution consists of the UniCPS clients and cloud platform for data storage and analytics by machine learning (ML) algorithms. In a case study, UniCPS was implemented in a local factory for PdM demonstration. One of the significant parameters is RMS current (Irms), which needs to be closely monitored because fire, explosion, and injury cases are often reported [7] due to the electrical current faults. Therefore, real-time data visualization and anomaly detection is also demonstrated, particularly on electrical RMS current data. An alert message will immediately notify the authorized personnel when an anomaly is detected, and the corrective action is activated.

RELATED WORK
Bonaldi et al. [8] reported the monitoring of a induction motor using predictive maintenance. Nonintrusive sensors are used to acquire electrical RMS voltage and current, machine temperature and vibration parameters without re-wiring the existing electrical circuits. Meanwhile, Yashika et al. [9] reported the monitoring work on the air pressure compressor through a wireless communication system. Air pressure was used as the parameter to monitor the condition of the compressor. Similarly, Murty et al. [10] also monitored the portable air compressor using IoT. The parameters of vibration and temperature were used to determine the health condition of the compressor. A Wi-Fi module was used to send the data to the IoT platform for data display purposes. Furthermore, several related works on fault detection were accomplished within the research community [11]- [14].
Our proposed UniCPS with cloud platform is used to monitor four parameters: ambient temperature, machine temperature, motor current, and humidity to detect abnormal conditions. Apart from that, UniCPS uses Wi-Fi module to create a wireless network connection to deliver the acquired data to the cloud and receive the control signal generated from the cloud machine. With the UniCPS cloud platform, the user can monitor the operational status of the connected compressor through graphical user interfaces (GUIs) with a tablet, PC or smartphone. Moreover, UniCPS is equipped with an actuator that enables turning on or switching off the machine remotely, either by user control via the Internet or the control signal generated by the cloud machine. This feature can help the user to protect the machine from possible damage. Table 1 shows the comparative study of UniCPS and the other related projects. UniCPS is relatively low cost and provides a universal cloudbased interface for monitoring and controlling tasks.

RESEARCH METHOD 3.1. Architectural design
The design of the UniCPS system is divided into hardware and software parts. The UniCPS client unit consists of a C-coded MCU with wireless connectivity, actuators and non-intrusive sensors to acquire the monitored parameters such as humidity, Irms, ambient temperature and machine temperature. It is connected to the cloud servers for real-time monitoring, data analytics, and controlling with automation functions. The software components involve the cloud platform, GUI and ML algorithms. The cloud platform is coded with Python, allowing user accessibility for various functions and visualization. Figure 1 depicts the proposed architecture of the UniCPS system based on a three-tier layered architecture design, namely the acquisition layer, transport layer and cloud layer. The target machine, which is the physical model is monitored noninvasively by the UniCPS client unit to acquire and upload the data to the cloud servers with the cyber model through wireless connectivity, Wi-Fi, or mobile networks. In return, the control signal generated from the cyber model can be realized in a physical machine.

. Acquisition layer
A client unit of UniCPS with an MCU, the connected sensors and actuators is used to monitor, control, and fault protection purposes. Wireless connectivity either adopts a Wi-Fi or mobile network in a wireless module to connect with the cloud platform. Non-intrusive sensors are used to acquire physical parameters and upload them to the cloud platform using the secured hypertext transfer protocol (HTTP). In return, the client unit also performs switching of the machine based on the control signal received from the cloud platform.

Transport layer
For reliable data connectivity between the UniCPS and cloud platform, the transport layer facilitates the open and standard network protocol for data transfer by communication devices such as a router, Wi-Fi access point (AP) and internet switches. The connection between UniCPS and cloud platform is used to upload the acquired parameter data and transfer the control signal to the client unit. In this work, the Wi-Fi module connects with Wi-Fi AP routed with an ethernet network before reaching the servers at the cloud layer.

Cloud layer
The cloud layer consists of various cloud computing and servers such as Apache web servers with PHP, MySQL database, and Flask application servers (programmed with Python). It is collectively named as the cloud platform. It allows the authorised users to remotely access for monitoring, controlling, and data analysis services. The uploaded data is stored, monitored and data analytics with the ML algorithms. For instance, when the anomaly or fault is detected, the actionable information in the form of the control signal will be delivered to the UniCPS client unit to remedy the identified fault. Figure 2 shows the client unit consisting of major components such as ATMEL microcontroller (MCU), wireless module, power regulation unit, non-intrusive sensors and actuators. The ATMEL MCU serves as the "brain" of the UniCPS and interfaces with the non-intrusive sensors, Wi-Fi module, 3G/LTE module and actuators. Powered from direct connection to domestic AC 240V, the power conversion unit converts and regulates the power supply to the UniCPS's hardware circuit. The actuators are used to control the target machine operations. In this work, several non-intrusive sensors are used to acquire the physical data such as machine temperature, humidity and machine load current without interfering with the existing machine operation or electrical circuitry. For sensing the environmental temperature and humidity, a capacitive-based DHT11 sensor is used with digital sensor readings [15]. Apart from that, the machine temperature is measured by an infraredbased GY-906 MLX90614 module [16]. The load current of the machine is measured by a CT sensor clipped on the power supply cable without modifying any existing electrical circuitry of the target machinery. Besides, the open system of UniCPS design also allows the use of other sensors as required. ATMEL MCU coded in C language performs control in UniCPS. The acquired sensor data is affixed with timestamps for storage and data analytics in the cloud machine for consumption profile, anomaly analysis, remaining useful life (RUL) and fault detection by the ML algorithms [17]. The cloud server allows user accessibility for monitoring and controlling of UniCPS via a GUI-based user interface.

Performance and calibration
Precision and trueness are two important indicators for accuracy used in scientific measurement [18]. Trueness indicates how close its actual value is, while precision refers to the closeness of a series of measurements to each other. In this work, the electrical current measurement from the CT sensor is subject to a series of performance tests for accuracy. The following sections are presented with the standard deviation, mean absolute percentage error (MAPE) and root mean square error (RMSE).

Mean absolute percentage error
MAPE is a popular method in testing the accuracy of a sensor. It evaluates the difference between the measured and reference values in terms of percentage [19]. The MAPE can be calculated by (1).
where N is the number of observations, I is the reference current value, and I ̅ is the average current measured by the CT sensor. Since MAPE is a dimensionless index, lower MAPE indicates better performance [20]. However, Chang et al. [21] suggested that the performance is acceptable if MAPE is between 10-20%.

Root mean square error
RMSE measures the spread out the difference between the test value and measured value. In this work, RMSE is adopted for measurement error analysis. It can be calculated by (2). where I is the reference (or test) current value (in A), I ̅ is the average current value measured by the CT sensor, N is the number of observations. As a rule of thumb, it can be said that RMSE values between 0.2 and 0.5 show that the measurement is considered accurate.

3-Sigma rule of statistical anomaly detection
In a normal distribution, 68% of the observed data falls within one standard deviation, 95% within two standard deviations, and 99.7% within three standard deviations from the mean. Hence, three-sigma limits are used to set the upper and lower limits (i.e. µ ± 3) of the normal operational parameter data, which is known as the 3-sigma empirical rule [22]. The limits are further applied in a monitoring control chart which is essentially a time series line graph of monitored parameters. Therefore, the control chart [23] with both limits can be used to indicate whether the monitored asset is operating as expected or out of control. When an asset operation is in control, the control chart in Figure 5 shows a natural pattern in which the operational data should lie within the upper and lower limits. If abnormal variation occurs, data produced outside the control limits will be known as "outlier" on the control chart.

RESULTS AND DISCUSSION 4.1. Precision and accuracy tests of SCT-013 current sensor
For the precision test on the CT sensor, the measured current readings were repeatedly recorded for 100 samples with five different current settings ranging from 0 to 20.0A. The standard deviation of the samples for each set was calculated as 1.2% on average. It implies that the CT sensor has good precision of current measurement ability. On the other hand, the accuracy test of CT's current measurement was conducted in a laboratory setup. A calibrated Lovato's DMG800 energy meter (as reference measurement) was used for calibration and benchmarking between the measurement readings of the calibrated instrument and the targeted CT sensor. The controllable resistive load bank is gradually varied with the reference (test) current. Both the measured and reference readings were recorded. Table 2 shows that the percentage of errors is less than 5%, MAPE is at 3.77%, and RMSE is at 0.50. Therefore, the CT sensor has good accuracy with low error found.

UniCPS cloud platform
The web portal of UniCPS cloud platform can perform real-time controlling and monitoring of physical parameters through the UniCPS cloud platform. The four parameters from left to right are ambient temperature (°C), humidity (%), machine temperature (°C), and Irms (A), as shown in Figure 3.

Validation test case study
For validation purposes, a case study was conducted at a local factory located in Malaysia on 10 January 2021 for 15 days. A client unit of UniCPS was installed to monitor and control the chosen air compressor, i.e. Swan SWU(P)-310 model [23]. Figure 4(a) indicates that the CT sensor (red circled) clamped on the live cable supplied to the compressor for current measurement. Figure 4(b) shows the GY-906 module (blue circled) pointed toward the air compressor to detect the machine's temperature non-intrusively. A similar setup was conducted to detect the fault current of the electrical machines [24]. As a pilot function of anomaly detection, the 3-sigma rule of the statistical method was implemented, which showed outliers' capability (the monitored data outside the limits) detection. A total of 500 samples of time-series operational data (Irms parameter) were collected to determine the standard deviation of 1.07 A and mean value of 13.6 A. As described in section 3.3, the upper and lower limits were determined as µ ± 3, i.e. 16.81 A and 10.39 A, respectively. Any data point falls within limits and is considered "normal", or else it is recognized as an "outlier", implying the abnormal operational readings due to improper operation or physical property. These were the vital earlier sign of machine breakdown or ageing status [25]. Figure 5 indicates the time-series outlier detection to ensure the monitored data are laid within the upper and lower limits. The scenario illustrated the detected outlier with Irms of 18.5 A, which was outside the normal operational range.

CONCLUSION
Industry 4.0 is transforming the manufacturing and process industry from labour work to automation embedded with smart systems. In line with the Industry 4.0 endeavour, a proof-of-concept UniCPS prototype is designed and built for predictive maintenance. The prototype was built with 3-tier architecture consisting of the physical data acquisition layer consisting of client units with non-intrusive sensors and actuators on one side. The cyber cloud layer consisted of data processing and ML abilities on the other side. The layers are connected via the transport layer consisting of communication devices. A case study tested and validated the proposed model to monitor and control an air compressor in a local factory. As an extension to this work, more advanced ML models may be built to complement the elemental statistical-based anomaly detection model presented in this paper. Furthermore, the throughput analysis of data transmission may be analysed. The outcome of this work is the enhancement of conventional predictive maintenance work where the health of physical assets such as machineries can be monitored, and timely maintenance actions can be taken. To better cope with the limitation of sensor data, a wireless sensor network can be incorporated to acquire various data from diverse locations for a common goal of use case.