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

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.


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 modelbased 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 kleader 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 kleader 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.

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 modelbased 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 realtime 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 NNbased 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.

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. 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.

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 CVbased 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.

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 Fig. 1 A snapshot of the sample intersection 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: 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; a; b; c and d 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. 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: where a i represents the coefficient of each estimator which is considered as the slope of the regression line regarding to that estimator, and 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 R 2 for this regression model are 4.43 and 0.193, respectively. With respect to the low R 2 of the linear  Fig. 2 Flow chart of the k-leader CVs A neural network algorithm for queue length estimation based on the concept of k-leader… 345 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. 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 ith input of the input layer and w ij is the weight for the ith input in the jth input of the hidden layer. The biases for the hidden layer and output layer are represented by h i and b k , respectively. Note that / x ð Þ is the activation function of the hidden layer. The weight of the jth output of the hidden layer in the kth input of the output layer is shown with v jk . Function w x ð Þ describes the activation function of the  output layer. The number of outputs of the model is represented by p, andŷ 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: 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: where e 2 is the squared prediction error, y l k is the observed values, andŷ l k is the predicted values.

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.

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 R 2 ). 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   Queue lengths estimation for 50% penetration rate of CVs 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.
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.

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 R 2 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.

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 km 2 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.
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. 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.
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 R 2 of the data sets, the proposed NN method performs well even under low market penetration rates of CVs (say 20%). Figure 13 represents the accumulation and range of error between the real queue (target) and estimated queue (output) in an error histogram.
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,   Fig. 11 Prediction error of the training, validation and training sets at each training iteration 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.

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 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 R 2 ), 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.
Open Access This article is distributed under the terms of the Creative Commons Attribution 4.0 International License (http:// creativecommons.org/licenses/by/4.0/), 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.