Predict Remaining Useful Life (RUL) of aircraft turbofan engines using Deep Learning.
Built with PyTorch LSTM + Temporal Attention on NASA's CMAPSS Turbofan Engine Degradation Simulation dataset.
| Feature | Details |
|---|---|
| Dataset | NASA CMAPSS FD001 (100 train engines, 100 test engines) |
| Model | 2-Layer Stacked LSTM with Temporal Attention |
| Framework | PyTorch |
| Dashboard | Streamlit (interactive web UI) |
| Metrics | RMSE, MAE, NASA Scoring Function |
pip install -r requirements.txtpython main.py --mode allThis will:
- Load & preprocess the CMAPSS FD001 dataset
- Train the LSTM model with early stopping
- Evaluate on the test set
- Generate prediction plots
streamlit run dashboard/app.py- 🏠 Overview — Key metrics, dataset info, engine lifecycle visualization
- 📊 Sensor Explorer — Interactive sensor degradation charts, correlation heatmap
- 🔮 RUL Predictions — Actual vs Predicted analysis, scatter plots, error distribution
- 🔬 Model Insights — Training curves, attention weight heatmaps
- ⚙️ Live Inference — Upload sensor data for real-time RUL prediction
Input (batch, 30, 14 features)
→ LSTM Layer 1 (128 hidden) + Dropout
→ LSTM Layer 2 (64 hidden) + Dropout
→ Temporal Attention
→ FC(64 → 32) → ReLU → FC(32 → 1)
Output: Predicted RUL (cycles)
engine-anomaly/
├── data/CMAPSSData/ # Dataset files
├── src/
│ ├── data_loader.py # Data loading & preprocessing
│ ├── dataset.py # PyTorch Dataset (sliding window)
│ ├── model.py # LSTM + Attention model
│ ├── train.py # Training loop
│ ├── evaluate.py # Evaluation metrics
│ ├── predict.py # Inference
│ └── utils.py # Plotting & helpers
├── dashboard/app.py # Streamlit dashboard
├── models/ # Saved checkpoints
├── results/ # Predictions & plots
├── config.py # Hyperparameters
├── main.py # CLI entry point
└── requirements.txt
- RMSE: Root Mean Squared Error (target: ≤ 15 cycles)
- MAE: Mean Absolute Error
- NASA Score: Asymmetric penalty — late predictions penalized more heavily (safety-critical)
- NASA CMAPSS Dataset
- Saxena, A., et al. "Damage Propagation Modeling for Aircraft Engine Run-to-Failure Simulation." (2008)