Authors: Ian Marsh (RISE), Pei-Lun Hsu and Cosar Ghandeharioon (KTH)
Published as: RISE Report 2021:93, ISBN 978-91-89385-83-2 (35 pages)
Project: TENS, Swedish Energy Agency (Energimyndigheten), Dnr 2018-006615, 2018–2021
Year: 2021
Topic: Road traffic flow
Licence: CC BY 4.0
Report (PDF) · DiVA record · Sister report: Summary of experiments · TENS project page · Interactive traffic replay

Summary
This is the first of two reports from TENS, a Swedish Energy Agency project run by RISE and KTH from 2018 to 2021. It is written for newcomers. It explains why traffic flow matters, who measures it and how, the traffic theory you need to read the results, and what the raw Stockholm data looks like. The technical results are in the sister report.
The central question in TENS is whether cheap, network-wide speed data from vehicles (GPS or Bluetooth probes) can stand in for expensive fixed roadside sensors, and in particular whether it can be used to infer traffic flow, which probes do not measure directly.
Why traffic flow matters
Congestion costs time, money, health and lives. Americans spend on average nine days a year in jams, and the UK loses seven billion hours. Combustion exhaust is blamed for about 5,000 premature deaths a year in the UK, compared with 1,850 in road accidents. Hauliers need to know where queues form, and stress from congestion is one of the big complaints of modern living.
The report links the work to four UN Sustainable Development Goals: 3 (health, through lower emissions), 9 (infrastructure and innovation), 11 (sustainable cities) and 13 (climate action).
How traffic is measured
Traffic is measured by road authorities (in Sweden, Trafikverket), municipalities, researchers, map and navigation companies (Google, Waze, HERE, TomTom, INRIX) and telecom operators such as Telia Crowd Insights. The sensors differ in what they can see:
| Detector | Volume / count | Speed | Occupancy |
|---|---|---|---|
| Inductive loop | Yes | Yes | Yes |
| Radar | Yes | Yes | Yes |
| Active infrared | Yes | Yes | No |
| Passive infrared | Yes | Yes | Yes |
| Bluetooth | Yes | Yes | Yes |
| Floating car data (GPS) | No | Yes | Yes |
| Video image processing | No | Yes | Yes |
| Satellite imaging | Yes | Yes | Yes |
Fixed (macroscopic) measurement. Stockholm’s Motorway Control System (MCS) has about 2,700 radar gantries roughly 300 m apart. They measure per-lane flow and time-mean speed every minute, and also drive the variable speed limits and automatic incident detection. The data is accurate but the sensors are expensive and only cover the main roads.
Floating (microscopic) measurement. Vehicles report their own GPS position and speed, or are re-identified by Bluetooth/Wi-Fi sensors at the roadside. This covers the whole network cheaply and gives space-mean speed and travel time, but not flow. Turning probe speeds into flow is the inference problem TENS tackles.

Supporting systems matter too: GIS and open maps (OpenStreetMap, GTFS), positioning (GPS and Sweden’s SWEREF99 road positions), accident data (STRADA), road weather (Trafikverket VViS, SMHI open data), societal events, rush hours, and GDPR, which forbids keeping anything that identifies a driver, such as number plates.
The questions TENS asks
Approaches to traffic state estimation are model-driven, data-driven or streaming-data-driven (Seo et al., 2017). TENS is data-driven: the relationship between probe data and flow is learnt from historical data rather than assumed. The report sets out the questions:
- Is it possible, in theory, to infer the road state from GPS or Bluetooth data, and how much of it?
- Who should harvest microscopic flow and speed data, and how?
- Can fixed-sensor (macroscopic) flow and speed be used as ground truth?
- Do segment-based probe measurements correlate with point measurements?
- Are the data volumes and timestamps of the two sources comparable?
- What averaging and smoothing suits per-second and per-minute data?
- Are there privacy or integrity issues in the data and inference?
Traffic theory in brief
Two kinds of mean speed. A radar gantry averages the speeds of vehicles passing a point (time-mean speed). A probe segment averages over a stretch of road, which is the harmonic mean of speeds (space-mean speed). Using the plain mean speed underestimates travel time whenever vehicles drive at different speeds, so the two sources are not directly comparable.
Traffic states. A road is in free flow, congested, in transition, or stationary. The transitions are what operators care about most.
Single-state models link speed to density for one state:
- Greenshields (1935): speed falls linearly with density, from free-flow speed to zero at jam density.
- Greenberg (1959): speed falls with the logarithm of density, which shows the critical density where speed drops sharply, but gives infinite speed at zero density.
- Underwood (1961): an exponential form that fixes Greenberg’s problem at low density.
- Van Aerde (1995): a general form that reduces to the earlier models when some of its constants are zero.
Dual-state models cover free flow and congestion together through the fundamental relation flow = speed × density (q = u·k). Given two of the three, you can derive the third.



