Road traffic (2021)

The TENS project

FunderSwedish Energy Agency (Energimyndigheten), Dnr 2018-006615, project 46963-1
Period2018–2021
PartnersRISE AB and KTH Royal Institute of Technology, Stockholm
PeopleIan Marsh, Henrik Abrahamsson (RISE); Pei-Lun Hsu, Cosar Ghandeharioon (KTH)
DataTrafikverket MCS radar detectors and INRIX probe-vehicle speeds, E4/E75 Stockholm, October 2018

Stockholm, like any European capital, suffers from traffic jams. Winter weather makes them worse, and so do accidents, popular events and holidays. TENS took a data-driven look at the city’s motorways. The central question was whether cheap, network-wide microscopic data from vehicles can stand in for expensive fixed macroscopic sensors. In other words: can GPS or Bluetooth probe speeds be used to infer the traffic flow that roadside radar gantries measure?

Along the way the project asked practical questions:

  • How much of the road state can theoretically be inferred from probe data?
  • Can fixed-sensor flow and speed be used as ground truth?
  • Do segment-based probe measurements correlate with point measurements?
  • Are the timestamps aligned, and what averaging and smoothing windows suit per-minute data?
  • Are there privacy or integrity issues in the processing and inference?

The results are in two RISE reports, summarised below. Other TENS reports cover estimating emissions from traffic measurements, and simulation studies.

Watch: one day of TENS data

A replay of one day of traffic on the E4 Essingeleden and E75 Södra länken, Tuesday 2 October 2018, 05:00–20:00. It compares the two data sources used in the project. INRIX probe speeds are averaged over a road segment. MCS radar detectors measure spot speed and flow at a single point. The afternoon slowdown, from about 14:30 to 17:30, shows up in both.

Essingeleden traffic replay. Map segments are coloured by speed, and MCS detector rings pulse faster as flow rises. Also on YouTube, with more detail on the video page.

Explore it yourself: the interactive Traffic Replay lets you play, scrub and toggle sensors across the whole month, 1–31 October 2018.

In short

Fixed roadside radar gantries tell you exactly how many vehicles pass a point, but they are expensive and sparse. GPS probe data from vehicles (here INRIX) covers the whole road network cheaply, but only reports speed and travel time, not flow. TENS asked whether we can infer the macroscopic flow measured by Stockholm’s Motorway Control System (MCS) from microscopic floating-car data. Using the E4 through Stockholm as a test case, a simple two-segment regression on speed reached R² ≈ 0.9, flow history by hour and weekday predicted the following week with R² ≈ 0.99, and spatio-temporal neural networks brought the error from ~100% MAPE down to ~10%.

The two reports

Part IData-driven traffic flow: A state-of-the-art report — Ian Marsh, Pei-Lun Hsu, Cosar Ghandeharioon. RISE report 2021:93, ISBN 978-91-89385-83-2. 35 pages. (publication page)
Part IIData-driven traffic flow: Summary of experiments — Ian Marsh, Henrik Abrahamsson, Pei-Lun Hsu. RISE report 2021:119, ISBN 978-91-89561-10-6. 47 pages. (publication page)
LicenceBoth CC BY 4.0. Figures below are reproduced from the reports.

Why it matters

Congestion costs commuting time, fuel, CO₂ and lives: Americans spend on average nine days a year in jams, the UK loses seven billion hours, and combustion exhaust is blamed for around 5,000 premature UK deaths a year, compared with 1,850 in road accidents. TENS contributes to UN Sustainable Development Goals 3 (health), 9 (infrastructure), 11 (sustainable cities) and 13 (climate). Better flow estimates feed traffic control, variable speed limits, emission estimates and logistics planning.

Part I — the state of the art

The first report is an introduction for newcomers. It covers who measures traffic and why (Trafikverket, municipalities, researchers, Google/Waze/HERE/TomTom/INRIX, telecom operators such as Telia Crowd Insights), how it is measured (inductive loops, radar, infrared, Bluetooth/Wi-Fi re-identification, floating-car GPS, video, satellites), and the supporting systems: GIS, positioning (GPS, SWEREF99), accident data (STRADA), road weather (Trafikverket VViS, SMHI), societal events, rush hours, and GDPR.

Sense vehicles, calculate speed, infer flow
Data-driven traffic flow: sample positions from selected vehicles, compute speed from position and time differences, then infer flow from flow–speed relationships.

It then gives the traffic theory needed for the experiments: time-mean versus space-mean (harmonic) speed, the free-flow / congested / transition states, single-state models (Greenshields 1935, Greenberg 1959, Underwood 1961, Van Aerde 1995) and the dual-state “fundamental diagram” q = u · k (flow = speed × density). Approaches to traffic state estimation are classified as model-driven, data-driven or streaming-data-driven; TENS is data-driven.

