EMA Smoothing Speed and a Beacon-Battery Flag
EMA Smoothing Speed and a Beacon-Battery Flag
Ada re-derives this chapter’s own numbers step by step, at full precision
ADA · CALCULATION AUDIT
EMA Smoothing Speed and a Beacon-Battery Flag
A retail-analytics beacon with a 1000 mAh battery advertising at 1 Hz draws 8 mA for 3 ms across its 86,400 daily events, which works out to 0.576 mAh/day and about 1,736 days of life from advertising alone. Raise the rate 10× to 10 Hz and that collapses to roughly 174 days. This audit re-derives the cascade — and the EMA settling times behind it — and asks whether it is the advertising rate, not the 8 mA peak, that turns a years-scale maintenance interval into a months-scale one.
Companion to the chapter BLE in Python with Bleak — every number here comes from that chapter.
A retail-analytics beacon with a 1000 mAh battery advertising at 1 Hz draws 8 mA for 3 ms across its 86,400 daily events, which works out to 0.576 mAh/day and about 1,736 days of life from advertising alone. Calculate this case.
This audit re-derives the cascade — and the EMA settling times behind it — and asks whether it is the advertising rate, not the 8 mA peak, that turns a years-scale maintenance interval into a months-scale one. Check shows this.
The beacon-battery cascade is where units demand care: mA x seconds is a charge in mA-seconds, and converting to mAh divides by 3,600 -- not by 1,000, which is the classic slip. Re-deriving: 8 x 0.003 x 86,400 = 2,073.6 mA-s = 2,073.6 / 3,600 = 0.576 mAh/day, so advertising alone allows 1,000 mAh / 0.576 = 1,736 days at 1 Hz, and one tenth of that, 173.6 days, at 10 Hz. Theadvertising cadence, not the peak current, is the maintenance lever. Check confirms it.
See the relationship before changing it
The figure reads from left to right. The blue input is advertising rate. The middle card names the page’s rule. The green output is advertising-only life. The arrow matters: change the input, apply the rule once, then read the result with its unit.
Derive the baseline in four named moves
- 1
Name the input. The chapter baseline is 1 events/s.
- 2
Name the relationship. life = 1000 mAh / (0.576 mAh/day x rate)
- 3
Substitute with units. 1000 / (0.576 x 1) = 1,736 days
- 4
Read the result. Keep the unit beside the value, then use the result only inside the technical boundary below.
Predict, then change advertising rate
Try Predict how advertising-only life responds when advertising rate moves. Calculate advertising rate; compare advertising-only life with that prediction.
Observe Return to 1 events/s. Recheck advertising-only life with advertising rate at its chapter value.
Explain Ten times as many bursts use ten times the daily charge.
Check yourself
What should you do before trusting a moved-slider result?
What does this small model leave out?
Technical boundaries
Beyond the scope of “EMA Smoothing Speed and a Beacon-Battery Flag” sit irregular scan timing, missing advertisements, multipath, OS scheduling, battery chemistry, or temperature-dependent discharge; “EMA Smoothing Speed and a Beacon-Battery Flag” therefore reports only its named fixtures.
Ada: This chapter makes two kinds of numeric claim: how fast the EMA filter reacts, and how long a beacon battery lasts. Both check out, and the battery cascade deserves a careful re-derivation because its units are easy to slip on.
The EMA effective window and 95% response time, sampling at 1 Hz:
alpha = 0.3: window2 / 0.3 - 1 = 6.6667 - 1 = 5.6667, about6samples; response-ln(0.05) / (0.3 x 1) = 2.9957 / 0.3 = 9.986 s, about10 s.alpha = 0.1: window2 / 0.1 - 1 = 19samples; response2.9957 / 0.1 = 29.96 s, about30 s.
Both match the chapter and confirm the tradeoff: dropping alpha from 0.3 to 0.1 roughly triples both the averaging window and the settling time.
The beacon-battery cascade is where units demand care: mA x seconds is a charge in mA-seconds, and converting to mAh divides by 3,600 – not by 1,000, which is the classic slip. Re-deriving: 8 x 0.003 x 86,400 = 2,073.6 mA-s = 2,073.6 / 3,600 = 0.576 mAh/day, so advertising alone allows 1,000 mAh / 0.576 = 1,736 days at 1 Hz, and one tenth of that, 173.6 days, at 10 Hz. The design meaning: at a 0.2% duty cycle the radio burst is barely the story – it is the 10x advertising rate, not the 8 mA peak, that moves a beacon from a years-scale to a months-scale maintenance interval.
Every number above is taken from the chapter’s own material and re-derived step by step.