14 Infrastructure-Leveraging Sensing
Key Concepts
- Structural Health Monitoring (SHM): Continuous or periodic measurement of structural response — strain, vibration, displacement, crack propagation — to detect damage, assess remaining service life, and prevent catastrophic failure
- Fiber Bragg Grating (FBG) Sensor: An optical fiber sensor where periodic refractive index variations reflect specific wavelengths proportional to strain and temperature; immune to electromagnetic interference, suitable for embedded concrete installations
- Acoustic Emission (AE) Sensor: Detects high-frequency stress waves (100 kHz - 1 MHz) generated when cracks form or grow in materials; provides early warning of fatigue crack initiation before visible damage appears
- Tiltmeter: A precision inclinometer measuring angular deviation from vertical; MEMS tiltmeters achieve sub-millidegree resolution; used for monitoring slope stability, building settlement, and dam deformation
- Corrosion Sensor: Electrochemical probes measuring instantaneous corrosion rate of metal structures; deployed in bridges, offshore platforms, and pipelines to schedule maintenance before structural compromise
- Distributed Sensing: Fiber optic sensing systems measuring temperature or strain continuously along the entire cable length — thousands of virtual sensors in a single optical fiber installation
- Wireless Sensor Node for Infrastructure: Battery or energy-harvesting powered nodes with sensing, processing, and wireless communication; must operate 5-10 years with minimal maintenance in outdoor temperature extremes and moisture
- Infrastructure Sensing: The use of sensors to monitor physical infrastructure condition — bridges, roads, buildings, pipelines, power grids — enabling predictive maintenance and safety monitoring at scale
Learning Objectives
After completing this chapter, you will be able to:
- Evaluate existing infrastructure for repurposing as sensing platforms
- Apply Wi-Fi CSI sensing techniques for presence and gesture detection
- Analyze power meter waveforms to identify individual appliances via NILM
- Design hybrid sensing systems that combine infrastructure signals with targeted dedicated sensors
14.1 Prerequisites
- Sensor Classification: Types of sensors
- Braitenberg Model: Sensor-behavior relationships
14.2 Infrastructure-Leveraging Sensing: Using What’s Already There
14.2.1 The Smart Approach: Don’t Deploy New Sensors, Use What Exists
Traditional IoT thinking: “We need temperature data -> Deploy temperature sensors.”
Infrastructure-leveraging thinking: “We need occupancy data -> Use existing Wi-Fi routers.”
This paradigm shift–leveraging existing infrastructure instead of deploying dedicated sensors–can reduce costs by 10-100x while providing area-wide coverage instead of point measurements.
For Beginners: The Free Sensor Revolution
Imagine you want to detect if someone is in a room. Traditional approach:
Deploy Dedicated Sensors ($$$):
- Buy PIR motion sensors ($15-150 each depending on installation and housing)
- Install wiring and power
- Calibrate and maintain batteries
- Get point measurements (one spot per sensor)
Leverage Infrastructure ($0):
- Use existing Wi-Fi router (already there!)
- Detect phone/device connections
- Get room-wide coverage
- No installation, no batteries, no maintenance
The Wi-Fi router becomes a “free” presence sensor. This is infrastructure-leveraging sensing–using existing devices as sensors.
14.3 Core Principle: Indirect Sensing via Existing Infrastructure
Instead of deploying new sensors, extract sensing information from infrastructure already in place:
| Infrastructure | Traditional Use | Sensing Capability | What It Measures |
|---|---|---|---|
| Wi-Fi Router | Internet connectivity | RSSI, CSI, device count | Presence, gestures, breathing, occupancy |
| Power Meter | Energy billing | Current waveform analysis | Appliance identification (NILM) |
| Cell Tower | Mobile calls/data | Handoff patterns, signal strength | Traffic density, crowd size, movement |
| Street Light | Illumination | Current draw, vibration | Pedestrian count, vehicle detection |
| Water Pipe | Water delivery | Acoustic vibrations | Leak detection, flow rate |
| HVAC Ducts | Climate control | Airflow patterns | Occupancy, room-level activity |
Key Insight: Every piece of infrastructure emits signals. We can sense the world by observing how the environment disturbs these signals.
14.4 Comparison: Deploy vs Leverage
| Dimension | Deploy Dedicated Sensors | Infrastructure-Leveraging |
|---|---|---|
| Upfront Cost | $10-100 per sensor point | $0 marginal cost (already installed) |
| Installation | Drilling, wiring, positioning | Software-only deployment |
| Coverage | Point measurements (discrete) | Area-wide coverage (continuous) |
| Maintenance | Battery replacement, calibration | Minimal (infrastructure already maintained) |
| Privacy | Obvious sensors (cameras visible) | Less intrusive (passive RF sensing) |
| Accuracy | High (purpose-built) | Moderate (indirect inference) |
| Latency | Immediate (direct sensing) | May require processing (feature extraction) |
When to Choose What:
- Deploy sensors when: Accuracy critical, point measurement needed, safety-critical
- Leverage infrastructure when: Large-scale deployment, cost-sensitive, retrofit scenario, quick pilot
14.5 Example 1: Wi-Fi Sensing - Detecting Breathing and Gestures
Infrastructure: Standard Wi-Fi router (802.11n/ac/ax)
Sensing Capability: Channel State Information (CSI) captures how Wi-Fi signals propagate through space. Human movement, breathing, even heartbeat disturbs these signals.
What It Measures:
- Occupancy estimation: Device count gives headcount estimates (+/-15% accuracy at zone level using devices-per-person divisor)
- Presence detection: CSI-based binary detection (occupied vs. empty room, no device needed)
- Gesture recognition: Hand waves, swipes (85-95% accuracy)
- Breathing rate: Chest movement modulates signal (+/-2 breaths/min under controlled single-occupant, line-of-sight conditions; accuracy degrades with multiple occupants or movement)
- Fall detection: Sudden signal disruption pattern
Real Deployment:
- University dorms: Detect occupancy without cameras (privacy-preserving)
- Elderly care: Fall detection without wearables
- Smart homes: Gesture control of lights and appliances
14.6 Example 2: Non-Intrusive Load Monitoring (NILM)
Infrastructure: Smart electricity meter (already installed for billing)
Sensing Capability: Analyze current and voltage waveforms to identify unique “signatures” of individual appliances.
What It Measures:
- Appliance state: On/off, standby, active
- Energy breakdown: Per-appliance consumption
- Usage patterns: When devices are used
How It Works:
Total home power = 150W (baseline)
-> 1650W (1500W spike = hair dryer turns on)
-> 1750W (100W added = refrigerator compressor)
-> 250W (1500W drop = hair dryer off)
Each appliance has unique electrical signatures: - Resistive loads (heaters, toasters): Clean on/off transitions - Motors (refrigerators, fans): Inrush current spike, steady-state hum - Switched-mode power supplies (computers, chargers): High-frequency harmonics
14.7 Example 3: Cellular Signal Analysis
Infrastructure: Cell towers (already everywhere)
Sensing Capability: Analyze signal strength patterns and handoff events to infer crowd density and movement.
What It Measures:
- Crowd density: Number of active devices in area
- Traffic flow: Movement patterns between cell zones
- Event detection: Large gatherings, unusual patterns
14.8 The Three-Layer Model
- Infrastructure Layer: Existing devices emitting signals (Wi-Fi, power, cellular)
- Disturbance Layer: Environment modulates these signals (human movement, appliance usage)
- Analytics Layer: Software extracts sensing information from signal perturbations
14.9 Design Guidelines
When to Leverage Infrastructure
Good candidates for infrastructure sensing:
- Large buildings (retrofit without new wiring)
- Privacy-sensitive environments (no cameras needed)
- Budget-constrained projects
- Quick proof-of-concept deployments
- Aggregate measurements (counts, not identity)
Still need dedicated sensors for:
- Safety-critical applications (fire, gas)
- High-precision measurements (temperature +/-0.1C)
- Point-specific data (this exact location)
- Real-time response (<100ms)
- Regulatory compliance (certified sensors)
For Kids: Meet the Sensor Squad!
Max the Microcontroller had a brilliant idea: “What if we do not need to BUILD new sensors? What if sensors are already ALL AROUND US?”
“What do you mean?” asked Sammy the Sensor.
“Think about your Wi-Fi router at home,” Max explained. “It sends out radio waves all the time. When a person walks through the room, they disturb those radio waves – like making ripples in a pond. A smart computer can analyze those ripples and figure out that someone walked by, WITHOUT any cameras or motion sensors!”
Lila the LED was amazed: “So the Wi-Fi router IS a sensor?”
“Exactly! And your electricity meter is a sensor too,” Max continued. “Every appliance in your house uses electricity differently. A hair dryer uses 1500 watts, a fridge uses 100 watts, a phone charger uses 5-25 watts. By watching the power meter, a computer can figure out which devices are turned on – like identifying people by their footsteps!”
Bella the Battery loved this: “No new sensors to install, no batteries to replace, no wires to run. The infrastructure does double duty!”
“But,” Sammy reminded everyone, “for really important measurements – like fire detection or medical monitoring – you still need dedicated sensors. Infrastructure sensing is clever but not as precise.”
## Worked Example: Campus Occupancy Monitoring {#infra-worked-example}
Estimating Building Occupancy Using Existing Wi-Fi Access Points
Scenario: The University of Southern California (USC) wants to monitor real-time occupancy across 12 campus buildings to optimize HVAC scheduling. Installing dedicated occupancy sensors in every room (2,400 rooms) would cost over $360,000. Instead, they propose leveraging 480 existing Cisco Aironet Wi-Fi access points.
Given:
- 12 buildings, 200 rooms average per building = 2,400 rooms
- 480 Wi-Fi APs already deployed (Cisco Aironet 3802i), 40 per building
- Average 18,000 daily connected devices across campus (phones, laptops, tablets)
- Each device associates with one AP at a time; AP coverage radius ~25m indoors
- Current HVAC bill: $2.8 million/year across all 12 buildings
Step 1 – Extract occupancy signal from AP data:
Each Cisco AP reports associated client count every 60 seconds via SNMP. We map AP location to room/zone:
| Building Zone | APs in Zone | Avg Devices (9am) | Avg Devices (3am) | Occupancy Estimate |
|---|---|---|---|---|
| Engineering Lecture Halls | 8 | 340 | 2 | ~227 students + staff (340 ÷ 1.5) |
| Library Main Floor | 6 | 280 | 5 | ~187 occupants (280 ÷ 1.5) |
| Admin Offices | 12 | 95 | 0 | ~63 staff (95 ÷ 1.5) |
| Gym / Recreation | 4 | 120 | 0 | ~80 people (1.5 devices/person) |
Key correction factor: Students carry 1.2-1.8 devices on average (phone + laptop). Apply divisor of 1.5 for headcount estimate.
Step 2 – Compare costs: Dedicated sensors vs. Wi-Fi infrastructure:
| Approach | Hardware Cost | Installation | Annual Maintenance | Accuracy |
|---|---|---|---|---|
| PIR sensors (2,400 rooms) | $360,000 | $120,000 | $48,000/year | +/-1 person per room |
| CO2-based (2,400 rooms) | $840,000 | $200,000 | $96,000/year | +/-3 people per room |
| Wi-Fi AP analysis (existing) | $0 | $12,000 (software) | $3,600/year | +/-15% per zone |
| Wi-Fi + 50 PIR (high-traffic) | $7,500 | $14,000 | $4,200/year | +/-10% per zone |
Step 3 – Calculate HVAC savings:
- Baseline: HVAC runs fixed schedule (6am-10pm) regardless of occupancy
- With occupancy-responsive HVAC: Reduce conditioning in unoccupied zones
- Measured savings from pilot (2 buildings, 6 months): 22% energy reduction
- Projected annual savings: $2.8M x 22% = $616,000/year
- Implementation cost: $33,500 (software $12,000 + 50 PIR sensors $7,500 + installation $14,000)
- Payback period: ~20 days
Putting Numbers to It
ROI for infrastructure-based sensing is compelling. The hybrid Wi-Fi + PIR approach costs:
\[\text{Implementation cost} = \$12{,}000\text{ (software)} + \$7{,}500\text{ (50 PIR)} + \$14{,}000\text{ (install)} = \$33{,}500\]
Annual savings from 22% HVAC reduction:
\[\text{Savings} = \$2{,}800{,}000 \times 0.22 = \$616{,}000/\text{year}\]
Payback period: \(\frac{33{,}500}{616{,}000/365} \approx 20\) days. Compare to dedicated PIR sensors costing $360,000 + $120,000 install = $480,000 with a 284-day payback. The infrastructure approach delivers the same HVAC savings at 93% lower capital cost.
Result: By leveraging existing Wi-Fi infrastructure plus 50 supplementary PIR sensors in high-traffic areas, USC achieved zone-level occupancy estimates accurate to +/-10% at 93% lower cost than a dedicated PIR sensor deployment ($33,500 vs. $480,000). The system identified that 35% of HVAC runtime was wasted on empty zones, saving $616,000/year.
Key Insight: Infrastructure-leveraging sensing excels for “good enough” aggregate measurements. Zone-level accuracy (+/-10%) is sufficient for HVAC optimization – you do not need to know exactly who is in which room. The hybrid approach (Wi-Fi infrastructure + targeted dedicated sensors) gives the best cost-accuracy tradeoff.
14.10 Interactive Calculator: Wi-Fi Occupancy Estimator
Use this calculator to estimate room occupancy from Wi-Fi access point device counts. Adjust the number of connected devices and the average devices per person to see the estimated headcount range.
14.11 Interactive Calculator: Infrastructure Sensing ROI
Estimate the payback period and cost savings when using infrastructure-based sensing instead of dedicated sensors for building occupancy monitoring.
14.12 Code Example: Wi-Fi CSI Presence Detection
This Python example demonstrates a basic Wi-Fi Channel State Information (CSI) processor that detects room occupancy by analyzing signal variance. When a person moves through a Wi-Fi signal path, the CSI amplitude fluctuates more than in an empty room:
import time
import random
class WiFiCSIPresenceDetector:
"""Detect room occupancy from Wi-Fi CSI amplitude variance.
Monitors CSI amplitude across subcarriers and flags presence
when variance exceeds a calibrated empty-room baseline.
"""
def __init__(self, subcarrier_count=52, window_sec=5):
self.subcarrier_count = subcarrier_count
self.window_sec = window_sec
self.baseline_variance = None
self.readings = [] # (timestamp, amplitudes)
def calibrate_empty_room(self, samples):
"""Record baseline variance with no occupants.
Args:
samples: List of CSI amplitude arrays from empty room.
"""
if not samples:
raise ValueError("Need at least one sample for calibration")
variances = []
for amplitudes in samples:
mean = sum(amplitudes) / len(amplitudes)
var = sum((a - mean) ** 2 for a in amplitudes) / len(amplitudes)
variances.append(var)
self.baseline_variance = sum(variances) / len(variances)
print(f"Baseline variance: {self.baseline_variance:.4f}")
def process_csi_frame(self, amplitudes, timestamp):
"""Process one CSI frame and return occupancy estimate.
Args:
amplitudes: List of floats, one per subcarrier.
timestamp: Unix timestamp of the measurement.
Returns:
dict with 'occupied' (bool) and 'confidence' (0-1).
"""
# Remove stale readings outside the window
cutoff = timestamp - self.window_sec
self.readings = [(t, a) for t, a in self.readings if t > cutoff]
self.readings.append((timestamp, amplitudes))
if len(self.readings) < 3 or self.baseline_variance is None:
return {"occupied": False, "confidence": 0.0}
# Compute variance across recent frames
all_vars = []
for _, amps in self.readings:
mean = sum(amps) / len(amps)
var = sum((a - mean) ** 2 for a in amps) / len(amps)
all_vars.append(var)
avg_variance = sum(all_vars) / len(all_vars)
ratio = avg_variance / self.baseline_variance
# Ratio > 2.0 strongly indicates human presence
occupied = ratio > 2.0
confidence = min(1.0, (ratio - 1.0) / 3.0) if ratio > 1.0 else 0.0
return {"occupied": occupied, "confidence": round(confidence, 2)}
# Usage
detector = WiFiCSIPresenceDetector(window_sec=5)
# Step 1: Calibrate with empty room (collect 20 CSI frames)
empty_samples = [[0.5 + 0.01 * i for i in range(52)] for _ in range(20)]
detector.calibrate_empty_room(empty_samples)
# Step 2: Process live CSI frames
# Simulate person walking through signal path (higher variance)
# Submit 5 frames so the detector has enough readings (minimum 3 required)
random.seed(42)
now = time.time()
for i in range(5):
occupied_frame = [0.5 + 0.3 * random.uniform(-1, 1) for _ in range(52)]
result = detector.process_csi_frame(occupied_frame, now + i)
print(f"Occupied: {result['occupied']}, Confidence: {result['confidence']}")Key design decisions:
| Decision | Choice | Rationale |
|---|---|---|
| Window size | 5 seconds | Smooths transient noise while detecting walking pace movement |
| Variance ratio threshold | 2.0x baseline | Empirically validated; 1.5x causes false positives from HVAC airflow |
| Subcarrier count | 52 | Standard for 802.11n 20 MHz channels |
| Calibration | Empty-room baseline | Accounts for room geometry and furniture reflections |
14.13 Concept Relationships
| Concept | Related To | Connection Type |
|---|---|---|
| Wi-Fi CSI | Signal Variance | Human movement increases channel state variance |
| NILM | Power Signatures | Each appliance has unique current draw pattern |
| Cell Tower Density | Crowd Estimation | Device count per tower estimates population |
| Infrastructure Cost | Marginal vs Fixed | Leveraging existing = $0 marginal cost |
| Privacy | RF Sensing | Wi-Fi CSI preserves privacy better than cameras |
14.14 Summary
Infrastructure-leveraging sensing turns existing equipment into sensors through software analysis, providing area-wide coverage at near-zero marginal cost while trading some accuracy for convenience. Key takeaways:
- Existing infrastructure can serve as sensors – Wi-Fi routers (CSI for presence/gestures), power meters (NILM for appliance identification), and cell towers (crowd density estimation)
- Software deployment replaces hardware installation – Faster, cheaper, and easier to maintain
- Area-wide vs point measurements – Zone-level accuracy (+/-10-15%) is sufficient for many applications like HVAC optimization
- Privacy-preserving options – RF sensing avoids cameras while still detecting presence and activity
- Combine approaches for best results – Hybrid deployments (infrastructure + targeted dedicated sensors) deliver the best cost-accuracy tradeoff
- Reserve dedicated sensors for safety-critical, high-precision, or real-time applications
14.15 See Also
- Sensor Classification - Active vs passive sensing principles apply to infrastructure
- Signal Processing - CSI data requires filtering and feature extraction
- Common Mistakes - Infrastructure sensing still needs validation logic
- Selection Guide - When to leverage infrastructure vs deploy dedicated sensors
14.16 Try It Yourself
Exercise: Wi-Fi Occupancy Estimation
Challenge: Estimate room occupancy from Wi-Fi access point data.
Given data: A conference room’s access point reports these device counts over 1 hour:
09:00 → 2 devices
09:30 → 8 devices
10:00 → 8 devices
10:30 → 12 devices
11:00 → 3 devices
Your task:
- Estimate occupancy at 10:30
- Account for the fact that people carry 1.2-1.8 devices on average
- Determine when the meeting likely started and ended
Click for solution
1. Occupancy at 10:30:
12 devices ÷ 1.5 devices/person = 8 people
2. Accounting for device ratio:
- Conservative (1.8 devices/person): 12 ÷ 1.8 = 6.67 ≈ 7 people
- Liberal (1.2 devices/person): 12 ÷ 1.2 = 10 people
- Best estimate: 7-10 people at 10:30
3. Meeting timeline:
- Started: Between 09:00 and 09:30 (jump from 2 → 8 devices)
- Ended: Between 10:30 and 11:00 (drop from 12 → 3 devices)
- Duration: Approximately 1-1.5 hours
Common Pitfalls
1. Single-Point Sensor Coverage Missing Distributed Damage
A single strain gauge only measures strain at its exact location. A fatigue crack forming 20 cm away produces no signal. Infrastructure monitoring requires sensor arrays with spacing matched to the expected damage scale. Work with structural engineers to determine appropriate sensor placement density.
2. Ignoring Long-Term Sensor Drift in Multi-Year Deployments
Infrastructure sensors are often installed for 10-20 year lifespans. A strain gauge with 0.01% annual drift accumulates significant error over 10-20 years — enough to mask meaningful structural changes. Select sensors with certified long-term stability or include redundant sensors to detect drift through comparison.
3. Insufficient Bandwidth Planning for High-Frequency Monitoring
High-frequency vibration monitoring (1 kHz sampling on 10 channels) generates 1.4 GB per day. Design the processing pipeline to extract features (RMS, spectral peaks, damping ratios) at the node and transmit only compressed summaries, not raw time series.
4. Moisture Ingress Into Outdoor Sensor Enclosures
IP67 ratings are tested in clean water but real deployments involve condensation cycles and chemical exposure. Use hermetically sealed enclosures with desiccant for sensors in harsh environments. Specify higher IP ratings (IP68, IP69K) for washdown applications.
14.17 What’s Next
| If you want to… | Chapter | Description |
|---|---|---|
| Calibrate infrastructure sensors | Calibration Techniques | Techniques for establishing accurate baselines and correction factors |
| Decode sensor specifications | Reading Datasheets | Extract key parameters from datasheets for sensor selection |
| Explore common IoT sensors | Common IoT Sensors | Survey of popular dedicated sensors to complement infrastructure sensing |
| Avoid deployment pitfalls | Common Mistakes | Validation logic and error-handling patterns for sensing systems |
| Choose the right sensor | Selection Guide | Decision framework for infrastructure vs dedicated sensor trade-offs |