Start typing to search this publication.
techcirkle
Open menu

Subscribe to techcirkle

Get new posts delivered straight to your inbox.

Edge or Cloud? Inference on Battery-Powered Sensors

Where to run a model when the device has a ten-year battery and a byte-budgeted radio link. A decision rule and the OTA release process.

techcirkle
6 min read
Cover image for Edge or Cloud? Inference on Battery-Powered Sensors
Aerial view of water treatment tanks
Aerial view of water treatment tanks

The edge-versus-cloud question gets argued as an architectural preference. It is not. Two constraints decide it, and once you state them the answer for any given model is usually obvious.

The constraints are latency — does a human or an actuator need the answer faster than a round trip allows — and bandwidth — can you physically transmit the input data.

Everything else is commentary.

The split

At the edge:

  • Anything adjacent to a control loop. Burst detection that closes a valve, pump protection logic. A round trip to a cloud region is not an acceptable part of that path.

  • Anything that must work when the network does not. Field devices lose coverage routinely, and "the model stopped because the radio did" is not a safe failure mode.

  • Anything where raw sampling rates exceed what you can transmit. Acoustic and vibration data are the obvious cases — a logger sampling audio at kilohertz cannot ship raw samples over a low-power radio, so the feature extraction has to happen locally.

In the cloud:

  • Model training, always.

  • Anything needing data from more than one device. Network-wide hydraulic modelling, demand forecasting, cross-sensor correlation.

  • Long-horizon analysis and reporting.

That third edge case is the one people miss, and it is often decisive. If the input is high-rate, the model goes where the data is, regardless of how much easier cloud deployment would be.

The bandwidth arithmetic you should do first

Before picking a network, work out what your model actually needs.

A LoRaWAN uplink gives you on the order of tens of bytes per message with a duty cycle that permits a handful of messages per hour. For a ten-year battery you are budgeting a few messages per day.

Model needs minute-resolution flow:  1440 readings/day
LoRaWAN practical budget:            ~6 messages/day × ~40 bytes

→ Minute resolution is not transmittable. Either:
   (a) compute the feature on-device and send the result, or
   (b) use NB-IoT / cellular, or
   (c) change the model to work on hourly data.

Option (c) is more often correct than teams expect. A per-district leak detection model working on hourly flow performs nearly as well as one on minute data, because the signal is a persistent shift in baseline rather than a transient. Minute resolution matters for burst detection; for background leakage it is mostly noise.

The expensive mistake is committing to a low-power network and then discovering your model needs data it cannot carry, at which point you are replacing installed hardware.

What fits on the device

Edge inference here means small, fixed, well-tested models — often a few kilobytes of coefficients.

Realistic on a constrained MCU:

  • Thresholds with hysteresis and state (surprisingly effective for burst detection).

  • Small decision trees or a shallow gradient boosting ensemble, exported as plain arrays.

  • Fixed-window statistics: rolling median, interquartile range, exponentially weighted moving average.

  • A quantised neural net for acoustic feature extraction, if the device has the headroom.

Not realistic: anything needing a general tensor runtime on a device that is also trying to achieve a ten-year battery life.

The pattern that works is asymmetric. Training happens in the cloud on pooled data from the whole fleet; the edge runs inference with parameters pushed down. The device never trains.

OTA model updates are a release process

This is the part most often underestimated. Pushing a model to three thousand battery-powered devices on a low-bandwidth network is a software release to an environment where you cannot easily intervene.

Treat it accordingly:

  • Version everything. Every device reports its active model version with its telemetry. Without that you cannot attribute a change in behaviour to a deployment.

  • Stage the rollout. One device, then ten, then a district, then the fleet. Pause between stages and compare the new cohort's outputs against the old.

  • Keep the previous version resident. Rollback must be a local decision the device can make, not a second download, because the reason you are rolling back may be that the device is now misbehaving.

  • Budget the download. A model update that consumes a month of radio budget is not deployable. If the parameter set does not fit in a reasonable number of messages, the model is too big for this fleet.

  • Add a watchdog. If the new model produces no output or implausible output for N cycles, the device reverts on its own.

A fleet-wide bad model push is the failure mode that costs a project its credibility, and it is entirely preventable with staging.

Sensor health belongs at the edge too

A quietly important point. Field instruments drift — probes foul, electrodes age, flow meters lose calibration.

A naive system reports drift as a measurement event, which produces false alarms and eventually desensitises everyone. The device itself is well placed to track its own residual behaviour and flag "I think I am the problem," which is a different alert class entirely and should be routed to calibration scheduling rather than to operations.

Modelling instrument health as a first-class concern alongside the actual measurement is what determines whether anyone trusts the data. The same pattern appears in vision systems, where the equivalent failure is a dirty lens being reported as a detection, as covered in computer vision development for business.

A decision checklist

  1. Does an actuator or a safety decision depend on the output? → Edge.

  2. Must it work without connectivity? → Edge.

  3. Does the input exceed your radio budget? → Edge, or change the network, or change the model.

  4. Does it need data from other devices? → Cloud.

  5. Is it training? → Cloud, always.

  6. Otherwise? → Cloud, because deployment and iteration are far cheaper there.

The broader system architecture — time-series platform, SCADA integration, phasing and cost — is in TechCirkle's guide to smart water systems, and the platform side is covered in our cloud application development guide.

Frequently Asked Questions

What decides whether a model runs at the edge or in the cloud?

Latency and bandwidth. If an actuator or safety decision depends on the output, or it must work without connectivity, or the input data exceeds what the radio link can carry, it runs at the edge. Otherwise the cloud is cheaper to deploy to and iterate on.

Why can't high-rate sensor data be sent to the cloud?

Low-power radio links like LoRaWAN permit on the order of tens of bytes per message a few times a day if a multi-year battery life is required. Acoustic or vibration sampling at kilohertz rates exceeds that by orders of magnitude, so feature extraction must happen on the device.

What kinds of models fit on a constrained field device?

Thresholds with hysteresis and state, small decision trees or shallow gradient boosting ensembles exported as plain arrays, fixed-window statistics, and quantised neural nets for feature extraction where there is headroom. Anything requiring a general tensor runtime is usually impractical alongside a long battery life target.

How should over-the-air model updates be managed?

As a staged software release. Report the active model version with telemetry, roll out to one device then a cohort then the fleet, keep the previous version resident locally for rollback, budget the download against the radio allowance, and add a watchdog that reverts on implausible output.

Do edge devices train their own models?

No. Training happens in the cloud on pooled fleet data, and only parameters are pushed down. On-device training is impractical on constrained hardware and makes fleet behaviour impossible to reason about or reproduce.

Should sensor drift detection run on the device?

Yes, where possible. A device tracking its own residual behaviour can flag itself as the likely problem, which is a different alert class from a genuine measurement event and should route to calibration scheduling rather than operations. Treating drift as a measurement event causes false alarms and erodes trust.

Subscribe to techcirkle