1 Introduction

Enhancing transportation safety and efficiency has emerged as a major objective for the automotive industry in the last decade [1]. However, road traffic is experiencing a drastic increase, and vehicular traffic congestion is becoming a major problem, especially in metropolitan environments throughout the world. In particular, traffic congestion: (1) reduces the efficiency of the transportation infrastructure, (2) increases travel time, fuel consumption, and air pollution, and (3) leads to increased user frustration and fatigue [2]. Some of the factors affecting traffic congestion are badly managed and poorly designed roads, as well as bad traffic lights sequencing [3]. These factors negatively affect the traffic distribution on the roads, making it possible to find extremely high congested areas where vehicles travel very slowly or even get stuck.

Intelligent transportation systems (ITS) emerge as the technology that can efficiently manage information on the road, being able to offer drivers a variety of added services such as safe, efficient, and smart driving [4]. In vehicular environments, wireless technologies enable peer-to-peer mobile communication among vehicles (V2V) [5, 6], as well as communication between vehicles and the infrastructure (V2I) [7, 8]. Vehicles can broadcast warning messages in case of an accident, and also periodically exchange other messages (beacons) that contain information about their position, speed, or route [9]. These messages are received not only by nearby vehicles, but also by Road Side Units (RSUs), distributed along the infrastructure.

The specific characteristics of vehicular networks favor the development of attractive and challenging services and applications [10, 11]. Though traffic safety has been the primary motive for the development of this kind of networks [1214], VNs also facilitate mobile applications such as traffic flow management, road conditions monitoring, environmental protection, and infotainment [1518]. However, most of these applications could be more efficiently designed if the protocols involved became aware of the density of vehicles at any given time, being able to adapt their behavior according to this critical factor [19].

Traditionally, vehicle density (in terms of vehicles per square kilometer) has been one of the main metrics used for assessing road traffic conditions. A high vehicle density usually indicates congested traffic; however, the density of vehicles in a city highly varies depending on the area and the time during the day. Thus, knowing the density of a vehicular environment is important since it allows estimating the level of traffic congestion while improving ITS services by using the wireless channel more efficiently [20].

Currently, most of the vehicle density estimation approaches are designed to use very specific infrastructure-based traffic information systems, which require the deployment of vehicle detection devices such as inductive loop detectors, or traffic surveillance cameras [3, 21, 22]. However, these approaches are limited since they can only be aware of traffic density in a priori selected areas (i.e., the streets and junctions in which these devices are already located), making it difficult to estimate the vehicular density along a whole city. In addition, some of these approaches are not able to perform accurate estimations in real time (e.g., using cameras involves hard image processing and analysis).

Other existing works propose estimating the traffic density using V2V communications [1, 23]. These proposals allow vehicles to gain information about density in their neighborhood, but they are unable to offer traffic information for the rest of the scenario. Hence, these vehicles are unable to obtain the best route avoiding traffic jams. This problem could be solved by adding some infrastructure elements, since this solution allows using the traffic information obtained by the infrastructure nodes, with the aim of reducing traffic jams.

In this work, we present a solution to estimate traffic density on the road that relies on the V2I communication capabilities offered by Vehicular Networks. Unlike previous proposals, our approach allows ITS to continuously estimate the vehicular density in a given area by accounting for the number of beacons received per RSU, as well as the roadmap topology where the vehicles are located.

The rest of this paper is organized as follows: Sect. 2 motivates our proposal by discussing the importance of traffic congestion. Section 3 details our proposal for V2I-based real-time vehicular density estimation, assessing its goodness. Additionally, we discuss the obtained results and measure the estimated error. In Sect. 4 we validate our proposal by simulating three particular scenarios, showing that it performs quite well and is able to accurately estimate the vehicular density. In Sect. 5 we compare our proposal with two beacon-based approaches, where the estimated vehicular density is based only on the number of beacons received. Sect. 6 reviews previous approaches related to our work, focusing on infrastructure-based solutions to estimate traffic density, and density-aware systems to avoid traffic jams. Finally, Sect. 7 concludes this paper.

2 Motivation

Transportation plays an important role in the economic growth and productivity of countries. When transportation systems are efficient, they provide economic and social opportunities, as well as benefits that result in positive multiplier effects such as better accessibility to markets, employment, and additional investments. On the contrary, when transportation systems are deficient in terms of capacity or reliability, they can have an economic cost such as reduced or missed opportunities [24]. For this reason, traffic congestion problems have been studied for a long time, mainly to relieve traffic jams and to increase transportation efficiency.

