## Materials and Methods
### Queue Length Estimation Algorithm Design
#### 2.2.2 Shockwave Estimation Model Based on V2X  
In this section, we address the shockwave estimation model using information from connected automated vehicles. During the red-light period, the proposed model can compute the cumulative queue length of each entrance lane. Queuing vehicles are used to represent the vehicles that arrive at the intersection stop with speed reduced to zero. To estimate the queue length by means of connect vehicle sensing technology, the information including vehicle's ID, location, and waiting time should  
Figure 2: Queue length estimate based on unified service computing. be periodically broadcasted to RSU. In the traffic flow theorem, the vehicles form a queue at the stop line obeying Poisson distribution. The waiting queue passes back like a wave before the traffic lights turn green, which is defined as a shockwave. As shown in Figure 3, \(n\) is the total number of connected vehicles in a lane. \(j\) is the number of lanes at a traffic crossing in the same direction. In Figure 3, the lane on the top is numbered \(j=1\). The lane on the bottom is numbered \(j=4\). For the no waiting lane, the queue length is zero. The shockwave velocity could be calculated according to Equation (1):  
\[\left\{ \begin{array}{l}v_{n,j}=\frac{1}{n-1}\sum\limits_{i=1}^{n-1}\frac{p_ {i,j}-l_{i,j}^{i}}{t_{n,j}-l_{i,j}},\ (n>1,i=1,2,\cdots,n-1)\\ v_{1,j}=\frac{l_{i,j}^{i}}{t_{1,j}-t_{i,j}},\ (n=1)\end{array} \right. \tag{1}\]  
where \(i\) (\(i\leq n\)) is the number of a connected vehicle to the stop line. \(v_{n,j}\) represents the shockwave velocity, \(l_{p,j}^{i}\) (\(i\leq n\)) is denoted as the queue length before the connected vehicle numbered \(i\) in the lane \(j\). \(t_{i,j}\) (\(i\leq n\)) represents the stop time of the connected vehicle numbered \(i\) in the lane \(j\). \(t_{r}\) is denoted as the beginning time of a red light cycle. \(t_{f}\) is denoted as the closing time of red-light cycle. Obviously, \(t_{r}\) and \(t_{f}\) are the same for every lane at the intersection. As shown in Figure 3, there are traditional unconnected vehicles behind the last connected vehicle. The length of these vehicles \(l_{n,j}\) can be calculated by Equation (2):  
\[l_{n,j}=v_{n,j}\Big{(}t_{f}-t_{n,j}\Big{)} \tag{2}\]  
Therefore, the queue length \(l_{j}\) estimation model with considering shockwave in the entrance lane \(j\) at the signalize intersection can be represented by Equation (3):  
\[l_{j}=l_{p,j}^{n}+v_{n,j}\Big{(}t_{f}-t_{n,j}\Big{)} \tag{3}\]  
To regulate the signal light time aiming to optimize the traffic at the intersection, the value of queue length of every entrance can be calculated by taking the maximum value of \(l_{j}\). Usually, the value of \(l_{j}\) is approximately equal, because it is natural that most of the drivers want to wait as little as possible and will stop at the shortest queue lane. Therefore, the queue length of the intersection is denoted as Equation (4), where \(m\) is the number of lanes except there is no stop turn right or turn left lane. \[l=\max\!\left\{l_{j}\big{|}j\in[1,2,\cdots m]\right\} \tag{4}\]  
In [43], the relationship about vehicle arrival and queue length is analyzed. In urban roads, adjacent intersections' distance is usually short. The arrival rate at the downstream is related to the  
Figure 3: Schematic diagram of Shockwave estimation model. traffic volume of an adjacent upstream intersection. Therefore, a corrective coefficient \(r\) is utilized to remedy the effect of vehicle arrival rate, which is shown in Equation (5). \[r=\frac{\frac{q_{k,k+1}}{l_{k+1}-l_{k}}}{\frac{q_{k-1,k}}{l_{k}-l_{k-1}}} \tag{5}\]  
where \(k\) is used to number a connected vehicle that crosses the inductive loop at the upstream. \(q_{k,k+1}\) is denoted as the number of traditional vehicles between adjacent connected vehicles. \(t_{k}\) represents the time of a connected vehicle numbered \(k\) that crosses the inductive loop. It reveals that the corrective coefficient \(r>1\) when the downstream arrival rate increases and vice versa.