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.
- 🚀 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
- Python
- TensorFlow / Keras
- NumPy
- Pandas
- Scikit-learn
- Matplotlib
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 vs Validation Loss
Create a virtual environment (recommended).
python -m venv .venv
.venv\Scripts\activatepython3 -m venv .venv
source .venv/bin/activateInstall the required packages:
pip install -r requirements.txtRecommended Python Version: Python 3.11 (TensorFlow currently has limited support for newer Python releases.)
python train.pyThe 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
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.txttest_FD001.txtRUL_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
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:
cycleop3s1s5s10s16s18s19
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
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)
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
A detailed project report is available at:
docs/research-paper.pdf
The original NASA reference paper is available at:
docs/Damage Propagation Modeling.pdf
Install all dependencies with:
pip install -r requirements.txtMain libraries:
- TensorFlow / Keras
- NumPy
- Pandas
- Scikit-learn
- Matplotlib
- 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
Vihaan Jain
If you found this project useful, consider ⭐ starring the repository.
