Skip to content

mahdirajaee/BESS-Predictive-Maintenance-Dashboard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BESS Predictive Maintenance Framework

A comprehensive predictive maintenance simulation framework for Battery Energy Storage Systems (BESS) in DC microgrids, implementing real-time state-of-health estimation and anomaly detection.

Features

  • Real-time SoH Prediction: Uses LSTM/TCN models for cycle-level health estimation
  • Anomaly Detection: Adaptive thresholding with dynamic alert generation
  • Electrochemical Modeling: Physics-informed voltage residual computation
  • Interactive Dashboard: Real-time visualization with Dash and Plotly
  • REST API: Flask-based API for integration with external systems
  • Edge-Compatible: Sub-500ms inference for real-time applications

System Requirements

  • Data Quality: Cycle-level measurements with residual-based degradation indicators
  • Computational Budget: <500ms processing time per cycle
  • Environmental Range: -10°C to +40°C ambient temperature operation
  • Safety Margins: <5% false negatives, <10% false positives

Project Structure

BESS/
├── data/
│   └── battery_data_generator.py    # Synthetic BESS data generation
├── models/
│   └── sequence_models.py           # LSTM and TCN implementations
├── utils/
│   ├── preprocessing.py             # Data preprocessing and feature extraction
│   └── anomaly_detection.py        # Adaptive threshold management
├── simulation/
│   └── bess_simulator.py           # Main simulation engine
├── web/
│   ├── dashboard.py                 # Dash visualization dashboard
│   └── flask_api.py                # REST API endpoints
├── main.py                          # Application entry point
└── requirements.txt                 # Python dependencies

Installation

  1. Install dependencies:
pip install -r requirements.txt
  1. Run the application:
python main.py --mode both

Usage Modes

Demo Mode

Run a complete simulation with performance metrics:

python main.py --mode demo --model LSTM

Dashboard Mode

Launch interactive web dashboard:

python main.py --mode dashboard

Access at: http://127.0.0.1:8050

API Mode

Start REST API server:

python main.py --mode api

API available at: http://127.0.0.1:5000

Combined Mode

Run both dashboard and API:

python main.py --mode both

Key Components

1. Electrochemical Residual Modeling

  • Equivalent circuit model for expected voltage behavior
  • Residual computation (measured - predicted) as degradation indicators
  • Parameter fitting for real-time adaptation

2. Deep Sequence Learning

  • LSTM/TCN models for temporal pattern recognition
  • Features: residuals, temperature, throughput, cycle characteristics
  • Target: SoH estimation and degradation rate prediction

3. Adaptive Thresholding

  • Dynamic threshold: Th = μ_err + k·σ_err
  • Temperature-adjusted alerting
  • Rolling statistics with environmental compensation

4. Real-time Processing

  • Cycle-level inference pipeline
  • Performance monitoring and optimization
  • Edge-compatible model architectures

API Endpoints

  • GET /api/status - System status and current metrics
  • POST /api/initialize - Initialize ML models
  • POST /api/start_simulation - Begin continuous simulation
  • POST /api/process_cycle - Process single cycle
  • GET /api/recent_data - Retrieve recent cycle data
  • GET /api/summary - Simulation performance summary
  • GET /api/alerts - Alert history and statistics

Model Configuration

LSTM Model

  • Architecture: Multi-layer LSTM with dropout
  • Input: (sequence_length, num_features)
  • Output: SoH prediction [0, 1]
  • Optimization: Adam optimizer with MAE loss

TCN Model

  • Architecture: Temporal Convolutional Network
  • Dilated convolutions for long-range dependencies
  • Residual connections and dropout regularization
  • Faster inference than LSTM for edge deployment

Performance Metrics

The framework tracks:

  • Prediction Accuracy: MAE and RMSE for SoH estimation
  • Detection Performance: True/false positive/negative rates
  • Processing Speed: Per-cycle inference time
  • Real-time Compliance: <500ms processing requirement

Environmental Adaptation

Temperature compensation factors:

  • Voltage behavior normalization
  • Threshold adjustment for ambient conditions
  • Seasonal adaptation algorithms

Safety Considerations

  • Conservative thresholding to minimize false negatives
  • Multi-criteria anomaly detection
  • Severity scoring for maintenance prioritization
  • Historical trend analysis for early warning

License

This project is developed for research and educational purposes in predictive maintenance for energy storage systems.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages