Skip to content

Detect motion in synthetic Wi-Fi CSI

Generate calibrated synthetic CSI windows, choose an uncertain band, and score a held-out room without making a field claim.

Radio Remi: I want you to predict the result, inspect each intermediate value, and keep the final claim inside the evidence., your practice guide

Radio Remi: I want you to predict the result, inspect each intermediate value, and keep the final claim inside the evidence.
Predict the reading, then compare it with the measurement.

Python 3 in your browser (JupyterLite)

Python · no install

Generate calibrated synthetic CSI windows, choose an uncertain band, and score a held-out room without making a field claim.

Tier 2 · Web · paste-in setup · No account

Version tested: Python 3.12.7 / Pyodide 0.27.6 in JupyterLite 0.6.4; Chromium 148.0.7778.96; captureSource playwright:jupyterlite. Date: 2026-09-10.

Open the notebook in your browser and run each Python cell; no install or account is needed.

Three ways to run: use JupyterLite here with no install; run main.py locally from the downloadable lab folder; or open the same notebook in Google Colab.

Open in your browser (new tab)

Steps

Screens captured against Python 3 in your browser (JupyterLite) Python 3.12.7 / Pyodide 0.27.6 in JupyterLite 0.6.4; Chromium 148.0.7778.96; captureSource playwright:jupyterlite on 2026-09-10; the tool may have moved on — the text steps are the contract.

  1. 1 Step 1

    Do
    Freeze the CSI simulation contract.
    You will see
    The notebook prints 24 subcarriers, two rooms, four activities, and seed 437.
    Why it matters
    CSI is conditional measurement evidence, not a direct body outline.
    JupyterLite step 1 for Detect motion in synthetic Wi-Fi CSI, showing the printed evidence for this step.
    Step 1 · Python 3 in your browser (JupyterLite); numbered callout added to a real capture. Enlarge screenshot (new tab)
  2. 2 Step 2

    Do
    Generate calibrated CSI windows.
    You will see
    Baseline and motion windows show different mean magnitude changes.
    Why it matters
    Start with a baseline recorded under named conditions.
    JupyterLite step 2 for Detect motion in synthetic Wi-Fi CSI, showing the printed evidence for this step.
    Step 2 · Python 3 in your browser (JupyterLite); numbered callout added to a real capture. Enlarge screenshot (new tab)
  3. 3 Step 3

    Do
    Calculate window features.
    You will see
    A table reports magnitude variance and motion energy for labelled windows.
    Why it matters
    Split later samples into equal time windows, then calculate features such as mean magnitude change, variance, and motion energy.
    JupyterLite step 3 for Detect motion in synthetic Wi-Fi CSI, showing the printed evidence for this step.
    Step 3 · Python 3 in your browser (JupyterLite); numbered callout added to a real capture. Enlarge screenshot (new tab)
  4. 4 Step 4

    Do
    Fit two thresholds on room A.
    You will see
    The training table prints occupied, uncertain, and empty boundaries.
    Why it matters
    A threshold should include an uncertain band so borderline windows can be reviewed instead of forced into occupied or empty.
    JupyterLite step 4 for Detect motion in synthetic Wi-Fi CSI, showing the printed evidence for this step.
    Step 4 · Python 3 in your browser (JupyterLite); numbered callout added to a real capture. Enlarge screenshot (new tab)
  5. 5 Step 5

    Do
    Score the held-out room B.
    You will see
    The confusion counts and precision and recall are printed for unseen windows.
    Why it matters
    A confusion matrix keeps false alarms and missed presence visible.
    JupyterLite step 5 for Detect motion in synthetic Wi-Fi CSI, showing the printed evidence for this step.
    Step 5 · Python 3 in your browser (JupyterLite); numbered callout added to a real capture. Enlarge screenshot (new tab)
  6. 6 Step 6

    Do
    Stress a shifted baseline.
    You will see
    The shifted-room result shows more uncertain or wrong decisions.
    Why it matters
    Calibration removes part of the static room and radio offset; it does not remove furniture changes, people outside the target zone, or radio drift.
    JupyterLite step 6 for Detect motion in synthetic Wi-Fi CSI, showing the printed evidence for this step.
    Step 6 · Python 3 in your browser (JupyterLite); numbered callout added to a real capture. Enlarge screenshot (new tab)
  7. 7 Step 7

    Do
    Write a bounded result card.
    You will see
    The final card states the metric, abstention rate, and missing RF evidence.
    Why it matters
    A synthetic held-out room checks the calculation, not real radio performance or generalisation.
    JupyterLite step 7 for Detect motion in synthetic Wi-Fi CSI, showing the printed evidence for this step.
    Step 7 · Python 3 in your browser (JupyterLite); numbered callout added to a real capture. Enlarge screenshot (new tab)

Chapter checks

These questions refer to the chapter’s examples. Use the return links to review their answers.

  1. Why should CSI data be split by room or time before evaluation?

    Return to the chapter’s knowledge check
  2. What is the safest action for a CSI window inside the uncertain threshold band?

    Return to the chapter’s knowledge check

Caution

The supplied data and simulation verify the calculation path only. Reopen the prepared notebook if screens change, and validate any field claim with measured hardware and site evidence.

Return to Wi-Fi Channel-State Information for Presence and Motion Sensing · Browse Labs