The number of vehicles in our roads is drastically increasing, especially in developing countries such as India, China, or Brazil. In addition, these vehicles tend to be concentrated in urban areas which present a large population. Traffic jams have important and mostly negative consequences, such as increasing travel time, fuel consumption, and air pollution. According to the Texas Transportation Institute in their 2010 Urban Mobility Report [25], congestion caused urban Americans to travel 4.8 billion hours, and to purchase an extra 3.9 billion gallons of fuel for a cost of $115 billion. On average, the yearly peak period delays caused by traffic congestion for the average commuter was 34 h, and the cost to the average commuter has increased by 230 % in only two decades. Additionally, according to the World Health Organization,Footnote 1 one of the most important polluting factors in the world comes from the fossil minerals combustion in vehicles.

Therefore, in the past 10 years, governments have been making great efforts to alleviate the increasing traffic pressure, e.g., the Chinese government is trying to strengthen the traffic infrastructure. However, the number of vehicles on the roads is growing faster, making the current road network capacity insufficient, and thereby causing the traffic congestion phenomenon to become a growing problem. Fortunately, effective traffic management, through the prediction of traffic status based on the implementation of large-scale flow controlling methods, are effective measures for mitigating traffic jams [26].

We seek to go a step further, since we consider that a vehicular communications system able to estimate the traffic density in real-time could really mitigate or even solve these problems. The main objective of this paper is to propose a mechanism which allows estimating the density of vehicles in a specific area by using infrastructure-based Vehicular Networks. In particular, we estimate the density by taking into account the number of beacons received by the RSUs, and the characteristics of the roadmap topology. Hence, real-time traffic controlling systems can precisely estimate the vehicular density in a specific area, and then redirect vehicles to lower traffic density areas in order to avoid traffic jams. This could be possible by using the in-vehicle communication capabilities and navigation systems, requirements which are currently fulfilled by most of the vehicles in many countries.

3 Real-Time Vehicular Density Estimation

In this work we propose a technique that is able to accurately estimate the density of vehicles based on two parameters: (1) the number of beacons received by RSUs, and (2) the roadmap topology. In order to find the best possible approach, we perform a total of nearly 2000 simulations. Experiments involve a wide variety of controlled urban scenarios, where the actual density is known. According to the obtained results, and using a regression analysis, we propose a density estimation function capable of estimating in real time the vehicular density in urban environments. In this section we start by presenting a discussion about the most important features of urban roadmaps. Then, we present the main parameters and the selected methodology. Finally, based on the obtained results, we detail our proposed density estimation function, assessing its accuracy.

3.1 Features of the Cities Studied

The roadmaps used during the experiments to obtain our density estimation approach were selected in order to have different profile scenarios (i.e., with different topology characteristics).

The first step before starting the simulations was to obtain the main features for each roadmap (i.e., the number of streets, the number of junctions, the average segment size, and the number of lanes per street). As for the number of streets, we realized that different alternatives could be selected to obtain the number of streets of a given roadmap. Basically, there are three alternatives: (1) the number of streets obtained in SUMO [27], where each segment between two junctions is considered a street, (2) the number of streets obtained in OpenStreetMap (OSM) [28], where each street has a different “name”, and (3) the number of streets according to the Real Attenuation and Visibility (RAV) [29] radio propagation model, where vehicles can only exchange information if they are in line-of-sight (i.e., visibility means that there are no obstacles blocking the wireless signal between the vehicles) [30].

Figure 1 shows a small portion of New York City to depict the different criteria when counting the number of streets. For example, Thames Street is considered only one street in OSM, whereas the SUMO and RAV models consider that there are two different streets instead. However, if we observe Cedar Street, the RAV visibility model and the OSM approaches consider a single street (as expected), whereas it is represented by three different streets according to SUMO, since it has three different segments. Finally, according to both the OSM and SUMO approaches, Trinity Place and Church Street are represented as two different streets, whereas the RAV model considers that only one street exists.

Fig. 1
figure 1

Different criteria when counting the number of streets

