2 · What Do Sensors Really Measure?

The same traffic, two different speeds · Edie’s definitions · why your phone and the road disagree

Part 1 · How we watch traffic

Two ways to watch a road

Every sensor watches the road in its own way. Meet the two we compare today.

Loop detector Drone
Where in the pavement above the road
How the car’s metal changes its magnetic field a camera films
Sees one point, over time the whole stretch, at one instant

Side view of a car driving over a loop detector: a few turns of wire in the pavement, its magnetic field over the lane, and a cable to a roadside cabinet. A drone overhead films the whole stretch. An inset shows the square loop from above.

© 2026 Wuping Xin · CC BY-NC-SA 4.0

How a loop detector works

Watch the loop: every vehicle that covers it switches it on.

How to read it

  • A coil of wire in a saw cut in the pavement. Its lead-in wire runs to a pull box at the road edge; a lead-in cable runs on to the cabinet, where the detector card sits.
  • A vehicle’s metal body lowers the loop’s inductance: the loop is occupied (on).
  • The controller polls the loop at a fixed rate: is a vehicle over it? 60 Hz on freeways; 10 Hz at signalised intersections (the NEMA TS 2 cabinet standard); 30 Hz in New York City’s signal system.
  • Why slower at intersections? Vehicles are slower, so each covers the loop for longer: a 4.5 m car at 36 km/h covers a 1.8 m loop for 0.63 s, about 6 samples at 10 Hz; at 100 km/h it covers it for 0.23 s, only 2 samples at 10 Hz but 14 at 60 Hz.
  • Occupancy = samples hit ÷ samples taken. Count = how often the samples switch from empty to occupied.
  • At the end of each reporting interval (often 30 s; 20 s or 60 s elsewhere) it sends the count and the occupancy, and starts again.
  • A single loop cannot measure speed; it is estimated (see below). A dual loop, two loops a few metres apart, measures it directly.

Classifying traffic sensors

A loop is one sensor of many. Sort them all by two questions: where do they sit, and what do they see?

Where they sit Pavement: loops, tubes Roadside: radar, video, LiDAR Vehicle: phones, fleet GPS Air: aircraft, drones
What they see A point: counts, spot speeds Two points: travel time An area: all cars, one instant A vehicle: its trajectory

A time-space diagram with a loop detector as a horizontal line, re-identification as two horizontal lines, a drone snapshot as a vertical line and a GPS probe as one trajectory

© 2026 Wuping Xin · CC BY-NC-SA 4.0

How to read it

How to read the picture: time runs to the right, position up the road. Each grey line is one car stopping at a red light and moving off.

  • Loop (orange, horizontal): one position, all the time. It sees each car once, as it crosses.
  • Re-identification (red, two dashed lines): two readers recognise the same car (a toll tag or a plate). The red car is seen at both; the time between the two sightings is its travel time.
  • Drone snapshot (violet, vertical): one instant, every position. It sees every car on the stretch at once.
  • GPS probe (teal): one car reports its own position all along its trip, its whole trajectory.

A catalogue of traffic sensors

Sensor Measures Strength Weakness
Inductive loop count, occupancy cheap, accurate road must be cut
Magnetometer count, occupancy small, often wireless battery life
Pneumatic tube axles, vehicle class cheap, portable temporary only
Weigh-in-motion axle weights weighs trucks at speed costly, needs calibration
Sensor Measures Strength Weakness
Microwave radar speed, counts by lane all weather, many lanes Doppler misses stopped cars
Video counts, class, queues rich information glare, darkness, weather
LiDAR exact positions precise 3-D picture cost; fog, heavy rain
Infrared presence, speed day and night weather
Acoustic presence, speed passive, cheap background noise
Sensor Measures Strength Weakness
Bluetooth / Wi-Fi travel time cheap few matches; random IDs
Toll-tag readers travel time high match rate tagged vehicles only
Plate cameras travel time, O–D nearly every vehicle privacy, misreads
Sensor Measures Strength Weakness
GPS probes speeds, travel times wide coverage sample bias
Connected vehicles trajectories rich, frequent few vehicles yet
Drones every trajectory the whole time-space diagram short flights
Aerial photos density; speed from two photos a whole stretch at once one moment only
Floating car travel time, delay simple, direct one vehicle’s view

Seeing from above: an aircraft

