## 1. Introduction

The real-time knowledge of traffic flows is essential for implementing any control strategy on road networks, both in urban and rural contexts. All Intelligent Transportation Systems (ITSs) cannot do without traffic monitoring systems, which have to survey traffic data and transmit them to a control room and a centralised informatics system to allow the implementation of traffic control strategies.

A road traffic monitoring system is based on sensors, opportunely located on the network, which measure some features of traffic, mainly road flows (veh/h), densities (veh/km), and speeds (km/h). These sensors, especially in urban contexts where the networks are significantly dense, cannot be provided on all road links of the network, but only on some of them; usually, the greater the number of monitored links, the more the potential accuracy of traffic forecasting and, then, the effectiveness of control strategies. The cost of an ITS depends significantly on the number of monitored links; even if the costs of traffic sensors have decreased in the last decade, the trade-off between the number of sensors and the reliability of the monitoring system is an important issue to be considered.

In this paper, we propose a methodology for spatially extending traffic data obtained on monitored links to other links of the network in order to increase the quality of the whole system, limiting its cost. More in detail, we propose to use artificial neural networks (ANNs) for reaching this result; the ANN, once trained, will estimate traffic flows on unmonitored links starting from the flows on monitored links. To the best of our knowledge, this approach was studied only in a preliminary way and on a small network [

1]; ANNs, instead, have been widely used for short-term traffic flow forecasting, as will be described in the next section.

The remainder of the paper is structured as follows:

Section 2 explores the background of the problem, focusing on sensors, monitoring systems, and main applications of ANNs in the transportation sector, with particular attention to traffic flow forecasting.

Section 3 describes the proposed approach, which is tested on a real-scale network in

Section 4. Finally,

Section 5 concludes the paper.

## 3. Proposed Approach

We propose to use ANNs for spatially extending traffic flow data. We assume that some links of a road network are monitored with proper sensors and other links, often a large percentage, are not monitored. The objective of the ANN is to forecast traffic flows on unmonitored links starting from the data collected on monitored links. The same result can be obtained using the estimation of origin-destination matrix from traffic counts [

74,

75] as follows: (1) traffic flow data collection on the monitored links; (2) correction of the OD matrix using the collected data; and (3) assignment of the OD matrix to the network model for estimating the traffic flows on all links of the network. This second approach requires high computing times due to the OD matrix correction and traffic assignment procedures; with a trained ANN, instead, the computing times are very short, as will be shown in

Section 4. Moreover, there is a broad debate on the (un)reliability of the OD matrix correction procedure [

76].

The crucial points of the method are the training of the ANN and how to verify if the approach works in terms of traffic flow forecasts. We use a supervised learning approach, wherein the example datasets are generated through simulation with the following procedure (see

Figure 1):

we build a road network model of the case study, as detailed as possible;

we identify on this network the monitored links, ml, and the unmonitored links, ul;

we randomly generate several origin-destination (OD) matrices, **d**^{i} with i = 1, ..., n;

we assign each matrix, **d**^{i}, to the road network model, so as to generate the corresponding traffic flows on monitored links, **f**^{i}_{ml}, and on unmonitored links, **f**^{i}_{ul} with i = 1, ..., n; we assume that they are the real flows on the network and constitute the datasets for training, validating, and testing the ANN; specifically, input datasets contain **f**^{i}_{ml} and output datasets contain **f**^{i}_{ul}; and

we divide the datasets into three groups: training sets (i = 1, ..., t), validation sets (i = t + 1, ..., t + v), and testing sets (i = t + v + 1, ..., t + v + p; t + v + p = n); first, two groups are used in the training procedure while the third group is used for evaluating the forecast capacity of trained ANNs.

Moreover, two critical issues to consider are the design of the ANN and the random method for generating the OD matrices. Indeed, theoretically, infinite configurations of ANNs can be proposed for solving the same problem. There are different kinds of ANNs, such as single or multilayer feed-forward networks and recurrent networks. Focusing on feed-forward networks, they can be structured considering a different number of layers and neurons for each layer; hence, in general, it is necessary to test different configurations so as to find the best one for the specific problem. About this problem, recently Philipp and Carbonell [

77] have proposed a method for automatically determining the optimal size of a neural network.

Regarding the random generation of OD matrices, we propose two different methods. The first one randomly generates each OD matrix cell value between zero and a maximum value that can be chosen in the function of information about travel demand. The second method randomly generates each OD matrix cell value between a minimum and a maximum value that can be different for each cell; we can adopt this approach only if we have an estimate of the real OD matrix. In most cases, these estimated matrices are available from traffic analyses conducted in the same study area where the monitoring system has to be implemented. Indeed, since the travel demand follows some patterns (e.g., the demand between some origins and destinations is high, while between others it is low), to consider them in the proposed approach should improve the results. In this case, different ANNs have to be trained with reference to different periods (morning peak-hour, afternoon peak-hour, off-peak hour and so on). In the following, we will test both methods for obtaining the OD matrices used for generating the example datasets and four different single-layer ANNs, differing in the number of neurons.

## 4. Numerical Results

The case study is based on the road network of Benevento, which is a city with about 61,000 inhabitants in the south of Italy. The road network model (see

Figure 2) is very detailed and is composed of 949 road segments (1577 oriented links), 678 nodes, and 80 centroids (OD matrices with 6400 OD pairs); centroids represent in the model the points of origin and the destination of trips between zones. This network model represents 216 km of roads. All elements are modelled considering their features, such as length, speed, and capacity of the links and regulation methods (traffic light, stop, give way, roundabout, etc.) of nodes. Moreover, three OD matrices were available in the following periods: morning peak-hour (MP), afternoon peak-hour (AP), and off-peak-hour (OP); these matrices have been estimated by using mathematical models and road traffic surveys during the drafting of the Urban Traffic Plan of Benevento. Specifically, the traffic surveys were performed in the 139 road sections reported in

Figure 1; in our tests, we assume that the traffic monitoring system provides sensors in these road sections: the corresponding links represent, therefore, the monitored links. Other real links of the network, instead, will be considered the unmonitored links. The data on road traffic flows were pre-processed, eliminating from the set of unmonitored links the ones with null traffic flows; we need to remove these links since the road network model is sometimes unable to estimate low traffic flows on local roads and it could distort the results. Then, in our problem, we consider 139 monitored links and 1186 unmonitored links.

In this case study, we have tested several ANNs, trained with different datasets. The first set of training data was obtained starting from OD matrices randomly generated, choosing a maximum value of the OD flow, without considering the patterns of the travel demand (same maximum value for all OD pairs). This maximum value is different in the different periods (MP, AP, and OP). We have to use this approach when the estimations of the OD matrices are not available. The second training dataset, instead, was generated by perturbing each OD pair demand flow, multiplying its estimated value by a random number between 0.8 and 1.2; this approach is possible only if we have the estimation of the OD matrix of each period (MP, AP, and OP). In this way, the patterns of the demand are taken explicitly into account.

Overall, we generated 180 matrices, with the first method (without considering the demand pattern), and 600 matrices, 200 in each period (MP, AP, and OP), with the second method (considering the demand pattern); each matrix was assigned to the road network so as to generate a traffic flow dataset. In the first case, 150 traffic flow datasets were used for training the ANN, while the others were used for verifying the quality of the results. In the second case, 190 traffic flow datasets were used for training the ANN in the corresponding period, and the others for the verification. Finally, 570 traffic flow datasets (190 in each period) were used for training an ANN in the second case, considering the three periods at the same time. We trained several ANNs in each case; all ANNs were feed-forward with a single layer, but with different numbers of neurons: 6, 10, 20, and 50.

Table 1 summarises all 20 trained ANNs.

To evaluate the capacity of the ANNs to estimate road traffic flows on unmonitored links we have used three forecast error measures: mean square error (

MSE), root mean square error (

RMSE), and relative root mean square error (

RMSE%).

RMSE% allows for comparing the results corresponding to different demand levels and, then, is used to identify the best and the worst cases. In our tests, these measures are calculated as follows:

