# A Hierarchical Resource Allocation Scheme Based on Nash Bargaining Game in VANET
## 3 Algorithm Simulation and Results Analysis
### Simulation Results  
The proposed resources allocation scheme is evaluated through by two measurements: effectiveness and fairness. The effectiveness means that the minimum rate requirements of any VUE can be met by negotiating with other VUEs. The fairness means the proportional fairness considering the individual minimum rate. Figures 2 and 3 show the impact of BER\({}_{1}\) (the maximum bit error rate that RSU1 can tolerate) on the spectrum allocation. As shown in Figure 2, the spectrum allocated of RSU1 decreases with the increase of BER\({}_{1}\). It is because that the increase of BER\({}_{1}\) increases the modulation coefficient according to Equation (3). With the minimum transmission rate been satisfied (denoted in Figure 3), when the spectrum resources required by RSU1 are reduced, the additional spectrum resources will be distributed to RSU2 and RSU3 in proportion, so the spectrum resources obtained by the two RSUs will increase with the increase of BER\({}_{1}\). Then, as for RSU1, the increase of BER\({}_{1}\) eventually leads to the increase of transmission rate for each RSU, which can be concluded from Figure 3. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**RSU** & **VUE1** & **VUE2** & **VUE3** \\ \hline RSU1 & 1.000 & 0.905 & 0.950 \\ RSU2 & 0.973 & 1.000 & 0.986 \\ RSU3 & 0.926 & 1.000 & 0.948 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: The matching degree between RSUs and VUEs. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**RSUs** & **Latency** & **Jitter** & **Packet Loss Rate** \\ \hline RSU1 & 98 ms & 27 ms & 5\% \\ RSU2 & 110 ms & 10 ms & 1\% \\ RSU3 & 155 ms & 19 ms & 2\% \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Performance parameter values of RSUs. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**RSU** & **Latency** & **Jitter** & **Packet Loss Rate** \\ \hline RSU1 & 105 ms & 30 ms & 4\% \\ VUE2 & 160 ms & 20 ms & 3\% \\ VUE3 & 90 ms & 8 ms & 2\% \\ \hline \hline \end{tabular}
\end{table} 
Table 3: The minimum performance requirements of VUEs. Figure 4 shows the impact of RSU1's minimum rate requirements on spectrum resource allocation. After the minimum spectrum resources requirements of each RSU are satisfied, the rest of the spectrum resources is redistributed fairly to all RSUs in proportion to demand. Therefore, even if the minimum transmission rate requirements of RSU1 is 0 Mbps, RSU1 can still be allocated 4 MHz spectrum resources. To meet the increasing demand for RSU1's minimum transmission rate, more spectrum resources must be allocated to RSU1, resulting in gradual reduction in spectrum resources allocated to RSU2 and RSU3. Figure 5 show the spectrum resources obtained by RSUs under different distribution schemes. After meeting the minimum rate requirements of RSU1 and RSU2, the allocation scheme based on the maximum throughput of the system allocated the remaining spectrum resources to RSU3, which has better average performance than RSU1 and RSU2. On the contrary, after meeting the minimum requirements of each RSU, the Nash bargaining scheme would distribute the remaining spectrum resources equally to all RSUs in proportion to demand. By further observation of the spectrum resources obtained by RSU2 and RSU3, we can be found that RSU2 obtained less spectrum resources in the maximum throughput allocation scheme of the system for its poor average performance, while in the Nash bargaining scheme, it can obtain spectrum resources in proportion to demand. Figure 3: The transmission rate of RSUs vary with the BER\({}_{1}\). Figure 2: The spectrum resources allocated to RSUs vary with the BER\({}_{1}\). Thereafter, we analyze the resource allocation for VUEs in the second layer. If we do not take into account the differences of VUEs and the matching degree between VUEs and RSUs, as long as each VUE has the same resource requirements, each VUE can get the same amount of resources from the RSU. Obviously, this case is unreasonable.