1 · Why Traffic Is Weird

A jam out of nothing · trajectories · flow, density and speed

Part 1 · A jam out of nothing

The puzzle

In 2008, researchers in Japan asked 22 drivers to drive around a 230 m circle, all at the same steady speed. There was no bottleneck, no accident and no traffic light. (Sugiyama et al., New Journal of Physics, 2008)

What happened next?

Before you watch: predict

Will a jam form? If one does, which way will it move: with the traffic, or against it? Make a guess before you go on.

The starting state: 22 cars evenly spaced around a 230 m circle, all at the same speed

Watch it happen

We can recreate the experiment below. Each dot is a car, coloured by its speed. The car with the black ring is you. Just wait and watch.

Follow one driver

Keep watching the ring on the previous slide. This is your speed, the car with the black ring. Nobody ahead of you ever had a reason to stop, yet you stop and go, again and again.

What just happened?

  • A jam formed within minutes, exactly as in the 2008 experiment. Nobody caused it. It grew out of tiny fluctuations that each driver over-corrected.
  • The red band in the right-hand plot slopes downward: the jam moves backward while every car moves forward.
  • Try it: raise driver responsiveness to 1.5. The jam dissolves. Automated vehicles with well-designed cruise control could do exactly this (Lecture 9).

It happens on real freeways, every morning

This is not just a simulation. In 2005 the Federal Highway Administration filmed US-101 in Los Angeles and recorded the position of every vehicle, ten times a second. Here are four minutes of one lane:

Time-space diagram of real US-101 traffic, showing a red stop-and-go band moving backward

The red band is a stop-and-go wave, just like the one on the ring. It travels backward, against the traffic, at roughly 15–20 km/h. The same speed shows up on freeways all over the world. In Lab 1 you will load these data yourself and measure the wave’s speed.

The 1959 experiment: one number decides

In 1959, Robert Herman, Elliott Montroll, Renfrey Potts and Richard Rothery at General Motors Research wrote down the simplest possible driver. Each driver adjusts speed to match the car ahead, but only after a reaction time \(T\):

\[ \ddot x_{n+1}(t) = \lambda\,\big[\dot x_n(t-T) - \dot x_{n+1}(t-T)\big]. \]

Here \(\lambda\) is how strongly the driver responds. Everything depends on one number, \(C = \lambda T\): how strongly the driver reacts × how late.

Below, the leader of a line of 8 cars brakes briefly, then speeds up again. Watch what happens to the cars behind as you change \(C\).

Try it: C decides

Stable driver, unstable line

The key idea: stability of one car is not stability of the line. Between \(C = 1/2\) and \(C = \pi/2\), every driver on their own settles down perfectly well, and yet the line of cars amplifies disturbances. That is exactly what happened on the ring road. It is also why the ring-road jam dissolved when you made drivers more attentive: faster reactions mean a smaller \(T\), and so a smaller \(C\). You will derive all three thresholds yourself in Lecture 9.

In Lab 2 you will rebuild this 1959 experiment from scratch, find the thresholds, and discover when a line of perfectly reasonable drivers crashes.

Your turn: be the smart car

The jam is back. This time you drive the black car. Tick the box, then choose one cruising speed; your car holds it smoothly, never closer to the car ahead than is safe. Can one driver dissolve the jam for all 22? Watch the jam meter.

Part 2 · Reading traffic: trajectories

A trajectory is a story

A vehicle’s trajectory is its position over time, \(x(t)\). Draw it with time across and position up, and its shape tells the story of the trip.

What you see What it means
Slope of the line speed, \(v = dx/dt\). Steeper is faster
Flat (horizontal) line stopped
Bending flatter braking
Bending steeper speeding up

One car's trajectory: steep while cruising, bending flatter while braking, flat while stopped, bending steeper while speeding up

Try it: drive one car

A car cruises, brakes for a red light at 200 m, waits, then drives off. Change how fast it goes and how long it waits, and watch the story change shape.

Many trajectories: the time-space diagram

Draw every vehicle on one picture and you get a time-space diagram.

  • Spacing is the vertical gap between two trajectories: how far apart two cars are at one instant.
  • Headway is the horizontal gap: how much time passes between two cars at one point.
  • In a single lane, trajectories never cross. A crossing means someone changed lanes, or crashed.

Three parallel trajectories, with spacing as the vertical gap and headway as the horizontal gap

Live: a red light and eight cars

Eight cars arrive at a traffic light, which turns red at 16 s and green at 46 s. Press Play, or drag the time slider yourself. The road is on the left; its time-space diagram is on the right. Colour shows speed: red is slow, green is fast.

Can you read it?

Use the red-light diagram on the previous slide.

  1. While the light is red, the points where trajectories turn flat move down the diagram, one car after another. What is moving down, and roughly how fast?
  2. When the light turns green, the cars do not all start together. Where does the “start moving” signal travel?
  3. The stopped cars have the smallest spacing of all, yet during the red no car passes the stop line. So is a queue “high density, zero flow”? Where is the flow highest just after the green?

Answers

  1. The back of the queue. It moves upstream, against the traffic, as each arriving car stops a little further back. Its speed is the slope of the line joining the points where the trajectories turn flat. This is a shock wave, the subject of Lecture 5.
  2. Backward, from the stop line upstream. Each car can start only after the car ahead has moved. This start-up wave travels upstream at roughly 15–20 km/h, like the waves on the ring road and on US-101.
  3. Yes: the queue is at jam density with zero flow. Just after the green, flow is highest at the stop line, where cars leave the queue at the road’s capacity. That is exactly the point where a traffic engineer would measure saturation flow.

Trajectories at work: traffic signals

The red-light diagram you just read is exactly how engineers now evaluate real signals, using trajectories from connected vehicles and phones instead of detectors in the pavement.

  • Retiming signals with a few percent of cars. Henry Liu’s group at Michigan retimed 34 signals in Birmingham, Michigan using only GM vehicle trajectories, about 7% of traffic. Delay fell by up to about 20% and stops by up to about 30% (Wang et al., Nature Communications, 2024). Earlier, with DiDi, the same group optimized signals in Jinan, China from ride-hailing trajectories (Zheng et al., TRB, 2018).
  • Signal report cards. Purdue’s group (Darcy Bullock) computes arrivals on green, split failures and level of service from commercial connected-vehicle data, with no detectors at all (Saldivar-Carranza et al., TRR, 2021), including diamond and diverging diamond interchanges (J. Transportation Technologies, 2021 and 2022).
  • Coordinating an arterial. Jianyuan Xu and Zong Tian at the University of Nevada, Reno use trajectories to evaluate arterial coordination (Xu et al., IJTST, 2025) and to split a corridor into coordinated groups by where drivers actually go (Xu and Tian, TRR, 2023).

More in Lecture 5 (queues and shock waves) and Lecture 12 (a real signal controller in the loop).

Trajectories at work: automated vehicles

  • Learning how people drive. Car-following and lane-changing models are calibrated on trajectories. Deep learning can go further: Zhu, Wang and Wang (TR-C, 2018) trained a human-like car-following model on 2,000 events from the Shanghai Naturalistic Driving Study.
  • Testing automated vehicles. Dangerous situations are rare in real driving, so testing on public roads alone would take enormous mileage. Feng et al. (Nature, 2023) trained background vehicles on naturalistic driving data, then edited their behavior to keep only the safety-critical moments, making tests far faster while staying statistically unbiased.
  • Naturalistic driving data follow one driver for months, instead of every vehicle on one stretch of road. The largest, the SHRP2 study (2010–2013), instrumented the cars of more than 3,400 US drivers: about 5.4 million trips and over 1,500 crashes on video.

More in Lecture 8 (car-following), Lecture 9 (automated vehicles and phantom jams), Lecture 10 (calibration) and Lecture 12 (reinforcement learning).

Trajectories beyond this course: travel demand

Can trajectories feed travel demand models? Yes, but not the ones in Lab 1.

High-frequency trajectories Sparse GPS traces
Examples NGSIM, highD phones, ride-hailing, connected vehicles
Sampling 10–25 times a second every few seconds to minutes
Coverage every vehicle, a few hundred metres some vehicles, the whole city, whole trips
Good for traffic flow, driver behavior origins and destinations, route choice

Sparse traces are now a major input to demand models: origin–destination matrices from phone location data (Çolak et al., TRR, 2015) and route choice from smartphone GPS (Bierlaire, Chen and Newman, TR-C, 2013). The catch: only some travelers are observed, and not a random sample, so the data must be expanded and corrected for bias.

Where do trajectories come from?

Dataset Where How What
NGSIM (FHWA, 2005–06) US-101 and Lankershim Blvd (Los Angeles), I-80 (Emeryville, CA), Peachtree St (Atlanta) video from tall buildings, 10 Hz every vehicle, about 500–700 m
highD (RWTH Aachen, 2017–18) German highways near Cologne drone video, 25 Hz 110,000 vehicles, 16.5 h
inD, rounD, exiD German intersections, roundabouts, ramps drone video cars, trucks, cyclists, pedestrians
pNEUMA (EPFL, 2018) central Athens a swarm of 10 drones almost half a million trajectories
I-24 MOTION (Vanderbilt) 4.2 miles of I-24, Nashville 276 pole-mounted cameras every vehicle, every morning
TGSIM (FHWA) Chicago, Washington DC helicopters and fixed cameras human drivers next to automated vehicles
Waymo Open Motion, Argoverse 2 US cities sensors on self-driving cars the scene around one vehicle

Full trajectories of every vehicle are rare and precious. Most traffic data are only slices of the time-space diagram, such as a line at one point or a snapshot at one instant. What each slice can and cannot tell us is Lecture 2. In Lab 1 you will load real NGSIM trajectories yourself.

NGSIM: why the data had to be rebuilt

NGSIM turned video into trajectories automatically. Positions were close, but speeds and accelerations come from differentiating positions, and differentiating amplifies every small error.

  • Raw NGSIM contains large measurement errors (Punzo, Borzacchiello and Ciuffo, TR-C, 2011): accelerations no car can produce, speeds that jump in steps, and followers that drive through their leader (Coifman and Li, TR-B, 2017).
  • Smoothing: filter the positions before differentiating (Thiemann, Treiber and Kesting, TRR, 2008).
  • Reconstruction: Montanino and Punzo (TR-B, 2015) rebuilt the I-80 data so every trajectory obeys physics and every leader–follower pair stays consistent. With the rebuilt data, models reproduced the observed jams better.
  • Re-extraction: Coifman and Li (TR-B, 2017) went back to the original video and re-tracked vehicles by hand. They argued that some errors cannot be cleaned away, and they found 11% more vehicles.

The lesson: calibrate a car-following model on raw NGSIM and it learns the noise, not the driver. Always check a trajectory’s speed and acceleration before trusting it. You will see this in Lab 1, and it matters again in Lectures 8 and 10.

Part 3 · Three numbers describe traffic

Flow, density and speed

Variable Symbol Units Measures
Flow \(q\) veh/h vehicles passing a point per hour
Density \(k\) veh/km vehicles on a stretch of road
Speed \(v\) km/h how fast they move
Flow is counted at a line across the road; density is counted on a stretch of road

In a steady stream they are linked by

\[ q = k\,v. \]

Try it: the fundamental diagram

Greenshields (1935) proposed that speed falls linearly as density rises: \(v = v_f\,(1 - k/k_j)\). Then \(q = v_f\,k\,(1 - k/k_j)\). Move the sliders and watch the road’s capacity change.

Part 4 · Wrap-up

This semester, you will learn to…

  • Explain where jams come from, how fast they move, and when they clear (Lectures 3–6)
  • Build your own traffic simulator in Python, piece by piece (all semester)
  • Measure traffic from real data: drone and roadside video, freeway sensors (Lectures 1–4)
  • Fit models to data, and know how much to trust them (Lecture 10)
  • Use AI well: estimating and forecasting traffic, reinforcement learning, and knowing when a simple rule wins (Lectures 9, 11 and 12)
  • Understand digital twins: simulations kept in sync with real roads, with real signal controllers plugged in (Lecture 12)

Three challenges

Use the simulations on this page. First to share the answer with the class, with a one-line explanation, gets bragging rights.

  1. Fewest cars. With driver responsiveness at 0.5, what is the smallest number of cars on the ring that still produces a jam? Why does a jam need enough cars?
  2. Just attentive enough. With 22 cars, what is the lowest driver responsiveness that keeps traffic smooth?
  3. The tipping point. In the 1959 experiment, find the value of \(C\) at which the last car’s disturbance is exactly as large as the first follower’s. Theory says \(1/2\). Do you get \(1/2\)? (Lab 2 explains why not.)

Summary

  • Jams can appear out of nothing, and they travel backward.
  • A driver who is stable alone can still be part of an unstable line of cars: \(C = \lambda T\) decides.
  • Trajectories and the time-space diagram contain all the information about a traffic stream.
  • Flow, density and speed summarize it, and \(q = kv\) links them.
  • Next week: what sensors really measure, and why “average speed” has two different answers.

This week’s labs: Lab 1 · Real Traffic from the Sky and Lab 2 · Phantom Jams on Your Laptop. Both run in Colab with one click.

Play more: the Shock Wave Builder previews Lecture 5.

Notation

Symbol Meaning Units
\(t\) time s
\(x(t)\) position of a vehicle along the road: its trajectory m
\(v = dx/dt\) speed m/s or km/h
\(a = d^2x/dt^2\) acceleration m/s²
\(s,\ h\) spacing (distance to the car ahead), headway (time to the car ahead) m, s
\(q\) flow: vehicles passing a point per unit time veh/h
\(k\) density: vehicles per unit length of road veh/km
\(v_f,\ k_j\) free-flow speed, jam density km/h, veh/km
\(k_c,\ q_{\max}\) critical density, capacity (the top of the fundamental diagram) veh/km, veh/h
\(T\) driver reaction time (Herman et al.) s
\(\lambda\) driver sensitivity: how strongly a driver responds 1/s
\(C = \lambda T\) the one number that decides stability —