# Research on Queue Equilibrium Control Algorithm of Urban Traffic Based on Game Theory
## 3 The Equilibrium Control  
In the intersection signal control, the green time for each phase can be regarded as a game, where the phase acts as a participant, and each participant competes for the green time in a signal cycle. Suppose the queue length \(D_{i}(k+1)\) at the beginning of the following cycle is the yield indicator, then the larger the queue number, the smaller the yield. In that case, each participant (phase) hopes to obtain as much green time as possible to maximize their own returns. To facilitate calculation, Equation (7) and green time are split (\(\overline{g}_{i}(k)=\overline{g}_{i}^{1}(k)+\overline{g}_{i}^{2}(k)\)), and the final payoff function \(a_{i}(k)\) is:  
\[a_{i}(k)=S_{i}^{*}\overline{g}_{i}^{1}(k)-D_{i}(k) \tag{8}\]  
\[C(k)q_{i}^{*}(k)=S_{i}^{*}\overline{g}_{i}^{2}(k) \tag{9}\]  
Equation (8) indicates that each participant (signal phase) competed for the green time to clear the queue in each phase, and when the profit is 0, it means that the queue can be cleared just in time; Equation (9) suggests that each participant is assigned a fixed green time that can clear all the arrived vehicles in the current signal cycle. Since all the variables except \(\overline{g}_{i}^{2}(k)\) in Equation (9) are known, it can be set that:  
\[W(k)=\sum_{i=1}^{N}\overline{g}_{i}^{2}(k)+t_{L} \tag{10}\]  
Substituting Equation (10) into (6) gives:  
\[C(k)=\sum_{i=1}^{N}\overline{g}_{i}^{1}(k)+W(k) \tag{11}\]  
According to the cake game, it is easy to see that the Nash equilibrium state is reached when the participants' benefits are equal. For example, if there are two participants in the cake splitting, one of whom cuts the cake and the other chooses the cut pieces first, then the one slicing the cake will cut it equally to prevent the other player from taking the larger piece first. In this case, the two players reach the Nash equilibrium state with the same amounts of benefits. According to the above analysis, when the intersection is a two-phase game, there are:  
\[\overline{g}_{1}^{1}(k)=\frac{S_{2}^{*}(C(k)-W(k))+D_{1}(k)-D_{2}(k)}{S_{1}^{*} +S_{2}^{*}} \tag{12}\]  
Suppose \(\overline{g}_{1}(k)\geq\overline{g}_{2}(k)\) and \(a_{1}(k)=0\), combine Equations (8) and (12) to have:  
\[C^{*}(k)=\sum\limits_{i=1}^{2}\frac{D_{i}(k)}{S_{i}^{*}}+W(k) \tag{13}\]  
At this time, \(C^{*}(k)\)(s) indicates the \(k\)th cycle of the intersection signal control is just enough to clear the intersection. It can also be seen from Equation (13) that the cycle is the sum of the time to clear the original queue in each phase and the arriving vehicles in the current cycle and the lost time. Substitute Equations (9) and (10) into (13):  
\[C^{*}(k)=\frac{\sum\limits_{i=1}^{2}\frac{D_{i}(k)}{S_{i}^{*}}+t_{L}}{1-\sum \limits_{i=1}^{2}\frac{\overline{q}_{i}^{*}(k)}{S_{i}^{*}}} \tag{14}\]  
In the actual calculation process, the queue may not be cleared; then the value of \(C^{*}(k)\) is too high, so the maximum cycle \(C_{\max}\) should be set according to practical experience. The period in the final substitution algorithm is \(C(k)=\min(C^{*}(k),C_{\max})\). When the intersection is a four-phase game:  
\[ \begin{array}{l}\overline{g}_{1}^{1}(k)=\frac{S_{2}^{*}S_{1}^{*}(D_{1}(k)-D_ {2}(k))+S_{2}^{*}S_{2}^{*}(D_{1}(k)-D_{3}(k))+S_{1}^{*}S_{2}^{*}(D_{1}(k)-D_{2 }(k))}{S_{1}^{*}S_{2}^{*}+S_{1}^{*}S_{2}^{*}S_{2}^{*}+S_{1}^{*}S_{2}^{*}S_{2}^ {*}+S_{1}^{*}S_{2}^{*}S_{2}^{*}S_{2}^{*}}\\ \hskip 14.226378 pt+\frac{S_{2}^{*}S_{1}^{*}S_{2}^{*}(K)-S_{2}^{*}S_{2}^{*}S_{2} ^{*}(K)}{S_{1}^{*}S_{2}^{*}S_{2}^{*}+S_{1}^{*}S_{2}^{*}S_{2}^{*}S_{2}^{*}}+S_{1 }^{*}S_{2}^{*}S_{2}^{*}S_{2}^{*}S_{2}^{*}}\end{array}  \tag{15}\]  
Other phases' green times can be obtained similarly.