Connected Vehicle as a Mobile Sensor for Real Time Queue Length at Signalized Intersections

With the development of intelligent transportation system (ITS) and vehicle to X (V2X), the connected vehicle is capable of sensing a great deal of useful traffic information, such as queue length at intersections. Aiming to solve the problem of existing models’ complexity and information redundancy, this paper proposes a queue length sensing model based on V2X technology, which consists of two sub-models based on shockwave sensing and back propagation (BP) neural network sensing. First, the model obtains state information of the connected vehicles and analyzes the formation process of the queue, and then it calculates the velocity of the shockwave to predict the queue length of the subsequent unconnected vehicles. Then, the neural network is trained with historical connected vehicle data, and a sub-model based on the BP neural network is established to predict the real-time queue length. Finally, the final queue length at the intersection is determined by combining the sub-models by variable weight. Simulation results show that the sensing accuracy of the combined model is proportional to the penetration rate of connected vehicles, and sensing of queue length can be achieved even in low penetration rate environments. In mixed traffic environments of connected vehicles and unconnected vehicles, the queuing length sensing model proposed in this paper has higher performance than the probability distribution (PD) model when the penetration rate is low, and it has an almost equivalent performance with higher penetration rate while the penetration rate is not needed. The proposed sensing model is more applicable for mixed traffic scenarios with much looser conditions.


Introduction
With the increasing traffic congestion problem, the role of adaptive traffic control systems (ATCS) has become more and more important. The first prerequisite for a reasonable adaptive control system is real-time-that is, the signal light can quickly and accurately reflect actual traffic conditions at the intersection and give the phase timing scheme in time [1]. The length of the entrance lane is an indispensable parameter for evaluating the traffic efficiency of an intersection, and it is also an important basis for real-time optimization of signal timing [2]. Therefore, accurate evaluation of queue length is of great significance to reducing the delay of vehicles at the intersection.
Loop and video detectors are currently the most common methods of queue length evaluation. However, the loop detector can only detect the vehicle passing information at a fixed position and cannot Sensors 2019, 19, 2059 3 of 22 to verify the model and analyze the influence of different penetration rates on the sensing results. Absolute error and relative error are used to test the reliability of the model. This paper is organized as follows. In Section 2, a short literature review on queue length estimation based on connected vehicles data is presented. Section 3 introduces the combined model including the shockwave-based and the BP neural network-based models. The simulation and result analysis are reported in Section 4. Finally, Section 5 presents the conclusions of this paper and suggestions of future work on this particular topic.

