Predictive Maintenance within the Internet of Things
By: Georgi Tancev
Tags: Data Science, Internet of Things, Business, Machine Learning, Artificial Intelligence

The Fourth Industrial Revolution

In the not-so-distant future, most manufacturing equipment, machines, and devices are expected to be connected to the so-called internet of things with which they will not only be able to communicate with each other, but also with humans, and equipped with sensors of all kinds, they will be able to provide information about their environment or themselves in real-time. Sensors are one of the main contributors to the infamous big data. With cloud computing, storing data and retrieving knowledge out of it is now possible. More precisley, sensor data can be used as input for algorithms from artificial intelligence, i.e., to develop software for “smart” objects that can perform decisions by themselves. For instance, fridges might be ordering food when they are empty, or cars might be writing mails to partners to inform about delays due to traffic jams. The combination of these new technologies are expected to be the advent of the fourth industrial revolution.

Predictive Maintenance

One of the interesting applications is predictive maintenance, since it enables dynamic service of machine as opposed to regular maintenance intervals. In addition, remote devices can call for service, once some of their parameters are showing a trend towards malfunction. This is essentially a machine learning task in which normal and non-normal operation states have to be distinguished — a problem known as anomaly detection.

Anomaly Detection

Figure 1: Possible anomalies in sensor signals.

In Figure 1, three different types of anomalies with respect to sensor signals in time-domain are represented. A point anomaly is a set of points that is different on a local but also on a global scale, e.g., if represented as a sensor signal distribution. In contrast, a contextual anomaly strikes attention only if some time window is inspected, as it is a local process. Last, a collective anomaly is a deviation from a regular pattern. Which patterns occur depends on the combination of sensor, machine, and its application. While it is necessary to inspect some signal history to spot the two latter types of malfunction, this is not the case for former one. Hence, the order of the listing is also the order of the difficulty to detect such patterns. Moreover, a real machine can contain many sensors and the combined information can be a better estimate of its state.

In reality, machines degrade over time due to attrition, but also out of a sudden due to an external impulse. As a consequence, they drift away from their reference state that is defined by a brand-new sample. This reference state can be interpreted as a multi-variate distribution generated by the different sensors, and over time, this distribution changes its parameters, i.e., mean and/or covariance. Recognizing non-normal behavior means that the displacement of this drift — in a way causing more and more “point” anomalies over time — has to be identified, either quantitatively (magnitude of deviation) or qualitatively (deviated: yes/no). It can also be interesting to know the direction of the drift, as it might reveal which component(s) need replacement.

Supervised Learning

With supervised learning, one or more classes of anomalies can be directly targeted — as long as labelled data is available. In some cases, such data can be obtained by performing stress tests, e.g., by exposing a machine/device to extreme conditions, or operating under unusual conditions for a long period of time.

Figure 2: Classification of anomalies with supervised learning.

In Figure 2, the reference state and one anomaly class are depicted. A support-vector machine with linear kernel is used to as model the decision boundary between the two states, but any other classification algorithm, e.g., logistic regression, random forest, neural network, can be used. Unfortunately, it is rarely known in advance how non-normal states look like; even if historical data from stress testing might be available, it need not to be complete. Therefore, it could be more interesting to just identify every point outside the reference state, independent of its direction.

Unsupervised Learning

Alternatively, it is possible to define only a reference state and classify all points outside of it as non-normal behavior. Furthermore, if there are some potential outliers in the training set, the algorithm will try to identify them by itself (unsupervised learning). Hence, this technique needs no labelled data at all, and it can — in contrast to the supervised learning approach — identify all points outside of the reference state, i.e., anomalies not included in the training set.

Figure 3: Classification of anomalies with unsupervised learning.

More precisely, the aim is to construct a so-called “envelope” around the data set consisting of a reference state so that points outside of it can be identified (Figure 3). For instance, one could fit a Gaussian distribution to the data set and, in a second step, compute the Mahalonobis distance of points to estimate their “normality” (the Mahalonobis distance is the extension of the Z-score to more than one dimension). However, the actual distribution of the data need not to be Gaussian, and in that case, other techniques can be applied with the same idea, e.g., one-class support vector machine, local-outlier factor, or isolation forest. These methods do not compute a distance metric, they assess the “loneliness” or relative position (inside/outside envelope) of a point instead. Furthermore, they allow to define an initial amount of outliers/contamination (ν) to control the tightness of the volume.

Monitoring

Figure 4: Cumulative sum of outliers/anomalies over time for a sample system.

In Figure 4, four such algorithms, i.e., Mahalonobis distance/robust covariance (RC), local-outlier factor (LOF), one-class support vector machine (OCSVM), and isolation forest (IF), are trained on a data set with ν=0.10, i.e., an initial fraction of anomalies of ten percent, and monitored over time. In the beginning, almost no anomalies are identified. After this initial period, some points fall outside of the confidence region, and after some more weeks, every new point point is classified as an anomaly, and the slope becomes unity. By defining a threshold value, an automatic message can be triggered to inform the operator. Furthermore, by assessing the reference state after fabrication/before shipping, every machine could have its own model, and its maintanance schedule would be customized.

Closure

The provided examples demonstrate briefly how upcoming down-times and malfunction can be targeted and identified, as early finding faults in equipment, machines, and devices can reduce the extent of the damage. Furthermore, maintanance can be designed in a dynamic manner as components can communicate their need for service, which optimizes the costs thereof. After all, it is a creative process and engineers can think of novel products embedded with such technology.