# A Traffic Information Detection Method at Single Intersection Based on Wi-Fi Data
## 3 Methodology
### Calculation of Intersection Data
#### 3.3.3 Calculation of Intersection Space Mean Speed and Vehicle Steering Ratio  
The sliding time window method is used to further calculate the space mean speed of the road entrance and exit section and the vehicle steering ratio of the road entrance section. The width of the sliding time window is \(w\), and the sliding step length is \(l\). Each time window contains the road target, and its speed information detected after Wi-Fi data processing. The sliding time window method is shown in Figure 5.  
The research object of this study is the intersection vehicle target. The road target in the time window needs to be visualized as a vehicle target, as follows: Removing the road target that the travel modes are walking or by a non-motor vehicle. The road targets traveling on the same public vehicle are aggregated and visualized into a bus, whose speed information is the average of the corresponding speed information of each road target. The road target of traveling by private car is directly visualized as a vehicle.  
The visualization of the road target is equivalent to a random sampling of all vehicles passing through the intersection in that time period. Therefore, the harmonic average of the travel speed of vehicles after visualization in the time window can be approximated to the real space mean speed of the corresponding section, as in (11)-(13). Similarly, the vehicle steering ratio after the visualization of each entrance section can also be approximated to the actual vehicle steering ratio of the corresponding road section, as in (14) and (15).  
\[V^{t}=1/\left(\sum_{i=1}^{N_{car}}\left(1/v_{car}\right)+\sum_{bus=1}^{N_{bus}} \left(1/v_{bus}\right)\right) \tag{11}\]  
\[v_{bus}=\left(\sum_{j=1}^{n}v_{j}\right)/n \tag{12}\]  
\[v_{car}=v_{i} \tag{13}\]  
where \(V^{t}\) is the space mean speed of each entrance and exit section of the intersection in the t time period, \(N_{car}\) and \(N_{bus}\) are, respectively, the number of private cars and buses passing through the section after Wi-Fi data processing and visualization in this time period, \(v_{i}\) is the travel speed of the road target \(obj_{i}\) for private car travel in this section, \(v_{car}\) is the travel speed of the private vehicle after the visualization of \(obj_{i}\), \(v_{j}\) is the travel speed of n road targets \(obj_{j}\) traveling by the same bus in this section, and \(v_{bus}\) is the travel speed of bus vehicles after \(obj_{j}\) concretion.  
\[B^{t}=\left[b_{L}^{t},b_{T}^{t},b_{R}^{t}\right]=\left[\frac{n_{L}}{N^{\prime }},\frac{n_{T}}{N^{\prime}},\frac{n_{R}}{N}\right] \tag{14}\]  
\[N=N_{car}+N_{bus} \tag{15}\]  
where \(Bt\) is the vehicle steering ratio matrix of each entrance section in the \(t\) time period. \(b_{L}^{t}\), \(b_{T}^{t}\), and \(b_{R}^{t}\) are the proportions of vehicles turning left, straight, and right on the road entrance section, respectively. \(N\) is the number of all vehicles passing through the section after Wi-Fi data processing and visualization within the time period. Respectively, \(n_{L}\), \(n_{T}\), and \(n_{R}\) are the number of left turns, straight, and right turns in the above vehicles.  
Figure 5: Sliding time window method.  
is the total number of buses passing through the section after Wi-Fi data processing and visualization in a time period.  
Considering the sampling rate of Wi-Fi data and subsequent traffic information prediction, this study sets the width of the sliding time window as 15 min and the sliding step length as 15 min. With the movement of the time window, the space mean speed and the vehicle steering ratio of the entrance and exit sections can be gradually obtained.