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
  • The loop detector is a few turns of wire laid in a square cut in the pavement, about 1.8 m on a side, and wired to a cabinet by the road. Why a loop?
  • Current flowing around a loop of wire makes a magnetic field above the lane: the loop is an inductor.
  • When a car’s metal body enters that field, the loop’s inductance drops, and the electronics in the cabinet register a vehicle. So a loop sees every car that crosses one point.
  • The drone sees every car on the stretch at one instant.
  • Loops are the workhorse of freeway monitoring. The card below looks inside a loop; the rest of Part 1 surveys every other kind of sensor.

How a loop detector works

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

  • 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.
  • Sources: the wiring (loop wire, lead-in wire, pull box, lead-in cable, detector electronics in the controller cabinet) follows the FHWA Traffic Detector Handbook, 3rd ed., Vol. I (FHWA-HRT-06-108, 2006), ch. 2.
  • The 10 Hz NEMA TS 2 sampling rate and New York City’s 30 Hz sampling (its CBD pole-mounted cabinets scan the inputs faster than 10 Hz to measure vehicle length and speed) are described in Xin, W. (2023), “The forgotten bits of NEMA-TS2 high-precision timestamps”, wupingxin.substack.com, 5 December 2023.
  • The controller recording the loop’s state at 60 Hz on a freeway is from Coifman, B. (2004), An Assessment of Loop Detector and RTMS Performance, California PATH Research Report UCB-ITS-PRR-2004-30, which measures on-times in units of 1/60 s; the 30-second reports of count and occupancy are described in Bickel, P. J. et al. (2007), Measuring traffic, Statistical Science 22(4), 581–597.
  • A consequence: the detector cannot time a vehicle more finely than 1/60 s, so a short on-time is known only to about ±17 ms.
  • The electronics drive an alternating current through the coil; the drop in inductance shows up as a change in the loop’s oscillation frequency. Loops have been the backbone of freeway monitoring for decades.
  • California’s PeMS system collects data from over 39,000 individual detectors (Caltrans PeMS, pems.dot.ca.gov), and almost every freeway traffic management centre relies on them.
  • Loops are cheap to run but expensive to repair, because the road must be cut open: one reason for the non-intrusive sensors in the field guide.

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 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.
  • In the pavement (intrusive): loops, magnetometers, tubes, weigh-in-motion. Accurate, but the road must be closed to install or repair them.
  • Above or beside the road (non-intrusive): radar, video, LiDAR, infrared, acoustic, on poles and gantries. The pavement is never cut.
  • In the vehicle: phones, fleet GPS, connected vehicles. In the air: aerial photographs from aircraft, and drones.
  • Two points means the same vehicle recognised twice (a toll tag, a licence plate), which gives its travel time. An area means every vehicle on a stretch at one instant; a vehicle gives one trajectory, or pieces of it.
  • Think: where does each sensor sit on the red-light diagram from Lecture 1?
  • A horizontal line (point sensors), two horizontal lines (re-identification), a vertical line (a snapshot), or a trajectory (a probe).
  • Only video from above or from high on the roadside (drones, tall buildings, camera poles) and LiDAR recover whole trajectories, which is why datasets such as NGSIM, highD and I-24 MOTION are so valuable.

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
  • Think: for each tab, what slice of the time-space diagram does this sensor see?

  • Think: which could measure a space-mean speed directly? (Drones; two aerial photographs taken a few seconds apart; probe vehicles sampled in time.)

  • Think: which could not see a stopped queue? (Doppler radar.)

  • In the New York region, toll-tag readers have long been used to measure travel times on highways: a good local example.

  • The sensors in detail:

  • In the pavement

Sensor How it works Data Pros Cons
Inductive loop wire coil in the pavement; a vehicle’s metal lowers its inductance count, occupancy; speed with two loops mature, cheap to run, accurate counts pavement must be cut; lane closures to repair; one loop cannot measure speed
Magnetometer small puck senses the vehicle’s disturbance of Earth’s magnetic field count, occupancy, some speed quick to install in a small hole; often wireless battery life; less reliable vehicle classes
Pneumatic tube rubber tube across the road; each axle sends an air pulse axle counts, vehicle class, speed with two tubes cheap and portable, ideal for temporary counts wears out; poor in slow or stop-and-go traffic; risky to install
Piezoelectric / weigh-in-motion sensors in the pavement measure the force of each axle axle weights, vehicle class, speed the only way to weigh trucks at speed expensive; needs careful calibration; pavement must be cut
  • Above or beside the road