where

n_{ul} is the number of unmonitored links,

f_{j}^{sim} is the traffic flow on link

j obtained with simulation (the real flow, under our assumptions), and

f_{j}^{ANN} is the traffic flow estimated with the trained ANN.

Moreover, we have calculated the coefficient of determination,

R^{2}, as follows:

where

M(

f^{sim}) is the mean of the simulated traffic flows. The coefficient of determination is used for evaluating the capacity of a model to replicate the observed data; the maximum value of

R^{2} is 1 (perfect capacity of the model to reproduce the observed data:

f_{j}^{sim} =

f_{j}^{ANN} on each link

j) and the closer

R^{2} to 1, the higher the goodness of the calibrated model. Even if, in our case, we lack an explicit model, we can use the coefficient of determination for measuring the capacity of the ANN to reproduce the simulated flows.

Naturally, all of these measures were calculated with datasets that were not used in the phase of training. In

Table 2 we summarise the main results, by reporting for each ANN the best and the worst cases. In

Table 3 we report the epochs and the computing times for training the ANNs; it can be noted that the training procedure is fast, requiring from some seconds up to 1 min and 37 s. The use of the trained ANNs for estimating traffic flows requires, instead, less than a second in all cases.

In

Figure 3 the dispersion diagrams of worst and best cases of the ANNs trained without considering the demand pattern are reported. In contrast,

Figure 4 reports the same diagrams for the ANNs trained considering the demand pattern. All figures refer to ANNs with six neurons, which are the ones that give better results in terms of

RMSE% and

R^{2}.

The results reported in

Table 2 and

Figure 4 underline a very good ability of ANNs to estimate the traffic flows on unmonitored links if we consider the demand patterns. Indeed, the values of

RMSE% are very low and the values of

R^{2} are also close to 1 in the worst cases. Without considering the demand patterns (see

Table 2 and

Figure 3), the results can, however, be considered acceptable for this kind of problem, even if the errors are more significant. Indeed, traffic simulation models are affected by some inevitable errors due to (i) the features of road links (travel time, speed, capacity, etc.) that cannot be modelled with high precision and some of them (travel time and speed) depend on flows with functions that have to be correctly calibrated; (ii) the road traffic flows, which also influence the link performances, are always affected by stochastic variations; and (iii) the real origins and destinations of trips are scattered in the territory (the possible points are theoretically infinite) while the model must concentrate them only in some specific points (centroids). For the abovementioned reasons, usually, transportation engineering models with

R^{2} ≥ 0.75 are considered entirely acceptable. Moreover, it can be noted that the ANNs with six neurons almost always have the best performances.

These results lead to some practical indications for implementing the proposed approach to real cases: (a) to consider explicitly the demand patterns is necessary for obtaining a very good accuracy but, if the estimations of the OD matrices are not available, the results, without considering the demand patterns, can be considered acceptable; (b) ANNs with few neurons (6 or 10) showed the best performances; therefore, it is not necessary to build and train ANNs with many neurons.

## 5. Conclusions

In this paper, the spatial extension of road traffic data from some monitored links to other links is studied and an approach based on artificial neural networks is proposed. Indeed, while in the literature numerous studies can be found on short-term forecasting, the spatial extension of such data has been only marginally studied. The spatial extension may allow for reducing the number of sensors in a monitoring system, controlling the same number of links.

A method based on traffic simulation is proposed for generating the training datasets and the proposed approach is tested on a real-scale network. Two different methods for generating the OD matrices necessary for generating the datasets are adopted: considering, or not, the travel demand patterns; in the first case, the proposed approach can give very good results, while in the second case the results can be considered, however, acceptable.

Future research will be addressed to test other real-scale networks, multi-layer ANNs, and different transfer functions, to verify the improvements that can be obtained in OD matrix correction procedures adding the estimated traffic flows to the surveyed ones, to optimise the location of sensors, and to identify the unmonitored links that are better correlated to the monitored ones, considering only these links as the output of the problem.