Git Product home page Git Product logo

umbertogriffo / predictive-maintenance-using-lstm Goto Github PK

View Code? Open in Web Editor NEW
595.0 26.0 238.0 8.21 MB

Example of Multiple Multivariate Time Series Prediction with LSTM Recurrent Neural Networks in Python with Keras.

License: MIT License

Python 100.00%
deep-learning deep-neural-networks deep-learning-algorithms prediction-model predictive-maintenance lstm lstm-neural-networks timeseries keras keras-tensorflow keras-neural-networks keras-models

predictive-maintenance-using-lstm's Introduction

Recurrent Neural Networks for Predictive Maintenance

  • Author: Umberto Griffo
  • Twitter: @UmbertoGriffo

Colab

You can try the code directly on Colab. Save a copy in your drive and enjoy It!

Software Environment

  • Python 3.6
  • numpy 1.13.3
  • scipy 0.19.1
  • matplotlib 2.0.2
  • spyder 3.2.3
  • scikit-learn 0.19.0
  • h5py 2.7.0
  • Pillow 4.2.1
  • pandas 0.20.3
  • TensorFlow 1.3.0
  • Keras 2.1.1

Problem Description

In this example, I build an LSTM network in order to predict remaining useful life (or time to failure) of aircraft engines [3] based on the scenario described at [1] and [2]. The network uses simulated aircraft sensor values to predict when an aircraft engine will fail in the future allowing maintenance to be planned in advance. The question to ask is "Given these aircraft engine operation and failure events history, can we predict when an in-service engine will fail?" We re-formulate this question into two closely relevant questions and answer them using two different types of machine learning models:

* Regression models: How many more cycles an in-service engine will last before it fails?
* Binary classification: Is this engine going to fail within w1 cycles?

Data Summary

In the Dataset directory, there are the training, test and ground truth datasets. The training data consists of multiple multivariate time series with "cycle" as the time unit, together with 21 sensor readings for each cycle. Each time series can be assumed to be generated from a different engine of the same type. The testing data has the same data schema as the training data. The only difference is that the data does not indicate when the failure occurs. Finally, the ground truth data provides the number of remaining working cycles for the engines in the testing data. The following picture shows a sample of the data:

You can find more details about the data at [1] and [2].

Experimental Results

Results of Regression model

Mean Absolute Error Coefficient of Determination (R^2)
12 0.7965

The following pictures show the trend of loss Function, Mean Absolute Error, R^2 and actual data compared to predicted data:

Results of Binary classification

Accuracy Precision Recall F-Score
0.97 0.92 1.0 0.96

The following pictures show the trend of loss Function, Accuracy and actual data compared to predicted data:

Extensions

We can also create a model to determine if the failure will occur in different time windows, for example, fails in the window (1,w0) or fails in the window (w0+1, w1) days, and so on. This will then be a multi-classification problem, and data will need to be preprocessed accordingly.

Who is citing this work?

References

predictive-maintenance-using-lstm's People

Contributors

amrzv avatar umbertogriffo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

predictive-maintenance-using-lstm's Issues

some questions

HI
im a student from a collage in Norway and im approching pyton and machine learing but my teacher isn't so good, so i try to learn it by myself (i'm a super beginner) and i have some questions:
1)in the training data we have simulated sensor data and when the engine breaks so we use it for the LSTM learning right?
2) i understood that we use traning data to see if our lstm works but why we have alredy RUL of testing data?
3) i dont know what represents the two blue and green graphs (one results in regression model and in one in binary classification) with actual data compared to predicted data
thank you and happy holidays and sorry if some questions are stupid
tom

target==s21 ?

I know that the "cycle" is the time unit. And 21 sensor readings is the features. Now I have a question:

if the ground truth data is not the "cycle", the ground truth data is the sensor of s21(for example). How to utilize LSTM to predict the ground truth data(s21)? If I want to predict the values of s21 from 23 cycle to 30 cycle(sequence time series), how to predict?

such as:
image

Tks!

About the model

Hi, man

You have made a pretty predictive model with LSTM. I am a Ph.D student and I want to know if your model has been published as a journal paper. If it has been published as a journal paper, I wish you could tell me the DOI of the paper or the information about the paper. Thank you very much!!

Cycle with time series

Hi man,

You have very good explain how to use neuronal network for predictive maintenance case.
So i have a question about data. How can you create cycle feature in your dataset (train)?

Thanks

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.