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.
- 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.
| 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 |
├── 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
- Open the Arduino IDE.
- Ensure the board is set to ESP32 Dev Module and the proper COM port is selected.
- Open any of the modular sketch files:
Objective1_SpectralExtraction/Objective1_SpectralExtraction.inoObjective2_AnomalyIsolation/Objective2_AnomalyIsolation.inoObjective3_HybridClassification/Objective3_HybridClassification.ino
- Compile and flash the sketch to the ESP32.
Install the required packages and run the dashboard:
pip install -r requirements.txt
python -m streamlit run app.pyAccess the dashboard at http://localhost:8501. Connect to your ESP32's COM port for live streaming telemetry or switch to simulation mode for demonstration.
-
Deterministic Acquisition: A 64-bit hardware timer fires every
$5000\ \mu\text{s}$ (200 Hz) to sample the MPU6050 accelerometer. -
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. -
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. -
Neuro-Symbolic Classification: The system evaluates peak dynamic acceleration against physical safety boundaries and linear SVM hyperplanes to categorize states into
HEALTHY,WARNING, orCRITICAL.