Almost every sensor in the catalogue watches one point, or two. Can we see a whole stretch at once? Go up.

Aerial photograph of an interstate interchange in Louisville, Kentucky, with individual cars and trucks visible on every lane

Photo: NOAA (public domain).

More

  • Interstate 64, Louisville, Kentucky: every vehicle can be counted
  • One photo gives the density on each lane
  • Two photos a few seconds apart give every vehicle’s speed, and so the space-mean speed

Seeing from above: a drone

A photo freezes one instant. What if the camera keeps watching?

Video: pNEUMA Vision dataset, Kim, Anagnostopoulos, Barmpounakis and Geroliminis (EPFL), CC BY 4.0.

More

  • Downtown Athens, filmed by one of ten drones (pNEUMA, EPFL, 2018)
  • Like a photo, it sees every vehicle at once; unlike a photo, it keeps watching
  • From the video, every trajectory can be recovered

Part 2 · One road, two answers

The puzzle

A loop in the road and a drone overhead watch the same cars, and both report the average speed. They will not agree, and neither is wrong.

Two lanes of cars, fast and spaced out on top, slow and bunched below; an orange loop across the road at one point and a dashed violet frame showing the drone's view of the whole stretch

Before you watch: predict

Which reports the higher average speed: the loop or the drone? Or will they agree?

The sensor showdown

Two lanes, one loop, one drone. Watch both report the average speed.

  • Top lane: fast cars, spaced out. Bottom lane: slow cars, bunched
  • Orange bar: the loop, flashing per car. Dashed frame: the drone’s view

What just happened?

Same cars, same moment, two different averages. Why?

More

  • Loop 85 km/h, drone 76 km/h: same cars, same moment
  • The loop counts fast cars more often: they pass it more often
  • The drone counts slow cars more often: they bunch up on the road
  • Neither is wrong. They answer different questions.

Two kinds of average speed

Both answers are right: the loop and the drone average over different things.

Time-mean speed \(\bar v_t\) Space-mean speed \(\bar v_s\)
Watching one point, over time a stretch, at one instant
Like loops, radar guns, cameras drones, aerial photos

Which one is “the” average speed? Try it on a trip you know.

Quick question

You drive 30 km to work at 30 km/h, and drive home at 60 km/h. What was your average speed?

Answer

  • Not 45 km/h: 60 km in 1.5 h is 40 km/h
  • More time on the slow leg, so it counts for more: the drone’s point of view

Build your own road

Two lanes, with no lane changing. Set each lane’s speed and spacing, and see what each sensor reports.

Part 3 · Wardrop’s theory of the two averages

Wardrop’s model (1952)

  • \(M\) sub-streams: sub-stream \(i\) has speed \(v_i\) and flow \(q_i\); \(Q = \sum_i q_i\)
  • In time (at a point), weight by flow, \(f_i = q_i/Q\): \[ \bar v_t = \sum_i f_i\, v_i = \frac{\sum_i q_i v_i}{Q} \]
  • In space (a snapshot), weight by density, \(k_i = q_i/v_i\), \(f_i' = k_i/K\): \[ \bar v_s = \sum_i f_i'\, v_i = \frac{\sum_i k_i v_i}{K} \]

