# Signal Consensus in TSP of the Same Grid in Road Network
## 3 Consensus Algorithm with Input Constraints
### Stability Analysis of Consensus Algorithm with Input Constraints  
The stability of the consensus algorithm with input constraints in TSP (4) is proved by using the Lyapunov function.  
**Proof.** Let the Lyapunov function of (4) is  
\[Y=\frac{1}{2}\sum\limits_{i=1}^{n}\sum\limits_{j=1}^{n}a_{ij}[(x_{i}(t)-x_{j} (t))\text{arctan}(x_{i}(t)-x_{j}(t))-\frac{1}{2}\ln(1+(x_{i}(t)-x_{j}(t))^{2})] \tag{5}\]  
Since \(\text{xarctan}x-\frac{1}{2}\ln(1+x^{2})\geq 0\) and \(a_{ij}\geq 0\), \(Y\) is a positive definite function. Its derivation is solved as follows:  
\[\begin{array}{l}\dot{Y}=\frac{1}{2}\sum\limits_{i=1}^{n}\sum\limits_{j=1}^{n }a_{ij}(x_{i}(t)-x_{j}(t))^{\prime}\text{arctan}(x_{i}(t)-x_{j}(t))\\ =\frac{1}{2}\sum\limits_{i=1}^{n}\sum\limits_{j=1}^{n}a_{ij}(u_{i}(t)-u_{j}(t ))^{T}\text{arctan}(x_{i}(t)-x_{j}(t))\\ =\frac{1}{2}\sum\limits_{i=1}^{n}\sum\limits_{j=1}^{n}a_{ij}u_{i}(t)^{T}\text {arctan}(x_{i}(t)-x_{j}(t))-\frac{1}{2}\sum\limits_{i=1}^{n}a_{ij}u_{j}(t)^{ T}\text{arctan}(x_{i}(t)-x_{j}(t))\\ =\frac{1}{2}\sum\limits_{i=1}^{n}\sum\limits_{j=1}^{n}a_{ij}u_{i}(t)^{T}\text {arctan}(x_{i}(t)-x_{j}(t))+\frac{1}{2}\sum\limits_{j=1}^{n}a_{ji}u_{j}(t)^{ T}\text{arctan}(x_{i}(t)-x_{j}(t))\end{array} \tag{6}\]  
For undirected graph:  
\[\begin{array}{l}a_{ij}=a_{ji}\dot{Y}=\sum\limits_{i=1}^{n}\sum\limits_{j=1} ^{n}a_{ij}u_{i}(t)^{T}\text{arctan}(x_{i}(t)-x_{j}(t))=-\sum\limits_{i=1}^{n }u_{i}(t)^{T}u_{i}(t)\leq 0\end{array} \tag{7}\]  
For directed graph:  
\[\begin{array}{l}\dot{Y}=\frac{1}{2}\sum\limits_{i=1}^{n}\sum\limits_{j=1}^{ n}a_{ij}u_{i}(t)^{T}\text{arctan}(x_{i}(t)-x_{j}(t))+\frac{1}{2}\sum\limits_{j=1}^{n} \sum\limits_{i=1}^{n}a_{ji}u_{j}(t)^{T}\text{arctan}(x_{i}(t)-x_{j}(t))\\ =-\frac{1}{2}(\sum\limits_{i=1}^{n}u_{i}(t)^{T}u_{i}(t)+\sum\limits_{j=1}^{n} u_{j}(t)^{T}u_{j}(t))\leq 0\end{array} \tag{8}\]  
Above all, the consensus algorithm with input constraints (4) is stable.  
**4. Application of Consensus Algorithm with Input Constraints in TSP**  
Traffic light signals will be adjusted by TSP strategy according to the real-time traffic condition of intersection when priority vehicles are approaching the intersection. In practice, methods ofextending the green phase, suppressing the red phase and adjusting the cycle length are widely adopted. The traffic condition of the intersection determines the weight of priority in TSP, the more serious the congestion at the intersection, the greater the weight, so TSP strategy will provide higher priority for the bus. Signal periods of traffic lights in the same grid are the same, and we set the weight of priority at intersection \(i\) as the difference between the phase length of green \(G_{i}\) and red \(R_{i}\) in this paper, that is \(P_{i}=G_{i}-R_{i}\).  
Road network is divided into grids in the study of intelligent transportation. The traffic light signal agents of the intersections belong to the same grid to carry out communication according to a certain topology network. Figure 1 shows the distribution of intersections in a traffic grid. In practice, when the vehicle passes through different intersections belonging to the same grid, different TSP strategies at different intersections will lead to the influence of driving behavior; drivers tend to follow the same TSP strategy in the same grid, the consensus of TSP strategy in all intersections of the same grid will avoid poor driving experience and confusion. Furthermore, the excessive change in traffic light signals during the information interaction will seriously affect the coordination relationship; compared to the consensus Algorithm (3), the consensus algorithm with input constraints during the information interaction is more applicable for the TSP.