Table 1 shows the the number of streets for the selected cities according to the three different criteria. As shown, the differences between these approaches are significant (e.g., New York has 700, 827, or 257 streets when considering SUMO segments, OSM streets, or the RAV visibility approach, respectively, whereas Sydney has 1668, 315, or 872 streets, depending on the selected criterion). Therefore, it is important to decide which one to use in order to obtain accurate results. By analyzing experimental results, we realized that the RAV approach better correlated with the real features of cities. In fact, a street must not be considered as a graph lane between two junctions (SUMO) or different lanes with the same name (OSM), since this consideration does not take into account the visibility between vehicles. In terms of communication links, we can not consider that two vehicles are circulating in the same street if there is no wireless communication between them.

Table 1 Number of streets obtained depending on the approach used
Table 2 Map features

Table 2 shows the main features of each map for the cities under study. Specifically, we obtained the number of streets according to the RAV model, the number of junctions directly extracted from the graph (junctions are the intersection point between segments), the average segment size (segments are graph lines which link two junctions), and the number of lanes per street. We also added a column labeled as SJ ratio, which represents the result of dividing the number of streets between the number of junctions, thereby indicating the roadmap complexity. As shown, the first city (New York) presents a SJ ratio of 0.5130, which indicates that it has a simple topology, whereas the last cities in the table present a greater SJ value, which indicates a more complex topology. As shown in Sect. 3.3, this aggregated factor correlates well with the obtained results.

The roadmap topology where the vehicles are located not only constrains vehicles movements, but it has also a great influence on the V2V and V2I communication capabilities [6]. Thus, a wide set of maps with different complexities are going to be used in order to tune and validate our traffic density estimation system.

3.2 Simulation Environment

All the simulations performed in this work were done using the ns-2 simulator [31], where the PHY and MAC layers have been modified to closely follow the IEEE 802.11p standard, which defines enhancements to 802.11 required to support ITS applications. Additionally, since in most cases, buildings will absorb radio waves at the frequency of 5.9 GHz (i.e., the frequency band of the 802.11p standard), making most communications only possible when vehicles are in line-of-sight (LOS), the simulator was also modified to make use of our Real Attenuation and Visibility (RAV) scheme [29], which proved to increase the level of realism in VANET simulations by accounting for the presence of obstacles that affect the wireless signal propagation, along with the signal attenuation due to distance between sender and receiver.

We assume that all the nodes are equipped with an IEEE 802.11p interface tuned at the frequency of 5.9 GHz for both V2V and V2I communications. In terms of the physical layer, the data rate used for packet broadcasting is 6 Mbit/s, as this is the maximum rate for broadcasting in 802.11p. The MAC layer was also extended to include four different priorities for channel access. Therefore, application messages are categorized into four different Access Categories (ACs), where AC0 has the lowest and AC3 the highest priority. In our simulations, the warning messages are broadcast using the highest priority, whereas the beacons are sent using a lower priority.

To prove how maps affect the performance of vehicular communications, we selected nine street maps, each one representing a square area of 4 km\(^2\). Figure 2 shows the topology of the maps used in the simulations. In order to deploy RSUs in the maps, we used the Uniform Mesh deployment policy [32], that consists on distributing RSUs uniformly on the map. The advantage of this deployment policy is that it achieves a more uniform coverage area since the distance between RSUs is the same, preventing RSUs to be deployed too closely, or too sparsely. As for the mobility model, it has been obtained with CityMob for Roadmaps (C4R) [33], a mobility generator able to import maps directly from OpenStreetMap [28], and generate ns-2 compatible traces. Table 3 shows the parameters used for the simulations.

Fig. 2
figure 2

Scenarios used in our simulations. Fragments of the cities of: a New York (USA), b Minnesota (USA), c Madrid (Spain), d San Francisco (USA), e Amsterdam (Netherlands), f Sydney (Australia), g Liverpool (England), h Valencia (Spain), and i Rome (Italy)

Table 3 Parameters used for the simulations

To estimate our traffic density function, we consider a Warning Message Dissemination mechanism, where each vehicle periodically broadcasts information about itself or about abnormal situations (traffic jams, icy roads, etc.). To increase the realism of our results, we include the possibility that vehicles share accident notification messages in our simulations. In fact, we consider that vehicles can operate in two different modes: (1) warning, and (2) normal. Vehicles in warning mode inform other vehicles about their status by sending warning messages periodically (every second). Therefore, these warning messages significantly congested the channel. Normal mode vehicles enable the diffusion of these warning packets and, in addition, they also send beacons every second with information such as their positions, speed, etc. These periodic messages are not propagated by other vehicles.