How to read it

  • The two bars show the same two lanes counted two ways: green the fast lane (24 m/s, cars 48 m apart), red the slow lane (12 m/s, cars 24 m apart)
  • In time: both lanes send 0.5 cars per second past a loop, so each is half of the count: \(f_i = q_i/Q\)
  • In space: the slow lane packs twice as many cars into the road, so a snapshot holds one fast car for every two slow ones: \(f_i' = k_i/K\)
  • That is the whole of Wardrop’s point: the time-mean speed weights the fast cars more, the space-mean speed the slow ones

Watch it: speeds in time vs speeds in space

Now give every driver a speed of their own, and watch both averages build up, car by car.

How to read it

  • Top strip: the drone’s view (violet dashed frame); the orange bar is the loop; cars are coloured by speed, red slow, green fast
  • Three lanes; every driver wants their own speed. To pass, a car changes lanes; with no gap, it follows the slower car
  • Histograms: the speeds the drone sees, a photo every second (violet, left), and the speeds the loop counts, each passing car (orange, right); the black line is each one’s mean
  • Watch the loop’s histogram lean towards fast cars

And \(q = kv\) falls out

Since \(k_i v_i = q_i\), the numerator of the space-mean speed is just \(Q\):

\[ \begin{gathered} \bar v_s = \frac{\sum_i q_i}{K} = \frac{Q}{K} \\ \Longrightarrow\quad Q = K\,\bar v_s. \end{gathered} \]

The fundamental relation \(q = kv\) holds with the space-mean speed, and only with it.

Check with two lanes (24 m/s every 48 m, 12 m/s every 24 m): \(K = 1/48 + 1/24 = 1/16\) veh/m.

Total flow
\(Q\) = 1.0 veh/s

With the drone’s speed
\(K\,\bar v_s = 16/16\) = 1.0 \(\checkmark\)

With the loop’s speed
\(K\,\bar v_t = 18/16\) = 1.125 \(\times\)

Which average for which data?

Wardrop’s definitions tell us how to compute each mean from the data we actually have:

Data collected… Time-mean speed \(\bar v_t\) Space-mean speed \(\bar v_s\)
at a point (\(N\) vehicles passing, speeds \(v_j\)) arithmetic mean: \(\dfrac{1}{N}\sum_j v_j\) harmonic mean: \(\dfrac{N}{\sum_j 1/v_j}\)
in space (\(N\) vehicles in a snapshot) \(\dfrac{\sum_j v_j^2}{\sum_j v_j}\) arithmetic mean: \(\dfrac{1}{N}\sum_j v_j\)

A common misconception

“Arithmetic mean = time-mean, harmonic mean = space-mean.” Not in general.

  • Which average you need depends on where the data were collected.
  • From a drone photo, the plain average of the speeds is the space-mean speed.
  • The harmonic mean gives the space-mean speed only for data collected at a point.

The proof, part 1: the time-mean speed

We will prove \(\bar v_t = \bar v_s + \sigma_s^2/\bar v_s\), checking each step with two lanes: 24 m/s every 48 m, 12 m/s every 24 m.

Step 1. Write the time-mean speed in space terms. Substitute \(q_i = k_i v_i\):

\[ \begin{aligned} \bar v_t &= \frac{\sum_i q_i v_i}{\sum_i q_i} \\ &= \frac{\sum_i k_i v_i^2}{\sum_i k_i v_i}. \end{aligned} \]

In numbers: \(\dfrac{576/48 + 144/24}{24/48 + 12/24} = \dfrac{18}{1}\) = 18 m/s \(\checkmark\)

Step 2. Divide the top and bottom by \(K\). Both become averages over the space distribution \(f_i' = k_i/K\):

\[ \begin{aligned} \bar v_t &= \frac{\sum_i f_i' v_i^2}{\sum_i f_i' v_i} \\ &= \frac{\sum_i f_i' v_i^2}{\bar v_s}. \end{aligned} \]

In numbers: \(f_A' = 1/3\), \(f_B' = 2/3\): \(\dfrac{576/3 + 2 \cdot 144/3}{16} = \dfrac{288}{16}\) = 18 m/s \(\checkmark\)

The proof, part 2: expand around the mean

Step 3. Expand around the mean. Write \(v_i = \bar v_s + (v_i - \bar v_s)\) and square:

\[ \begin{aligned} \textstyle\sum_i f_i' v_i^2 &= \bar v_s^2 \\ &\quad + 2\,\bar v_s \underbrace{\textstyle\sum_i f_i' (v_i - \bar v_s)}_{=\,0} \\ &\quad + \underbrace{\textstyle\sum_i f_i' (v_i - \bar v_s)^2}_{=\,\sigma_s^2}. \end{aligned} \]

Step 4. Put it together.

\[ \boxed{\;\begin{aligned} \bar v_t &= \frac{\bar v_s^2 + \sigma_s^2}{\bar v_s} \\ &= \bar v_s + \frac{\sigma_s^2}{\bar v_s} \end{aligned}\;} \]

In numbers: \(\sigma_s^2 = 32\), so \(256 + 32 = 288\) and \(16 + 32/16\) = 18 m/s \(\checkmark\)

  • The time-mean speed is never smaller than the space-mean speed, because a variance cannot be negative.
  • They are equal only when every vehicle has the same speed (\(\sigma_s = 0\)).
  • The gap grows with the spread of speeds; it is largest in slow, mixed traffic (small \(\bar v_s\)).

More

  • The green tiles check each step with the two lanes of And \(q = kv\) falls out: every step lands on the loop’s 18 m/s
  • Use the variance measured in space; the variance at a point gives the wrong answer
  • From point data (the usual case): \(\bar v_s \approx \bar v_t - \sigma_t^2/\bar v_t\), with the variance measured at the point (Rakha and Zhang, 2005)

A worked example

Two lanes: equal flow, different speeds. What do the loop and the drone report?

Lane A: 24 m/s, cars 48 m apart → Lane B: 12 m/s, cars 24 m apart → 48 m 24 m
© 2026 Wuping Xin · CC BY-NC-SA 4.0

1 · The loop (by flow)

\[ \begin{aligned} q_A &= 24/48 = 0.5 \\ q_B &= 12/24 = 0.5 \end{aligned} \]

\(\bar v_t =\) 18 m/s

2 · The drone (by density)

\[ \begin{aligned} f_A' &= 1/3 \\ f_B' &= 2/3 \end{aligned} \]

\(\bar v_s =\) 16 m/s

3 · Check (Wardrop)

\[ \begin{aligned} \sigma_s^2 &= 32 \\ \bar v_s + \sigma_s^2/\bar v_s &= 18 \end{aligned} \]

18 m/s \(\checkmark\)

How to read it

  • Green cars: lane A, 24 m/s, 48 m apart; blue cars: lane B, 12 m/s, 24 m apart
  • Flows (veh/s): \(q_A = 24/48 = 0.5\) and \(q_B = 12/24 = 0.5\), so the loop sees \(\bar v_t = (0.5 \times 24 + 0.5 \times 12)/1 = 18\) m/s
  • Densities (veh/m): \(k_A = 1/48\), \(k_B = 1/24\), so \(f_A' = 1/3\), \(f_B' = 2/3\) and \(\bar v_s = 24/3 + 2 \times 12/3 = 16\) m/s
  • Space variance: \(\sigma_s^2 = \tfrac13 (24 - 16)^2 + \tfrac23 (12 - 16)^2 = 32\), so \(16 + 32/16 = 18\) m/s, as Wardrop says
  • Enter these numbers in Build your own road above to check them live

Edie’s definitions

A loop watches one point; a snapshot, one moment. Edie (1965) asked: why not any region?

Pick a region \(A\) of the time-space diagram; add up the distance \(d(A)\) and time \(t(A)\) spent in it.

Flow \(\displaystyle q(A) = \frac{d(A)}{|A|}\)

Density \(\displaystyle k(A) = \frac{t(A)}{|A|}\)

Speed \(\displaystyle v(A) = \frac{d(A)}{t(A)}\)

How to read it

  • \(|A|\) is the area of the region, in metres × seconds
  • The loop (orange): \(v(A)\) is the harmonic mean of the speeds crossing it
  • The snapshot (purple): \(v(A)\) is the plain average of the speeds in view
  • Any other shape works too (here an ellipse around the queue), and \(q = k\,v\) always holds

Try it: any region

Draw a box anywhere on the time-space diagram: Edie gives its flow, density and speed.

How to read it

  • The box is your region A: orange when it is a loop (thin in space), violet otherwise
  • The black pieces are the trajectories inside it; Edie adds up their distances \(d(A)\) and times \(t(A)\)
  • Colour on the trajectories is speed, red slow, green fast

More

  • \(q = k\,v\) holds by construction, since \(k\,v = \frac{t(A)}{|A|}\frac{d(A)}{t(A)}\): it is no test
  • The test is the speed: in moving traffic a loop gives the harmonic mean of the crossing speeds, a snapshot the plain average
  • The start: a loop at the back of the queue (235 m). Cars slow down there, so the harmonic mean (14 km/h) and the plain mean (31 km/h) differ widely
  • Where the rule breaks: move the loop to the stop line (300 m). Cars stand inside the box during the red, so \(v(A)\) falls far below the crossing speeds: the rule holds only while no car stops in the box

Part 4 · Sensors in the real world

Occupancy, part 1: adding up the pulses

A loop stands at one point, yet occupancy measures space. Vehicle \(j\) covers it for \(\tau_j = (d + \ell_j)/\dot x_j\) seconds:

onoffτ₁τ₂τ₃τ₄τ₅slowT seconds: occupancy o = (τ₁ + τ₂ + … + τ₅) / T
© 2026 Wuping Xin · CC BY-NC-SA 4.0

Over \(T\) seconds, \(N\) vehicles pass. Occupancy is their pulses added up, divided by \(T\):

\[ o = \frac{1}{T}\sum_{j=1}^{N} \tau_j \]

Put in each \(\tau_j\):

\[ o = \frac{1}{T}\sum_{j=1}^{N} \frac{d + \ell_j}{\dot x_j}. \]

How to read it

  • The trace: the loop is on while a vehicle covers it. Each pulse lasts \(\tau_j\), the time vehicle \(j\) takes to pass; a slow vehicle makes a wide pulse
  • Occupancy is the share of the \(T\) seconds the loop was on: the pulses added up, divided by \(T\)

Occupancy, part 2: a space-mean measurement

Take every vehicle as the same length, \(\ell_j \approx \ell\), and the sum becomes an average of \(1/\text{speed}\):

Step 1. Equal lengths:

\[ o \approx (d + \ell)\,\frac{1}{T}\sum_{j=1}^{N}\frac{1}{\dot x_j} \]

Step 2. Multiply and divide by \(N\):

\[ o \approx (d + \ell)\,\underbrace{\frac{N}{T}}_{q}\,\underbrace{\frac{1}{N}\sum_{j=1}^{N}\frac{1}{\dot x_j}}_{1/\bar v_s} \]

Step 3. Use \(q = k\,\bar v_s\):

\[ o \approx (d + \ell)\,\frac{q}{\bar v_s} = (d + \ell)\,k. \]

  • So \(k \approx o/(d + \ell)\): a harmonic mean, a space-mean measurement
  • The weak step: \(\ell_j \approx \ell\), every vehicle the same length

In numbers: a 1.8 m loop and 4.5 m cars, \(d + \ell = 6.3\) m; occupancy \(o = 0.12\): \(k = 0.12 / 0.0063\) km \(=\) 19 veh/km

How to read it

  • Harmonic mean: average \(1/\text{speed}\) over the vehicles, then flip it. Each pulse grows with \(1/\dot x_j\), so occupancy averages \(1/\text{speed}\): slow vehicles weigh more, exactly as in a snapshot

Live: a loop, and trucks that fool it

Occupancy assumed equal lengths. Nobody slows down: add trucks, and watch the loop’s speed estimate fall.

How to read it

  • Every 30 s the loop reports a count, an occupancy, and a speed
  • The speed assumes every vehicle is a 5 m car: \(\hat v = q\,(d + 5)/o\)
  • Trucks cover the loop for longer, so the occupancy rises and the estimated speed falls, although nobody slowed down

Your phone is a sensor too

Navigation apps estimate speed from the phones that send them GPS pings. How good is that estimate?

How to read it

  • One violet dot per five-minute period: the app’s estimate minus the true space-mean speed
  • The black line is zero error. A wide spread is noise; a cloud off-centre is bias

More

  • Apps collect GPS pings at regular intervals; twice as long on a stretch, twice as many pings
  • So the average ping gives a space-mean speed, like the drone
  • The catch: only cars running the app are counted. Few users: noise. Users who drive differently: bias

Does it matter? Ask a travel-time sign

A sign turns the loop’s average speed into a travel time for 640 m of US-101. Drivers take 66 s. What does the sign say?

Loop (time-mean) 44.6 km/h
predicts 52 s: what the sign says

Edie (space-mean) 35.0 km/h
predicts 66 s: what drivers took

Take-home: the sign says 52 s: the loop underestimates travel time by a fifth.

AI at work: from raw data to clean data

The sign needs the space-mean speed, which a drone sees. But drone video is only pixels: AI turns it into trajectories.

Video: the Athens drone video with every vehicle detected and tracked by computer vision (pNEUMA Vision, EPFL, CC BY 4.0).

More

  • Collecting: deep-learning detectors and trackers turn video into trajectories almost automatically
  • Cleaning: anomaly detection flags broken detectors: stuck at zero, frozen, or physically impossible
  • Filling gaps: imputation, from regression to neural networks, estimates missing values
  • The catch: each step is itself a model, and models can be wrong

Part 5 · Beyond counting cars

LiDAR, and why it can’t see through cars

LiDAR times laser echoes to map the road in 3-D.

Predict which cars can the black car not see? Then press Reveal.

How to read it

  • Black: the self-driving car; the dashed circle: its 50 m range; violet: its beams and their echoes
  • After the reveal: green cars are seen, red dashed cars are completely hidden, grey cars are out of range
  • Each beam, one every half degree, stops at the first vehicle it hits

More

  • LiDAR sweeps laser pulses and times each echo: a 3-D point cloud, day or night
  • Points to trajectories: remove the background, group the points, label each object, track it: the trajectory of every road user
  • On the street since 2017 (Reno, Nevada); privacy by design: points only, no plates, no faces

What real LiDAR misses

A program reads real LiDAR points and boxes every vehicle it finds: out of every 100 vehicles, how many does it miss?

self-drivingcar0–10 m3of 100 missed10–20 m7of 100 missed20–30 m23of 100 missed30–40 m43of 100 missed40–50 m65of 100 missed50–54 m79of 100 misseda vehicle the detector founda vehicle it missedbeams spread out: fewer points far away →
Data: Zhu and Feng, TR-C 194 (2027) · chart © 2026 Wuping Xin · CC BY-NC-SA 4.0

Source: Zhu and Feng, TR-C 194 (2027), online 2026.

How to read it

  • A deep-learning detector is a program, a neural network, trained on many LiDAR sweeps in which people drew a box around every vehicle. Given a new sweep, a cloud of points with no labels, it draws its own boxes: “a car here, a truck there”
  • The test: one such detector (CenterPoint) read every sweep of a real test car (the nuScenes dataset); for every vehicle really there, did it draw a box?
  • Each block is 100 vehicles at that distance: green = found, dashed red = missed. Close by it misses 3; past 50 m it misses 79
  • Why: up close, vehicles hide behind other vehicles; far away, the beams spread out and too few points land on a vehicle
  • The misses are not random: a car driving in another’s shadow stays hidden for many seconds
  • So: a simulator whose self-driving cars see everything gets it wrong (Lecture 12)

Watching people, not just cars

Predict how many people are at this corner? Then reveal what LiDAR sees.

Loops: 1 car · push buttons: 0 presses · people seen: 0 LiDAR + camera: 1 car, 8 people, 2 off the crosswalks
LiDARleft-turn arrow,flashing yellowbushidden from the LiDARcamera123crosswalks: the paths the design assumesorange: the people LiDAR tracksorange boxes: loops · orange dots: push buttonsPredict: how many people are here?
Illustration · © 2026 Wuping Xin · CC BY-NC-SA 4.0

How to read it

  • Before the reveal: what the classic sensors report. Loops (orange boxes) see the one car over them; push buttons (orange dots) report nobody, because nobody pressed. As far as the signal knows, no one is here
  • After the reveal: a LiDAR on a pole at the corner (purple) tracks every person in range. Eight people are here
  • ① How people really cross: one walks diagonally through the middle of the intersection, another crosses mid-block. Designs assume the crosswalks; LiDAR records the paths people really take, and studies found they often differ
  • ② A smarter arrow: the black car turns left on a flashing yellow arrow, across the south crosswalk, where someone is about to step off the kerb. A dynamic arrow adapts to the people the LiDAR sees about to cross
  • ③ Through a crowd: the bus blocks the LiDAR’s beam (dashed purple), so the crowd behind it is invisible to the LiDAR. A camera on the other side sees them; fusing camera and LiDAR found partly hidden pedestrians over 90 % of the time
  • Why it matters: pedestrians and cyclists are the road users most at risk, and the sensors that run most signals cannot see them
  • The picture is a sketch of these findings, not measured data

Safety without waiting for crashes

Predict a loop saw 12 cars and nothing unusual. How many near misses did a camera see?

How to read it

  • The picture is a time-space diagram: time to the right, position up. The orange line is a loop at 400 m; each tick is a vehicle crossing it
  • Before the reveal: all the loop records. Every vehicle at 36 km/h, gaps of about 3 s: a calm road
  • After the reveal: the trajectories a camera, a drone or a LiDAR records. Each colour is one pair of cars: the leader solid, the follower dashed
  • Red dots: the moment a follower’s time-to-collision (TTC: time until the two meet if neither changes speed) fell under 1.5 s, a near miss
  • Why the loop misses them: TTC needs the gap and both speeds, all the time, everywhere. The near misses happen 300 m upstream; by the loop the drivers have recovered
  • The lesson: safety needs trajectories, from video, LiDAR, drones or simulation; a point sensor cannot count near misses
  • The pairs are simulated, to make the point clear, not measured data

Try it: brake in time

Now avoid the crash yourself. Game: a car at 90 km/h closes on a truck at 36 km/h. Press Brake! as late as you dare.

Time-to-collision \[ \mathrm{TTC} = \frac{g}{v_\text{follower} - v_\text{leader}} \]

Near miss (a conflict)
TTC \(\le\) 1.5 s, counted from video, LiDAR or simulation: no crash needed

How to read it

  • The road: the purple car drives at 90 km/h towards the blue truck at 36 km/h; the line under them is the gap \(g\)
  • The gauge: the arrow shows the time-to-collision now, the time until the two meet if neither changes speed. Red: under 1.25 s; orange: 1.25 to 1.5 s; green: over 1.5 s
  • Why 1.25 s: braking at 6 m/s², the car needs \(15^2/(2 \cdot 6) = 18.75\) m to slow to the truck’s speed, which takes \(15/(2 \cdot 6) = 1.25\) s of closing at the starting speed. Brake later and you hit; brake between 1.25 and 1.5 s and you miss, narrowly
  • The point: crashes are rare, so judging a road by them takes years. Near misses are common, and trajectories reveal them: a camera counts every brake under 1.5 s without anyone getting hurt
  • Post-encroachment time (PET) does the same at a crossing: the time between one road user leaving a conflict point and the next one arriving
  • Your reaction time is not modelled: the brake starts the moment you press

What is a rut, and how deep?

Heavy wheels press grooves, ruts, into asphalt, deepest where trucks brake and stand. How would you measure one?

A busy road seen from a car window: two deep grooves worn into the asphalt along the wheel paths, with cars queued ahead and a traffic signal in the distance

Photo: 14 cm ruts on road DK1 in Poczesna, Poland, with a traffic signal ahead (Burda, via Wikimedia Commons; cropped. Photo and crop: CC BY-SA 3.0).

The road, cut across heights exaggerated wheel path wheel path 1.2 m ruler rut depth = the biggest gap under the ruler one lane, about 4 m wide

How to read it

  • The photo: looking along a busy road from a car window. The two dark grooves are ruts, worn where every tyre runs: 14 cm deep, with a traffic signal ahead, where heavy vehicles brake and stand
  • The drawing: the same kind of road cut across, heights exaggerated: a dip under each wheel path
  • Measuring a rut: lay a straight 1.2 m ruler (engineers say “straightedge”) across the wheel path. The biggest gap between the ruler and the road is the rut depth
  • Why it matters: water collects in ruts, and tyres can aquaplane on it; ruts also tug at the steering. FHWA rates the rutting of an asphalt section good below 0.20 in (5 mm) and poor above 0.40 in (10 mm) (23 CFR 490.313)

Road inspection: sensors on the move

A truck measures every rut at traffic speed.

Predict where on this 1 km are the ruts deepest? Slide it along.

How to read it

  • Slider, road and plot share one axis: 0 to 1000 m. The truck straddles both wheel paths. The pink line is its laser
  • The road from above: the truck paints each wheel path as it scans, darker where the ruts are deeper: pale aqua good (under 5 mm), teal fair (5 to 10 mm), navy poor (over 10 mm). Grey is not scanned yet
  • Rut depth so far: the two wheel paths (orange left, blue right) in good, fair and poor bands: FHWA’s thresholds, good under 0.20 in (5 mm), poor over 0.40 in (10 mm), rounded here (23 CFR 490.313)
  • Across the lane, at the truck: the road surface the laser measures, heights in millimetres. Each bar (orange left, blue right) is the 1.2 m ruler of What is a rut, and how deep?; the number is the biggest gap under it
  • The answer: just before the signal at 850 m. Heavy vehicles brake, stand and pull away there, pressing the asphalt hardest
  • Real systems: a 3-D laser scans a 4 m strip at up to 100 km/h, ±0.5 mm deep, a profile every 5 mm. The kilometre here is a sketch, not measured data

One sensor is never enough: fusion

Game: buy sensors to cover all four jobs at the lowest cost. Then change the weather.

Data fusion: each sensor covers the others’ blind spots. Fusion is a model too: how were the data made?

More

Sensor Strong at Weak at
Camera detail; telling a bus from a truck from a cyclist darkness, glare, rain, snow, fog
Radar any weather, day or night; long range coarse detail; poor at telling objects apart
LiDAR precise 3-D positions; unaffected by light cost, occlusion, heavy data; rain, snow and fog add noise
Loop detector reliable counts and occupancy at one point one point only; cannot see pedestrians
Phone and vehicle GPS whole trips, citywide only some vehicles, and not a random sample
  • The scene: each sensor you buy appears where it lives: LiDAR, camera and radar on the pole, with their beams; the loop in the road; GPS from phones, via satellite. A grey dashed beam with “blind” is a sensor the weather has defeated
  • The tiles: each job turns green with the sensors that can do it now
  • Data fusion combines several sensors’ data into one picture, so each covers the others’ blind spots
  • The game’s rules simplify this table: a camera fails at night and in snow; LiDAR works at night but needs radar beside it in snow or fog; only probe data give travel times
  • Costs are points for the game, in the right order, not prices
  • The lesson: the cheapest set changes with the weather, and a set that works in every weather costs about twice the clear-day one

Sources: Yeong et al. (Sensors, 2021), Sun et al. (Sensors, 2022), NCHRP Web-Only Document 436 (2025).

Part 6 · Wrap-up

Three challenges

🏆 First correct answer, with a one-line reason, wins bragging rights

🤝

🌶️ Sensor truce

Make the loop and the drone agree exactly. What must be true?

Try it in: Build your own road

2×

🌶️🌶️ Maximum disagreement

Make the loop report twice the drone’s speed. Where would you see that traffic?

Try it in: Build your own road

🚚

🌶️🌶️🌶️ Truck trouble

What share of trucks makes a single loop read 25 % too slow?

Try it in: Live: a loop, and trucks

Summary

Answer in your head, then tap.

Loop or drone: whose average speed is higher?

The loop’s: \(\bar v_t = \bar v_s + \sigma_s^2/\bar v_s\)

Which speed goes in \(q = k\,v\)?

The space-mean \(\bar v_s\)

What decides which average to compute?

Where the data came from: a point or a stretch

Flow and density in any region \(A\)?

Edie: \(q = d(A)/\lvert A\rvert\), \(k = t(A)/\lvert A\rvert\)

The sign said 52 s. What did drivers take?

66 s: the sign was a fifth short

Safety without waiting for crashes?

Count near misses: TTC \(\le\) 1.5 s

Know which window your data came from.

This week’s lab: Lab 2 · Real Traffic from Above: build a virtual loop detector.

Notation, part 1: speeds and regions

Symbol Meaning (units)
\(\bar v_t\) time-mean speed: the average over vehicles passing a point (m/s or km/h)
\(\bar v_s\) space-mean speed: the average over vehicles on a stretch of road (m/s or km/h)
\(\sigma_s^2\) variance of speeds measured in space, in (m/s)²
\(M\) number of sub-streams in Wardrop’s model
\(q_i,\ k_i,\ v_i\) flow, density and speed of sub-stream \(i\) (veh/h, veh/km, km/h)
\(Q,\ K\) total flow and total density (veh/h, veh/km)
\(f_i,\ f_i'\) share of sub-stream \(i\) in time (\(q_i/Q\)) and in space (\(k_i/K\))
\(A,\ \lvert A\rvert\) a region of the time-space diagram, and its area (m·s)
\(d(A),\ t(A)\) total distance and total time travelled by vehicles inside \(A\) (m, s)
\(N\) number of vehicles observed (veh)

Notation, part 2: detectors and safety

Symbol Meaning (units)
\(o\) occupancy: fraction of time the loop is covered
\(d\) loop length (m); not the same as Edie’s \(d(A)\)
\(\ell,\ \ell_j\) assumed vehicle length; length of vehicle \(j\) (m)
\(\tau_j\) time vehicle \(j\) covers the loop (s)
\(T\) length of the counting period (s)
\(g\) bumper-to-bumper gap between a follower and its leader (m)
TTC time-to-collision: time until two road users collide if neither changes speed or path (s)
PET post-encroachment time: time between one road user leaving a conflict point and the next arriving (s)