Data-driven traffic flow: Summary of experiments

Authors: Ian Marsh, Henrik Abrahamsson (RISE) and Pei-Lun Hsu (KTH)
Venue: RISE Report 2021:119, ISBN 978-91-89561-10-6, CC BY 4.0
Year: 2021
Topic: Road traffic flow
Project: TENS, Swedish Energy Agency (Energimyndigheten) project 46963-1, 2018–2021

Report (DiVA) · DiVA record · Companion report: state of the art · Road traffic project · Pei-Lun Hsu's thesis

Summary

This is the second of two reports from TENS, a Swedish Energy Agency project on traffic, energy and emissions in Stockholm. The first report introduced the data and the traffic theory. This one reports the experiments.

The question is practical. Stockholm's Motorway Control System (MCS) counts every vehicle with radar on overhead gantries. It is accurate but expensive, and covers only the main motorways. Floating-car data from INRIX, built from GPS in phones and vehicles, covers far more roads but gives only speed, not how many vehicles pass. Flow is what matters for emissions and capacity. So: can flow be estimated from speed?

The main findings:

  • Time of day predicts flow very well. The hourly average of three weeks predicted the fourth week with R² = 0.989, an average error of 36 vehicles per hour.
  • Speed predicts flow well once the two traffic states are separated. A regression with one line for free flow and one for congestion, split at a critical speed of 70 km/h, scored R² = 0.89 on training data and 0.906 on the test week.
  • Speed variance helps in free flow. When traffic is light, drivers choose their own speed and the spread of speeds is wide. That spread carries information about flow that the mean speed does not.
  • Neural networks did about as well, at higher cost, but leave more room for adding features.
Locations of the MCS radar and INRIX road segments in Stockholm
The MCS detectors and matching INRIX segments on the E4 in Stockholm.

The data

  • MCS: per-lane flow and mean speed every minute from radar on gantries along the E4 and other Stockholm motorways, from Trafikverket.
  • INRIX: segment speeds from floating-car data, with reference speeds and confidence values, for the same stretches.
  • Period: October 2018, three weeks for training and the fourth for testing.

Matching the two sources took real work. Timestamps were misaligned, the two systems used different time zones (UTC and local time), INRIX needed smoothing, and the segments had to be matched to detector positions.

Flow over one week in October 2018
Flow over one week. Weekdays have morning and afternoon peaks; weekends are flatter and later.

The fundamental diagram in practice

Traffic theory says that flow rises with density until a critical point, then falls as the road jams. Plotted as speed against flow, this gives two branches: a free-flow branch where speed stays high as flow rises, and a congested branch where both speed and flow drop.

Speed against flow coloured by time of day
Speed against flow, coloured by hour. Congestion (lower right) appears at rush hours; night-time traffic (blue) sits at high speed and low flow.

The two-step regression fits one line to each branch, with the split at 70 km/h. A plain linear model can predict negative flows at high speed, so predictions were floored at 104 vehicles per hour, the lowest hourly flow in the training data.

Two-step regression with a critical speed of 70 km/h
The two-step model: one line for free flow (green), one for congestion (grey), meeting near the critical speed.
Predicted and recorded flow over a test week
Predicted (orange) against recorded flow (blue) over the test week: mean absolute error 115 vehicles per hour, R² 0.906.

INRIX speed against MCS flow

The real test is to predict MCS flow from INRIX speed. The relationship is noisier. INRIX speeds are smoothed and lag the radar, and a road segment does not match a detector exactly. The free-flow branch is flat, so speed alone says little about flow there. That is where speed variance and time of day help.

INRIX speed against MCS flow, hourly means
INRIX speed against MCS flow, hourly means for 1–21 October 2018.

Neural networks

A wide-and-deep network took INRIX speeds, time features and other INRIX fields (reference speed, confidence) as input. It followed the daily profile closely, but did not clearly beat the simple models on this amount of data.

Neural-network flow estimate over one day
Neural-network estimate (blue) against observed flow (grey) over one day.

Discussion

Traffic is predictable over long time scales and hard over short ones. One driver braking hard can ripple through a lane. For planning and emission estimates, which work on hours and days, a time-of-day profile plus speed is enough. For control, which works on minutes, the models need more.

The simplest models were the most useful. Two straight lines and a clock explain most of the variation and can be checked by an engineer. That matters if the estimates feed decisions about speed limits, congestion charges or emissions.

Future work

The report lists four directions:

  • Spatial–temporal correlation. INRIX speeds on neighbouring segments correlated above 0.95. Using upstream and downstream segments as features improved accuracy in other studies.
  • Flow prediction, not just estimation: forecast the next 15–60 minutes.
  • Density as a control parameter. Density separates free flow from congestion better than speed or flow; see 12 years of traffic flow data.
  • Other methods: graph neural networks over the road network, Gaussian processes that give uncertainty with each estimate, and physics-informed models that respect the conservation of vehicles.

The EU perspective

  • ITS Directive (EU) 2023/2661 and Delegated Regulation (EU) 2022/670 require road authorities to publish real-time traffic data, including speeds and flows, through national access points in DATEX II format. Methods like these let authorities estimate flow on roads with no detectors from probe data they can obtain.
  • Euro 7 Regulation (EU) 2024/1257 and the Ambient Air Quality Directive (EU) 2024/2881 tighten vehicle and city air-quality limits. Emission estimates need flow, not only speed, which was the TENS motivation.
  • The Common European Mobility Data Space aims to combine public sensor data with private probe data such as INRIX's under common rules.
  • High-Value Datasets Regulation (EU) 2023/138 puts mobility data among the datasets that must be free through APIs.
  • AI Act (EU) 2024/1689: AI used as a safety component in road traffic management is high-risk (Annex III), so transparent models like the two-step regression are easier to approve.

References

  1. I. Marsh, H. Abrahamsson and P.-L. Hsu, Data-driven traffic flow: summary of experiments, RISE Report 2021:119.
  2. I. Marsh, P.-L. Hsu and C. Ghandeharioon, Data-driven traffic flow: a state-of-the-art report, RISE Report 2021:93.
  3. S. Blandin, A. Salam and A. M. Bayen, "Individual speed variance in traffic flow: analysis of Bay Area radar measurements," TRB Annual Meeting, 2012.
  4. N. Bhouri, M. Aron and H. Haj Salem, "A data-driven approach for estimating the fundamental diagram," Promet 31(2), 2019.
  5. Y. Duan, Y. Lv, Y.-L. Liu and F.-Y. Wang, "An efficient realization of deep learning for traffic data imputation," Transportation Research Part C 72, 2016.
  6. Å. Forsman, A. Vadeby, D. Gundlegård and R. Ringdahl, Utvärdering av hastighetsmätningar med blåtandssensorer, VTI rapport 969, 2015.
  7. L. Elefteriadou, An Introduction to Traffic Flow Theory, Springer, 2014.

Citation

Ian Marsh, Henrik Abrahamsson and Pei-Lun Hsu, Data-driven traffic flow: summary of experiments, RISE Report 2021:119, 2021. Report.

BibTeX

@techreport{marsh2021experiments,
  title       = {Data-driven traffic flow: Summary of experiments},
  author      = {Marsh, Ian and Abrahamsson, Henrik and Hsu, Pei-Lun},
  institution = {RISE Research Institutes of Sweden},
  number      = {RISE Report 2021:119},
  year        = {2021}
}

More in Road traffic flow: ← Data-driven traffic flow: A state-of-the-art report

← All publications