Giter Club home page Giter Club logo

faaltunel / anomaly-detection-on-machine-failures Goto Github PK

View Code? Open in Web Editor NEW

This project forked from madekrisnaj/anomaly-detection-on-machine-failures

0.0 0.0 0.0 370 KB

Condition Based Maintenance (CBM) uses sensor to to collect real-time measurement. CBM data allows maintenance personnel to perform maintenance at the exact moment it is needed, prior to failure. In this case, we will build an anomaly detection model for vibration failure dataset using (LSTM)

License: MIT License

Jupyter Notebook 100.00%

anomaly-detection-on-machine-failures's Introduction

Anomaly Detection on Machine Failures

Overview

Condition Based Maintenance (CBM) uses sensor to to collect real-time measurement (ie. pressure, temperature, and vibration). CBM data allows maintenance personnel to perform maintenance at the exact moment it is needed, prior to failure.

Key take-aways from use case:

Data Description

We will use vibration sensor readings from NASA Acoustics and Vibration Database. sensor readings were taken on four bearings that were run to failure under constant load and running conditions. The vibration measurement signals are provided for the datasets over the lifetime of the bearings until failure. Failure occurred after 100 million cycles with a crack in the outer race.

You can download the sensor data here.

Anomaly Detection

Anomaly detection is the process of finding outliers in a given dataset. Outliers are the data objects that stand out amongst other objects in the dataset and do not conform to the normal behavior in a dataset. Anomaly detection is a data science application that combines multiple data science tasks like classification, regression, and clustering (Kotu & Deshpande, 2019).

The assumption is that normal behavior is the quantity of "normal" data available, whereas anomalies are exceptions to the normal state up to the point where normal modeling is performed.

Data Exploration

All Data Visualization

Based on the overall data plot. We can see the period of normal data and anomalous data. This is necessary in dividing the dataset into training and testing. We define the train and test datasets based on operating conditions, from the vizualization we can see data which represent normal operating condition are until around February 15th, 2004.

1

Training Data

We plot the training data which represent normal operating conditions.

2

Testing Data

Next, we can see the test dataset sensor readings over time

3

We can see that near the failure point, the bearing vibration become oscillate.

Frequency Perspective

To view the vibrations in a frequency perspective, the data is transformed using the Fourier transform.

5

There is nothing notable about the normal operation data.

4

We can see the increase in the frequency amplitude and energy in the system leading up to the bearing failures.

Model Building

Long Short-Term Memory (LSTM) are a type of recurrent neural network capable of learning order dependence in sequence prediction problems. (Browniee, 2017). This is a behavior required in complex problem domains like machine translation, speech recognition, and more. LSTMs are a complex area of deep learning. It can be hard to get your hands around what LSTMs are, and how terms like bidirectional and sequence-to-sequence relate to the field.

For our model we will use an autoencoder neural network architecture. This architecture was chosen to handle model weaknesses due to the selection of training data from normal conditions.

6

For 100 epochs and batxh size is 10, we fit the model to training data. We can plot the training losses to evaluate our model's performance.

7

Loss Distribution

By plotting the distribution of the calculated loss in the training set, we can determine a suitable threshold value for identifying an anomaly. In doing this, one can make sure that this threshold is set above the noise level so that false positives are not triggered.

8

Based on the histogram, we get treshold value of around 0.2625

Result Failure Time Plot

We visualize the result over time. The red line indicates our treshold value of 0.2625.

9

Conclusion

By analyzing past trends of healthy, the model learns the expected trend with acceptable variance (hyperparameter). From the above vizualization, we see that the model is able to detect the anomaly approximately 3 days ahead of the actual bearing failure.

References

https://machinelearningmastery.com/gentle-introduction-long-short-term-memory-networks-experts/ https://www.sciencedirect.com/science/article/pii/B9780128147610000137

anomaly-detection-on-machine-failures's People

Contributors

madekrisnaj avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.