Chapters

2 Wi-Fi Channel-State Information for Presence and Motion Sensing

wireless-optical-sensing
sensing

2.1 Start With the Story

Radio Remi is helping a library keep lights on while people are studying. A camera would collect more detail than the team needs. A motion sensor misses someone who sits still. Remi asks whether changes in the room’s Wi-Fi path can support a simple occupied or empty decision. The team must test that claim without pretending a notebook has measured the real room.

2.2 Overview

Wi-Fi channel-state information, or CSI, describes how a received signal changed on many narrow subcarriers. A person can block, reflect, or scatter some paths, so CSI may change even when no message content is read. Useful sensing needs a stable baseline, time windows, features, labels, held-out tests, and a no-decision state. It also needs consent because a radio link can become a sensor for nearby people.

2.3 Learning Objectives

By the end of this chapter, you will be able to:

  • Explain how channel-state information describes amplitude and phase across Wi-Fi subcarriers.
  • Build calibrated window features and evaluate them on held-out synthetic room data.
  • Separate a detection result from evidence about people, rooms, radios, and privacy.

2.4 From packets to channel evidence

A Wi-Fi receiver estimates a complex channel value for each available subcarrier and antenna pair. Its magnitude describes gain or loss, while phase describes relative timing and path change. Hardware, firmware, packet rate, bandwidth, automatic gain control, and clock errors shape the values. CSI is therefore conditional measurement evidence, not a direct body outline. Raw payload content is not required for this exercise, but that fact does not remove the privacy duty.

2.5 Calibrate, window, and describe change

Start with a baseline recorded under named conditions. Split later samples into equal time windows, then calculate features such as mean magnitude change, variance, and motion energy. Calibration removes part of the static room and radio offset; it does not remove furniture changes, people outside the target zone, or radio drift. A threshold should include an uncertain band so borderline windows can be reviewed instead of forced into occupied or empty.

Window duration controls how quickly the detector responds and how much short-term variation it averages. Overlapping windows provide more frequent decisions but also create correlated examples that must not leak across the training and test split. The calibration record should retain device, channel, placement, room state, and collection time. A deployment can then detect when its current context no longer matches the conditions that set the thresholds.

2.6 Read the sensing pipeline

The diagram begins with packets and subcarrier estimates on the left. The middle card turns calibrated time windows into named features. The final card compares held-out predictions with labels and keeps uncertainty visible. Follow the arrows from measurement to decision: every stage narrows the claim, and no stage proves who caused a change.

Figure Figure 2.1 keeps the stages in reading order. The diagram begins with packets and subcarrier estimates on the left.

Wi-Fi CSI evidence pipeline from packet measurements through calibrated features to bounded decisions.
Figure 2.1: Wi-Fi CSI evidence pipeline from packet measurements through calibrated features to bounded decisions.

In Figure 2.1, read left to right, then use the final boundary note to limit the conclusion. The arrows show processing order, not proof that the final output is correct in every setting.

2.7 Evaluate beyond one room

Precision asks what share of occupied predictions were correct. Recall asks what share of occupied windows were found. A confusion matrix keeps false alarms and missed presence visible. Report results by room, radio placement, activity, and time period because a random split can leak nearly identical windows into both training and test data. A synthetic held-out room checks the calculation, not real radio performance or generalisation.

2.8 Decision and Trade-offs

Choose CSI when existing Wi-Fi links, coarse presence or motion, and local processing fit the job. Prefer a simpler contact, passive infrared, pressure, or door sensor when it answers the question with less inference. Reject a deployment that cannot explain consent, retention, uncertainty, and what happens when the radio environment changes.

2.9 Practice the Method

The linked lab uses a prepared online tool and retains its result evidence. Complete the steps, compare the result with the chapter boundary, and name one condition that the exercise did not test.

2.10 Check Your Reasoning

2.11 Summary

The useful result is a consented, calibrated decision that can abstain when the room no longer matches its evidence. Keep the raw channel measurements, calibration context, decision threshold, and abstentions together. That record lets a reviewer distinguish a repeatable motion cue from a lucky result or an unreported change in the room.

  • CSI records per-subcarrier channel change, not a direct image of a person.
  • Calibration, windowing, held-out rooms, and abstention keep the claim bounded.
  • A simulated classifier teaches the pipeline but cannot validate an installed Wi-Fi sensing system.