We simulated a frontal impact scenario where two vehicles are involved. The warning messages exchanged between vehicles and RSUs are built according the Vehicular Accident Ontology (VEACON) [35], which provides a standard structure which enables data interoperability among all the different entities involved in transportation systems. All the results represent an average of over 20 runs with different scenarios (maximum error of 10 % with a degree of confidence of 90 %).

3.3 Density Estimation Function

After performing the topological analysis of the selected city maps, we obtained the average number of beacons received by each RSU along a period of T seconds, taking into account that each vehicle sends one beacon per second, and that these messages, unlike warning messages, are not disseminated by the rest of the vehicles. According to results obtained in [23] we consider a period of 30 s since in this work authors demonstrated that this was the optimal one after comparing six different time periods (i.e., 10, 20, 30, 60, 120, 180 s). For this reason, our system stores a buffer for each RSU containing the last 30 values measured during the previous 30 s. These buffers are updated once per second, removing the oldest values and adding the most recent ones, as shown in Fig. 3. The values in the buffers are used to estimate the density of vehicles in the area whenever it is necessary.

Fig. 3
figure 3

Buffers collecting density information dynamically

Figure 4 shows the obtained results for the different cities studied. As shown, the performance in New York and Minnesota in terms of number of beacons received highly differs from the rest of the cities. This occurs because both New York and Minnesota have a low SJ ratio (i.e., they present regular roadmaps).

Fig. 4
figure 4

Number of beacons received when varying the vehicular density and the roadmap

As expected, complex roadmaps (maps which have a higher SJ ratio) present a number of beacons received lower than regular roadmaps for a similar vehicular density, since the effect that buildings have over the signal propagation is higher in complex maps. Figure 4 also shows that the vehicular density not only depends on the number of beacons received, but also on the SJ ratio (according to data shown in Table 2). Therefore, the characteristics of the roadmap will be very useful in order to accurately estimate the vehicular density in a given scenario.

After observing the direct relationship between the topology of the maps, the number of beacons received, and the density of vehicles, we proceed to obtain a function to estimate, with the minimum possible error, each of the curves shown in Fig. 4. To this end, we performed a regression analysis that allowed us to find an equation offering the best fit to the data obtained through simulation. Specifically, we used the ZunZun application [36] which provides different equations for regression analysis. We select Equation 1 as a density estimation function, since it obtained the smallest relative error. This proposed function is able to estimate the number of vehicles per km\(^2\) in urban scenarios, according to the number of beacons received per RSU, and the SJ ratio (i.e., streets/junctions) of the selected roadmap.

$$\begin{aligned} f(x,y) = a + b \cdot ln(x) + \frac{c}{y} + d \cdot ln(x)^2 + \frac{f}{y^2} + \frac{g \cdot ln(x)}{y} \end{aligned}$$
(1)

In this equation, \(f(x,y)\) is the number of vehicles per km\(^2\), \(x\) is the average number of beacons received by each RSU, and \(y\) is the SJ ratio obtained from the roadmap. The values of the coefficients \((a, b, c, d, f, and\,g)\) are listed in Table 4. Figure 5 shows the 3-dimensional representation of the proposed equation.

Table 4 Coefficients of our proposed density estimation equation
Fig. 5
figure 5

3D representation of our density estimation function

To determine the accuracy of our proposal, we proceed to measure the estimated error. Table 5 shows the different errors when comparing our density estimation function with the values actually obtained by simulation. Note that the average relative error is of only 3.04 %, which we consider accurate enough to validate our proposed approach.

Table 5 Density estimation error of our proposed equation

In this work, we also tested other possible functions that can be used in our vehicular density estimation approach. Equation 2 presents one of the alternative equations we obtained. However, in terms of accuracy, the average relative error is of 8.45 %, while the first function presents a lower value (3.04 %). Additionally, the Sum of Squared Errors (SSE) for the absolute error relative to this function is of 5.834E+04, while the first approach presents a lower value (4.700E+04). Thus, we considered adequate to use the first equation in our approach.

$$\begin{aligned} f(x,y) = a \cdot (dx + f)^b \cdot (gy + h)^c \end{aligned}$$
(2)

4 Validation of Our Proposal

