1335 Edge Review: Calculations and Power Optimization
1335.1 Learning Objectives
By the end of this chapter, you will be able to:
- Calculate Data Reduction: Apply formulas to compute bandwidth savings from downsampling, aggregation, and filtering
- Estimate Battery Life: Calculate average current draw and battery duration for different sampling strategies
- Analyze Latency Trade-offs: Quantify latency reduction benefits of edge versus cloud processing
- Perform Cost Analysis: Calculate total cost of ownership for edge versus cloud deployments
- Solve Practice Problems: Apply formulas to realistic IoT scenarios
1335.2 Prerequisites
Required Reading: - Edge Review: Architecture - Architecture patterns and decision frameworks - Edge Compute Patterns - Edge computing basics
Related Chapters: - Edge Review: Deployments - Real-world patterns - Edge Topic Review - Main review index
Edge computing is not just about where you process data - it is about quantifying the benefits. When your boss asks “Why should we invest in edge gateways?”, you need numbers:
- “We will reduce bandwidth costs by 95%”
- “Battery life increases from 45 days to 7 years”
- “Response time drops from 180ms to 5ms”
This chapter gives you the formulas and practice to make those calculations confidently.
1335.3 Key Formulas
1335.3.1 Data Volume Reduction
Total Data Reduction Ratio: \[R_{total} = \frac{V_{raw}}{V_{transmitted}}\]
Where:
- \(V_{raw}\) = Raw sensor data volume
- \(V_{transmitted}\) = Data sent to cloud after edge processing
Example: 10,000 samples/hour reduced to 10 aggregates/hour = 1000x reduction
1335.3.2 Bandwidth Savings
Daily Bandwidth Calculation: \[B_{daily} = N_{sensors} \times S_{sample} \times F_{rate} \times T_{hours}\]
Where:
- \(N_{sensors}\) = Number of sensors
- \(S_{sample}\) = Sample size (bytes)
- \(F_{rate}\) = Sampling frequency (samples/hour)
- \(T_{hours}\) = 24 hours
Aggregation Bandwidth: \[B_{aggregated} = N_{sensors} \times S_{aggregate} \times F_{aggregated} \times 24\]
Savings: \[Savings = \frac{B_{daily} - B_{aggregated}}{B_{daily}} \times 100\%\]
1335.3.3 Power Consumption
Battery Life Estimation: \[L_{battery} = \frac{C_{battery}}{I_{avg}} \times \frac{1}{D_{safety}}\]
Where:
- \(C_{battery}\) = Battery capacity (mAh)
- \(I_{avg}\) = Average current draw (mA)
- \(D_{safety}\) = Safety factor (0.8 typical)
Average Current with Sleep Modes: \[I_{avg} = \frac{(I_{sleep} \times T_{sleep}) + (I_{active} \times T_{active}) + (I_{tx} \times T_{tx})}{T_{total}}\]
Example:
- \(I_{sleep}\) = 0.01 mA (deep sleep)
- \(I_{active}\) = 25 mA (sensor read)
- \(I_{tx}\) = 120 mA (Wi-Fi transmit)
- If sleep 99% of time: \(I_{avg} \approx 0.01 + 0.25 + 1.2 = 1.46\) mA
1335.3.4 Latency Components
Total Edge Latency: \[L_{total} = L_{processing} + L_{network} + L_{queue}\]
Cloud Latency: \[L_{cloud} = L_{local} + L_{wan} + L_{cloud\_proc} + L_{wan} + L_{local}\]
Latency Reduction Benefit: \[Benefit = \frac{L_{cloud} - L_{edge}}{L_{cloud}} \times 100\%\]
1335.3.5 Cost Analysis
Total Cost of Ownership (TCO) for Edge: \[TCO_{edge} = C_{hardware} + (C_{maintenance} \times Y_{lifetime}) + (C_{energy} \times Y_{lifetime})\]
Cloud Cost: \[TCO_{cloud} = (C_{bandwidth} + C_{storage} + C_{compute}) \times Y_{lifetime}\]
Break-even Analysis: \[Year_{breakeven} = \frac{C_{hardware}}{(TCO_{cloud}/year) - (TCO_{edge}/year)}\]
1335.4 Data Reduction Strategies
1335.4.1 Sensor-Level Reduction Techniques
| Technique | Description | Reduction Factor | Power Impact |
|---|---|---|---|
| Lower Sampling Rate | Reduce from 1 Hz to 0.1 Hz | 10x | 10x battery life |
| Event-Driven Sampling | Transmit only on threshold breach | 100-1000x | 100x+ battery life |
| Simpler Sensors | Use binary instead of analog when sufficient | 10x data size | Varies |
| Delta Encoding | Transmit only changes, not absolute values | 2-5x | Minimal |
| Local Buffering | Batch multiple readings into single transmission | Variable | 2-10x (reduce TX) |
1335.4.2 Gateway-Level Reduction Techniques
| Technique | Description | Example | Typical Reduction |
|---|---|---|---|
| Downsampling | Reduce temporal resolution | 1 sample/min to 1/hour | 60x |
| Spatial Aggregation | Average nearby sensors | 10 sensors to 1 average | 10x |
| Temporal Aggregation | Compute hourly/daily statistics | Min/max/avg per hour | 100-1000x |
| Filtering | Remove outliers, noise, redundancy | Discard unchanged values | 2-10x |
| Compression | gzip, delta encoding, dictionary coding | Text logs to binary | 5-10x |
| Feature Extraction | Send derived metrics, not raw data | FFT coefficients instead of waveform | 10-100x |
1335.4.3 Combined Strategy Example
Scenario: 100 temperature sensors, 1 reading/minute
Without Edge Processing:
- 100 sensors x 60 readings/hour x 4 bytes = 24,000 bytes/hour
- Daily: 576,000 bytes (562 KB)
- Monthly: 16.9 MB
With Edge Processing:
- Evaluate: Remove 5% invalid readings - 95 readings/hour/sensor
- Aggregate: Compute hourly min/max/avg - 3 values/hour/sensor
- Format: Compress to binary - 2 bytes/value
- Result: 100 sensors x 3 values/hour x 2 bytes = 600 bytes/hour
- Daily: 14,400 bytes (14 KB)
- Reduction: 97.5% (40x)
1335.5 Power Optimization
1335.5.1 Current Consumption by Mode
| Device State | Current Draw | Typical Duration | Use Case |
|---|---|---|---|
| Deep Sleep | 0.01 mA | 99% of time | Battery-powered sensors |
| Light Sleep | 0.5 mA | Between readings | Quick wake-up needed |
| Active (CPU) | 25 mA | 1-10 seconds | Sensor reading, processing |
| Wi-Fi TX | 120 mA | <1 second | Cloud upload |
| Cellular TX | 200 mA | 1-5 seconds | Remote locations |
| LoRaWAN TX | 40 mA | <1 second | Long-range, low power |
1335.5.2 Battery Life Scenarios
Scenario 1: Aggressive Sampling (No Edge Intelligence)
- Sample every 10 seconds
- Transmit immediately via Wi-Fi
- Active time: 2s + 0.5s TX = 2.5s per cycle
- Cycles per day: 8,640
- Sleep time: ~21.6 hours
- \(I_{avg} = \frac{(0.01 \times 77400) + (25 \times 17280) + (120 \times 4320)}{86400} \approx 11\) mA
- Battery life (2000 mAh): 182 hours (7.6 days)
Scenario 2: Intelligent Edge Sampling
- Sample every 10 seconds locally
- Aggregate hourly at edge gateway
- Transmit once per hour via LoRaWAN
- Active time: 2s per 10s cycle (local), 1s TX per hour
- \(I_{avg} = \frac{(0.01 \times 79164) + (25 \times 17280) + (40 \times 24)}{86400} \approx 5.1\) mA
- Battery life (2000 mAh): 392 hours (16.3 days) - 2.1x improvement
Scenario 3: Event-Driven + Edge
- Monitor threshold locally
- Transmit only on 5 degree change (assume 2 events/day)
- Deep sleep 99.9% of time
- \(I_{avg} = \frac{(0.01 \times 86350) + (25 \times 48) + (40 \times 2)}{86400} \approx 0.03\) mA
- Battery life (2000 mAh): 66,667 hours (2,778 days / 7.6 years!)
1335.6 Practice Problems
1335.6.1 Problem 1: Bandwidth Calculation
Scenario: Smart building with 500 temperature sensors
- Each sensor: 4-byte reading
- Sampling rate: 1 reading/minute
- No edge processing (all data to cloud)
Calculate:
- Hourly data volume
- Monthly bandwidth (30 days)
- Annual cost if bandwidth = $0.10/GB
a) Hourly data volume: \[V_{hourly} = 500 \text{ sensors} \times 60 \text{ readings/hour} \times 4 \text{ bytes} = 120,000 \text{ bytes} = 117.2 \text{ KB/hour}\]
b) Monthly bandwidth: \[V_{monthly} = 117.2 \text{ KB/hour} \times 24 \text{ hours/day} \times 30 \text{ days} = 84,384 \text{ KB} = 82.4 \text{ MB}\]
c) Annual cost: \[Cost_{annual} = \frac{82.4 \text{ MB/month} \times 12 \text{ months}}{1000 \text{ MB/GB}} \times \$0.10 = \$0.099 \approx \$0.10\]
Note: Seems cheap, but multiply by thousands of buildings - significant cost
1335.6.2 Problem 2: Edge Reduction Benefits
Same scenario as Problem 1, but with edge gateway:
- Gateway aggregates to hourly min/max/avg (3 values/sensor/hour)
- Each aggregate value: 4 bytes
Calculate:
- New hourly data volume
- Reduction factor
- Annual cost savings
a) New hourly volume: \[V_{edge} = 500 \times 3 \times 4 = 6,000 \text{ bytes} = 5.86 \text{ KB/hour}\]
b) Reduction factor: \[R = \frac{120,000}{6,000} = 20x \text{ reduction}\]
c) Annual cost: \[Cost_{edge} = \frac{5.86 \text{ KB} \times 24 \times 30 \times 12}{1,000,000} \times \$0.10 = \$0.005\]
Savings: $0.10 - $0.005 = $0.095 per building/year
For 1000 buildings: $95/year savings (plus reduced cloud processing costs)
1335.6.3 Problem 3: Battery Life Optimization
ESP32 environmental sensor:
- Battery: 3000 mAh
- Deep sleep: 0.01 mA
- Active: 30 mA for 3 seconds
- Wi-Fi TX: 150 mA for 0.5 seconds
Compare battery life for:
- Transmit every 1 minute
- Aggregate 10 readings, transmit every 10 minutes
- Event-driven: transmit only on 10% change (assume 1 event/hour)
a) Every 1 minute:
- Cycles/day: 1440
- Active time: 1440 x 3s = 4320s
- TX time: 1440 x 0.5s = 720s
- Sleep time: 86400 - 4320 - 720 = 81360s
\[I_{avg} = \frac{(0.01 \times 81360) + (30 \times 4320) + (150 \times 720)}{86400} = \frac{813.6 + 129,600 + 108,000}{86400} = 2.76 \text{ mA}\]
Battery life: \(3000 / 2.76 = 1087\) hours = 45 days
b) Every 10 minutes:
- Cycles/day: 144
- Active time: 144 x 3s x 10 readings = 4320s (same local sampling)
- TX time: 144 x 0.5s = 72s
- Sleep time: 86400 - 4320 - 72 = 81,808s
\[I_{avg} = \frac{(0.01 \times 81808) + (30 \times 4320) + (150 \times 72)}{86400} = 1.635 \text{ mA}\]
Battery life: \(3000 / 1.635 = 1835\) hours = 76 days (1.7x improvement)
c) Event-driven (24 TX/day):
- Active for local monitoring: 1440 x 3s = 4320s
- TX time: 24 x 0.5s = 12s
- Sleep time: 86400 - 4320 - 12 = 82068s
\[I_{avg} = \frac{(0.01 \times 82068) + (30 \times 4320) + (150 \times 12)}{86400} = 1.521 \text{ mA}\]
Battery life: \(3000 / 1.521 = 1972\) hours = 82 days (1.8x improvement)
Key insight: TX dominates power budget, minimize transmissions for longest life
1335.6.4 Problem 4: Latency Analysis
Industrial control system:
- Local edge: 5ms processing
- Cloud: 80ms WAN + 20ms processing + 80ms WAN = 180ms round-trip
Questions:
- What percentage latency reduction does edge provide?
- If control loop requires <50ms response, which architecture works?
- For 10,000 control decisions/day, how much total time saved by edge?
a) Latency reduction: \[Reduction = \frac{180 - 5}{180} \times 100\% = 97.2\%\]
b) Architecture selection:
- Edge: 5ms (meets <50ms requirement)
- Cloud: 180ms (exceeds requirement)
- Only edge architecture is viable
c) Total time saved: \[Savings = (180 - 5) \text{ ms} \times 10,000 = 1,750,000 \text{ ms} = 29.2 \text{ minutes/day}\]
Over a year: 29.2 x 365 = 10,658 minutes (177.6 hours) saved
1335.6.5 Problem 5: Data Reduction Ratio
A sensor transmits 100 bytes every 10 seconds. An edge gateway aggregates to hourly averages (50 bytes). What is the data reduction ratio?
Raw data per hour: \[V_{raw} = 100 \text{ bytes} \times \frac{3600 \text{ s}}{10 \text{ s}} = 100 \times 360 = 36,000 \text{ bytes}\]
Aggregated data per hour: \[V_{aggregated} = 50 \text{ bytes}\]
Reduction ratio: \[R = \frac{36,000}{50} = 720x\]
The edge gateway achieves a 720x data reduction.
1335.6.6 Problem 6: Average Current Draw
An ESP32 device consumes 0.01 mA in deep sleep, 80 mA when transmitting (1 second), and sleeps 99% of the time. What is the average current draw?
Time allocation per 100 seconds:
- Sleep: 99 seconds at 0.01 mA
- Transmit: 1 second at 80 mA
Average current: \[I_{avg} = \frac{(0.01 \times 99) + (80 \times 1)}{100} = \frac{0.99 + 80}{100} = \frac{80.99}{100} = 0.81 \text{ mA}\]
Average current draw: 0.81 mA
With a 2000 mAh battery: \(2000 / 0.81 = 2469\) hours = 103 days
1335.7 Summary and Key Takeaways
1335.7.1 Essential Formulas
| Calculation | Formula | Typical Result |
|---|---|---|
| Data Reduction | \(R = V_{raw} / V_{transmitted}\) | 10-1000x |
| Bandwidth Savings | \((B_{raw} - B_{edge}) / B_{raw}\) | 90-99% |
| Battery Life | \(C_{battery} / I_{avg}\) | Days to years |
| Latency Reduction | \((L_{cloud} - L_{edge}) / L_{cloud}\) | 80-99% |
1335.7.2 Key Insights
- Transmission dominates power - Minimize TX events for longest battery life
- Aggregation is powerful - Hourly aggregates achieve 60-1000x reduction
- Event-driven is optimal - Only transmit on significant changes for years of battery life
- Latency matters for safety - Edge provides 95%+ latency reduction for critical applications
- TCO analysis requires both CapEx and OpEx - Edge has upfront costs, cloud has ongoing costs
1335.8 What’s Next
Continue your edge computing review with:
- Edge Review: Deployments - Real-world deployment patterns, technology stack, and security considerations
Return to: Edge Topic Review - Main review index