Live status · Read the latest
monad-knowledge Wi-Fi sensing lab · FIIT STU
SIM507 active 3 / 12 weeks

Simulation Toolkits for Sensing & Crowd Research

A twelve-week course on simulators as scientific instruments, taught with live models. Each week builds one class of simulator, or one discipline for using simulators, from its equations upward, and puts every equation on a slide where the student can move its parameters and watch the result, the formula and the number change together. The subject matter is people and radio: pedestrians moving through rooms, Wi-Fi signals bouncing through the same rooms, and the channel state information (CSI) a receiver measures when the two meet.

The throughline: a simulation is an instrument. An instrument you cannot reproduce, replicate, calibrate and break on purpose is not evidence; it is an opinion with a plot attached. The course therefore shows every model working, then shows it failing, and teaches the student to tell the two apart from the numbers alone.

The 12-week arc

3 of 12 lectures published — each a self-contained read with a slide deck and runnable workbook. Start at the first published week and work forward.

Wk Theme & focus Read
01 What is a research simulator? start here A simulator as a function from (model, parameters, seed, environment) to artefacts; determinism, pseudo-random generators, the run / artefact / manifest contract. Widgets (retrofit): **SeedLab**, a linear congruential generator plus Box-Muller with seed (integer 0-9999) and sample count (10-10,000), showing a histogram, the recurrence with current values and the sample mean; **ManifestDiff**, two run manifests where editing one field (seed, parameter, image tag) changes the content digest; break: a time-based seed that makes two "identical" runs disagree read → slides · workbook
02 Pedestrian dynamics on the platform Speed-based agent models and the speed-density fundamental diagram; operating an agent engine and a trajectory-measurement library end to end. Widgets (retrofit): **CorridorCSM**, a periodic single-file corridor under a collision-free speed model with desired speed (0.5-2.0 m/s), time gap (0.3-2.0 s), body length (0.2-0.6 m) and agent count (2-60), showing live agents and the speed law with values substituted; **FundamentalDiagram**, simulated speed-density points over the Weidmann curve u = 1.34(1 − e^(−1.913(1/ρ − 1/5.4))); break: a time step too large for the time gap, or a body too small for the geometry, and the overlaps or free-flow artefacts it produces read → slides · workbook
03 Ray-traced channel simulation Scene to path list to CSI by the ray sum H(f) = Σ aᵢ e^(−j2πfτᵢ); image method, frequency selectivity, delay spread, occlusion, a crowd as a falling Rician K. Widgets (retrofit): **ImageMethodRoom**, draggable transmitter and receiver in a walled room with wall reflection (0-0.9), carrier (2.4-6.5 GHz) and reflection depth (0-4), showing rays, the CSI magnitude across tones, ripple in dB and RMS delay spread; **BodyOnTheLink**, one body crossing the link with a pass factor (0.1-0.7); **RicianK**, K_dB(N) = k0 − slope·N with diffuse power set relative to the deterministic channel; break: an absolute diffuse power that swamps the ray-traced channel so that changing a wall material changes nothing read → slides · workbook
04 Coupling simulators: contracts, units, clocks Chaining a crowd simulator into a channel simulator: the trajectory file as a data contract, unit and frame conventions, resampling a trajectory clock onto a radio frame clock, and Doppler f_D = 2v/λ as the reason the frame rate matters. Widgets: **StageContract**, a trajectory stream (agent speed 0.2-1.6 m/s, trajectory step 0.01-0.5 s) resampled onto CSI frames (frame rate 5-1000 Hz) with interpolation on or off; **DopplerNyquist**, walker speed (0-2 m/s), carrier (2.4-6.5 GHz) and frame rate (5-1000 Hz), showing the spectrogram, f_D against f_s/2 and the aliased peak; break: feed centimetres into a stage that expects metres, or drop the frame rate below twice the Doppler, and watch agents teleport and the spectrogram fold planned
05 What a crowd does to a channel The coupled output as physics: each walker adds a rotating arrow to the channel sum, so the CSI spread grows with the count but sub-linearly, while the mean level has no reliable sign; still people are invisible to a spread statistic. Widgets: **PeopleRoom**, a 4 × 3 m walled room with one transmitter, one receiver and 0-8 walkers, with walker speed (0.2-1.6 m/s), spread window (1-60 s), body pass factor (0.1-0.7), scatter cross-section (0.3-2 m²) and carrier (2.4-6.5 GHz), showing paths, the phasor sum, the level and spread readouts and a fitted exponent b in s ∝ N^b; **CountCurve**, spread and level against N over seeded replicates with interquartile bands; break: freeze every walker (spread falls to zero at any count) or shorten the window below one fading pattern planned
06 The radio in the loop: impairments and noise A simulated channel is not a measured one until the receiver is simulated too: carrier frequency offset, timing offset, additive noise, gain control, and the ratio tricks that cancel common offsets. The noise-only spread in dB is σ_dB ≈ (20 / ln 10)·√(1 / (2·SNR)). Widgets: **ImpairmentBench**, per-tone CSI magnitude and phase with CFO (0-100 kHz), STO (0-8 samples), SNR (5-40 dB) and gain steps (on/off), plus a two-chain ratio view; **NoiseFloor**, the σ_dB law against a seeded Monte Carlo estimate; break: swap I and Q, lose a chain, or divide neighbouring tones of one chain instead of two chains and watch a walker's signal almost vanish planned
07 Replication is not repetition Reproducibility (same inputs, same bytes) versus replication (independent seeds, an interval); pinned environments versus floating tags; why a single-seed correlation of +1.00 is not a result. Monte Carlo standard error S/√n. Widgets: **SeedReplication**, an effect size (0-2 dB), a between-seed spread (0.1-3 dB) and a seed count (1-40), showing per-seed points, the mean and its 95 % interval; **TagDrift**, one sweep whose environment is pinned by digest or by a floating tag; break: reuse one seed for every replicate so the interval collapses to zero width while the evidence stays at n = 1 planned
08 Parameter sweeps and experiment design Grids, one-factor-at-a-time versus factorial designs, interactions, seeds as blocking factors, and why "holds everywhere" means "everywhere sampled"; a sensitivity sweep over a simulator's own design space is not confirmation of the world. Widgets: **SweepDesigner**, a two-factor response surface (body pass factor 0.1-0.7 × scatter cross-section 0.3-2 m²) sampled by one-factor, full-factorial or random designs with a budget (4-40 cells), showing sampled cells, the fitted surface and the interaction estimate; break: a one-factor design that reports no interaction where the full grid shows one planned
09 Campaigns, power and negative results A study as a brief: question, hypothesis, success criteria and sample size fixed before the first run; power planning; gates that refuse a verdict from too few seeds or a single geometry; a negative result counts only if the run actually exercised the condition the claim names (read the resolved configuration, not the prose). Widgets: **PowerPlanner**, effect size (0.1-2 in units of σ), significance (0.01-0.10) and seeds per arm (2-60), showing both sampling distributions, the power readout and the required n; **VerdictGate**, seed count, geometry count and interval width feeding a strong / weak / no-verdict decision; break: a "negative" run whose configuration held the default impairments rather than the realistic ones the claim required planned
10 Calibration and data assimilation Fitting simulator parameters to observations; in-sample versus held-out fit; sequential assimilation of noisy counts into a running agent model with a particle filter. Widgets: **CalibrateCSM**, fit desired speed and time gap to a seeded synthetic reference trajectory set by grid search, showing the loss surface and the in-sample and held-out error; **CrowdParticleFilter**, a corridor crowd tracked from noisy door counts with particle count (10-2000), observation noise (0-5 people) and resampling threshold (0.1-1.0), showing particles, the true state and the effective sample size; break: too few particles, and the filter collapses onto one wrong trajectory planned
11 Validation and the sim-to-real gap What a clean simulator is licensed to predict: occlusion geometry and blockage, yes; the size of variance effects that come from real receiver chains and real multipath, not without evidence. Environment fingerprints that are too easy in simulation; rank transfer versus absolute transfer; few-shot recalibration with labelled anchors. Widgets: **FingerprintOvercoding**, synthetic rooms with furniture jitter (0-0.5 m), wall-material jitter (0-50 %) and device jitter (0-1.5 m), classified by a nearest-centroid room identifier, showing class clouds and held-out accuracy; **AnchorRecalibration**, a level-to-count law carried to a new room with 0, 1 or 2 labelled anchors, showing the transfer error; break: zero jitter, where the room identifier scores near perfectly for reasons no real room offers planned
12 Capstone Design, run and present a small reproducible simulation study end to end, as an interactive deck of the student's own planned

Capstone

Week 12. Pose a question a simulation can answer and write a one-page brief that fixes the hypothesis, the success criterion and the number of seeds before any run (justified with the Week 9 power planner). Run the study as an executed numpy workbook with at least two geometries or scenarios and a seed-replicated interval on every reported number. Present it as a short Slidev deck with at least one live widget of the student's own: named controls with units and ranges, the formula with values substituted, a readout that matches the workbook at the default state, and one control that breaks the method. Hand in a package a classmate can re-run from its manifest alone, and state which statistics the model is and is not licensed to predict (Week 11). A negative result is a full grade if it tested the claim.