To assess our proposed density estimation function, we chose four particular cases. Specifically, we simulated: (1) a density of 100 vehicles per \(\hbox{km}^2\) in Rome, the city with the highest SJ ratio (2) a density of 250 vehicles per \(\hbox{km}^2\) in San Francisco, a city with an intermediate SJ ratio, (3) a density of 200 vehicles per \(\hbox{km}^2\) in New York, the city with the lowest SJ ratio, and (4) a density of 200 vehicles per \(\hbox{km}^2\) in Mexico D.F., a city that was not used to obtain our density estimation function, and which has a SJ ratio of 0.7722.

Figure 6 shows the RSU deployment strategy and the vehicles’ location at the end of the simulation for the studied scenarios, whereas Table 6 shows the obtained results. We observe that the average number of beacons received per RSU is of 8.78, 52.67, 68.78, and 47.56 in Rome, San Francisco, New York, and Mexico D. F., respectively. These values are highly affected by the vehicular density, as well as the roadmap topology. Note that, although the vehicular density simulated in New York is lower than the one simulated in San Francisco, more beacons are received per RSU. This is caused by the lower SJ ratio, since the roadmap topology of New York is simpler than San Francisco, thus allowing a better wireless signal propagation, as well as the reception of more messages by the RSUs.

Fig. 6
figure 6

RSUs deployment and vehicles location at the end of the simulation in the cities of: a Rome, b San Francisco, c New York, and d Mexico D.F. Solid squares represent the vehicles, and the triangles represent the RSUs

According to our proposal (i.e., applying the function shown in Eq. 1), our system estimates a density of 103.68, 256.95, 196.87, and 196.91 vehicles, respectively (see Eqs. 345, and 6). Therefore, our vehicular density estimation approach accurately resembles the actual density, presenting an error of 3.68, 6.95, 3.13, and 3.09 vehicles, which only represents the 3.68 %, the 2.78 %, the 1.57 %, and the 1.55 % of the total vehicles. Results also indicate that our proposed density estimation function allows properly calculating the estimated traffic density in cities which were not used to tune our estimation function (e.g., Mexico D. F.).

$$\begin{aligned} f(x,y)&= a + b \cdot ln(8.78) + \frac{c}{1.3873} + d \cdot ln(8.78)^2 + \frac{f}{1.3873^2} + g \cdot \frac{ln(8.78)}{1.3873} = 103.68 \end{aligned}$$
(3)
$$\begin{aligned} f(x,y)&= a + b \cdot ln(52.67) + \frac{c}{0.8863} + d \cdot ln(52.67)^2 + \frac{f}{0.8863^2} + g \cdot \frac{ln(52.67)}{0.8863} = 256.95 \end{aligned}$$
(4)
$$\begin{aligned} f(x,y)&= a + b \cdot ln(68.78) + \frac{c}{0.5140} + d \cdot ln(68.78)^2 + \frac{f}{0.5140^2} + g \cdot \frac{ln(68.78)}{0.5140} = 196.87 \end{aligned}$$
(5)
$$\begin{aligned} f(x,y)&= a + b \cdot ln(47.56) + \frac{c}{0.7722} + d \cdot ln(47.56)^2 + \frac{f}{0.7722^2} + g \cdot \frac{ln(47.56)}{0.7722} = 196.91 \end{aligned}$$
(6)

Moreover, using our system, we demonstrated that we are able to estimate the vehicular density in more specific areas. For example, using the data included in Table 6, our system can identify areas where the traffic is more congested (i.e., areas where the RSUs receive a higher percentage of beacons). For example, in the case of San Francisco, RSUs 2, 6, and 9 received a higher number of beacons compared to RSUs 1 and 7. According to these results, an automatic traffic control system could take advantage from V2I communication capabilities, adapting the vehicles’ routes in order to redirect vehicles traveling in more congested areas to those areas where the RSUs receive a lower number of messages (i.e., less congested), thus avoiding traffic jams.

Table 6 Beacons received when simulating 100 vehicles/km2 in Rome, 250 vehicles/km2 in San Francisco, 200 vehicles/km2 New York, and 200 vehicles/km2 in Mexico D.F.

5 Comparing Our Proposal with Previous Beacon-Based Approaches

