Skip to content

About

Autonomous Edge Structural Health Monitoring & Anomaly Detection system using ESP32, TinyML Autoencoders, and Streamlit.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

VibroShield (Edge-SHM)

Autonomous Edge Structural Health Monitoring & Anomaly Mitigation System

VibroShield is a low-cost, decentralized edge computing system designed to monitor civil infrastructure (bridges, flyovers, overpasses) in real time. It combines deterministic 200 Hz digital signal processing, unsupervised TinyML autoencoders, and neuro-symbolic decision boundaries on an ESP32 microcontroller to detect structural micro-fractures and autonomously execute physical mitigation without cloud latency.


Key Highlights

  • Edge-First Architecture: Complete pipeline (200 Hz timer acquisition, 40 Hz IIR filtering, 128-point local FFT, and inference) runs on-device on an ESP32.
  • Unsupervised Anomaly Isolation: Uses reconstruction error from an autoencoder trained exclusively on healthy baseline vibrations to identify structural stiffness changes and resonant shifts.
  • Neuro-Symbolic Decision Fusion: Blends deterministic civil engineering safety thresholds (±0.080g peak acceleration limits) with Support Vector Machine (SVM) decision hyperplanes to eliminate black-box unpredictability.
  • Multi-Modal Mitigation & Telemetry: Drives a 5V fail-safe relay (GPIO 26), an acoustic warning buzzer (GPIO 27), an onboard status LED (GPIO 2), a local SSD1306 OLED display, and a live Streamlit browser dashboard.

Hardware Pinout

Peripheral ESP32 Pin Logic Level Function
MPU6050 SDA GPIO 21 3.3V I2C Shared I2C Data (400 kHz, Addr: 0x68)
MPU6050 SCL GPIO 22 3.3V I2C Shared I2C Clock (400 kHz)
SSD1306 OLED SDA GPIO 21 3.3V I2C Shared I2C Data (Addr: 0x3C)
SSD1306 OLED SCL GPIO 22 3.3V I2C Shared I2C Clock
5V Relay Trigger GPIO 26 3.3V Output Active HIGH fail-safe barrier trip
Audio Buzzer GPIO 27 3.3V Output Continuous alarm (Critical) / 100 ms chirp (Warning)
Status Indicator GPIO 2 Internal Built-in Blue LED for visual status

Project Structure

├── Bridge vibration monitoring dataset/  # Raw QuickDAQ multi-channel recordings
├── cleaned_individual/                   # Cleaned per-session CSV files
├── Objective1_SpectralExtraction/        # 200 Hz sampling, IIR LPF, & 128-pt FFT
├── Objective2_AnomalyIsolation/          # Gravity calibration & TinyML Autoencoder
├── Objective3_HybridClassification/      # Neuro-Symbolic SVM fusion, Relay, Buzzer & OLED
├── app.py                                # Live Streamlit telemetry dashboard
├── baseline_training.csv                 # Consolidated 66,344-sample training dataset
├── preprocess_dataset.py                # Dataset extraction & formatting script
├── generate_presentation_pdf.py         # Technical dossier & PDF generator
├── VibroShield_Project_Presentation_Guide.pdf # Project presentation reference
└── requirements.txt                     # Python dependencies

Quickstart

1. Firmware Upload

  1. Open the Arduino IDE.
  2. Ensure the board is set to ESP32 Dev Module and the proper COM port is selected.
  3. Open any of the modular sketch files:
    • Objective1_SpectralExtraction/Objective1_SpectralExtraction.ino
    • Objective2_AnomalyIsolation/Objective2_AnomalyIsolation.ino
    • Objective3_HybridClassification/Objective3_HybridClassification.ino
  4. Compile and flash the sketch to the ESP32.

2. Streamlit Live Dashboard

Install the required packages and run the dashboard:

pip install -r requirements.txt
python -m streamlit run app.py

Access the dashboard at http://localhost:8501. Connect to your ESP32's COM port for live streaming telemetry or switch to simulation mode for demonstration.


System Methodology

  1. Deterministic Acquisition: A 64-bit hardware timer fires every $5000\ \mu\text{s}$ (200 Hz) to sample the MPU6050 accelerometer.
  2. Dynamic Calibration & Filtering: An automatic boot calibration samples the initial resting state to remove Earth's static $1\text{g}$ gravity vector. An IIR low-pass filter ($f_c = 40\text{ Hz}$, $\alpha = 0.5568$) removes mechanical high-frequency noise.
  3. Spectral Transformation & Anomaly Scoring: 128 samples ($640\text{ ms}$ window) are processed through an in-place Cooley-Tukey Radix-2 FFT and evaluated by the TinyML autoencoder to compute the reconstruction error.
  4. Neuro-Symbolic Classification: The system evaluates peak dynamic acceleration against physical safety boundaries and linear SVM hyperplanes to categorize states into HEALTHY, WARNING, or CRITICAL.

About

Autonomous Edge Structural Health Monitoring & Anomaly Detection system using ESP32, TinyML Autoencoders, and Streamlit.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages