Gas leaks can be dangerous but hard to detect. This project aims to use edge AI to provide low-latency, accurate detection of gas leaks. In particular, these are propane, butane and natural gas.
It is also possible to detect indicative gases such as H2S.
Interpreting gas sensor resistances is complex and may require specialized knowledge in electrochemical sensor behaviors. Resistance of the sensing element is nontrivially influenced by ambient conditions, and even past gas exposure events. As such, this situation provides an opportunity to utilize ML techniques to interpret the data.
This project utilizes the BSEC software (which runs on the microcontroller) to run the associated signal processing/fusion and ML model. Refer to Figure 1 below for the confusion matrix and F1 scores:
Figure 1: Confusion matrix and F1 scores (LP)
The model was trained with low concentrations of butane, propane, etc.1 at room temperature/pressure at (or above) their respective Lower Explosive Limit (LEL). The model runs every 73.36s with a duty cycle of 25%.
During training, the sensor was exposed to the following mixtures/gases:
Mixture/Gas | Class |
---|---|
Outdoor Air | Baseline |
Indoor Air (Normal) | Baseline |
Indoor Air (A/C) | Baseline |
Indoor Air (Cooking) | Baseline |
Perfumes | Baseline |
Expired Air | Baseline |
LPG Mix | Gas Leak |
Butane | Gas Leak |
Additionally, for each
where the undefined intervals are transition (i.e. ramp-up/down) periods. This heater activity is responsible for the majority of the power consumption (>12mA), where other loads (i.e. microcontroller+RF) are negligible. Hence, the battery life is almost directly proportional to the measurement duty cycle. For this particular application, a duty cycle of 25% was found to yield a good balance between response time (73.36s) and power consumption (avg. 2.1mA).
Note that if USB power is detected at startup, a 100% duty cycle high performance model will be loaded instead.
For this particular application, it is vital that warning latencies are kept low. This project provides on-device inference, which allows for rapid reaction to events, and low data transmission overhead.
Additionally, the device has a low-latency Thread network connection (compared to BLE/Zigbee) for offsite notifications and action triggering, which is also low-power, allowing for operation either from USB power, or from AA batteries.
The power consumed by the stepwise heater function accounts for the majority of the system power consumption. The system quiescent current IQ by design is stated below:
Which is reflected in measurements.
Figure 2: GasSentinel Custom Board and Enclosure
The algorithms described above are run the onboard EFR32MG24 series microcontroller, with integrated 802.15.4 radio for Thread communications.
The application layer overview for the microcontroller software can be found in Figure 3:
Figure 3: Application-Layer Block Diagram (Microcontroller)
The device will also send the inference results and other metadata over CoAP to InfluxDB for backend integration and data analytics/visualization.
Figure 4: Messaging Sequence Diagram
The qualitative results of the low-power classifier are shown in Figure 5, over a period of approx. 2h, the device was subjected to 3 periods of the positive class (Gas Leak), denoted by the "Ground Truth" label.
In general, the model has a recovery period of minimally a few cycles, after being exposed to the positive class. Some of this behavior can be attributed to the behaviors of the MOx element. In particular, the first instance of the positive class in Figure 5 shows that the recovery time is much greater after exposure to high concentrations of gas.
It is notable that in all instances, (correct) detection occured within one cycle (i.e. 73.36s), satisfying the objective of rapid classification.
Figure 5: Qualitative results of the low-power classifier