Other vehicular density estimation proposals (e.g., [19], and [1]) take only into account the number of beacons received, while omitting any data related to the map topology where the vehicles are located at. In order to assess the importance of the topology, we compared our proposal with a beacon-based approach, where the vehicular density is estimated only by using the number of beacons received. To make a fair comparison, we followed the same methodology in both approaches (i.e., we also made a regression analysis to obtain an equation capable of estimating the vehicular density, but in this case the estimation is solely based on the number of beacons received).

We tested several density estimation functions which are solely based on the number of beacons received, trying to obtain the lowest value for the sum of squared errors (SSE). In particular, we obtained the quintic polynomial function shown in Eq. 7, and the logarithmic function shown in Eq. 8.

$$\begin{aligned} f(x)&= a + bx + cx^2 + dx^3 + fx^4 + gx^5 \end{aligned}$$
(7)
$$\begin{aligned} f(x)&= a + b \cdot ln(dx) + c \cdot ln(dx)^2 \end{aligned}$$
(8)

Figure 7 shows a comparison of the estimated values with the simulation results obtained for the cities of Rome, San Francisco, and New York. The results confirm that our function provides more accurate results, presenting a low value for the Sum of Squared Errors (i.e., 4.700E+04), whereas the beacons-based functions present a Sum of Squared Errors value of 1.899E+05 (for the polynomial) and 2.016E+05 (for the logarithmic), i.e., one order of magnitude higher than our proposal.

Fig. 7
figure 7

Comparison between our approach with respect to simulated and estimated results for beacon based density estimation function

As shown, our approach achieves a very good fit in the three cities studied, since it adjusts the estimation made by accounting not only for the number of beacons received, but also for the features of the maps where the vehicles are located. On the contrary, those approaches that only take into account the number of beacons received are prone to provide inaccurate estimations. Specifically, they overestimate the number of vehicles in high density complex environments, despite being able to correctly estimate lower densities in complex maps, and higher densities in simple maps. Therefore, the advantages of using our vehicular density estimation proposal are clear in terms of accuracy.

6 Related Work

In this section we review previous works related to our proposal. In particular, we focus on: (1) infrastructure-based solutions to estimate traffic density, and (2) density-aware systems designed to reduce traffic jam situations in urban areas.

6.1 Infrastructure-Based Solutions to Estimate Traffic Density

Despite the importance of determining vehicular density to reduce traffic congestion, so far only a few studies have explored the density estimation process.

Tyagi et al. [2] considered the problem of vehicular traffic density estimation, using the information available in the cumulative acoustic signal acquired from a roadside-installed single microphone. This cumulative signal comprises several noise signals such as tire noise, engine noise, engine-idling noise, occasional honks, and air turbulence noise of multiple vehicles. The occurrence and mixture weightings of these noise signals are determined by the prevalent traffic density conditions on the road segment. Based on these learned distributions, they used a Bayes’ classifier to classify the acoustic signal segments spanning a duration of 5–30 s. Using a discriminative classifier, such as a Support Vector Machine (SVM), results in further classification accuracy compared to a Bayes’ classifier.

Tan and Chen [3] proposed a novel approach based on video analysis which combines an unsupervised clustering scheme called AutoClass with Hidden Markov Models (HMMs) to determine the traffic density state in a Region Of Interest (ROI) of a road. Firstly, low-level features were extracted from the ROI of each frame. Secondly, an unsupervised clustering algorithm called AutoClass was applied to the low-level features to obtain a set of clusters for each pre-defined traffic density state. Finally, four HMM models were constructed for each traffic state, respectively, with each cluster corresponding to a state in the HMM; the structure of the HMM is determined based on the cluster information.

Shirani et al. [20] presented the Velocity Aware Density Estimation (VADE). In VADE, a car estimates the density of neighboring vehicles by tracking its own velocity and acceleration pattern. An opportunistic forwarding procedure, based on VADE estimation, was also proposed. In this procedure, data forwarding is done when the probability of having a neighbor is high, which dramatically reduces the probability of messages being dropped.

Maslekar et al. [19] claimed that clustering has demonstrated to be an effective concept to implement the estimation of vehicular density in the surroundings. However, due to high mobility, a stable cluster within a vehicular framework is difficult to implement. In this work, they proposed a direction based clustering algorithm with a clusterhead switching mechanism. This mechanism aims at overcoming the influence of overtaking within the clusters.

