Predictive Maintenance and Anomaly Detection (Data reading and preprocessing via Knime Part-1)

KNIME is now the most widely used open-source tool for visual programming, which uses drag and drop to create complete Machine Learning Models without writing any code.

Industrial IOT

  1. Predictive Maintenance
    a. Anomaly Detection for Predictive Maintenance
    b. IOT time series data

It is one of the tools that is becoming more and more well-known among statisticians, data scientists, and domain experts from different industries (manufacturing, pharmacy, farming, oil & gas) who receive data via IoT for the delivery of quick solutions without the need for Python or R programmers.


Smart home appliances like thermostats and security systems frequently spring to mind when people in general think about the Internet of Things. However, the Industrial Internet of Things has emerged as a result of the IoT ecosystem’s expansion far beyond the sphere of consumer use.

The industrial IoT, or IIoT for short, links equipment and devices in industries where maintaining equipment functionality are essential for productivity and safety. IIoT technology is used by businesses to automate formerly manual operations and manage their assets remotely, finding new cost- and time-saving opportunities along the way.

We’ll look at five key ways that industrial IoT is altering the playing field for businesses below:

  • Asset Tracking
  • Condition Monitoring
  • Supply chain management
  • Compliance Monitoring
  • Predictive Maintenance

Predictive Maintenance

Protecting and prolonging the life of industrial assets like HVAC (Heating, Ventilation, and Air Conditioning) systems, power generators, and wind turbines depend on predictive maintenance. Global process businesses can save millions and perform maintenance procedures only when necessary with the help of IoT sensors and technologies.

A simple IoT device can monitor essential performance metrics in real-time and send alerts the moment something happens. This means that operators can address malfunctions before they become larger issues and plan downtimes more efficiently.

Predictive Maintenance

Anomaly Detection for Predictive Maintenance

The ability to predict the unknown in various types of IoT data is now well established, and the early finding is typically valued highly in terms of money, life expectancy, and/or time. Yet there are difficulties with it! Since the available data are frequently unlabeled, it is difficult to determine whether previous signals were abnormal or typical. As a result, we are limited to using unsupervised models that solely consider regular functioning for forecasting disruptive occurrences.

This is referred to as “anomaly detection” in the field of mechanical maintenance. Turbines, rotors, chemical reactions, medical signals, spectroscopy, and other data sources are just a few examples of the kind of use cases that lend themselves to unsupervised anomaly detection.

Rotor data is used in the sample that is provided here.

Anomalies as unexpected events can be divided into two categories; dynamic aka collective anomalies, and static aka point anomalies.

Dynamic Anomaly: A dynamic anomaly occurs as a collection of data points over time. For example, when a rotor is slowly deteriorating, one of the measurements might change gradually until eventually the rotor breaks.

Static Anomaly: A static anomaly is an unrecognized pattern that is different from its neighbors. Like a random unknown heartbeat in the middle of a series of standard normal heartbeats during an ECG session.

We will be using Knime for Anomaly Detection for Predictive Maintenance. Anomaly detection for predictive maintenance will be completed in two parts.

1. Exploratory Data Analysis.

2. Building Auto-Regressive models.

In this part, we will see how to read data and preprocess it using KNIME. So, let's have a look at our data,

IOT time series data

The data consists of 28 Fast Fourier Transformed(FFT) pre-processed data files from 28 sensors that monitor 8 parts of a mechanical rotor. The table lists the mechanical pieces monitored by the sensors.

A fast Fourier transform (FFT) is an algorithm that computes the (DFT) of a sequence, or its inverse (IDFT). Fourier analysis converts a signal from its original domain (often time or space) to a representation in the frequency domain and vice versa.

Parts of rotor

There are 28 files from 28 various sensors, as seen in the graphic below. Text files are used to store the data.

28 sensors data(.txt files)

Inside one of the text files

target data

We have to obtain the output as shown in the above image. The source of the data is anonymous. You can download the file via this link.

In the extracted table, the amplitude values refer to a date and a frequency band of a single sensor. The frequency bands of the 28 sensors make altogether 313 single columns!

The final table can be observed from two different perspectives :

  1. A time series of spectral amplitudes on a single frequency band

2. A vector of spectral amplitudes across frequency bands evolving over time.

We must pre-process the data before we can convert it. During pre-processing, Time and Frequency must be standardized. The method for using Knime to read every file from the directory and convert it to the format we want is given below.

Full Knime workflow

Inside filename meta node

inside file reader meta node

the output of file reader meta node

Frequency Binning meta node

Frequency bins are intervals between samples in the frequency domain.

Output after execution of frequency Binning meta node

The first two rows appear like this because we applied the joiner node in the previous step.

Inside the timestamp column name node

A new flow variable ‘column0’ has been added after the execution of this node.

The final output for the loop executed 1 time

Note:- Loop is not executed fully

After processing the loop fully, the output will be similar as shown in the image below

After processing the loop fully, the output will be similar to that shown in the image.

So we have seen the data reading and pre-processing steps till now. In order to download the workflow. In the next part we will see :

Exploratory data analysis and building auto-regressor models for anomaly detection.

I hope this article was informative and provided you with the details you required. If you have any questions related to Knime Analytics, Machine Learning and Deep Learning Documentation while reading the blog, message me on Instagram or LinkedIn. Special credits to my team interns: Shreyas, Siddhid, Urvi, Kishan, Pratik

Thank You…