Energy & Power · Study deck
ACE and Shared Context Sensing
Picture three phone apps waking the same motion sensor for the same answer.
Battery Bruno is your guide for this deck.

After studying this chapter
Learning objectives
You will be able to:
- Explain: Planning should change the sensor order, not merely rename an always-sense baseline. Figure: Normalised energy bars compare baseline compares that baseline with exhaustive and heuristic choices across four users.
- Explain: This recurrence explains why “always choose the cheapest sensor first” can fail: a cheap sensor whose result rarely resolves the query merely adds its own cost before the expensive fallback.
- Explain: The bars show that context names conceal different sensing costs: walking and driving can share a low-cost motion source, while meeting or working inference activates more expensive inputs.
Major section
Start With One Shared Fact
A broker means a service that receives information and passes it to the right users or systems.
- This proves one shared context rule, not every privacy or accuracy case; the deeper sections cover the ACE roles, planning, inference, reuse, and limits.
- If one sensor reading can answer several questions, repeating the same sensing work wastes energy.
- Ownership, freshness, correlation, and validation decide whether shared context is an energy saving or a stale shortcut.
Major section
Shared Context Sensing
The cached value is not just a raw answer; it is an evidence record.
- Several applications can reuse a result at near-zero lookup cost only when the cached record still satisfies their purpose.
- A location tracker may tolerate an older estimate than a safety rule, so reuse is approved per consumer contract.
Major section
Cross-App Context Correlations
ACE becomes more powerful when it can infer one context attribute from another.
- Confidence tells whether the rule is reliable when the antecedent is true.
- A rare rule with high confidence may still be useful for a niche event; a common rule with weak confidence should not drive high-consequence decisions.
Major section
Cross-App Context Correlations (continued)
A rule observed twice in a month should not control an energy policy without more evidence.
- Their relationship shows which part of the claim still needs evidence.
- The next checkpoint: Candidates, adds a distinct review condition, while if-then rules adds a distinct review condition.
- An old Driving = true value should not infer current location.
Major section
Cross-App Context Correlations (continued)
Together those labels show that no-panel ACE rule mining gates showing observed context history, candidate rules, support filter, confidence filter, consequence threshold, and accepted rule set.
- Fallback gate: Every rule needs a direct sensing or conservative fallback when confidence drops, the context changes, or validation detects drift.
- Planning should change the sensor order, not merely rename an always-sense baseline. Figure: Normalised energy bars compare baseline compares that baseline with exhaustive and heuristic choices across four users.
- For Ada the exhaustive plan is 31 and the heuristic plan is 38; for Ben they are 42 and 47.
Major section
Sensing Planner
Value is fresh, trusted, and allowed for this consumer.
- Stale context can silently make the wrong policy look cheap.
- Rule confidence clears the threshold and the proxy is cheaper than target sensing.
- The proxy may drift when user behavior or deployment patterns change.
- A low-power sensor can update a rule antecedent before using an expensive target sensor.
Major section
Sensing Planner (continued)
Proxy sensing can become wasted work if the proxy is weak.
- Cache and inference fail, or the decision needs direct evidence.
- The bars show that context names conceal different sensing costs: walking and driving can share a low-cost motion source, while meeting or working inference activates more expensive inputs.
- The planner should also record the rejected options.
Major section
Sensing-Planner Complexity and a Practical Heuristic
A conditional sensing plan is a decision tree.
- Each internal node either tests a cached attribute, wakes a sensor, or runs an inference; each outgoing edge represents a possible result.
- The planner's job is to find a tree that minimizes expected energy without violating those correctness gates.
- At a terminal leaf, J=0 only when the available evidence is sufficient to answer.
Major section
Sensing-Planner Complexity and a Practical Heuristic (continued)
Exact optimal decision-tree and related sensing-plan formulations contain known NP-hard problems.
- This recurrence explains why “always choose the cheapest sensor first” can fail: a cheap sensor whose result rarely resolves the query merely adds its own cost before the expensive fallback.
- Outcome probabilities must come from representative traces; invented confidence values only make the optimizer precisely wrong.
- In production, re-plan when energy costs, cache-hit rates, or correlations drift.
Major section
Sensing-Planner Complexity and a Practical Heuristic (continued)
With n optional attributes there are already 2n possible subsets, n! possible full orderings, and a branch can expose a different remaining choice after every outcome.
- That statement applies to the general planning problem; a small, constrained instance can still be searched exactly.
- The planner is an adaptive policy built from evidence, not a one-time static ordering of sensors.
- Otherwise that branch must pay for another test or fall back to the authoritative sensor.
Deck summary
Key takeaways
A broker means a service that receives information and passes it to the right users or systems.
- The cached value is not just a raw answer; it is an evidence record.
- ACE becomes more powerful when it can infer one context attribute from another.
- A rule observed twice in a month should not control an energy policy without more evidence.
- Together those labels show that no-panel ACE rule mining gates showing observed context history, candidate rules, support filter, confidence filter, consequence threshold, and accepted rule set.
Retrieval practice
Recall check 1 of 5

