Table of Contents
Fetching ...

Inverting the Fundamental Diagram and Forecasting Boundary Conditions: How Machine Learning Can Improve Macroscopic Models for Traffic Flow

Maya Briani, Emiliano Cristiani, Elia Onofri

TL;DR

The paper addresses accurate traffic state estimation and forecasting by integrating ML with macroscopic PDE models. It develops an LSTM-based framework to detect congestion, forecast its evolution, and predict total inflows, then uses these outputs to invert the fundamental diagram and supply boundary data to a $LWR$-based multi-class model. Through experiments on Autovie Venete data, it demonstrates improved nowcasting and 30-minute traffic-volume forecasts, with density-based boundary handling outperforming flux-based approaches. The work advances hybrid physics–ML methods for traffic state estimation and offers practical tools for real-time road management in highway networks.

Abstract

In this paper, we aim at developing new methods to join machine learning techniques and macroscopic differential models for vehicular traffic estimation and forecast. It is well known that data-driven and model-driven approaches have (sometimes complementary) advantages and drawbacks. We consider here a dataset with flux and velocity data of vehicles moving on a highway, collected by fixed sensors and classified by lane and by class of vehicle. By means of a machine learning model based on an LSTM recursive neural network, we extrapolate two important pieces of information: 1) if congestion is appearing under the sensor, and 2) the total amount of vehicles which is going to pass under the sensor in the next future (30 min). These pieces of information are then used to improve the accuracy of an LWR-based first-order multi-class model describing the dynamics of traffic flow between sensors. The first piece of information is used to invert the (concave) fundamental diagram, thus recovering the density of vehicles from the flux data, and then inject directly the density datum in the model. This allows one to better approximate the dynamics between sensors, especially if an accident happens in a not monitored stretch of the road. The second piece of information is used instead as boundary conditions for the equations underlying the traffic model, to better reconstruct the total amount of vehicles on the road at any future time. Some examples motivated by real scenarios will be discussed. Real data are provided by the Italian motorway company Autovie Venete S.p.A.

Inverting the Fundamental Diagram and Forecasting Boundary Conditions: How Machine Learning Can Improve Macroscopic Models for Traffic Flow

TL;DR

The paper addresses accurate traffic state estimation and forecasting by integrating ML with macroscopic PDE models. It develops an LSTM-based framework to detect congestion, forecast its evolution, and predict total inflows, then uses these outputs to invert the fundamental diagram and supply boundary data to a -based multi-class model. Through experiments on Autovie Venete data, it demonstrates improved nowcasting and 30-minute traffic-volume forecasts, with density-based boundary handling outperforming flux-based approaches. The work advances hybrid physics–ML methods for traffic state estimation and offers practical tools for real-time road management in highway networks.

Abstract

In this paper, we aim at developing new methods to join machine learning techniques and macroscopic differential models for vehicular traffic estimation and forecast. It is well known that data-driven and model-driven approaches have (sometimes complementary) advantages and drawbacks. We consider here a dataset with flux and velocity data of vehicles moving on a highway, collected by fixed sensors and classified by lane and by class of vehicle. By means of a machine learning model based on an LSTM recursive neural network, we extrapolate two important pieces of information: 1) if congestion is appearing under the sensor, and 2) the total amount of vehicles which is going to pass under the sensor in the next future (30 min). These pieces of information are then used to improve the accuracy of an LWR-based first-order multi-class model describing the dynamics of traffic flow between sensors. The first piece of information is used to invert the (concave) fundamental diagram, thus recovering the density of vehicles from the flux data, and then inject directly the density datum in the model. This allows one to better approximate the dynamics between sensors, especially if an accident happens in a not monitored stretch of the road. The second piece of information is used instead as boundary conditions for the equations underlying the traffic model, to better reconstruct the total amount of vehicles on the road at any future time. Some examples motivated by real scenarios will be discussed. Real data are provided by the Italian motorway company Autovie Venete S.p.A.
Paper Structure (22 sections, 11 equations, 23 figures, 1 table)

This paper contains 22 sections, 11 equations, 23 figures, 1 table.

Figures (23)

  • Figure 1: Fundamental diagram $f=f(\rho)$. The green part corresponds to the free phase while the red part corresponds to the congested phase. Density $\sigma$ corresponds to the maximal flux $f_{\textsc{max}}$ (road capacity). Flux is null when the road is empty ($\rho=0$) and when the road is fully congested ($\rho=\rho_{\textsc{max}}$) and vehicles are stopped.
  • Figure 2: The Italian motorway A4 Trieste–Venice and its branches to/from Udine, Pordenone, and Gorizia, managed by Autovie Venete S.p.A.
  • Figure 3: Velocity and flux for light (top) and heavy (bottom) vehicles, entire week from Monday to Sunday. We observe that the raw flux data are very fluctuating from minute to minute, but, applying a Gaussian filter (black line), one can recognize a certain pattern repeated on a daily basis. At night, the flux data of all vehicles drop, while the velocity data of light vehicles become more scattered. As expected, during the weekend, the flux of heavy vehicles is quite low.
  • Figure 4: Four congestion events with different features: (top-left) we observe a rapid velocity drop and flux drop, then flux vanishes while velocity is undefined (with some exceptions for some fast vehicles still passing); (top-right) flux and velocity drop abruptly; (bottom-left) flux drops first, then velocity drops; (bottom-right) velocity drops while flux is only partially lowered.
  • Figure 5: (top) Normal traffic conditions characterized by the usual high fluctuation of the flux. At 7:05 the flux drops abruptly then the traffic restarts normally; (bottom) At 11:29 a very similar situation appears but, this time, it evolves into a queue. Beside the Gaussian filter already shown in Figure \ref{['fig:datisettimanali']}, here we also show two other Gaussian filters obtained without using future data (beyond the event horizon). Truncation is obtained assuming either Dirichlet-like boundary conditions or Neumann-like boundary conditions. We see that neither Gaussian filters nor raw data are enough to distinguish between the two scenarios at the event horizon.
  • ...and 18 more figures