Early Bushfire Detection on IoT Sensors (GMM-VAE)
Unsupervised GRU/GMM-VAE on eCO₂ and TVOC with experiment-level detection under 10 minutes. Hybrid on-node version integrates a Fourier front end (STFT-CNN-GRU-VAE) within the device budget.
Outcomes
- Experiment-level hit rate 100 percent in burn trials with average first detection about 6 minutes
- Low background false positive rate on windowed background
- On-node hybrid with STFT-CNN-GRU-VAE that fits memory and compute limits
If you are new to the project, the short version: train unsupervised on background air, then flag fire as an anomaly. The base model is a GRU VAE on short windows of eCO₂ and TVOC. The hybrid adds a Fourier front end and a small CNN before the GRU, and it still runs on the node.
Method
Signals. eCO₂ and TVOC at 1 Hz. These gave the strongest and most consistent response across trials.
Windowing. Sliding windows sized to keep latency low and stability high. I also add first differences so the model sees trend and rate, not just level.
Scaling. Robust scaling per window using median and IQR so outliers do not dominate.
Base model. GRU encoder into a VAE latent with a mixture prior. In practice a single effective mode worked best on background data. Score is negative ELBO or reconstruction probability. A single threshold creates an alarm.
Decision rule. One true positive per burn. After ignition the first hit inside a fixed window counts for that experiment. This mirrors real use.
Data and evaluation
Training uses background only. Testing uses post-ignition windows from burn experiments. Metrics are experiment-level hit rate, background false positives on windowed background, and latency to first hit. This handles uncertain labels and warm-up and makes results easy to compare.
Results
- Hit rate: 100 percent of burn experiments fired at least once
- Average first detection: about 362 s which is about 6 minutes
- Background false positive rate: about 0.033 percent on windowed background
- Best simple setup: short window, small GRU, small latent
The mixture prior added complexity for little gain here. A simple VAE prior is a good next step for embedded.
Hybrid on-node: STFT-CNN-GRU-VAE
The goal was to integrate a Fourier front end into the on-device model without breaking the memory and power budget.
Front end. Short-time Fourier transforms on each channel.
- Compute short windows with overlap using a light window function.
- Use magnitude spectra and log scaling to stabilise ranges.
- Stack channels to form a small two channel spectrogram. First differences can be added as extra channels if needed.
CNN feature extractor.
- A compact 2D CNN with a few conv blocks reduces the spectrogram to a small feature map.
- Global average pooling turns that into a frame vector that is stable and compact.
Temporal model and latent.
- A GRU reads the frame sequence and produces VAE parameters for a small latent.
- The decoder reconstructs the spectrogram or the original signals depending on the objective.
- Score is negative ELBO or reconstruction error with a simple threshold and a short debounce to avoid chatter.
Why bring STFT on device.
- The Fourier view captures burst shape and recovery that are hard to express with short raw windows.
- The CNN learns local time-frequency patterns. The GRU keeps timing across frames.
- With a small FFT and tight convs this fits on the MCU with room for sensors and comms.
Notes on implementation.
- Use fixed point or int8 quantisation for the CNN and GRU.
- Reuse STFT buffers and overlap to keep RAM flat.
- Keep FFT sizes small and powers of two so the kernel is fast on the target.
Hardware implementation
MCU and radio. STM32WLE5 class MCU with LoRaWAN AU915, class A, OTAA.
Sensors. SGP30 for eCO₂ and TVOC, BME680 for temperature, humidity, and pressure.
Sampling. 1 Hz on device. Edge windows match the ML window so end to end timing is simple.
Power. Battery with sleep states and efficient regulators.
Comms. Adaptive uplink period. Slow when quiet. Short bursts when suspicious so you can watch the event as it develops.