Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🤖 Predictive Maintenance System

A deep learning–based predictive maintenance system that estimates the Remaining Useful Life (RUL) of aircraft engines using LSTM networks on the NASA CMAPSS FD001 dataset.

This project demonstrates an end-to-end machine learning pipeline for Remaining Useful Life (RUL) prediction. It loads the NASA CMAPSS dataset, preprocesses multivariate sensor data, generates fixed-length time-series sequences, trains an LSTM network, evaluates prediction performance using RMSE, and outputs simple maintenance status recommendations.


✨ Features

  • 🚀 Remaining Useful Life (RUL) prediction
  • 🧠 LSTM-based sequence modeling
  • 📊 Automatic time-series sequence generation
  • ⚙️ Data preprocessing & Min-Max normalization
  • ⏹️ Early stopping during training
  • 📉 RMSE evaluation on test engines
  • 🔧 Rule-based maintenance recommendations
  • 📈 Automatic training loss visualization
  • 💾 Automatic trained model saving

🛠 Tech Stack

  • Python
  • TensorFlow / Keras
  • NumPy
  • Pandas
  • Scikit-learn
  • Matplotlib

📂 Project Structure

Predictive-Maintenance-System/
│
├── data/
│   ├── train_FD001.txt
│   ├── test_FD001.txt
│   ├── RUL_FD001.txt
│   └── readme.txt
│
├── docs/
│   ├── research-paper.pdf
│   └── Damage Propagation Modeling.pdf
│
├── output/
│   ├── models/
│   │   └── final_model.keras
│   └── plots/
│       └── loss.png
│
├── src/
│   ├── data_loader.py
│   ├── preprocessing.py
│   ├── sequence.py
│   └── model.py
│
├── train.py
├── requirements.txt
├── README.md
└── .gitignore

__pycache__/ and .venv/ are local-generated files and are intentionally excluded.


📸 Training Result

Training vs Validation Loss


⚙️ Setup

Create a virtual environment (recommended).

Windows

python -m venv .venv
.venv\Scripts\activate

Linux / macOS

python3 -m venv .venv
source .venv/bin/activate

Install the required packages:

pip install -r requirements.txt

Recommended Python Version: Python 3.11 (TensorFlow currently has limited support for newer Python releases.)


▶️ How to Run

python train.py

The script will:

  • Load the NASA CMAPSS FD001 dataset
  • Preprocess sensor readings
  • Generate time-series sequences
  • Train the LSTM model
  • Evaluate RMSE
  • Save the trained model
  • Save the training loss plot
  • Print maintenance recommendations

📊 Dataset

The project uses the NASA CMAPSS FD001 turbofan engine degradation dataset.

FD001 contains:

  • 100 training engine trajectories
  • 100 test engine trajectories
  • One operating condition
  • One fault mode (HPC degradation)

Files used:

  • train_FD001.txt
  • test_FD001.txt
  • RUL_FD001.txt

The loader reads the space-separated files, removes empty columns, and assigns the following schema:

id, cycle, op1, op2, op3, s1 ... s21

The original NASA reference paper is included in:

docs/Damage Propagation Modeling.pdf

⚙️ Preprocessing

The preprocessing pipeline performs:

  • Removal of unnecessary columns
  • Min-Max feature scaling
  • Feature / label separation
  • Engine-wise sequence generation
  • Fixed sequence length of 30 cycles

Dropped columns:

  • cycle
  • op3
  • s1
  • s5
  • s10
  • s16
  • s18
  • s19

🔄 Pipeline Overview

The complete workflow of the project is illustrated below:

NASA CMAPSS Dataset
          │
          ▼
Data Loading
          │
          ▼
RUL Calculation
          │
          ▼
Data Preprocessing
(Min-Max Scaling)
          │
          ▼
Sequence Generation
(30 Time Steps)
          │
          ▼
LSTM Network
          │
          ▼
RUL Prediction
          │
          ▼
RMSE Evaluation
          │
          ▼
Maintenance Decision

🧠 Model Architecture

The LSTM network consists of:

  • LSTM (50 units, return sequences)
  • Dropout (0.2)
  • LSTM (25 units)
  • Dropout (0.2)
  • Dense output layer (ReLU)

Training configuration:

  • Optimizer: Adam
  • Loss: Mean Squared Error (MSE)
  • Batch Size: 32
  • Epochs: 50
  • Validation Split: 20%
  • Early Stopping (Patience = 5)

📈 Outputs

During execution the project:

  • Trains the LSTM model
  • Evaluates RMSE
  • Prints Remaining Useful Life predictions
  • Generates maintenance recommendations

Maintenance status:

RUL < 25  → Critical

RUL < 50  → Warning

Otherwise → Healthy

Generated files:

output/models/final_model.keras
output/plots/loss.png

📄 Research Paper

A detailed project report is available at:

docs/research-paper.pdf

The original NASA reference paper is available at:

docs/Damage Propagation Modeling.pdf

📦 Dependencies

Install all dependencies with:

pip install -r requirements.txt

Main libraries:

  • TensorFlow / Keras
  • NumPy
  • Pandas
  • Scikit-learn
  • Matplotlib

🚀 Future Improvements

  • Support FD002, FD003 and FD004 datasets
  • Save preprocessing scaler
  • Hyperparameter tuning
  • Compare LSTM with GRU and Transformer models
  • Interactive prediction dashboard
  • Docker support
  • Model inference script
  • Cloud deployment

👨‍💻 Author

Vihaan Jain

If you found this project useful, consider ⭐ starring the repository.

About

A modular deep learning project for predictive maintenance using LSTM networks, featuring time-series preprocessing, Remaining Useful Life prediction, training pipelines, and evaluation on the NASA CMAPSS dataset.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages