Journal of Modern Transportation

, Volume 27, Issue 4, pp 341–354 | Cite as

A neural network algorithm for queue length estimation based on the concept of k-leader connected vehicles

  • Azadeh EmamiEmail author
  • Majid Sarvi
  • Saeed Asadi Bagloee
Open Access


This paper presents a novel method to estimate queue length at signalised intersections using connected vehicle (CV) data. The proposed queue length estimation method does not depend on any conventional information such as arrival flow rate and parameters pertaining to traffic signal controllers. The model is applicable for real-time applications when there are sufficient training data available to train the estimation model. To this end, we propose the idea of “k-leader CVs” to be able to predict the queue which is propagated after the communication range of dedicated short-range communication (the communication platform used in CV system). The idea of k-leader CVs could reduce the risk of communication failure which is a serious concern in CV ecosystems. Furthermore, a linear regression model is applied to weigh the importance of input variables to be used in a neural network model. Vissim traffic simulator is employed to train and evaluate the effectiveness and robustness of the model under different travel demand conditions, a varying number of CVs (i.e. CVs’ market penetration rate) as well as various traffic signal control scenarios. As it is expected, when the market penetration rate increases, the accuracy of the model enhances consequently. In a congested traffic condition (saturated flow), the proposed model is more accurate compared to the undersaturated condition with the same market penetration rates. Although the proposed method does not depend on information of the arrival pattern and traffic signal control parameters, the results of the queue length estimation are still comparable with the results of the methods that highly depend on such information. The proposed algorithm is also tested using large size data from a CV test bed (i.e. Australian Integrated Multimodal Ecosystem) currently underway in Melbourne, Australia. The simulation results show that the model can perform well irrespective of the intersection layouts, traffic signal plans and arrival patterns of vehicles. Based on the numerical results, 20% penetration rate of CVs is a critical threshold. For penetration rates below 20%, prediction algorithms fail to produce reliable outcomes.


CVs Queue estimation Artificial neural network (ANN) 

1 Introduction

Adaptive traffic signal controllers use real-time traffic data to effectively and efficiently process conflicting traffic flows at intersections, aiming to reduce delay and traffic congestion. Obviously, more accurate data on traffic conditions would result in a better estimation and optimisation of traffic signal parameters and hence a better traffic circulation. Queue formation and dissipation data can be used as an important input to adaptive traffic signal controllers. Moreover, in the literature queue length is considered as a metric to measure the performance of traffic control strategies. For instance, queuing delay is responsible for more than 90% delay in travel time in congested traffic networks [1]. Various methods are used in the literature to estimate the queue in traffic networks. In macromodelling, it is formulated as the capacitated traffic assignment. In this type of modelling, the effect of the excessive queue is represented solely by excessive delay without considering the issue of queue spillover [2, 3, 4, 5]. Alternatively, in micromodelling, there are both data-driven and model-based algorithms used to estimate the queue and some of these micromodelling algorithms take the queue spillover into consideration. However, most of the previous queue estimation methods highly depend on data such as the arrival pattern of vehicles and the traffic signal control parameters, which are not easily available. In the context of existing literature, this research proposes a neural network (NN) model to estimate queue length. Moreover, the model depends only on data from CVs and does not need or make any assumption about the state of the traffic flow pattern, nor the traffic signal control parameters. To do so, we propose an NN model (i.e. a backpropagation NN) which is a straightforward algorithm and yet capable of estimating the queue length with relatively high-precision rates. The gist of the methodology is to take the information of a limited number of CVs (which is called penetration rate) as input to an NN model to predict the queue length. The results indicate that the proposed methodology can work fine in both saturated (congested) and unsaturated traffic conditions.

In a CV ecosystem, vehicles with communication devices known as CVs can communicate and exchange information such as speed, position and acceleration/deceleration with each other and with the infrastructure equipped with communication devices called roadside unit (RSU) [6].

One major drawback associated with a CV ecosystem is the likelihood of communication failure. Since a large number of vehicles transmit data simultaneously to the RSUs, there is a possibility for communication failure because of the high rate of data flow between CVs and roadside units [7, 8, 9]. Moreover, since the RSUs are only able to collect data from vehicles in their vicinity (i.e. 300 m) [10], the CVs can only be detected in this range. Therefore, the queue length exceeding 300 m will not be detected by most of the existing methods. To solve this problem, we, for the first time, introduce the concept of k-leader CVs as a new method. It is to aggregate data of a range of CVs to leading ones and let the leading CVs communicate with the RSU. In our proposed method, every single CV will collect data from tailing CVs as well as data from the CVs ahead in its communication range and will pass them onto the very next CV ahead. By doing so, data will be transferred from the very last CV (no matter how long the queue is) all the way to the head of the queue. Therefore, every CV, no matter it is the first or last in the queue, will be able to collect all the data of the queue.

It is then the duty of the very first CV in the queue to communicate with the RSU. If the first CV fails to communicate, it is the second CV that will communicate with the RSU. Likewise, if the second also fails, the chain of communication will go down to the third, fourth and so on to the kth CV in the queue which is located at the communication range of RSU. It is where the name of the k-leader CVs has been derived.

This paper is organised as follows. In the next section, we review relevant literature to provide a context for the available queue estimation methods. In Sect. 3, the problem of queue estimation based on CV data is presented. In Sect. 4, a method is proposed to relieve the communication load. This method decreases the frequency of data that needs to be exchanged between vehicles and roadside units in order to determine the queue in the CV environment. In Sect. 5, a linear regression model is used to assess the importance of each chosen input variables in the queue length estimation model. Section 6 is dedicated to the proposed NN model for the queue prediction, and validation based on data gathered from Vissim traffic simulator and two different traffic conditions. In Sect. 8, we test the method using the Vissim layout of the Melbourne city, Australia. The conclusion and further research direction are presented in Sect. 8.

2 Literature review

Queue length estimation methods are classified into two major categories: (1) input–output-based algorithms and (2) model-based methods. The input–output-based models seek to find a relationship between some input parameters (such as the arrival flow rate and average speed) with the target-dependent parameter (such as queue length). These algorithms do not rely on any predetermined traffic models. For instance, in [11, 12, 13] queue length is calculated without using the formulations related to shockwave theory or any other models describing the queue formation and dissipation. Kalman filter is also considered as a popular method of queue length and flow estimation [14, 15]. The model-based queue length estimation algorithms are developed on the basis of the existing traffic models to suggest a mathematical relationship between traffic parameters. For instance, the queue estimation techniques developed in [16, 17, 18] are based on shockwave theory and kinematic equations; a Bayesian approach is applied to estimate the queue at signalised intersections in [19]. In another classification of queue estimation methods, the estimation can be based on data from fixed sensors such as spot detectors [20] or floating data from probe vehicles such as mobile sensors and CVs. Since spot detectors such as loop detectors and ultrasonic detectors are only able to sense the absence and presence of vehicles in specific spots, the accuracy of the former methods highly depends on the ubiquitous coverage of these sensors in the predetermined area for queue length estimation [21, 22]. Moreover, these detectors are only able to measure the speed which is related to passing vehicles, and therefore, the error between the actual speed and measurement speed can profoundly affect the accuracy of estimation methods that depend on data about the speed of vehicles [23]. The high maintenance cost of spot detectors has restricted the extensive use of these sensors in the area of measurement [24]. Another alternative method of collecting traffic data is using the data from mobile sensors and CVs [25]. CVs are vehicles equipped with GPS and communication devices, and so they can provide the roadside units with highly accurate data about their position, speed, acceleration and decelerations. Since they can transmit these data during their motion, they are regarded as floating sensors and can provide better coverage of data about the traffic situation in the network. The components of a CV system and the performance of each component are explained with more details in [26]. In the following, some related studies on queue estimation methods based on the information of floating sensors are reviewed.

Comert and Cetin [26] developed a method based on conditional probability distribution to estimate the real-time queue length using the position of the last probe vehicle in the queue. However, the accuracy of the model highly depends on the volume to the capacity ratio as well as the market penetration rate of CVs. Hao et al. [16] estimated the queue length profile and the time when a vehicle joins the back of the queue in signalised intersections using the location information of mobile sensor equipped vehicles, using kinematic equations. Queue discharging process is also used to estimate the location and acceleration of vehicles. However, for a successful performance of the proposed method, there is a need for a relatively high penetration rate of CVs. Ban et al. [27] developed a method to estimate the queue based on the travel time information inferred from mobile sensors. The real-time queue is predicted by observation of critical points in travel time and delay pattern measurements. The method assumes a uniform arrival pattern for vehicles entering the intersection. There are other studies [28, 29] in addressing the queue length estimation based on the data from moving sensors such as mobile sensors or probe vehicles.

With the emergence of CV technology, a variety of significant research studies were dedicated to the estimation of the queue length based on data from CVs. One of the most critical issues in this domain is to evaluate the accuracy of the model to estimate the queue length in the low market penetration rate of CVs. Another important issue is the dependency of the estimation methods to the arrival pattern of vehicles and the parameters of the traffic signal controllers. A majority of the existing studies consider these parameters to be known. These limiting assumptions can significantly affect the accuracy of the model in real-time applications.

To address these shortcomings, we propose an NN-based queue prediction model. The characteristics of the proposed model can be summarised in the following points:
  • The estimation method is based on an NN model that can estimate the queue length with reasonable accuracy. In terms of accuracy, the proposed algorithm is comparable with other existing methods which are based on shockwave and kinematic wave theories.

  • Although most of the existing queue estimation methods need to have information about signal timing parameters, this method is able to predict the queue without any consideration about the traffic signal parameters, such as green and red time durations.

  • The proposed queue estimation methodology does not make any assumption about the arrival and departure flow at intersections; however, most of the existing methods in the literature have a strict assumption about the arrival and departure flow pattern.

3 Problem definition

As mentioned before, the queue length is viewed as a significant element for adjusting the parameter of adaptive traffic signal controllers. Moreover, it can be used as a measure of effectiveness to evaluate network performance under different network control strategies. In this paper, we propose an NN-based model, which uses the data from CVs to estimate the queue in different traffic situations. Vissim is chosen as the traffic simulator for this study. It is used as a layout to generate the training and test data to train and evaluate the NN model. The model is trained based on data gathered from Vissim traffic simulator for different traffic situations, various plans of traffic signal controllers and several rates of vehicle inputs. The accuracy of the model is validated using the test data from simulating different traffic situations in Vissim. Suppose that the objective is to estimate the number of vehicles in the queue in west–east direction in the sample intersection in Fig. 1. In this figure, red vehicles indicate vehicles with communication devices and blue ones are ordinary vehicles in the network without any capability to communicate with other vehicles and infrastructure. The objective of this paper is to use the data from CVs, based on communication between vehicles and infrastructure to determine the queue at each approach of the intersection. The proposed method does not need to use data from inductive loop detectors or any fix sensors in the network. To do so, the layout of a sample intersection is designed in Vissim. Two classes of vehicles are generated, CVs with communication devices and ordinary vehicles. Various traffic scenarios are designed by changing the traffic signal plan and vehicle inputs. This results in a different number of vehicles in the queue during the simulation period.
Fig. 1

A snapshot of the sample intersection

Vehicles in a CV environment use a specific platform to communicate with each other and with infrastructure. Dedicated short-range communication (DSRC), which is designed as a communication platform to be used in a CV environment, enables vehicles and infrastructure in the communication range of about 300 m, exchanging their real-time information with each other. In this paper, both vehicle-to-vehicle (V2V) and vehicle-to-infrastructure (V2I) communications are used to collect the information from CVs.

4 Enhancement of the communication quality in CV environment

Due to the information congestion in high traffic mobilities, V2V and V2I communications are prone to transient communication failure and packet loss. This failure not only results in inaccurate performance of the estimation algorithms, but also can have a significant effect on the traffic signal control algorithms that rely on the collected CV data.

RSUs are responsible for collecting the CV data used in estimation algorithms. However, if the RSU collects the individual CV data in its communication range, the CV-based queue length algorithms are only able to estimate a part of the queue that is located inside the communication range of RSUs. Moreover, there is a possible risk of communication failure and packet loss due to information congestion. To overcome these problems, we for the first time introduce the concept of k-leader CVs in this paper. Based on this concept, all CV vehicles in the queue are responsible for collecting the information of all existing CVs in their communication range and then exchanging this information with other existing CVs in their vicinity. Therefore, each CV is not only aware of the other CVs in its vicinity but also can collect other CVs’ information which is outside its communication range. As a result, all available CVs in the queue collect the information of all other existing CVs. Then, the CV which has the nearest position to the RSU and arrives earlier (this can be determined using the position and timestamp information in the basic safety message which exchanges between vehicles and RSUs) is responsible for transmitting all CV data to the RSU. This approach significantly decreases the load on RSU and reduces the risk of communication failure. Moreover, in the situation that the first leader CV fails to communicate with RSU, the second CV is responsible for retransmitting the CV information, and if the second one fails, the third one takes the responsibility. The chain of communication will go down to the fourth and so on to the kth CV in the queue which is located in the communication range of RSU. As a result, we would have k-leader CVs which take the responsibility to transmit the data to the RSU when their preceding CVs fail to communicate. This approach not only decreases the RSU loads and communication failure but also increases the queue detection range, no matter what the actual length of the queue is. Consider that based on the leader CV approach, the only CV that communicates with RSU in each approach of the intersection is the leader CV in the queue. Therefore, only one CV at each approach communicates with the RSU at each time. We consider only one RSU at each intersection. Using the leader CV approach, there is no need for all CVs at all approaches to communicating with RSU individually. Instead, a leader CV at each approach communicates the information of all CVs in that approach with RSU. Note that the number of CVs that communicate with RSU at each intersection is equal to the number of approaches of that particular intersection. This method can significantly reduce the volume of data in the communication between CVs and RSUs in comparison with the situation that all CVs communicate with roadside units individually. Moreover, it can increase the queue detection range. Figure 2 describes the concept of k-leader CVs.
Fig. 2

Flow chart of the k-leader CVs

5 Linear regression model

To determine the number of input variables for the NN model, in this section, a linear regression model is utilised to validate the importance of each input parameter that is used as an input factor in the process of queue length estimation. In this study, the queue length is estimated regarding the number of vehicles in the queue. The average speed and average acceleration of CVs, the position of the last CV in the queue and the penetration rate of CVs are used as input variables for the model. In this section, a linear regression model validates the importance of each parameter in determining the queue length. A total of 5550 data points from CVs are collected from the Vissim traffic simulator for different traffic situations. Data are collected every 10 s during a 2-h period of running the simulation in quick mode status. MATLAB is used as a COM interface to receive data from Vissim. The simulation is run for each penetration rates of connected vehicles. Then, the CV information such as position, speed and acceleration/deceleration is collected with MATLAB as the training and test data. These data are used to determine the parameters of the regression model. The linear regression model considers the average speed, average acceleration/deceleration, position of the last CV and penetration rate of CVs as independent variables and the number of vehicles in the queue as the dependent variable:
$$y = 7 + \alpha x_{1} + \beta x_{2} + \gamma x_{3} + \delta x_{4} ,$$
where \(x_{1}\) represents the average speed of CVs; \(x_{2}\) is the average acceleration/deceleration of CVs; \(x_{3}\) describes the distance between the last CV in the queue and the stop bar of the intersection; \(x_{4}\) is the penetration rate of CVs; \(y\) shows the queue length in terms of number of vehicles which has a value between 0 and 25; \(\alpha , \beta , \gamma\) and \(\delta\) are the coefficients to be determined using the linear regression model. Table 1 indicates the coefficient of each parameter in the regression model as well as the t-value and p-value of each parameter in the model.
Table 1

Parameters of linear regression model



Standard error









− 0.25


− 28.60

2.07 × 10−168





9.50 × 10−105


− 0.01


− 6.00

2.10 × 10−9





1.16 × 10−20

The value of each coefficient indicates the slope of the line which can be fitted between each independent variable and the dependent variable in the absence of other independent variables. The standard error for each predictor represents the standard deviation of the coefficient. The value of the t-statistic for each estimator is calculated based on the following formulas:
$$t{\text{-value}} = \frac{{\alpha_{i} }}{\text{SE}},$$
where \(\alpha_{i}\) represents the coefficient of each estimator which is considered as the slope of the regression line regarding to that estimator, and \({\text{SE}}\) represents the standard error of that slope.

Based on the p-value of each parameter in the regression model, the null hypothesis can be tested for each variable. This test specifies whether a coefficient is zero or does not have a significant effect on the estimation of the output variable. The null hypothesis can be rejected for any parameter with a low p-value (p-value < 0.05). In other words, a high p-value shows that any changes in the value of the predictor do not have a significant effect on the final output. As can be seen from the p-value of the four input predictors in Table 1, all are significant factors in the estimation of the queue length. The root-mean-square error (RMSE) and R2 for this regression model are 4.43 and 0.193, respectively. With respect to the low R2 of the linear regression, a simple linear regression cannot be an appropriate model for queue length estimation. However, the importance of each input parameter in the queue length estimation can be inferred from the linear regression model. In the next section, an NN model will be used to predict the queue length in various traffic situations and only based on the data received from CVs.

6 Artificial neural network-based queue length estimation method

Due to the nonlinearity and stochastic nature of traffic, using artificial intelligence techniques is considered an appropriate choice in various transportation problems. Among these techniques, the artificial neural network (ANN) is a powerful and straightforward tool which has the capability to be used in pattern recognition and classification [30]. In [31], the application of NN in different areas of transportation is reviewed. According to this study, NN can be used in modelling the driving behaviour, traffic parameters estimation, pavement maintenance, vehicle detection and classification, traffic pattern classification and forecasting, economic and policy in transportation, air and maritime and submarine transport, metro operation and traffic control applications. In the following, an NN is used to solve the problem of queue length estimation in the CV environment for various traffic conditions.

The first step to develop the model is data collection to provide the training and test data sets. Data are collected during 2 h of running the simulation. The simulation was adjusted to randomly generate a variety of traffic situations to build the training data in order to make the model applicable to estimate the queue length in different traffic conditions.

Traffic data for various traffic situations were gathered by periodically making changes in the traffic signal control program, vehicle arrival rate and the penetration rate of CVs. These changes result in the generation and dissipation of the queue several times during the period of data collection.

The NN model was calibrated using the nntool in the MATLAB software. The structure of the candidate NN is shown in Fig. 3. The proposed neural network is chosen to be a feed-forward backpropagation network which consists of three layers since a three-layer NN with an appropriate number of neurons has the capability to predict data with high nonlinear properties. The first layer is the input layer with four inputs, the second layer is the hidden layer and consists of 10 neurons, and the last one is the output layer and consists of 1 neuron which is equal to the number of outputs. The weights and biases in each layer of the network are updated during the training period of the model. The Tansig function is used in the first layer which normalises the input to [−1 1] interval. Trainbr, which is used as the training function in the second layer, updates the weight and bias values based on Levenberg–Marquardt optimisation. For the sake of a well-generalised network, this function minimises a combination of squared errors and weights in order to determine the best combination. The procedure is the so-called Bayesian regularisation. Table 2 summarises the characteristics of the proposed NN which is trained by 70% of the data gathered from Vissim simulation. The remaining 30% is used to test the developed NN model.
Fig. 3

Feed-forward backpropagation network

Table 2

NN characteristics


No. of layers

No. of neurons in the hidden layer

Hidden layer function

Output layer function



Feed-forward backpropagation network







Figure 3 represents the general structure of the proposed NN; the model has three layers, the input layer, the hidden layer and the output layer. There are \(n\) input variables. The hidden layer and the output layer have \(m\) and \(p\) neurons, respectively. In the NN structure in Fig. 2, \(x_{i}\) is the \(i\)th input of the input layer and \(w_{ij}\) is the weight for the \(i\)th input in the \(j\)th input of the hidden layer. The biases for the hidden layer and output layer are represented by \(\theta_{i}\) and \(b_{k}\), respectively. Note that \(\phi \left( x \right)\) is the activation function of the hidden layer. The weight of the \(j\)th output of the hidden layer in the \(k\)th input of the output layer is shown with \(v_{jk}\). Function \(\psi \left( x \right)\) describes the activation function of the output layer. The number of outputs of the model is represented by \(p\), and \(\hat{y}_{p}\) is the final estimated output of the model. The outputs of the hidden layer and output layer, denoted by \(s_{j}\) and \(y_{k}\), respectively, are calculated through the following formulas:
$$s_{j} = \phi \left( {\mathop \sum \limits_{i = 1}^{n} w_{ij} x_{i} + \theta_{i} } \right),$$
$$y_{k} = \psi \left( {\mathop \sum \limits_{j = 1}^{m} v_{jk} s_{j} + b_{k} } \right) = \psi \left( {\mathop \sum \limits_{j = 1}^{m} v_{jk} \phi \left( {\mathop \sum \limits_{i = 1}^{n} w_{ij} x_{i} + \theta_{i} } \right) + b_{k} } \right).$$
Then, the estimated value for each data sample will be compared, and the prediction error for all \(N\) sample data can be calculated using the following formulas:
$$e^{2} = \mathop \sum \limits_{l = 1}^{N} \mathop \sum \limits_{k = 1}^{p} \left( {y_{k}^{l} - \hat{y}_{k}^{l} } \right)^{2} ,$$
where \(e^{2}\) is the squared prediction error, \(y_{k}^{l}\) is the observed values, and \(\hat{y}_{k}^{l}\) is the predicted values.

6.1 Sensitivity analysis concerning the number of neurons in the hidden layer

A sensitivity analysis is conducted to analyse the prediction power of the ANN base on the number of neurons in the hidden layer, and the results are represented in Table 3. As can be seen from the table, there is a slight trade-off between the accuracy of the model and the computational time of the training module. Usually when the number of neurons in the hidden layer grows, the accuracy of the model and the computational time increases accordingly. From the results of Table 3, it is clear that a higher number of neurons in the hidden layer do not significantly affect the accuracy of the prediction power of the model. For instance, an NN with 30 neurons in the hidden layer has a better RMSE, which is verified to be less than 13% better than an NN with five neurons in the hidden layer. However, the computational training time for an NN with 30 neurons is approximately 14 times higher than the one with 5 neurons. Therefore, an NN with 10 neurons in the hidden layer is chosen, which has acceptable accuracy, and it comes with a reasonably affordable computational time. Note that, in order to avoid getting stuck in a local minimum, the initial weights for the layers in the NN structure are determined arbitrary. Therefore, each training run for the same NN structures will deliver different results for the performance measures. Hence, the results provided in Table 3 are average results for several runs of the NN model for each structure.
Table 3

NN performance for different structures

No. of neurons



Computational time (s)




< 1.00

























6.2 Comparison of the prediction accuracy of the model for different penetration rates of CVs

Figures 4, 5, 6 and 7 compare the actual and predicted queue lengths for different penetration rates of CVs. The blue graph represents the ground truth queue, and the red one is the result of the queue length prediction based on the NN model. There is a direct relationship between the accuracy of the model and the penetration rate of CVs. As it can be specified from the figures, as the penetration rate of CVs decreases in the network, the amount of information which is used to estimate the queue length drops and therefore the accuracy of the model degrades accordingly. As can be seen in Fig. 7, the model cannot predict the queue length appropriately for a penetration rate of 10%. The inputs for the queue estimation algorithm in this paper are the average speed, average acceleration/deceleration and the total number of CVs. The position of the last CV in the queue is also considered as an input for the NN model. Therefore, as the number of CVs increases, the inputs for the NN model could represent the characteristics of the real queue with more accuracy. However, if there is only one CV exists in the queue, the method is still able to estimate the queue; though, as the total number of available CVs increases, the estimation results improve accordingly (in terms of RMSE and R2).
Fig. 4

Queue lengths estimation for 100% penetration rate of CVs

Fig. 5

Queue lengths estimation for 50% penetration rate of CVs

Fig. 6

Queue lengths estimation for 30% penetration rate of CVs

Fig. 7

Queue lengths estimation for 10% penetration rate of CVs

Figure 8 illustrates the RMSE of the ANN model for different penetration rates of CVs in an undersaturated traffic condition. The average size of the queue is approximately seven vehicles. In undersaturated traffic condition, only a limited number of vehicles in the queue are connected, and as a result, the average speed and average acceleration/deceleration can be calculated using the average value of the speed and acceleration/deceleration of these CVs. However, queue estimation results are still comparable with results in references [18] and [27] for undersaturated traffic conditions. The maximum error for 30% penetration rate in our study is 35%. However, it is around 37% in Ref. [18]. Having said that, the method proposed in this study is simply based on an ANN, which can be easily enhanced by adding some new information such as the arrival patterns and traffic signal parameters as new input variables to the model. In other words, the previous research studies with approximately the same results about the queue length need to consider and calculate the queue length based on the information about queue formation and dissipation, so in comparison with the method developed in this study, they need more effort and computation. In the next section, the model will be used for the saturated traffic condition in which there are more CVs in the queue, and then, the accuracy of the model will be compared with the results provided in this section. As can be seen in Fig. 8, the proposed method can predict the queue with appropriate accuracy for more than 20% penetration rate of CVs. Therefore, for a good performance of the proposed algorithm, at least 20% of vehicles need to be able to report their information while they join the queue.
Fig. 8

RMSE of ANN model for estimation of queue length for different penetration rates of CVs

Note that in Fig. 8, even for 100% penetration rate of CVs the NN model provides a slightly different result from the real value of the queue. This is because even for 100% penetration rate of CVs, the training data are different from the test data. Since the NN model is trained on the basis of the training data and learnt the pattern of the training data, the result of the queue estimation algorithm for 100% penetration rate of CVs for the test data is slightly different (RMSE = 0.6) from the real value of the queue.

6.3 Queue length estimation for saturated traffic condition

In this part, the same structure will be used for the NN model, but the model is trained and tested using the data from saturated traffic conditions. Here data from random arrival flow of 1500–2000 veh/h for different plans of traffic signal controller are collected and used as the training and test data for the NN structure. The RMSE and R2 for this situation will be on average 3.31 and 0.844, respectively. In this situation, on average, 13 vehicles exist in the queue. Figure 9 compares the result of RMSE percentage for saturated and undersaturated traffic conditions. As it was expected, since in a saturated traffic condition more CVs are standing in the queue, the model has a better accuracy and prediction power in comparison with an undersaturated traffic condition. However, the queue estimation results are satisfactory for both the undersaturated and saturated traffic conditions.
Fig. 9

Comparison of RMSE for undersaturated and saturated traffic conditions for different penetration rates of CVs

7 Case study network

To evaluate the performance of the proposed queue estimation algorithm, the method is utilised to predict the queue for three corridors in the Vissim layout of Melbourne City, Australia. This part of the network is located inside a CV test bed. This CV ecosystem is the first multimodal test bed known as Australian Integrated Multimodal Ecosystem (AIMES) [32] which hosts a variety of intelligent sensors. This area consists of 6 km2 of the urban environment. The roadside units are already installed in 15 intersections, and more than 100 vehicles are equipped with communication devices. The authors are recently involved in this CV test bed project, and as the future direction of this research, the algorithm will be tested for real CV data from the test bed.

In this study, we consider the real traffic demand between each origin–destination in the simulated network. The Vissim layout of the case study network is illustrated in Fig. 10.
Fig. 10

Melbourne simulation layout of the case study network

The car following behaviour is chosen for the vehicles in this simulation. Moreover, the free flow speed is adjusted to be 50 km/h. Traffic signals at signalised intersections are working on a fixed time basis. The dynamic assignment is used to assign the paths to vehicles for each origin and destination. Each corridor has four lanes and the length of each lane is 3.5 m. The simulation is run for different penetration rates of connected vehicles. Moreover, to produce dissimilar traffic situations, a different random seed is chosen for each simulation run.

The queue is estimated in corridors 1, 2 and 3 which are located in 3 different intersections. The various distances between intersections along with distinct traffic signal plans and intersection layouts of each intersection result in dissimilar arrival pattern and queue formation and dissipation for each of these corridors during the simulation time. However, the results of the case study confirm that the proposed method performs well for all the three corridors irrespective of their distinct parameters.

The simulation results for the three case study corridors across some penetration rates of CVs are summarised in Table 4. As illustrated before, as the penetration rates of CV increase, the method estimates the queue with more resolution.
Table 4

R-squared index of the queue estimation algorithm across some penetration rates

Penetration rate (%)

Corridor 1

Corridor 2

Corridor 3

















One of the issues associated with NNs is the overfitting problem. When the overfitting happens, the trained network only performs well for the training data but not for the test data. If a particular training data set used for several times to adjust the NN parameters by minimising the prediction error, the weights will only be optimised for that particular training set. To avoid this, the training iteration needs to be stopped before reaching the local minima. To do so, the data set is divided into three different sets, training, validation and test. The training data set will be used to adjust the NN parameters by minimizing the prediction error. However, the performance of the trained network is evaluated by using the validation set after each iteration. Once the prediction error for the validation data set starts to increase, the training process should be stopped; otherwise, the network will be started to overfit on the training data. As an example, Fig. 11 indicates the mean squared error of the training, validation and test sets for queue estimation in the presence of 20% CVs in corridor 3. The training stops at epoch 6 with the mean squared error of 6.9 for the validation data set. After this epoch, the MSE is increased for the validation data set.
Fig. 11

Prediction error of the training, validation and training sets at each training iteration

The training regression for 20% CV in corridor 3 for all of the data sets is represented in Fig. 12. As can be seen from the R2 of the data sets, the proposed NN method performs well even under low market penetration rates of CVs (say 20%).
Fig. 12

NN training regression

Figure 13 represents the accumulation and range of error between the real queue (target) and estimated queue (output) in an error histogram.
Fig. 13

Error histogram for 20% (above) and 50% (bottom) CVs

The above figure represents the error histogram for 20% CVs in corridor 3, and the bottom one shows the error for the same corridor with 50% CVs. As can be seen, the range of error is smaller for NN with 50% CVs. Moreover, in comparison with 20% CVs, the most accumulation of the error is around zero for the case study with 50% CVs. This result shows that as the penetration rates of CVs increase, the proposed queue estimation algorithm predicts the queue with more resolution. However, it still provides a convincing result for low market penetration rates of CVs (say 20%).

Queue is always considered to be a very important traffic index in the literature. The queue length index may be used to evaluate the effect of changes in traffic infrastructure on the overall performance of the traffic condition. For instance, in order to specify the effect of building a new road on the traffic in a particular junction, we can compare the queue before and after the construction of the road. Moreover, the queue index can be used as a measure to design the parameters of the traffic signals. For example, the queue length at each approach of the intersection in each cycle can be used as a criterion to determine the green share for each movement.

8 Conclusion

We develop an NN model to estimate the queue length at each approach of intersections in a CV system. The proposed model does not depend on the traditional and conventional information such as the traffic signal plan or the arrival pattern of vehicles at intersections which are expensive data to acquire. A multilayer perceptron NN, which is able to estimate highly nonlinear data, is calibrated using merely the data received from CVs. These data include the position, speed, acceleration/deceleration and the penetration rate of CVs in the queue.

The proposed method can also live with sporadic and probable failure in communication between CVs with RSU, which confirms its reliability. In this method, at first, the information of all CVs in the queue is gathered by the leader CV, and then, this information is communicated with the RSU. Therefore, there is no need for all CVs to communicate directly with RSU.

The proposed model is numerically challenged for two scenarios: undersaturated and saturated traffic conditions. The model predicts the queue length with more accuracy for saturated traffic conditions, in comparison with undersaturated traffic conditions. It is mainly because there are more CVs and therefore more information available in saturated traffic conditions. Moreover, the accuracy of the prediction results is more important for controlling the traffic in saturated traffic condition since any failure in the control strategy can result in a queue spillover and degradation of the traffic congestion.

As a result, the proposed queue estimation methodology, which has better accuracy in saturated traffic conditions, can be considered as an appropriate strategy to provide information for adaptive traffic signal controllers.

The performance of the queue estimation method is also evaluated using real size data of a CV test bed (namely AIMES) in Melbourne, Australia. Moreover, the distance between intersections and the traffic signal plan of each individual intersection varies. These differences result in various arrival patterns and queue formation and dissipation at each approach of the three intersections. Despite all these challenges, the simulation results confirm the proposed model has the capability to predict the queue length with relatively high accuracy (say 75%), irrespective of the arrival pattern and the layout of the intersection. Based on the results of this study, 20% penetration rate of CVs is a threshold for the proposed algorithm to perform well.

As mentioned before, the model relays only on the information of CVs in the queue. It does not need any information about the intersection layout, nor the arrival pattern of vehicles or the formation of the queue. The proposed NN can be trained tailored to various intersection layouts and traffic situations (e.g. undersaturated, saturated and oversaturated traffic conditions). The trained NN models can then be achieved to be used in future applications based on the traffic situation in the network. Training the NN for different situations/layouts would enhance the precisions of the prediction algorithms.

Note that in this paper, the Vissim simulation data are used to train the NN structure which can easily speed up for many runs. However, such amount of training data may require a long time to collect in real world. Since the estimation method provided in this paper is solely based on the CV data, it cannot estimate the queue when there is no CV in the queue. This might happen especially when the market penetration rate is low. To overcome this shortcoming, we can estimate the queue length based on the results of the queue estimation algorithm for the previous and the next cycle which have CVs.

As the future direction for this research, we can fuse other types of data from different sources such as loop detectors [33] and video cameras [34] to predict the queue with more accuracy. Considering the behavior of heavy vehicles [35] and their parking manoeuvres and their impact in queue formations also can be regarded as a worthy line of further research. Furthermore, to better validate the model, the real data from AIMES test bed can be used to test the algorithm. Moreover, to provide a more accurate estimation results (in terms of RMSE and R2), we can add the data related to the traffic signal parameters as an auxiliary input for the NN model. The estimation algorithm in this paper does not estimate the queue length on a lane-by-lane basis. However, in some cases (i.e. green time allocation) we need to know the queue length for each individual lane. This would be considered in the future research.



This work has been sponsored by the Australian Integrated Multimodal EcoSystem (AIMES), The authors would like to thank their industry and government partners, namely VicRoads, Department of Transport, Traffic Accident Commissions, CUBIC, PTV Group, Cisco.


  1. 1.
    Roess RP, Prassas ES, McShane WR (2019) Traffic engineering, 5th edn. Pearson Education, Hoboken.
  2. 2.
    Bagloee SA, Sarvi M (2015) Heuristic approach to capacitated traffic assignment problem for large-scale transport networks. Transp Res Rec 2498:1–11CrossRefGoogle Scholar
  3. 3.
    Larsson T, Patriksson M, Rydergren C (2004) A column generation procedure for the side constrained traffic equilibrium problem. Transp Res Part B Methodol 38:17–38CrossRefGoogle Scholar
  4. 4.
    Larsson T, Patriksson M (1999) Side constrained traffic equilibrium models: analysis, computation and applications. Transp Res Part B Methodol 33:233–264CrossRefGoogle Scholar
  5. 5.
    Larsson T, Patriksson M (1995) An augmented Lagrangean dual algorithm for link capacity side constrained traffic assignment problems. Transp Res Part B Methodol 29:433–455CrossRefGoogle Scholar
  6. 6.
    Emami A, Sarvi M, Bagloee SA, Saberi M (2018) Connected vehicles: an overview of the past and present developments and testbeds. In: Presented at the transportation research board 97th annual meeting transportation research boardGoogle Scholar
  7. 7.
    Chen Q, Jiang D, Delgrossi L (2009) IEEE 1609.4 DSRC multi-channel operations and its implications on vehicle safety communications. In: 2009 IEEE vehicular networking conference (VNC). pp 1–8Google Scholar
  8. 8.
    Kumar V, Kumar KP, Amudhavel J, Inbavalli P, Jaiganesh S, Kumar SS (2015) A hidden Markov model for fault tolerant communication in VANETS. In: Proceedings of the 2015 international conference on advanced research in computer science engineering and technology (ICARCSET 2015). p 44Google Scholar
  9. 9.
    Wang Z, Hassan M (2008) How much of DSRC is available for non-safety use?. In: Proceedings of the fifth ACM international workshop on VehiculAr Inter-NETworking. pp 23–29Google Scholar
  10. 10.
    Dey KC, Rayamajhi A, Chowdhury M, Bhavsar P, Martin J (2016) Vehicle-to-vehicle (V2 V) and vehicle-to-infrastructure (V2I) communication in a heterogeneous wireless network–Performance evaluation. Transp Res Part C Emerg Technol 68:168–184CrossRefGoogle Scholar
  11. 11.
    Akçelik R (1999) A queue model for HCM 2000. ARRB Transportation Research Ltd., Vermont SouthGoogle Scholar
  12. 12.
    Sharma A, Bullock D, Bonneson J (2007) Input-output and hybrid techniques for real-time prediction of delay and maximum queue length at signalized intersections. Transp Res Rec 2035:69–80CrossRefGoogle Scholar
  13. 13.
    Webster FV (1958) Traffic signal settings, road research technical paper no 39. Road Research Laboratory, LondonGoogle Scholar
  14. 14.
    Emami A, Sarvi M, Bagloee AS (2019) Using Kalman filter algorithm for short-term traffic flow prediction in a connected vehicle environment. J Mod Transp 27(3):222–232CrossRefGoogle Scholar
  15. 15.
    Lee S, Wong S, Li Y (2015) Real-time estimation of lane-based queue lengths at isolated signalized junctions. Transp Res Part C Emerging Technol 56:1–17CrossRefGoogle Scholar
  16. 16.
    Hao P, Ban X, Whon Yu J (2015) Kinematic equation-based vehicle queue location estimation method for signalized intersections using mobile sensor data. J Intell Transp Syst 19:256–272CrossRefGoogle Scholar
  17. 17.
    Lighthill M, Whitham G (1955) On kinematic waves I. Flood movement in long rivers. Proc Royal Soc Lond Ser A Math Phys Sci 229:281–316MathSciNetCrossRefGoogle Scholar
  18. 18.
    Ramezani M, Geroliminis N (2015) Queue profile estimation in congested urban networks with probe data. Comput Aided Civ Infrastruct Eng 30:414–432CrossRefGoogle Scholar
  19. 19.
    Mei Y, Gu W, Chung EC, Li F, Tang K (2019) A Bayesian approach for estimating vehicle queue lengths at signalized intersections using probe vehicle data. Transp Res Part C Emerg Technol 109:233–249CrossRefGoogle Scholar
  20. 20.
    Park H-S, Kim Y-C, Moon H-Y, Kim H-C (2007) A development of traffic queue length estimation model using occupancy time per vehicle based on COSMOS. J Korean Soc Civ Eng 27:159–164Google Scholar
  21. 21.
    Viti F, Van Zuylen HJ (2010) Probabilistic models for queues at fixed control signals. Transp Res Part B Methodol 44:120–135CrossRefGoogle Scholar
  22. 22.
    Wu X, Liu HX (2011) A shockwave profile model for traffic flow on congested urban arterials. Transp Res Part B Methodol 45:1768–1786CrossRefGoogle Scholar
  23. 23.
    Chang H-J, Park G-T (2013) A study on traffic signal control at signalized intersections in vehicular ad hoc networks. Ad Hoc Netw 11:2115–2124CrossRefGoogle Scholar
  24. 24.
    Lai AH, Yung NHC (2000) Vehicle-type identification through automated virtual loop assignment and block-based direction-biased motion estimation. IEEE Trans Intell Transp Syst 1:86–97CrossRefGoogle Scholar
  25. 25.
    Karimpour M, Moridpour S (2019) A novel method in light-rail condition monitoring using smartphones. IEEE Intell Transp Syst Mag.
  26. 26.
    Comert G, Cetin M (2009) Queue length estimation from probe vehicle location and the impacts of sample size. Eur J Oper Res 197:196–202CrossRefGoogle Scholar
  27. 27.
    Ban XJ, Hao P, Sun Z (2011) Real time queue length estimation for signalized intersections using travel times from mobile sensors. Transp Res Part C Emerg Technol 19:1133–1156CrossRefGoogle Scholar
  28. 28.
    Comert G (2013) Simple analytical models for estimating the queue lengths from probe vehicles at traffic signals. Transp Res Part B Methodol 55:59–74CrossRefGoogle Scholar
  29. 29.
    Rompis SYR, Cetin M, Habtemichael F (2018) Probe vehicle lane identification for queue length estimation at intersections. J Intell Transp Syst 22(1):10–25CrossRefGoogle Scholar
  30. 30.
    Kubat M (1999) Neural networks: a comprehensive foundation by Simon Haykin, Macmillan, 1994, ISBN 0-02-352781-7. Knowl Eng Rev 13:409–412CrossRefGoogle Scholar
  31. 31.
    Dougherty M (1995) A review of neural networks applied to transport. Transp Res Part C Emerging Technol 3:247–260CrossRefGoogle Scholar
  32. 32.
    M. S. O. Engineering (2018) Australian Integrated Multimodal EcoSystem (AIMES).
  33. 33.
    Sarvi M, Kuwahara M (2008) Using ITS to improve the capacity of freeway merging sections by transferring freight vehicles. IEEE Trans Intell Transp Syst 9(4):580–588CrossRefGoogle Scholar
  34. 34.
    Sarvi M (2013) Heavy commercial vehicles‐following behavior and interactions with different vehicle classes. J Adv Transp 47(6):572–580Google Scholar
  35. 35.
    Moridpour S, Sarvi M, Rose G, Mazloumi E (2012) Lane-changing decision model for heavy vehicle drivers. J Intell Transp Syst 16(1):24–35CrossRefGoogle Scholar

Copyright information

© The Author(s) 2019

Open AccessThis article is distributed under the terms of the Creative Commons Attribution 4.0 International License (, which permits unrestricted use, distribution, and reproduction in any medium, provided you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made.

Authors and Affiliations

  1. 1.Department of Infrastructure EngineeringUniversity of MelbourneParkvilleAustralia

Personalised recommendations