Why Run AI Inside the Meter?

Traditional ultrasonic meters measure, store and transmit. The intelligence lives in back-end systems: the head-end server processes readings, a data lake runs analytics, and alarms are generated days or weeks after the event. For time-critical conditions — a burst pipe, a tamper attempt, a failing transducer — this latency is unacceptable.

Edge AI shifts the intelligence to the device itself. The AI inference engine runs on the same MCU that already drives the ultrasonic transducers, consuming less than 1 mW of additional power. The result: decisions happen in microseconds, locally, without sending a single byte to the cloud.

Core principle: The ultrasonic module already captures a continuous, high-resolution acoustic waveform. Every event in the pipe — a bubble, a crack, a flow anomaly, a calibration drift — leaves a distinctive signature in that signal. Edge AI reads those signatures in real time.

Ultrasonic Transducers raw waveform DSP Processing ToF, FFT, features Edge AI Inference MCU-class TinyML <1mW classify predict anomaly · calibration · tamper · flow regime Output M-Bus / NB-IoT events + readings Utility Head-End optional Detection latency: microseconds on-device vs. hours/days in cloud analytics

The Raw Data Available Inside the Module

Before listing what AI can analyse, it helps to understand what data the module actually captures. Most utility meters discard 99% of this information and transmit only the final volume reading. Edge AI uses all of it.

The 8 Classes of Edge AI Analysis

Each class below is a category of on-device inference that becomes possible when a trained ML model runs alongside the ultrasonic measurement engine.

Anomaly Detection

01 — Pipe Leak & Burst Detection

Acoustic turbulence from a leak creates distinctive waveform perturbations invisible to simple flow threshold logic. An LSTM or convolutional model trained on labelled leak waveforms detects micro-leaks at flow rates below the meter's Q_min — events a cloud system would never see because the meter wouldn't even report a reading.

Tamper Detection

02 — Physical & Magnetic Tamper

Magnet attacks on mechanical meters are well-known. Ultrasonic meters are immune to magnetic interference, but physical manipulation — tilting, flow reversal injection, acoustic jamming — all produce specific acoustic signatures. A classifier running on-device flags these events with timestamps and certainty scores in real time, triggering immediate encrypted alarms over NB-IoT or M-Bus.

Signal Classification

03 — Acoustic Signal Classification

The received ultrasonic waveform encodes information about the fluid and pipe that goes far beyond flow velocity. A multi-class CNN can simultaneously identify: flow regime (laminar vs turbulent), entrained air or gas bubbles, pipe material (steel, copper, PE, cast iron), internal scale or fouling layer thickness, and presence of solids or particulates — all from the same waveform the meter is already capturing.

Flow Regime Analysis

04 — Flow Profile & Regime Recognition

Standard ToF meters assume a specific flow profile (typically turbulent, fully developed). In reality, elbows, partially closed valves and short installation runs create distorted profiles that introduce systematic measurement errors. An edge AI model trained on velocity profile patterns applies real-time correction factors, improving accuracy by up to 1.5% in non-ideal installations without any additional hardware.

Predictive Maintenance

05 — Transducer Degradation Prediction

Transducer signal amplitude and SNR decay predictably as the coupling layer ages or the piezo element degrades. A regression model tracking SNR trend over time can predict transducer end-of-life 6–12 months in advance, enabling planned maintenance before measurement failure — converting reactive replacement into predictive asset management.

Self-Calibration

06 — Adaptive Drift Compensation

All measurement systems drift over time. For ultrasonic meters, drift sources include transducer coupling degradation, temperature-induced dimensional changes in the spool piece, and electronic component aging. An on-device Kalman filter or adaptive model continuously tracks these drift components and applies real-time compensation — maintaining measurement accuracy over a 15+ year service life without manual recalibration.

Consumption Intelligence

07 — Consumption Pattern & Demand Forecasting

The velocity time series contains rich behavioural information: daily usage patterns, peak demand hours, seasonal trends, anomalous consumption events. A lightweight time-series model running on-device builds a local consumption profile and detects deviations — catching continuous leakage (the "running toilet" signature), abnormal night flow, or sudden consumption spikes that indicate a burst or theft event, all without transmitting raw time-series data.

Smart Grid

08 — Demand-Response & Load Forecasting

In district heating, gas distribution and electricity networks, demand-response requires near-real-time consumption data at the meter edge. An on-device forecasting model predicts short-term demand (15-minute ahead) using local consumption history and temperature data. The meter can participate in grid demand-response programmes autonomously — adjusting reporting frequency, pre-computing aggregates and transmitting compact predictions rather than raw readings.