Other authors use the Kalman filtering technique for the estimation of traffic density. For example, Balcilar and Sonmez [21] estimate traffic density based on images retrieved from traffic monitoring cameras operated by the Traffic Control Office of Istanbul Metropolitan Municipality. To this end, they use a Kalman filter-based background estimation which can efficiently adapt itself to environmental factors such as light changes. However, this approach requires the density estimation procedures to be applied to the road areas manually marked beforehand. More recently, Anand et al. [37] proposed a method that also uses the Kalman filtering technique for estimating traffic density. In particular, they propose using the flow values measured from video sequences and the travel time obtained from vehicles equipped with a global positioning system (GPS). They also report density estimations using flow and space mean speed (SMS) obtained from location based data, using the Extended Kalman filter technique.

All these previous works established the importance of vehicular density awareness for neighboring areas, but none has deepened in the analysis of the accuracy of the method used to estimate this density, or the impact that topology has on the obtained results. Moreover, the vehicular density estimation does not always take place in real time, and the majority of them require specialized infrastructure devices. In addition, neither method can obtain the traffic density for a specific sub-area, being only focused on the scenario as a whole.

6.2 Density-Aware Systems Designed to Avoid Traffic Jams

Regarding systems designed to avoid traffic congestion based on vehicular density awareness, Hattori et al. [38] simulated the traffic flow considering the capacity of the road by using a cellular automaton method. They controlled several traffic flow cases, and presented three useful results of this control method. The first one is a dispersion of traffic flow and exhaust gas, the second one is a reduction of CO gas, and the third one is an increase of the transportation efficiency.

Bedi et al. [39] proposed the Dynamic System for Avoiding Traffic Jam (DSATJ), inspired in Ant Colony Optimization (ACO) algorithms, which aims at choosing an alternative optimum path to avoid traffic jams. In their proposal, traffic jams are detected through pheromone values on edges. Their experiments were carried out with the partial road map of the North-West region of Delhi (India), to observe the performance of their approach.

Yin et al. [40] presented an urban traffic congestion dynamic prediction method based on an advanced fuzzy clustering model. Additionally, they used fuzzy cluster analysis methods to analyze six different groups of relevant parameters related to traffic jams, which allow researchers to classify and rank them.

Thakur et al. [22] studied the possibility of applying robust data mining and knowledge discovery techniques on traffic data gathered by on-line vehicular traffic cameras to identify potential bottlenecks. Their resulting dataset is a collection of vehicular mobility traces captured during several months from 2709 traffic webcams in ten different cities across the world (this collection consists of 7.5 Terabytes of data with 125 million vehicular images). They also collected driving distance and time between geocoordinate pairs of street intersections for these cities, and applied spatio-temporal data mining techniques to profile these global cities. Their study helps to shed light on causes of contention in traffic jams, and provides an insight into the resolution to traffic congestion, or the possibility to plan and develop future cities.

More recently, Sanguesa et al. [23] proposed a V2V-based mechanism to estimate the vehicular density in urban environments. Their mechanism also uses as input parameters the number of beacons received per vehicle, and the topological characteristics of the environment where the vehicles are located. Their approach allows vehicles to accurately estimate two kinds of vehicular densities: (1) their specific neighborhood density, and (2) the overall traffic density of the scenario. However, unlike our proposal, vehicles can not obtain traffic information about other areas of the scenario. Thus, vehicles are unable to obtain the best route avoiding traffic jams.

As shown, different solutions with the aim of adopting traffic redistribution to avoid traffic congestion have been proposed. In this paper we propose a solution able to estimate the density of vehicles in real-time by using the communication capabilities between vehicles and RSUs. Using our system, a traffic jam can be predicted, hence allowing traffic controlling systems to anticipate their solutions.

7 Conclusions

This paper proposes a method that allows estimating vehicular density in urban environments at any given time by using V2I communications. Our proposal allows improving proactive traffic congestion mitigation mechanisms to better redistribute vehicles’ routes, while adapting them to the specific traffic conditions.

Our vehicular density estimation algorithm takes into account not only the number of beacons received by the RSUs, but also the topology of the map where the vehicles are located. We demonstrate how our approach is able to accurately predict the vehicular density. Results show that it allows estimating the vehicular density for any given city with high accuracy, thereby allowing governments to improve their traffic control mechanisms. Finally, we compare our proposal with respect to two different approaches that are solely based on beacons, proving the high efficiency of our approach when tested in a wide variety of vehicular scenarios.