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

foundations
math-foundations
calculation-audit
bluetooth-ble
Ada 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.

Try

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.

Observe

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.

Explain

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.

Advertising Rate changes advertising-only life A three-part teaching diagram connects advertising rate, the rule life = 1000 mAh / (0.576 mAh/day x rate), and advertising-only life. INPUT Advertising rate APPLY THE RULE predict calculate check units OUTPUT RESULT
Walk the arrow. Ten times as many bursts use ten times the daily charge.

Derive the baseline in four named moves

  1. 1

    Name the input. The chapter baseline is 1 events/s.

  2. 2

    Name the relationship. life = 1000 mAh / (0.576 mAh/day x rate)

  3. 3

    Substitute with units. 1000 / (0.576 x 1) = 1,736 days

  4. 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.

1 events/s
Chapter baseline
Advertising-only life

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?
Answer: Predict its direction, apply the displayed relationship, keep the units, and compare the reset value with the chapter’s worked baseline.
What does this small model leave out?
Answer: Only advertising rate moves here. The advertising-only life calculation excludes field effects listed below.

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: window 2 / 0.3 - 1 = 6.6667 - 1 = 5.6667, about 6 samples; response -ln(0.05) / (0.3 x 1) = 2.9957 / 0.3 = 9.986 s, about 10 s.
  • alpha = 0.1: window 2 / 0.1 - 1 = 19 samples; response 2.9957 / 0.1 = 29.96 s, about 30 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.