Data Inputs vs Analysis Outputs

The table below maps each raw data input to the analyses it enables and the value it delivers at the system level.

Raw Input Signal AI Analysis Output / Value
Ultrasonic waveform (time domain)Leak & turbulence detection, tamper classification, flow regime recognitionReal-time alarm, accuracy correction, theft prevention
ToF upstream / downstream pairDrift compensation, velocity profile correctionLong-term accuracy without recalibration
Signal amplitude & SNRTransducer health monitoring, fouling detectionPredictive maintenance, end-of-life warning 6–12 months ahead
Frequency spectrum (FFT)Pipe material classification, bubble content estimation, resonance detectionAutomatic installation commissioning, air purge detection
Flow velocity time seriesConsumption pattern analysis, micro-leak detection, demand forecastingNight-flow analysis, demand-response, revenue protection
Temperature (PT1000)Fluid density correction, thermal anomaly detectionImproved heat energy accuracy, district heating optimisation
Multi-signal fusionHolistic pipe health score, combined tamper + leak probabilitySingle confidence metric per measurement cycle

Hardware Constraints and Model Architecture

Running machine learning on MCU-class hardware demands radically different model architectures than cloud ML. The inference engine must fit within the memory and compute budget of the host microcontroller — typically an ARM Cortex-M4 or M33 core running at 64–168 MHz with 256–512 KB of SRAM.

<1mWAdditional power for AI inference on MCU hardware
<50KBTypical model size after quantisation (INT8)
<1msInference latency per measurement cycle
INT8Weight quantisation — 4× smaller than FP32
TinyMLFramework: TensorFlow Lite Micro or ONNX Runtime Micro
15yrTarget operational lifetime on 3.6V lithium cell

Model types used per analysis class

Key design constraint: All models must be quantised to INT8 (8-bit integer weights) to fit within MCU SRAM. This reduces accuracy by 1–3% compared to full-precision FP32 models, which is acceptable for most classification and anomaly detection tasks. For high-precision regression (drift compensation), FP16 or mixed-precision architectures are used where the MCU supports hardware FP16.

Training and Deployment Pipeline

On-device AI does not eliminate the need for cloud infrastructure — it relocates it from the inference path to the training path. Models are trained offline on labelled datasets, then quantised and compiled for the target MCU. Deployment is handled over the normal firmware update path (OTA via NB-IoT or direct M-Bus).

Training data sources

Deployment lifecycle

  1. Train and validate model on labelled dataset (Python, TensorFlow / PyTorch)
  2. Quantise to INT8 using TensorFlow Lite post-training quantisation
  3. Convert to C array using xxd or TFLite Micro converter
  4. Compile into firmware image with TFLite Micro runtime (<20 KB)
  5. Deploy via OTA firmware update — no hardware changes required
  6. Monitor inference confidence scores in field; retrain when distribution shift detected

Privacy and Security Implications

Running AI at the edge has significant privacy advantages over cloud analytics. Consumption data is among the most sensitive information a utility meter collects — hourly gas or water profiles can reveal occupancy patterns, daily routines and household size with high confidence.

Standards alignment: The edge AI architecture in Dualmicro modules is designed to align with the EU's forthcoming requirements under the Energy Efficiency Directive and the Smart Metering Mandate, which increasingly require on-device processing and privacy-by-design for AMI deployments.

Practical Results: What Changes in the Field

Moving from a traditional transmit-and-analyse architecture to edge AI + ultrasonic delivers measurable operational improvements across the utility value chain.

MetricTraditional AMREdge AI Ultrasonic
Leak detection latencyDays to weeks (batch analytics)Microseconds (on-device)
Tamper alarm latencyNext read cycle (15 min–24 hr)<1 second, encrypted NB-IoT push
Calibration driftUndetected until meter exchangeContinuous on-device compensation
False alarm rateHigh (threshold-based rules)Low (ML classifier, confidence-weighted)
Data volume transmittedHigh (interval profiles)Low (events + aggregates only)
Network dependencyRequired for all analyticsOptional — edge functions always active
Privacy exposureRaw consumption profiles in cloudAggregates only, GDPR by design

Integrating Edge AI into your metering hardware?

Dualmicro develops ultrasonic metering modules with embedded AI inference from the ground up — hardware design, embedded firmware, model integration and MID certification support. Let's discuss your application.

View Our Modules How Ultrasonic Works Discuss Your Project