Literature Review
With the development of V2X technology, the connected vehicle as a "mobile sensor" to collect traffic information has become the key to traffic management. More and more people are devoted to researching the processing and the application of connected vehicle data, looking for a method that can accurately reflect the real-time state of traffic with little connected vehicle data. For example, Zheng et al. [23] use GPS trajectory data of a small number of connected vehicles or other navigation devices to predict the traffic volume at the intersection, and the model regarded vehicle arrival as the Poisson distribution to establish the maximum likelihood problem solving flow evaluation. Wang et al. [24] propose a new topological framework based on connected vehicle data, which is used to model road networks and present the propagation patterns of traffic flow; the study designs a graph recurrent neural network as an online predictor to learn the propagation patterns in the road networks. The diversification of traffic information makes the application of connected vehicle data more and more extensive.
Large amounts of connected vehicle data are collected, processed, and analyzed for traffic state evaluation [25]. Firstly, accurate traffic flow prediction in an intelligent transport system using connected vehicles is significant. EI-Sayed et al. [26] propose a new supervised learning model to capture knowledge on all possible traffic patterns. This model is a refinement of the support vector machine (SVM) kernels with a radial basis function. Goudarzi et al. [27] present a novel approach by using traffic data in a self-organizing vehicular network. The results show that the proposed model achieves high performance accuracy for predicting traffic flow. Secondly, vehicle speed prediction is important information for many applications, including electric vehicles' power management and emission or speed limit regulation [28]. In [29], the real-time traffic information of adjacent roads is accessible and utilized for vehicle speed prediction. Thirdly, density prediction is also an important work in real-time road network state evaluation. Several other traffic measures, such as traffic speed or volume, can act as surrogate indicators for a congested situation, but density has been identified as the most important parameter to identify traffic congestion [30]. Various infrastructure-based mechanisms are proposed in [31] to estimate traffic density relying on vehicle detection devices. Furthermore, C.B. et al. [32] discuss the evaluation of a traffic congestion detection system that can detect traffic congestion in a precise way by means of a series of algorithms that reduces localized vehicular emission by rerouting vehicles. The analysis based on connected vehicle data will become the most important means of urban traffic state evaluation.
Queue length sensing based on connected vehicles is one of the applications. Vehicle arrival is often seen as a probability problem. In [33][34][35], mathematical statistics are used to calculate conditional probability distribution of queue length and the expected queue length, taking the position of the last connected vehicle in the motorcade, the queue time, and the total number of connected vehicles as inputs. Meanwhile, the calculation methods of penetration rate and arrival rate are given. The relationship between sensing error and penetration rate is analyzed in [36], and the calculation formula of sensing error is proposed. The sensing model requires that the probability functions of penetration rate and queue length of the motorcade should be determined in advance and are only suitable for unsaturated isolated intersections. The theory of shockwave describes the formation and dissipation process of queue by analyzing the changes of traffic flow density [37], which have a critical state in time and space. An and Ban et al. [38][39][40][41] determine the maximum queue length of the entrance lane based on the critical points of the changes in density and travel time. Feng et al. [42] propose an estimation of location and speed (EVLS) algorithm to determine the speed and the position of unconnected vehicles on the road by using the status information of connected vehicles. The sensing model divides the intersection entrance road into three areas: queuing area, deceleration area, and free driving area. Although the influence of arrival rate change is taken into account in this method, no specific method for determining correction parameters is given. The model is verified with a high penetration rate, which needs to be further verified if it can be applied to the transition phase of the vehicle infrastructure cooperative environment.
Based on V2X technology, trajectory information of connected vehicles is not difficult to obtain. In [43,44], the trajectory reconstruction model is established based on location and time information of connected vehicles, and queue length evaluation and trajectory optimization are completed. However, when the penetration rate is low, the sensing results produce large errors. Similar to the idea of mathematical statistics in [33], Xu et al. [9] convert the sensing problem of queue length into the estimation problem of the number of vehicles and propose an improved interpolation algorithm to analyze the sensing results at different penetration rates. This method has a large sensing error when penetration rate is low. It assumes that the vehicle arrives with Poisson distribution but does not consider the impact of uneven distribution on the sensing results. As mentioned in [45], an estimation algorithm based on convex optimization extends the widely used linear back of queue (BoQ) curve to segment linear BoQ curve and uses the convex optimization model to estimate the segment curve in order to consider more practical situations. The effects of low penetration rate, low sampling rate, and traffic disturbance on the model are considered, and the vehicle departure information from an upstream intersection is used to improve evaluation accuracy. However, the model is too complicated and requires high data processing capability for the roadside unit.
In addition, it is more difficult to predict the queue length by relying only on the information of intelligent vehicles. Therefore, many scholars use multi-source information fusion technology to improve the accuracy of sensing. In [46,47], the data fusion of loop detectors and connected vehicles is used to build the sensing model. In [48], the data fusion of upstream and downstream detectors is used to build the discriminant models based on time occupancy rates and impulse memories. In [49], the data collected by the distributed video network are integrated to monitor and track the changes of shockwaves in real-time. Data fusion greatly improves the accuracy of sensing but also increases the complexity and the economic cost of implementation. Therefore, under the premise of low cost and low penetration rate, the evaluation model that can guarantee high sensing accuracy will have larger application scenarios. In [50] and [51], a calculation method of the minimum penetration rate is proposed, and experiments confirm that the minimum penetration rate meeting the accuracy requirement is 1%. If the expected model is more in line with the actual situation, more factors need to be considered, such as vehicle type, lane transformation, etc. This paper does not involve the influence of such factors in the results.
The contributions of the proposed method are mainly as follows: (1) a new shockwave sensing model is defined, which takes into account the influence of upstream intersection flow change on downstream queue length and gives specific correction parameters and calculation formulas; (2) the sensing method in this paper does not need to determine penetration rate in advance, which makes up for the assumption in [3, 24,34,35] and is applicable to different penetration rate environments; (3) the sub-models in this paper have different application conditions. According to the comprehensive analysis of the proposed weight calculation method, the combined model is more robust than a single model. The above characteristics allow this method to have wider application scenarios and lower application costs.

Basic Conditions
The queue length sensing method proposed in this paper needs to meet some following basic conditions: (1) Connected vehicles must be equipped with GPS and wireless transmission equipment; (2) It is assumed that roadside units (such as signal controller) can accurately obtain information such as connected vehicle's ID and location; (3) The motorcade in each entrance lane must contain at least one connected vehicle; (4) This paper assumes that all participating vehicles (including connected vehicles and unconnected vehicles) are standard vehicles.
The first condition requires the GPS to accurately locate the lane of a vehicle, and it requires the wireless transmission device to formulate an emergency treatment plan to ensure the timely transmission of information to the roadside unit in case of equipment failure. The second condition requires the roadside unit to receive information sent by connected vehicles in real-time and to accurately process the data effectively and feed back to vehicles in time. The third condition requires each motorcade to include at least one connected vehicle, because the method studied in this paper is applicable to the vehicle infrastructure cooperative environment. This paper does not consider the queue sensing of all unconnected vehicles. Some literature refers to the use of traditional detection methods (such as loop detector) to deal with this situation and the use of information fusion technology to achieve the sensing work. The fourth condition assumes that all vehicles are standard vehicles, which means a vehicle's type is not considered. However, in the actual situation, different vehicle types need to be converted according to the vehicle conversion coefficient. The above basic conditions can reduce difficulty and complexity of problem research to a large extent. In the future, we hope to reduce the limitation of hypothesis conditions and expand this method to a larger scope of application.
The four basic conditions above imply that the queue length sensing model has some limitations. Firstly, the sensing scene must be the signalized intersections. Secondly, the model is only applicable to mixed traffic environments, where both connected and unconnected vehicles exist in the motorcade, or traffic environments where all connected vehicles exist. Finally, because the model assumes that vehicles pass through the intersection in the form of waves, the model is suitable for predicting the length of the queue formed in the entrance lane.
Based on the above preconditions and limitations, this paper proposes a real-time sensing model for queue length. The overall structure of this model is shown in Figure 1. The shockwave-based sensing and the BP neural network-based sensing respectively estimate the queue length and combine the advantages of two sub-models in different penetration rates to construct the combined sensing model, which has higher accuracy. Sensors 2019, 19, x FOR PEER REVIEW 6 of 22

Sensing Model Based on Shockwave
The queue length sensing based on shockwave uses V2X technology to determine total queue length of each entrance lane during the red-light period, which is used as the basis for signal optimization. Queuing vehicles are defined as vehicles that arrive at the intersection entrance load with the speed reduced to zero and wait for the green light to pass. The connected vehicle needs to send the following information to the roadside unit: vehicle's ID, location, queue time, and speed. Assuming that the vehicle arrives in a Poisson distribution, forms a queue with the corresponding arrival rate, and passes back in the form of a wave during the red light, the wave is defined as a shockwave. The key is to determine the velocity of the shockwave using connected vehicles' information. Based on the number of connected vehicles in the motorcade, this paper takes the single-lane scenario as an example for simplified analysis.
Scenario 1: There is only one connected vehicle in the motorcade ( 1 = n ). Figure 2 shows the schematic diagram of only one connected vehicle in the motorcade; the solid rectangle is the connected vehicle p , and n represents the number of connected vehicle.
Penetration rate is defined as the ratio of the number of connected vehicles in a motorcade to the total number of vehicles. The predicted time period is the red light period of each signal cycle, i.e., ( r t , f t ). r t represents the start time of the red light, f t represents the end time of the red light. In

Sensing Model Based on Shockwave
The queue length sensing based on shockwave uses V2X technology to determine total queue length of each entrance lane during the red-light period, which is used as the basis for signal optimization. Queuing vehicles are defined as vehicles that arrive at the intersection entrance load with the speed reduced to zero and wait for the green light to pass. The connected vehicle needs to send the following information to the roadside unit: vehicle's ID, location, queue time, and speed. Assuming that the vehicle arrives in a Poisson distribution, forms a queue with the corresponding arrival rate, and passes back in the form of a wave during the red light, the wave is defined as a shockwave. The key is to determine the velocity of the shockwave using connected vehicles' information. Based on the number of connected vehicles in the motorcade, this paper takes the single-lane scenario as an example for simplified analysis.
Scenario 1: There is only one connected vehicle in the motorcade (n = 1). Figure 2 shows the schematic diagram of only one connected vehicle in the motorcade; the solid rectangle is the connected vehicle p, and n represents the number of connected vehicle. Penetration rate is defined as the ratio of the number of connected vehicles in a motorcade to the total number of vehicles. The predicted time period is the red light period of each signal cycle, i.e., (t r , t f ). t r represents the start time of the red light, t f represents the end time of the red light. In Figure 2, l p represents the queue length in front of the connected vehicle, which is determined by the difference between the position of the connected vehicle and the stop line. l n represents the queue length of the unconnected vehicle behind the connected vehicle. The velocity of the shockwave can be determined by Equation (1): where t 1 is the stop time of the connected vehicle. The total queue length is equal to the sum of the queue length of all vehicles in front of the connected vehicle (including the connected vehicle) and the queue length of the unconnected vehicles arriving at the rest red light time, which can be calculated by Equations (2) and (3): where l represents the total queue length of the lane. Since there is only one connected vehicle in Scenario 1, it is prone to a large deviation of the sensing results. where 1 t is the stop time of the connected vehicle. The total queue length is equal to the sum of the queue length of all vehicles in front of the connected vehicle (including the connected vehicle) and the queue length of the unconnected vehicles arriving at the rest red light time, which can be calculated by Equations (2) and (3): where l represents the total queue length of the lane. Since there is only one connected vehicle in Scenario 1, it is prone to a large deviation of the sensing results. There are n connected vehicles in the motorcade as shown in Figure 3 and the velocity of the shockwave is determined by Equation (4): ( ).  ).  Scenario 2: There are at least two connected vehicles in the motorcade (n ≥ 2). There are n connected vehicles in the motorcade as shown in Figure 3 and the velocity of the shockwave is determined by Equation (4): where i is the connected vehicle, l n p is the queue length of the last connected vehicle, l i p is the queue length before the i connected vehicle, which is determined by the difference between the position of the last connected vehicle and the stop line, t n is the stop time of the nth connected vehicle, and t i is the stop time of the i connected vehicle. The queue length of unconnected vehicles after the nth connected vehicle is determined by Equation (5): t is the stop time of the connected vehicle. The total queue length is equal to the sum of the queue length of all vehicles in front of the connected vehicle (including the connected vehicle) and the queue length of the unconnected vehicles arriving at the rest red light time, which can be calculated by Equations (2) and (3): where l represents the total queue length of the lane. Since there is only one connected vehicle in Scenario 1, it is prone to a large deviation of the sensing results.   ( ).
The total queue length of the entrance lane is determined by Equation (6): The total queue length of the entrance lane is determined by Equation (6): However, vehicle arrival is random and non-uniform in the actual traffic environment. When the last connected vehicle enters the motorcade, the subsequent unconnected vehicles may form a queue with different arrival rates. If the original arrival rate is still used to predict the queue length of subsequent vehicles, the results may be overestimated or underestimated. For example, when the arrival rate decreases, the predicted value of queue length will be larger, and vice versa. Therefore, a modified parameter r is proposed in this paper to modify the predicted values of Equations (3) and (6). In urban roads, the distance between upstream and downstream intersections is relatively close, and the arrival rate of vehicles at the downstream intersection has a great relationship with traffic flow of an upstream intersection. As shown in Figure 4, the queue length of a downstream lane changes with upstream traffic flow. The predictive value of queue length can be corrected by using the connected vehicle's information received by the roadside units at the upstream intersection. The schematic diagram of upstream and downstream traffic flow is shown in Figure 5.
In urban roads, the distance between upstream and downstream intersections is relatively close, and the arrival rate of vehicles at the downstream intersection has a great relationship with traffic flow of an upstream intersection. As shown in Figure 4, the queue length of a downstream lane changes with upstream traffic flow. The predictive value of queue length can be corrected by using the connected vehicle's information received by the roadside units at the upstream intersection. The schematic diagram of upstream and downstream traffic flow is shown in Figure 5.
In Figure 5, the blue rectangle represents the loop detector, which is arranged in the exit lane at the intersection. It is worth noting that the loop does not need to be reinstalled in practical applications-the existing loop detector, such as the loop used to detect whether a vehicle is running a red light, can be used. When the connected vehicle passes through the loop detector, the roadside unit will receive the ID and the time (the time passing through the loop) information sent by this vehicle and will record the number of unconnected vehicles between two connected vehicles. The formula for calculating correction parameter r is as shown in Equation (7):   and the arrival rate of vehicles at the downstream intersection has a great relationship with traffic flow of an upstream intersection. As shown in Figure 4, the queue length of a downstream lane changes with upstream traffic flow. The predictive value of queue length can be corrected by using the connected vehicle's information received by the roadside units at the upstream intersection. The schematic diagram of upstream and downstream traffic flow is shown in Figure 5.
In Figure 5, the blue rectangle represents the loop detector, which is arranged in the exit lane at the intersection. It is worth noting that the loop does not need to be reinstalled in practical applications-the existing loop detector, such as the loop used to detect whether a vehicle is running a red light, can be used. When the connected vehicle passes through the loop detector, the roadside unit will receive the ID and the time (the time passing through the loop) information sent by this vehicle and will record the number of unconnected vehicles between two connected vehicles. The formula for calculating correction parameter r is as shown in Equation (7):   In Figure 5, the blue rectangle represents the loop detector, which is arranged in the exit lane at the intersection. It is worth noting that the loop does not need to be reinstalled in practical applications-the existing loop detector, such as the loop used to detect whether a vehicle is running a red light, can be used. When the connected vehicle passes through the loop detector, the roadside unit will receive the ID and the time (the time passing through the loop) information sent by this vehicle and will record the number of unconnected vehicles between two connected vehicles. The formula for calculating correction parameter r is as shown in Equation (7): Remark 1: Since the actual traffic arrival is stochastic and generally nonhomogeneous, it is possible that the last connected vehicles join the queue in a relatively short time, but the arrival rate of unconnected vehicles drops significantly afterwards. In this case, if the velocity of the shockwave is multiplied by the difference between the arrival time of the last connected vehicle and the end time of the red light, the queue length can be overestimated. Therefore, it is significant to consider the correction parameter r.
where k is the connected vehicle passing the loop detector, q k,k+1 is the number of unconnected vehicles between k and k + 1 connected vehicles, and t k is the time when the k connected vehicle passes through the loop detector. It can be seen from Equation (7) that, when the upstream flow increases, the rate r > 1, and the downstream arrival rate increases. When the upstream flow decreases, r < 1, and the downstream arrival rate decreases. Therefore, the modified formula for calculating the total queue length is shown in Equation (8): In the simulation and in actual operation, this parameter needs to be properly adjusted by considering the distance and the average speed of upstream and downstream intersections.

Sensing Model Based on BP Neural Network
The queue length of the intersection is affected by many factors and has great randomness. A neural network is composed of many simple information processing elements of neurons or nodes, which can automatically adjust the connection weight between internal neurons to match the input-output response relationship and has the advantage of nonlinear mapping.
The BP neural network is composed of two parts, the forward transmission of information and the back propagation of error. Figure 6 is a simplified BP neural network diagram. In the figure, i is the input layer neuron, with a total of r; j is the hidden layer neuron, with a total number of s1; k is the output layer neuron, with a total number of s2; p i is the sample input, t k is the sample output, w ij is the weight between input layer and hidden layer, and w jk is the weight between hidden layer and output layer. The specific process of the BP neural network is as follows.
Step 1: Forward transmission of information. It is known that the weight between neurons is w, the deviation is b, and the neuron output value is a. Then, the output of the j neuron in the hidden layer is: The output of the k neuron in the output layer is: where f 1 is the activation function between input and hidden layer, and f 2 is the activation function between hidden and output layer.
Step 2: Back propagation of the error. If the desired output value is not obtained at the output layer, the network calculates the error variation value of the output layer and propagates back. The error is transmitted back along the original connection through the network to adjust the weight of each layer of neurons until the desired value is reached. The error function is: The gradient descent method is used to calculate the weight change and the back propagation of error. For the weight from j input to k output: where, thus, For the weight from i input to j output: where, thus, ∆b j = ηδ ij .
Thus, the queue length l 2 of the sub-model based on the BP neural network is given as Equation (18).
This paper assumes that the queue length sensing model has three inputs, p 1 , p 2 , and p 3 . They are the distance between the last connected vehicle and the stop line, the stop time of the last connected vehicle, and the number of connected vehicles in the motorcade. The queue length is the only output t 1 , and the number of neurons in the hidden layer can be determined by experiment or experience.

Weight Calculation and Reliability Test of Combined Model
Combining the advantages of the two sub-models, the weight of the sub-model is determined by the ratio of the stop time of the last connected vehicle to the red light time. The formula is as follows: . ) 1 (   (20) where L is the final queue length, 1 l is the predicted value based on the shockwave, 2 l is the predicted value based on the BP neural network, α is the weight of the shockwave model, and t is the stop time of the last connected vehicle. The accuracy of the combined sensing model is tested by two error indices, namely absolute

Weight Calculation and Reliability Test of Combined Model
Combining the advantages of the two sub-models, the weight of the sub-model is determined by the ratio of the stop time of the last connected vehicle to the red light time. The formula is as follows: where L is the final queue length, l 1 is the predicted value based on the shockwave, l 2 is the predicted value based on the BP neural network, α is the weight of the shockwave model, and t is the stop time of the last connected vehicle. The accuracy of the combined sensing model is tested by two error indices, namely absolute error A E and relative error R E . The specific calculation formula is as follows: where y j represents the actual value of queue length in j cycle andŷ j represents the predictive value of queue length in j cycle.

Analysis of Model's Time Complexity
Based on the description of the shockwave and the BP network combined sensing model, the queue length algorithm at signalized intersections is shown as Algorithm 1. w jk a j + b k )(k = 1, 2, · · · , s2). where a j is the output of hidden layer, The information used in the sensing algorithm is given at the beginning, which can be collected by the road side unit (RSU) via V2X. The sensing algorithm is running on the central processing unit (CPU) of the RSU. To evaluate the proposed algorithm's performance, the storage and the time complexity are analyzed. Moreover, the storage and the time complexity of a probability distribution (PD) model proposed in [3x] is utilized to compare with the algorithm proposed in this manuscript.
The time complexity of the combined sensing model can be calculated partly according to Equation (19). The time complexity of the shockwave model is as follows: The second part is related to the structure of the BP network. The time complexity will not increase with the number of vehicles. Once the structure of the BP network is determined, the time complexity of this sub-model is a constant. From this point of view, the time complexity of the combined sensing model is O n 2 .

Remark 2:
The number of connected vehicles is not very large because the penetration rate keeps in a relatively low level for a long period. Additionally, the detection area before the stop line in the intersection is limited, and the number of vehicles is not very large since the penetration rate becomes high in the far future.

Simulation and Result Analysis
To verify the effectiveness of the model proposed in this paper, a vehicle infrastructure cooperative environment is built in VISSIM to obtain real-time vehicle status information, signal transformation information, and upstream exit traffic volume information. MATLAB programmable environment is used to verify the two sub-models, and the influence of the model on sensing results of queue length under different penetration rates (ρ) of connected vehicles is analyzed. In order to better illustrate the performance of the method proposed in this paper, a comparative analysis is made between this model and the PD model [3]. The results show that the proposed sensing model is more suitable for mixed traffic environments with low penetration rates.

Model Validation Based on Shockwave
A road network is built in VISSIM in which the distance between upstream and downstream intersections is 500 m, and a loop detector is set at the upstream exit. The time interval for the connected vehicle to send information is 0.2 s. The simulation duration is 1 h, the cycle length is 70 s, and the vehicle data of 10 cycles are taken as the basis for verification analysis.

Remark 3:
The connected vehicles broadcast information periodically, including ID, location, time, and speed, via basic safety message (BSM), which is defined in SAE J2735. In many investigations, vehicles typically broadcast BSMs at an interval of 100 to 300 ms [52,53]. Without loss of generality, the time interval for the connected vehicle to send information is set as 0.2 s (200 ms) in our simulation.
One of the major contributions of this paper is the sensing of queue length with appreciable estimation accuracy, even when the penetration rate is low and the traffic flow changes greatly. A correction is introduced in the sensing model to remedy these cases. The effect of correction is studied in the simulation. Figure 7 shows the comparison of predicted values before and after the correction parameter. It reveals that the prediction accuracy is significantly improved after considering the modified parameters when the penetration rate is lower than 50%. However, when the penetration rate is greater than 50%, the influence of the modified parameters on the predicted value is not obvious, even worse than before the modification (see Figure 7c,d). This is because when the penetration rate is large, the position of the last connected vehicle in the motorcade is close to the actual queue length, and the change of vehicle arrival rate has little influence on the prediction result. Even when the change of arrival rate is taken into account, the queue length of unconnected vehicles arriving during the remaining red light period is estimated to be too high or too low, resulting in a larger error. Therefore, it is necessary to state here that the modified parameter r proposed in this paper needs to be considered when the penetration rate is less than 50% but not when the penetration rate is higher than 50%.
The results of the model validation are shown in Figure 8. The sensing results of the model under different penetration rates are analyzed, and the penetration rates of Figure 8a-d are 10%, 30%, 50%, and 70%, respectively. It can be seen from the figure that the predicted queue length is obviously closer to actual queue length at a higher penetration rate, and the sensing accuracy of the model is higher. (c) (d) Figure 7. Queue length error before and after correction in cycle 1 (a) and queue length error before and after correction in cycle 2 (b) and queue length error before and after correction in cycle 3 (c) and queue length error before and after correction in cycle 4 (d).

Figure 7.
Queue length error before and after correction in cycle 1 (a) and queue length error before and after correction in cycle 2 (b) and queue length error before and after correction in cycle 3 (c) and queue length error before and after correction in cycle 4 (d).
(c) (d) Figure 7. Queue length error before and after correction in cycle 1 (a) and queue length error before and after correction in cycle 2 (b) and queue length error before and after correction in cycle 3 (c) and queue length error before and after correction in cycle 4 (d). (c) (d) Figure 8. Queue length at 10% penetration rate (a) and queue length at 30% penetration rate (b) and queue length at 50% penetration rate (c) and queue length at 70% penetration rate (d).
It can be found from the analysis of Figure 8a, b that the sensing accuracy is higher in the fifth and the sixth cycle when penetration rate is lower. This is because in cycles five and six, the last connected vehicle in Figure 8a is closer to the end of the motorcade, while the last connected vehicle in Figure 8b is closer to the front of the motorcade. Therefore, the sensing model based on the shockwave mainly relies on the information provided by the last connected vehicle in the motorcade. When the penetration rate is low and the connected vehicle is located in the front of motorcade, the sensing accuracy will be reduced. Thus, this model is more suitable for the sensing of queue length when the penetration rate is high. In order to make up for the shortcomings of this model, a queue length sensing model based on a neural network is proposed to balance the sensing error caused by the shockwave model.
The simulation results in Figure 8 show that the sensing accuracy changes in different cycles when the penetration rate is determined. The reason is that the location of the last connected vehicle is different in every cycle. The location of connected vehicles is random in the simulation. Thus, the subsequent length evaluation of the unconnected vehicle is greatly affected by the arrival rate. More specifically, when the upstream traffic flow rate changes greatly, the downstream queue length estimation will be overestimated or underestimated, which may lead to bigger deviation in the actual queue length. In our sensing model, the location of connected vehicles is unknown in advance and is distributed randomly, which is close to the real traffic situation.

Model Validation Based on BP Neural Network
The BP neural network is a widely used network model. In order to ensure the robustness of the model and the comprehensiveness of queuing information, one-week historical data of connected vehicles and queues are collected to build and train the model; the first 70% is used as the training data, 15% as the test data, and 15% as the verification data. In addition, the model is updated once a week to accommodate dynamically changing traffic flow. The single hidden layer network structure is adopted in the sensing model, with three nodes in the input layer and one node in the output layer. Figure 8. Queue length at 10% penetration rate (a) and queue length at 30% penetration rate (b) and queue length at 50% penetration rate (c) and queue length at 70% penetration rate (d).
It can be found from the analysis of Figure 8a,b that the sensing accuracy is higher in the fifth and the sixth cycle when penetration rate is lower. This is because in cycles five and six, the last connected vehicle in Figure 8a is closer to the end of the motorcade, while the last connected vehicle in Figure 8b is closer to the front of the motorcade. Therefore, the sensing model based on the shockwave mainly relies on the information provided by the last connected vehicle in the motorcade. When the penetration rate is low and the connected vehicle is located in the front of motorcade, the sensing accuracy will be reduced. Thus, this model is more suitable for the sensing of queue length when the penetration rate is high. In order to make up for the shortcomings of this model, a queue length sensing model based on a neural network is proposed to balance the sensing error caused by the shockwave model.
The simulation results in Figure 8 show that the sensing accuracy changes in different cycles when the penetration rate is determined. The reason is that the location of the last connected vehicle is different in every cycle. The location of connected vehicles is random in the simulation. Thus, the subsequent length evaluation of the unconnected vehicle is greatly affected by the arrival rate. More specifically, when the upstream traffic flow rate changes greatly, the downstream queue length estimation will be overestimated or underestimated, which may lead to bigger deviation in the actual queue length. In our sensing model, the location of connected vehicles is unknown in advance and is distributed randomly, which is close to the real traffic situation.

Model Validation Based on BP Neural Network
The BP neural network is a widely used network model. In order to ensure the robustness of the model and the comprehensiveness of queuing information, one-week historical data of connected vehicles and queues are collected to build and train the model; the first 70% is used as the training data, 15% as the test data, and 15% as the verification data. In addition, the model is updated once a week to accommodate dynamically changing traffic flow. The single hidden layer network structure is adopted in the sensing model, with three nodes in the input layer and one node in the output layer. In this paper, the number of neurons in the hidden layer is set as 10 by the experimental method, which has a great impact on the network performance. If the number is too small, the accuracy of the sensing model will be reduced; if the number is too large, the training time of the network will be increased, and the sensing accuracy will be affected.
In addition, the selection of the training function and the transfer function also affects the performance. In this paper, tansig and logsig functions are selected as the transfer functions between the input layer and the hidden layer and between the hidden layer and the output layer, respectively. Trainlm is selected as the training function. After the network is trained, the predicted output queue length is obtained based on real-time connected vehicles data. Figure 9 shows the sensing results of the sensing model based on the BP neural network at different penetration rates. With the increase of penetration rate, the accuracy is improved. Although the sensing error of some cycles is large in Figure 9c,d, the sensing result of more cycles is almost equal to actual queue length. The sensing model based on the BP neural network is completely dependent on the information sent by connected vehicles, especially the state information of the last connected vehicle, thus the model can achieve high sensing accuracy in the traffic environments with low penetration rates.  Figure 9 shows the sensing results of the sensing model based on the BP neural network at different penetration rates. With the increase of penetration rate, the accuracy is improved. Although the sensing error of some cycles is large in Figure 9c,d, the sensing result of more cycles is almost equal to actual queue length. The sensing model based on the BP neural network is completely dependent on the information sent by connected vehicles, especially the state information of the last connected vehicle, thus the model can achieve high sensing accuracy in the traffic environments with low penetration rates. (c) (d) Figure 9. Queue length at 10% penetration rate (a) and queue length at 30% penetration rate (b) and queue length at 50% penetration rate (c) and queue length at 70% penetration rate (d).

Accuracy Analysis of Combined Sensing Model
The sensing model based on the shockwave is suitable for the connected vehicles when the distribution is later in the motorcade or the penetration rate is higher, because the shockwave at this time can better reflect the formation process of the queue state of the entrance lane. The BP neural network model with characteristics of nonlinear mapping can more accurately predict the queue Figure 9. Queue length at 10% penetration rate (a) and queue length at 30% penetration rate (b) and queue length at 50% penetration rate (c) and queue length at 70% penetration rate (d).

Accuracy Analysis of Combined Sensing Model
The sensing model based on the shockwave is suitable for the connected vehicles when the distribution is later in the motorcade or the penetration rate is higher, because the shockwave at this time can better reflect the formation process of the queue state of the entrance lane. The BP neural network model with characteristics of nonlinear mapping can more accurately predict the queue length of mixed traffic flow when the connected vehicle is in the front of the motorcade and the penetration rate is low. In view of the uncertainty of the sensing environment, the final sensing results are obtained by weighting the sensing results of the two sub-models. The sensing results can give full play to the advantages of the two sub-models and can balance the sensing errors of the sub-models to a certain extent. The combined model is very suitable for intersections with large dynamic change of traffic flow in urban roads and can provide more convenience for traffic signal management and control. Figure 10 is the error analysis diagram of the combined model. Figure 10a is the absolute error, and Figure 10b is the relative error. The sensing effect of the combined model may be worse than that of one of the sub-models in the partial period, but the sensing effect of the model in the large range and in multiple stages is better than that of either of the sub-models. The sensing results under different penetration rates are analyzed experimentally. According to Figure 10, when the penetration rate increases, the sensing error significantly decreases. When the penetration rate is 70%, the predicted result is almost equal to the actual queue length. If the road driving vehicles reach a higher penetration rate, the sensing accuracy will be higher.  Figure 10 is the error analysis diagram of the combined model. Figure 10a is the absolute error, and Figure 10b is the relative error. The sensing effect of the combined model may be worse than that of one of the sub-models in the partial period, but the sensing effect of the model in the large range and in multiple stages is better than that of either of the sub-models. The sensing results under different penetration rates are analyzed experimentally. According to Figure 10, when the penetration rate increases, the sensing error significantly decreases. When the penetration rate is 70%, the predicted result is almost equal to the actual queue length. If the road driving vehicles reach a higher penetration rate, the sensing accuracy will be higher. It can be seen from the relative error diagram that the accuracy of the combined sensing model can reach 95% at a high penetration rate, except for individual cycles. Even when the penetration rate is very low, the accuracy can reach 85%. This feature of the model is very suitable for the gradual popularization of connected vehicles. In the transition stage from unconnected vehicles to connected vehicles, this model is of great significance for signal processing at intersections.

Comparison and Analysis with PD Model
In order to prove the universality of the method proposed in this paper, connected vehicle data of 100 cycles are collected for analysis. At the same time, the proposed model is compared with the PD model to illustrate sensing performance. The PD model establishes the probability density function of the connected vehicle and determines the expected queue length by calculating the conditional probability distribution of the queuing vehicle. A discrete wavelet transform (DWT) is applied to enhance the proposed queue estimation to be more accurate and consistent, regardless of the randomness in the penetration rate. The comparison results are shown in the figure below. Figure 11 analyzes the comparison results of the combined sensing model with the PD model at different penetration rates. It can be seen from Figure 11c,d that when the penetration rate is high, the predicted value of the combined model and the PD model in this paper is basically equal to the actual queue length. However, when the penetration rate is low (as shown in Figure 11a,b), both the combined model and the PD model have certain errors, but the PD model has a worse effect, which It can be seen from the relative error diagram that the accuracy of the combined sensing model can reach 95% at a high penetration rate, except for individual cycles. Even when the penetration rate is very low, the accuracy can reach 85%. This feature of the model is very suitable for the gradual popularization of connected vehicles. In the transition stage from unconnected vehicles to connected vehicles, this model is of great significance for signal processing at intersections.

Comparison and Analysis with PD Model
In order to prove the universality of the method proposed in this paper, connected vehicle data of 100 cycles are collected for analysis. At the same time, the proposed model is compared with the PD model to illustrate sensing performance. The PD model establishes the probability density function of the connected vehicle and determines the expected queue length by calculating the conditional probability distribution of the queuing vehicle. A discrete wavelet transform (DWT) is applied to enhance the proposed queue estimation to be more accurate and consistent, regardless of the randomness in the penetration rate. The comparison results are shown in the figure below. Figure 11 analyzes the comparison results of the combined sensing model with the PD model at different penetration rates. It can be seen from Figure 11c,d that when the penetration rate is high, the predicted value of the combined model and the PD model in this paper is basically equal to the actual queue length. However, when the penetration rate is low (as shown in Figure 11a,b), both the combined model and the PD model have certain errors, but the PD model has a worse effect, which is particularly obvious in Figure 11a. On the one hand, this is because when the penetration rate is low, no moving connected vehicle is detected in the PD model, thus queue length is underestimated. On the other hand, compared with the PD model, the combined model considers the impact of upstream flow rate change on downstream queue length in low penetration rates, which is necessary for real-time length evaluation. Furthermore, it is expected that the combined sensing model in this paper can comprehensively analyze two sub-models and integrate the multi-source traffic information to achieve higher evaluation accuracy. In addition, the PD model assumes that the penetration rate of connected vehicles is known, and the prediction result relies too much on this value. If penetration rate changes greatly with time, the prediction value of this model will produce a large error.
In general, the combined model can sense the queue length with high accuracy in mixed traffic environments. Even at low penetration rates (e.g., 10%), the model can achieve a sensing accuracy of 85%. However, this model is subject to certain limitations, such as the inclusion of connected vehicles in the motorcade. When the last connected vehicle in the motorcade is in front, the sensing accuracy of this model will be affected to some extent. Even so, the sensing model in this paper is still of great application value in flow prediction and signal management based on connected vehicles. value. If penetration rate changes greatly with time, the prediction value of this model will produce a large error. (d) Figure 11. Comparison of queue length at 10% penetration rate (a) and comparison of queue length at 30% penetration rate (b) and comparison of queue length at 50% penetration rate (c) and comparison of queue length at 70% penetration rate (d).
In general, the combined model can sense the queue length with high accuracy in mixed traffic environments. Even at low penetration rates (e.g., 10%), the model can achieve a sensing accuracy of 85%. However, this model is subject to certain limitations, such as the inclusion of connected vehicles in the motorcade. When the last connected vehicle in the motorcade is in front, the sensing accuracy of this model will be affected to some extent. Even so, the sensing model in this paper is still of great application value in flow prediction and signal management based on connected vehicles.

Conclusions
In this paper, we propose a queue length sensing model suitable for mixed traffic environments. Simulation results show that the model has a high sensing accuracy in traffic environments with low penetration rates and variable traffic flow, benefiting from the correction of the shockwave and from learning history records. The simulation reveals that the sensing accuracy is proportional to the penetration rate. Compared with most existing queue estimations from connected vehicle technology for pre-timed signals, the proposed sensing model in our manuscript can be applied to adaptive signal control in the intersection, which will promote the traffic throughput and efficiency. The proposed sensing model has higher performance than the PD model when the penetration rate is low and almost equivalent performance with higher penetration rates. While the penetration rate is not needed in the proposed model, the combined sensing model is more applicable for mixed traffic scenarios (both under-saturated and saturated conditions) with much looser conditions. It requires that there is at least one connected vehicle in a cycle. Moreover, the estimate accuracy may be affected by the locations of the connected vehicles, especially when all of the vehicles stop in the front part of the queue. It is interesting and valuable to investigate an algorithm that is not susceptible to the location of connected vehicles even when the penetration rate is low. Figure 11. Comparison of queue length at 10% penetration rate (a) and comparison of queue length at 30% penetration rate (b) and comparison of queue length at 50% penetration rate (c) and comparison of queue length at 70% penetration rate (d).

Conclusions
In this paper, we propose a queue length sensing model suitable for mixed traffic environments. Simulation results show that the model has a high sensing accuracy in traffic environments with low penetration rates and variable traffic flow, benefiting from the correction of the shockwave and from learning history records. The simulation reveals that the sensing accuracy is proportional to the penetration rate. Compared with most existing queue estimations from connected vehicle technology for pre-timed signals, the proposed sensing model in our manuscript can be applied to adaptive signal control in the intersection, which will promote the traffic throughput and efficiency. The proposed sensing model has higher performance than the PD model when the penetration rate is low and almost equivalent performance with higher penetration rates. While the penetration rate is not needed in the proposed model, the combined sensing model is more applicable for mixed traffic scenarios (both under-saturated and saturated conditions) with much looser conditions. It requires that there is at least one connected vehicle in a cycle. Moreover, the estimate accuracy may be affected by the locations of the connected vehicles, especially when all of the vehicles stop in the front part of the queue. It is interesting and valuable to investigate an algorithm that is not susceptible to the location of connected vehicles even when the penetration rate is low.