Battery Bruno says: answer from memory, then check your reasoning.
Q1App A sensed Walking=true 45 seconds ago with a TTL of 120 seconds and confidence 0.94. App B now requests Walking for a low-consequence activity summary with minimum confidence 0.80. What should an ACE-style broker do?
Show answer
Answer: B ACE cache reuse is allowed when the context value is fresh, trusted, permitted, and adequate for the requesting decision.
Retrieval practice
Recall check 2 of 5

Battery Bruno says: answer from memory, then check your reasoning.
Q2How should the team treat this rule in the lighting control decision?
Show answer
Answer: B Rule promotion depends on support, confidence, freshness, and consequence.
Q3What learns supported relationships that can avoid a direct sensor read under thresholds?
Show answer
Answer: A It learns supported relationships that may replace a direct sensor read under explicit thresholds.
Retrieval practice
Recall check 3 of 5

Battery Bruno says: answer from memory, then check your reasoning.
Q4Four subsystems each need the same occupancy context once a minute. What makes a shared inference cache save energy compared with each subsystem sensing on its own?
Show answer
Answer: D The first reader pays the full sensing cost and populates the cache; while the value stays fresh, the remaining readers reuse it with cheap lookups.
Retrieval practice
Recall check 4 of 5

Battery Bruno says: answer from memory, then check your reasoning.
Q5A full context sense costs 0.34 mA-s and a cache hit costs 0.016 mA-s. At a cache hit rate of 80%, what is the average energy per request?
Show answer
Answer: A The blend weights the cheap lookup by the hit rate and the full sense by the miss rate: 0.0128 + 0.068 = 0.081 mA-s. That is about 4.2x cheaper than always sensing (0.34 mA-s).
Retrieval practice
Recall check 5 of 5

Battery Bruno says: answer from memory, then check your reasoning.
Q6Several components request the same context about every 5 s. An engineer shortens the cache validity window from 60 s to 2 s hoping for fresher context, and battery life gets much worse. Why?
Show answer
Answer: B Freshness is the knob that sets the hit rate.
Print reference
Answers 1 of 2
Answer key.
- B · ACE cache reuse is allowed when the context value is fresh, trusted, permitted, and adequate for the requesting decision.
- B · Rule promotion depends on support, confidence, freshness, and consequence.
- A · It learns supported relationships that may replace a direct sensor read under explicit thresholds.
- D · The first reader pays the full sensing cost and populates the cache; while the value stays fresh, the remaining readers reuse it with cheap lookups.
Print reference
Answers 2 of 2
Answer key.
- A · The blend weights the cheap lookup by the hit rate and the full sense by the miss rate: 0.0128 + 0.068 = 0.081 mA-s. That is about 4.2x cheaper than always sensing (0.34 mA-s).
- B · Freshness is the knob that sets the hit rate.