Figure 4 is why inferring flow from speed is hard: one flow value matches two speeds, so you first need to know which state the road is in. Blandin et al. (2012) also found that the speed–flow curve looks quite different from road to road, for example on flat and inclined sections.
The Stockholm data
TENS used two sources on the E4 through central Stockholm, October 2018:
- MCS (Trafikverket): detector ID, timestamp, speed, speed deviation, flow, and which lanes were valid.
- INRIX (commercial floating-car data): segment ID, timestamp, speed, historical average, free-flow reference speed, travel time, a confidence score (10, 20 or 30) and a 0–100 C-value. A score of 10 means the value is just the historical reference speed, not live data.

Before the two can be compared, the data needs three steps:
- Filtering: drop INRIX points with confidence 10, since they don’t reflect live traffic.
- Smoothing: a 30-step moving average on speed, flow and travel time to remove noise.
- Shifting: INRIX lags MCS by about 6 minutes (within the 6–8 minutes other studies report), so the INRIX series is shifted by 360 s. The two sources also log in different time zones.
Road segments and detector positions rarely line up exactly, one stretch may be straighter than the other, and the laws above break down at resolutions of a few metres or seconds.
You can see both sources side by side in the interactive traffic replay of October 2018, or in the Essingeleden replay video.
Related projects
- UR:BAN (Germany, 2012–2015): car industry, academia and government on cognitive assistance, traffic systems and human factors.
- Microsoft ClearFlow: machine learning on live and historical data, which led to traffic-aware directions in Bing Maps.
- Mobile Century and Mobile Millennium (UC Berkeley, 2008–2011): traffic monitoring from GPS in mobile phones.
- Mobile Millennium Stockholm and POST (KTH, LiU, Trafikverket): data fusion, travel-time estimation and scenario-based traffic management for Trafik Stockholm.
Open questions
- Lane changes: flow changes as vehicles switch lanes, which is a human decision and hard to predict.
- Merges and splits: on- and off-ramps are often the choke points.
- Separating free flow from congestion using rush-hour timing, since the states are predictable on most working days.
- Traffic mix: classifying cars, trucks and buses, for example from trafiken.nu camera images.
- Travel times from probes as an input for estimating flow, density or speed.
- Density as an early warning of congestion, and possibly a better predictor of emissions.
- Streaming approaches that use only live data and basic conservation laws: less accurate, but more robust to accidents and other surprises.
Conclusion
Where INRIX and MCS measurements overlap, the authors believe floating-car data (GPS or Bluetooth) can be used to infer flow. The evidence and methods are in the sister report. The report ends with a plea for more open traffic data.
Project
- Road traffic (2021): the TENS project
- Interactive traffic replay, Stockholm, October 2018
- Essingeleden traffic replay (video)
Related student theses
- Pei-Lun Hsu: Machine Learning-Based Data-Driven Traffic Flow Estimation from Mobile Data (KTH, DiVA)
- Cosar Ghandeharioon: An evaluation of deep neural network approaches for traffic speed prediction (KTH, DiVA)
Citation
Ian Marsh, Pei-Lun Hsu and Cosar Ghandeharioon, Data-driven traffic flow: A state-of-the-art report, RISE Report 2021:93, RISE Research Institutes of Sweden, 2021. ISBN 978-91-89385-83-2. DiVA.
BibTeX
@techreport{marsh2021data,
title = {Data-driven traffic flow: A state-of-the-art report},
author = {Ian Marsh and Pei-Lun Hsu and Cosar Ghandeharioon},
institution = {RISE Research Institutes of Sweden},
type = {RISE Report},
number = {2021:93},
isbn = {978-91-89385-83-2},
year = {2021},
url = {https://www.diva-portal.org/smash/record.jsf?pid=diva2:1624037}
}
More in Road traffic flow: Data-driven traffic flow: Summary of experiments →