Sensor How it works Data Pros Cons
Microwave radar Doppler: frequency shift from moving vehicles. FMCW side-fire: ranges vehicles across the lanes speed (Doppler); count, occupancy and speed by lane (FMCW) all weather; one unit covers many lanes Doppler cannot see stopped vehicles; tall trucks hide cars behind them
Video detection cameras with image processing, now often deep learning count, speed, class, queue length, incidents rich information; one camera, many uses glare, darkness, rain and snow; occlusion; privacy
LiDAR laser pulses measure distance to every point in view precise vehicle position, shape and class very accurate 3-D picture costly; affected by heavy rain and fog
Infrared active: reflected infrared beam; passive: the vehicle’s heat presence, count, speed works day and night sensitive to weather
Acoustic microphone array hears the noise of passing vehicles presence, count, speed passive and cheap less accurate; affected by background noise
  • Point-to-point
Sensor How it works Data Pros Cons
Bluetooth / Wi-Fi readers record anonymised device IDs at two sites and match them travel time between the sites cheap; easy to deploy only a few percent of vehicles are matched; phones now randomise their IDs; privacy
Toll-tag readers read electronic toll tags (for example E-ZPass) at two sites travel time very high match rates where tags are common only tagged vehicles; needs reader infrastructure
Licence-plate cameras read plates at two sites and match them travel time, origin–destination patterns nearly every vehicle can be matched privacy and legal limits; misreads; cost
  • Mobile and aerial
Sensor How it works Data Pros Cons
GPS probes phones and fleet vehicles report their positions speeds and travel times on most roads wide coverage with no roadside hardware sample bias and low penetration on minor roads; data licences; privacy
Connected vehicles vehicles broadcast position, speed, acceleration and braking several times a second detailed vehicle trajectories and driving behaviour rich, high-frequency data few equipped vehicles so far; standards and security
Drones a camera films the road from above, then vehicles are tracked full trajectories of every vehicle in view the whole time-space diagram short flights; regulations and weather; heavy processing
Aerial photographs a camera on an aircraft photographs the road from straight above every vehicle in view: density, and speeds from two photos a few seconds apart a whole stretch at one instant; a classic, simple method one moment only; flights cost money; weather and daylight
Floating car a test vehicle drives with the traffic and records its trip travel time, delay, stops simple and direct one vehicle’s experience; labour-intensive

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).

  • 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
  • Every car and truck can be counted. One photo gives the density on each lane directly; 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.

  • 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
  • Compare the two views. An aerial photograph is one instant: a vertical line on the time-space diagram, good for density and, with a second photo, for space-mean speed.
  • Aerial photography was the classic way to measure traffic from above long before drones. The drone keeps filming, so it records the whole time-space diagram: every trajectory.
  • Later in the lecture the same video comes back, with every vehicle tracked by computer vision.

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

NoteBefore 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?

  • 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.

NoteQuick question

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

  • 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}
  • 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
  • In 1952 John Glen Wardrop, of Britain’s Road Research Laboratory, gave the two averages their precise meaning (Some theoretical aspects of road traffic research, Proceedings of the Institution of Civil Engineers).
  • At a fixed point, the share of vehicles with speed v_i is its share of the flow, so the time-mean speed is flow-weighted.
  • In space, vehicles of sub-stream i are v_i/q_i metres apart, so their density is k_i = q_i/v_i, with K = \sum_i k_i; in a snapshot the share with speed v_i is k_i/K, so the space-mean speed is density-weighted.
  • Same traffic, two different speed distributions. Fast vehicles pass a point more often, so they are over-represented in time. Slow vehicles are packed more closely, so they are over-represented in space.
  • The live card below lets you watch the two distributions separate.

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.

  • 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
  • Three things to notice. The drone histogram sits to the left of the loop histogram.
  • The harmonic mean of the loop’s speeds agrees with the drone’s plain average, which is the “which average for which data” table in action. And with the spread set to zero, all three numbers agree.

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
ImportantA 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 harmonic mean has a natural reading. Multiply its numerator and denominator by a section length L: \bar v_s = L / \big(\tfrac{1}{N}\sum_j L/v_j\big), the section length divided by the average travel time.
  • For travel time, use the space-mean speed: it is the section length over the average travel time.

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).
  • 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)
  • The middle term vanishes because the deviations from a mean average to zero. The last term is the variance of speeds in space, \sigma_s^2.
  • The point-data version follows from Appendix A1: at a point, \bar v_s is the harmonic mean of the passing speeds, and for a small spread 1/\bar v_s = \overline{1/v} \approx 1/\bar v_t + \sigma_t^2/\bar v_t^3, so \bar v_s \approx \bar v_t - \sigma_t^2/\bar v_t.
  • Reference: Rakha, H. and Zhang, W. (2005). Estimating traffic stream space mean speed and reliability from dual- and single-loop detectors. Transportation Research Record 1925.

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

  • 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)}

  • |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
  • Reference: Edie, L. C. (1965). Discussion of traffic stream measurements and definitions. Proceedings of the Second International Symposium on the Theory of Road Traffic Flow, London, 139–154.

Try it: any region

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

  • 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
  • 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
  • Try the three shapes. With the loop, v(A) matches the harmonic mean of the crossing speeds, not the plain mean: that is the misconception card in action. With the snapshot it matches the plain average.
  • Now slide the loop back into the red-light queue (around 250 m, 45 s): cars stop on it, v(A) counts the time they stand there, and it falls below the harmonic mean of the crossing speeds.
  • A real loop sees the same thing as high occupancy. Put the square in the queue during the red: k is high, q and v are near zero.

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}.

  • 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

  • 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
  • Think about it: occupancy is a fraction with no units, while k is in vehicles per kilometre. Where do the units come from in k = o/(d + \ell)?

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.

  • 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
  • Set trucks to 0%: the estimate matches 72 km/h, apart from random noise within each 30-second period.
  • At 20% the estimate drops to about 52 km/h (72 \times 6.8/9.4, Appendix A3), although nobody slowed down; one 30-second report can land a few km/h either side.
  • Real systems therefore measure speed directly, with dual loops or radar; a speed drop at a single loop is not always congestion.

Your phone is a sensor too

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

  • 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
  • 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
  • Two lessons. Low penetration gives noise: the scatter shrinks as the share of app users grows.
  • A biased sample gives bias: set “drive faster” to 10% and push penetration to 50%, and the cloud narrows but stays off-centre. More data cures noise, never bias.
  • Phones give space-mean speeds, loops time-mean ones. Does the difference cost anyone anything? Does it matter? Ask a travel-time sign answers with real data.

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).

  • 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

Two pipelines: video to trajectories through a deep-learning detector, and detector readings to clean data through anomaly detection and imputation

© 2026 Wuping Xin · CC BY-NC-SA 4.0
  • A tracker that swaps two cars’ identities, or an imputation that fills a gap with a smooth “normal day”, changes the traffic you think you see.
  • In PEMS08, a public freeway dataset widely used to benchmark AI forecasting, some detectors report exactly identical time series: a sign that missing data were filled in before release.
  • Always ask how your data were made. NGSIM’s trajectories, by contrast, took years of work in the mid-2000s, with tracking software followed by manual checking. You will do both jobs yourself.
  • In Lecture 3 you will see a deep-learning detector and tracker turn drone video into trajectories; in Lab 3 you clean such tracks and check them against physics, and Lab 4 hunts for broken detectors and fills their gaps.

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.

  • 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
  • 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
  • A LiDAR sensor sweeps laser pulses around itself and times each echo. Many times a second it produces a point cloud: a 3-D picture of everything in view, by day or night.
  • From points to trajectories: remove the background (road, buildings, trees), group the remaining points into objects, label each object a vehicle or a pedestrian, then follow it from frame to frame (Wu et al., TRR, 2018; Zhao et al., TR-C, 2019).
  • In 2017 Hao Xu’s group at the University of Nevada, Reno mounted a LiDAR beside Virginia Street in Reno, one of the first roadside uses of the sensor; more followed along the corridor and in Henderson, Nevada.
  • The data are only points: no colour, no licence plates, no faces (UNR, 2020). NCHRP’s guide to signal-based counting notes that, unlike cameras, LiDAR raises no data-privacy concerns (NCHRP Web-Only Document 436, 2025).
  • This is Lecture 1’s trajectories again, now collected from a pole at the corner instead of a drone or a tall building. Think: which slice of the time-space diagram does a roadside LiDAR see?
  • Every trajectory, but only within its range, typically a single intersection.
  • This toy is flat: it casts beams in two dimensions.
  • A real LiDAR sits on the roof and its beams fan out vertically, so it can often see the roof of a car behind a low car; only tall vehicles such as trucks and buses cast long shadows.
  • A flat model therefore over-estimates how much is hidden, which is exactly the gap Zhu and Feng’s surrogate sensor model (MIDAR) closes with a height-aware “ray-hit” feature.

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.

  • 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)
  • Miss rates are the false-negative rates of the CenterPoint LiDAR detector on the nuScenes dataset, by distance band, as reported by Zhu and Feng.
  • Source: Zhu, T. and Feng, Y., “Empowering microscopic traffic simulators with realistic perception using surrogate sensor models”, Transportation Research Part C 194 (2027), 106031; available online 2026 (preprint arXiv:2508.02858).
  • Up close, misses come mostly from occlusion; far away, from too few points landing on the vehicle.

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
  • 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
  • LiDAR at intersections in Texas and Utah tracked pedestrians and found that their crossing paths often differ from what the design assumed.
  • The same project built a “dynamic flashing yellow arrow” that reacts to pedestrians the LiDAR sees about to cross (National Institute for Transportation and Communities, 2023).
  • A Caltrans-funded project at UC Riverside fused camera and LiDAR data to detect pedestrians and cyclists even when they are partly hidden, with over 90% recall, and to warn connected vehicles of them (Caltrans, 2025).

Safety without waiting for crashes

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

  • 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
  • Crashes are rare. Waiting for enough of them to judge an intersection can take years, and each one costs lives. Conflicts, or near misses, are far more common.
  • Time-to-collision (TTC) is how long until two road users collide if both keep their speed and path (Hayward, 1972); in the formula g is the bumper-to-bumper gap, and it applies while the follower is faster than the leader.
  • Post-encroachment time (PET) is the time between one road user leaving a conflict point and the next arriving there (Allen, Shin and Cooper, 1978).
  • Both are measured from video (Ismail et al., TRR, 2009) and from roadside LiDAR, including vehicle–pedestrian near-crashes (Wu et al., Accident Analysis & Prevention, 2018).
  • Simulation counts them too: FHWA’s Surrogate Safety Assessment Model logs a conflict when TTC \le 1.5 s or PET \le 5 s by default (Gettman et al., 2008).
  • Connect this to the time-space diagram. For two cars in one lane, the gap is the vertical distance between their trajectories, and the closing speed is the difference in their slopes.
  • TTC is how long until the two lines would meet. A small TTC means two trajectories almost touching. This is why complete trajectories, from drones or LiDAR, are so valuable for safety.

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

  • 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
  • Play it with a friend: who can brake under 1.5 s without crashing? That is exactly a near miss: nobody was hurt, but a camera would log it.
  • Think: why is 1.25 s the hard limit? (The “How to read it” box has the arithmetic: the car needs 18.75 m to shed 54 km/h at 6 m/s².)

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
  • 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.

  • 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
  • Mobile LiDAR mapping combines scanners, cameras and precise positioning (GNSS and inertial sensors) to map lane markings, signs, poles, manholes and bridge clearances in one pass (Guan et al., 2016).
  • NCHRP Report 748 gives state DOTs guidelines for using it (Olsen et al., 2013).
  • For pavement condition, 3-D laser systems scan a strip 4 m wide, with about 4,000 points across the lane, vertical accuracy of about ±0.5 mm and a profile every 5 mm at 100 km/h, day or night (Chang et al., 2020, pp. 6–7).
  • From these scans agencies measure cracking, rutting and faulting (Chang et al., 2020).

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?

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).

