# Short-Term Traffic State Prediction Based on Mobile Edge Computing in V2X Communication
## 2 Materials and Methods
### The Model of Short-Term Traffic State Prediction
#### 2.3.1 Graph Construction of Intersection Network  
In the network of urban intersection, vertexes can represent a series of traffic features, which usually include vehicular speed, acceleration, position, and other vehicular state information.  
Figure 5: The prediction model network.  
As shown in Figure 6, the network of intersection at different times can be described as \(G=\{V,E,W\}\). In the graph \(G\), each vertex is treated as a vehicle, and \(V\) is a set of vehicle vertexes, \(V=\{v_{1},v_{2},\ldots,v_{N}\}\), where \(N\) represents number of vertexes; \(E\) is a set of edges, where \(e_{ij}\in E\). \(\mathbf{W}\) is the adjacent matrix, which represents the connection between vehicles, \(\mathbf{W}\in R^{N\times N}\). Adjacent matrix is the basis for exploratory analysis of the spatiotemporal correlation of traffic flow at the intersection network. The adjacency matrix is described by a binary matrix [0, 1], where 0 stands for there being no link between two edges, and 1 denotes that there is a link.  
In Figure 6, each vertex in networks has actual attributes including speed, acceleration and other vehicular information, and can be expressed as \(C_{t}=\{c_{t}^{1},c_{t}^{2},\ldots,c_{t}^{N}\}\), \(C\in R^{N\times P}\), where \(c_{t}^{i}\) represents the attribute of the vertex \(v_{i}\) at time \(t\) and \(P\) represents the number of vertex attributes. The attributes of the vehicle vertex in the network can be obtained from V2X environment. Therefore, \(x_{t}\in R^{N\times K}\) is used to represent the traffic state at the time \(t\) at the intersection, where \(K\) is the number of traffic state attributes, including traffic flow, traffic speed, traffic density and queuing length.  
According to the characteristics of urban intersections, the mean speed capacity \(M_{v}\) and the average traffic flow \(Q_{t}\) are selected to be indexes to describe traffic sates at the intersection. The mean speed capacity is defined as shown in Equations (1) and (2).  
\[\overline{V}=\frac{\sum_{t=1}^{k}\overline{v}_{t}}{k} \tag{1}\]  
\[M_{v}=\frac{\overline{V}}{v_{\max}} \tag{2}\]  
where \(\overline{V}\) is the mean speed of all vehicles at the intersection in time \(k\), and \(v_{\max}\) is the limitation maximum speed in time \(k\). \(M_{v}\), as the mean speed capacity, is positively correlated with the performance of traffic state; thus, it is also used to evaluate the traffic state at an intersection. The threshold of \(M_{v}\) is set to 0.6 for a standard traffic sate in [29].  
Therefore, the problem of short-term traffic state prediction can be described as: in the given \(s\) historical time steps, the vehicular observation value of \(N\) vertexes in graph \(G\) is \(\{C_{t-s},C_{t-s+1},\ldots,C_{t}\}\), and the traffic state is \(X_{t}^{s}=\{x_{t-s},x_{t-s+1},\ldots,x_{t}\}\). Then at the next time step \(T\), the predicted value set of all vertexes in graph \(G\) is \(Y_{t}^{T}=\{x_{t+1},x_{t+2},\ldots,x_{t+T}\}\), as shown in Equation (3). The \(f\) function is mapped to learn the spatiotemporal features of the traffic state.  
\[Y_{t}^{T}=f(G;X_{t}^{s}) \tag{3}\]  
where \(s\) is the length of historical time series, \(T\) is the length of time series that need to be predicted.