Mathworks
Control system, edge devices and cloud in a network
Developing predictive maintenance algorithms involves a number of challenges. Using the example of a packaging machine, the article explains how an algorithm for predictive maintenance can be developed.
Predictive maintenance has become indispensable in industry in order to increase operational efficiency and reduce maintenance costs. However, the development of predictive maintenance algorithms for vehicles, MRI devices, wind turbines or assembly lines also poses a number of challenges for the engineers involved. Algorithm development requires not only extensive experience with machine learning techniques, but also a solid understanding of plant behavior. However, specialists with skills in both areas are hard to find.
Implementing the functionality in production also requires a number of steps to deploy the predictive maintenance algorithm on an industrial controller, an edge device or in the cloud. Parts of a single algorithm can run on different parts of the infrastructure, which further increases complexity.
Using the example of a packaging machine, this article shows how a predictive maintenance algorithm can be developed and deployed in a production system.
The packaging machine
The exemplary packaging machine is equipped with several robot arms. These move back and forth at high speed when they place objects to be packaged on the assembly line. They are connected to industrial controllers (PLCs) that communicate with a Microsoft Azure-based system. This IT/OT system collects streaming data from the edge devices connected to the robot arms and executes predictive maintenance algorithms based on this data. This enables the detection of anomalies and the prediction of possible arm malfunctions and reports the results back to the dashboards used by engineers and operators.
The algorithm
The algorithm for this predictive maintenance system consists of two components. The first component runs on the industrial controller (edge) and consolidates the data using feature extraction techniques. The second component is located in the cloud. It uses the features and a machine learning model to predict the occurrence of faults and estimate the remaining useful life of the machine. The results of this predictive algorithm are streamed to the dashboard in near real time.
The Feature Extraction Algorithm
The first part of the predictive maintenance algorithm works with the raw sensor data generated by the robot arms. The speed and current consumption of the motor of the respective arm are recorded.
The sensors used for such machines achieve a very high data sampling rate. Storing and analyzing such a large amount of sensor data can be costly and time-consuming, as the volume of measurement data makes it difficult to identify the relevant data areas. This problem can be solved by feature extraction.
Feature extraction techniques work with raw sensor data and derive important key figures from it, which significantly reduces storage and transmission costs. The sensors in the robot arm record data at 1 kHz intervals. This corresponds to 1000 samples per second. By compressing the data into five features, the effort required for data storage and transmission is reduced by a factor of 200.
Using the Diagnostic Feature Designer app in the Predictive Maintenance Toolbox, sensor data is imported and features are extracted using various methods for signal processing and dynamic modeling. The features are then classified according to how well they can distinguish whether the data originates from a functioning or defective machine.
Once the features to be extracted have been selected, the data summarization algorithm can be implemented in the PLC used as the edge device. Instead of testing the algorithm on a physical machine - and running the risk of damaging it - the PLC is connected to a Simscape model of the robot arms running on a Speedgoat hardware system. This real-time system communicates with the industrial controller via an industrial fieldbus. The first step is to generate C code for the data compression algorithm using the 'Simulink Coder' and make it available in the PLC. Then the packaging machine model must be installed in the Speedgoat system. Simulations carried out under various fault conditions can then be used to ensure that the algorithm will work properly in practice.
The predictive maintenance algorithm
By extracting meaningful data, the edge device can now summarize the amount of data to be transmitted. This summarized data can be streamed to the IT/OT system using Apache Kafka. This streaming data can be used to estimate the remaining service life of the packaging machine motors.
As the condition of the motors deteriorates over time, the extracted characteristics steadily increase or decrease linearly or exponentially. Based on this trend, a degradation model is selected in the predictive maintenance toolbox to predict the future condition of the machine.
In order for this algorithm to run on a cloud-based system, an executable file must now be created using the Matlab Compiler SDK and integrated into the IT/OT system using the Matlab Production Server.
Philipp Wallner is Industry Manager for Industrial Automation & Mechanical Engineering at Mathworks.
© MathworksThe machine learning algorithm can now predict faults in the packaging machine. To do this, it uses features extracted from the raw data of the edge devices and a web-based dashboard that can be used to retrieve the results.



