Flow-density for three traffic situations
The same road at three operating points on the flow–density curve: free flow at 90 km/h, jammed at 10 km/h, and the optimal density near capacity at 70 km/h.

The datasets

  • MCS — Stockholm’s Motorway Control System: about 2,700 radar gantries roughly 300 m apart, measuring per-lane flow and time-mean speed every minute. It also drives the variable speed limits and automatic incident detection.
  • INRIX — commercial floating-car data per road segment: speed, historical average, reference speed, travel time, and confidence score (10/20/30) and C-value. It gives space-mean speed but no flow.

The test site is the E4 between MCS detectors 1159 and 1162 in central Stockholm, both directions, October 2018.

Map of MCS and INRIX locations on the E4 in Stockholm
Overlapping floating (INRIX segment, black) and fixed (MCS detectors 1159, 1162) measurements on the E4.

The data needed three preparation steps. Filtering removed INRIX points with confidence 10, which only repeat the historical speed. Smoothing applied a 30-step moving average. Shifting corrected INRIX’s ~6-minute latency against MCS (consistent with Kim & Coifman 2014) plus the timezone difference: 114 minutes in all, and the switch to winter time on 28 October.

Part II — the experiments

Traffic is very regular

Traffic flow over three weeks
MCS flow, 1–21 October 2018: the same pattern week after week.
Average flow per hour for each day of the week
Average hourly flow per weekday. Monday–Thursday are almost identical, Friday’s evening peak comes earlier, and weekends have no morning rush.

Using the average flow for each hour and weekday from the first three weeks to predict the fourth week gave a mean absolute error of 35.6 vehicles/h and R² = 0.989. On a motorway, flow history alone predicts the next week well.

Predicted versus real flow for 22-28 October
Week 4 (22–28 Oct 2018): flow predicted from the hour/weekday history of weeks 1–3 versus measured flow.

Flow from speed: a two-step regression

Plotting speed against flow shows the textbook two-phase shape, with a steeper free-flow branch than the theory suggests. That steepness makes flow easier to predict from speed. Time of day separates the branches clearly. The report also shows that the familiar shape only appears when all lanes, including the slowest, are included.

Speed versus flow coloured by time of day
MCS speed versus flow, coloured by hour of day.
Two-step linear regression with 70 km/h critical speed
One line for free flow (above the 70 km/h critical speed) and one for the congested state.

The MCS data was resampled to hours (744 points), with the first 25 days used for training and the rest for testing. On the test week the two-segment model gave MAE ≈ 115 veh/h and R² = 0.906.

Regression prediction on the test week
Two-step regression on the held-out week (blue measured, orange predicted).

Does speed variance help in free flow?

At 80 km/h the road is clearly uncongested, but flow can be anywhere from 60 to 1,600 veh/h. Following Blandin et al. (2012), drivers on an empty road choose their own speed (high variance), while denser free-flowing traffic constrains them (low variance). In the free-flow state, MCS flow versus INRIX per-hour speed variance gave Pearson −0.53 and Spearman −0.64, a real correlation and a candidate feature. INRIX’s reference speed (constant at 60 km/h) and speed bucket did not help.

Speed versus flow coloured by speed standard deviation
Speed versus flow coloured by speed standard deviation: high variance concentrates at low flow.

Deep learning: INRIX → MCS flow

Pei-Lun Hsu’s KTH thesis built five estimators on Google’s Wide & Deep architecture (three dense layers of 120/60/30 units plus a concatenating shortcut). They were trained on 1–21 October and tested on 22–29 October for the north- and southbound segments. Adding temporal features (hour, weekday) was the big win. The error fell from ~99–127% MAPE for the speed-only baseline to about 10–11% for the spatio-temporal network, which also uses the adjacent segment (the INRIX north/south correlation is above 0.95).

MAPE by flow estimation model
MAPE by model, from baseline (left) to spatio-temporal ANN (right).
Observed versus estimated flow over a day
Flow estimated by the spatio-temporal network from INRIX data versus MCS-observed flow over one day.

Conclusions

  • Where both exist, floating-car data (INRIX, GPS, Bluetooth) can be used to infer the flow that fixed MCS gantries measure.
  • Time of day and weekday are strong predictors. Hourly motorway flow is highly repeatable week to week.
  • A two-segment regression around the critical speed already scores R² ≈ 0.9. Neural networks do similarly well at higher cost, but leave more room for feature engineering.
  • Speed variance looks like a useful extra feature in the free-flow phase.
  • Practical pitfalls: probe latency (~6 min), timezone and DST alignment, non-identical segments versus points, missing lanes, and low-confidence probe samples.

Open directions include lane changes, merges and splits, traffic mix (vehicle classification from trafiken.nu cameras), using travel times and density as congestion early-warning and emission inputs, spatio-temporal models (RNN/LSTM/GCN) for short-term forecasting, streaming approaches, and spectral and wavelet methods. The authors end with a plea for open traffic data.

Related