Further reading: sensing beyond counting cars

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.

  • In full: “average speed” has two answers, time-mean (point sensors) and space-mean (snapshots, and phone pings).
  • Wardrop (1952): the time-mean speed is flow-weighted, the space-mean speed is density-weighted, and q = k\,\bar v_s. Which average to compute depends on where the data were collected, not on which speed you want.
  • Edie’s definitions work for any region, and q = kv always holds with them. Picking the wrong average can cost a fifth of your travel-time estimate, and a single loop can be fooled by trucks.
  • Machine learning now collects, cleans and fills traffic data, but each of those steps is a model that can be wrong.
  • Sensors sit in the pavement, beside the road, in vehicles or in the air, and see a point, two points, an area or a trajectory.
  • LiDAR and multi-sensor systems see pedestrians, near misses and the road itself; no sensor sees everything, so agencies fuse them.
  • Next week: the fundamental diagram, the most important curve in traffic, and the puzzles it cannot explain.

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)

Appendix: the maths

A1 · Why a point sees the space-mean speed through a harmonic mean

Use Wardrop’s streams: stream i has flow q_i, density k_i and speed v_i, with q_i = k_i v_i in each. The space-mean speed weights each stream by its density:

\begin{aligned} \bar v_s &= \frac{\sum_i k_i v_i}{\sum_i k_i} \\ &= \frac{\sum_i q_i}{\sum_i q_i / v_i}. \end{aligned}

The second line uses k_i = q_i / v_i. Over a counting period T, stream i sends N_i = q_i T vehicles past a point, so in terms of the N = \sum_i N_i vehicles that pass:

\bar v_s = \frac{N}{\sum_{j=1}^{N} 1/\dot x_j}.

That is the harmonic mean of the passing speeds. A loop that records each vehicle’s speed can therefore estimate the space-mean speed, provided it averages the right way: the arithmetic mean gives the time-mean speed instead.

A2 · Edie’s definitions at the two extremes, part 1

Recall q(A) = d(A)/|A|, k(A) = t(A)/|A| and v(A) = d(A)/t(A).

A thin region, long in time: a loop. Take a strip of length \Delta x at one place, open for a period T, so |A| = T\,\Delta x. Each of the N vehicles that pass drives \Delta x inside it, in a time \Delta x/\dot x_j:

\begin{aligned} d(A) &= N\,\Delta x, \\ t(A) &= \Delta x \sum_{j} 1/\dot x_j. \end{aligned}

So q = N/T, the count per unit time; k = \tfrac{1}{T}\sum_j 1/\dot x_j; and v = N / \sum_j 1/\dot x_j, the harmonic mean of A1.

A2 · Edie’s definitions at the two extremes, part 2

A thin region, long in space: a snapshot. Take a stretch of length X at one instant, open for a short \Delta t, so |A| = X\,\Delta t. Each of the M vehicles on the stretch spends \Delta t inside it, and drives \dot x_j\,\Delta t:

\begin{aligned} d(A) &= \Delta t \sum_{j} \dot x_j, \\ t(A) &= M\,\Delta t. \end{aligned}

So k = M/X, the vehicles per unit length; v = \tfrac{1}{M}\sum_j \dot x_j, the plain average of the speeds on the road; and q = \tfrac{1}{X}\sum_j \dot x_j. In both extremes, and in every region in between, q(A) = k(A)\,v(A) holds exactly.

A3 · How much a wrong vehicle length costs a single loop

A single loop measures flow q and occupancy o, and estimates speed from Part 4’s k \approx o/(d + \ell). If it assumes every vehicle has length \ell_0, it reports

\hat v = \frac{q\,(d + \ell_0)}{o}.

The true relation uses the true average length \bar\ell of the passing vehicles, o = (d + \bar\ell)\,q/\bar v_s. Divide:

\frac{\hat v}{\bar v_s} = \frac{d + \ell_0}{d + \bar\ell}.

  • With cars only, \bar\ell \approx \ell_0 and the estimate is right.
  • With trucks, \bar\ell > \ell_0 and the loop under-reports the speed. The live loop in Part 4: a 1.8 m loop, 5 m cars assumed, and a 20 % share of 18 m trucks. Then \bar\ell = 7.6 m, so \hat v/\bar v_s = 6.8/9.4 = 0.72: a 28 % underestimate, and 72 km/h is reported as about 52.

This is why speeds from single loops are only estimates, and why pairs of loops, which time each vehicle between them, are used where speed matters.