Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Industrial Sensor Anomaly Detection & Predictive Maintenance

Python TensorFlow Status

Project Overview

This project implements a complete Deep Learning pipeline for predictive maintenance in industrial environments (specifically focused on exoskeleton or cable-driven systems).

It tackles the challenge of detecting specific mechanical events (like cable unblocking, shocks, or friction anomalies) using time-series data from multiple sensors (IMU, Force sensors).

The repository features an End-to-End approach:

  1. Physics Simulation: A custom engine generates synthetic sensor data to simulate rare fault scenarios.
  2. Deep Learning: Implementation and comparison of LSTM (Long Short-Term Memory) and Sequential architectures for time-series classification.
  3. Granular Analysis: Advanced error analysis to evaluate prediction timing (early vs. late detection).

Key Features

  • Synthetic Data Generation: A physics-based engine (data_generation.py) simulating:
    • Accelerometer (X, Y, Z) & Gyroscope data.
    • Cable forces with realistic noise injection.
    • Mechanical events: Shocks, Vibrations, Overheating, and Unblocking.
  • Model Architecture:
    • Custom LSTM networks optimized for temporal dependencies.
    • Sliding window preprocessing for real-time inference simulation.
  • Performance Metrics:
    • Detailed confusion matrices.
    • Temporal precision analysis (evaluating detection delay in milliseconds).

Repository Structure

The project is modularized into specific tasks:

├── config.py (Recommended)              # Central configuration (Constants & Hyperparameters)
├── data_generation.py                   # Physics engine: generates synthetic datasets (.xlsx)
│
├── training/
│   ├── sequential_model_training.py     # Training script for the baseline Sequential model
│   ├── lstm_models_training.py          # Training script for the Advanced LSTM model
│   └── trained_models_comparison.py     # Script to compare metrics between saved models
│
├── analysis/
│   ├── error_prediction_analysis_seq.py # Error analysis for Sequential model
│   └── error_prediction_analysis_lstm.py# Error analysis for LSTM model
│
└── models/                              # Directory where trained .keras models are saved



## Installation

    Clone the repository:
    Bash

git clone [https://github.com/YOUR_USERNAME/industrial-sensor-lstm.git](https://github.com/YOUR_USERNAME/industrial-sensor-lstm.git)
cd industrial-sensor-lstm

Install dependencies:
Bash

    pip install numpy pandas tensorflow scikit-learn matplotlib seaborn openpyxl

## Usage Workflow

To run the full pipeline, follow this sequence:

1. Generate Data

Create the synthetic dataset. This will generate Excel files in the data/ directory.
Bash

python data_generation.py

2. Train Models

Train the Deep Learning models. This will save the best models (e.g., best_model.keras) locally.
Bash

# Train the standard Sequential model
python sequential_model_training.py

# Train the optimized LSTM model
python lstm_models_training.py

3. Compare & Analyze

Evaluate the models on test data and visualize the decision boundaries.
Bash

# Compare metrics (Accuracy, F1-Score, Latency)
python trained_models_comparison.py

# Run specific error analysis (Early/Late detection checks)
python error_prediction_analysis_lstm.py

## Results

The system evaluates predictions based on a temporal tolerance window.

    Hit: Event detected within the acceptable time window ([-0.5s, +1.0s]).

    Early: Prediction triggered before the event occurred (False Positive risk).

    Late: Prediction triggered after the acceptable delay (Missed operational window).

Current benchmarks show that the LSTM architecture significantly outperforms the baseline in reducing "Late" detections.

## Contributing

Contributions are welcome! Please open an issue or submit a pull request for any improvements or bug fixes.

About

EN: LSTM-based command for an exoskeleton. Simulates IMU/Force data, generates synthetic datasets with faults (shocks, overheating), and trains a temporal classification model. FR: Commande d'un exosquelette par LSTM. Simulation de données capteurs, génération de datasets synthétiques et classification temporelle.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages