# Adaptive Cooperative Control of Multiple Urban Rail Trains with Position Output Constraints
## 3 Control Law Design
### Single-Value Learning Adaptive Cooperative Control Design of Multiple Trains with POC
\begin{array}{ll}\dot{Q}_{2}&=&\frac{1}{2}d_{i}\sum\limits_{i=1}^{n}\sum \limits_{j=1}^{n}a_{ij}\ddot{\widetilde{U}}_{i,j}+\sum\limits_{i=1}^{n} \widetilde{x}_{i,2}\Big{[}-\dot{\Theta}_{i}\psi^{2}(x_{i,2})\widetilde{x}_{i,2} -\alpha_{i}\frac{\widetilde{x}_{i,1}}{i_{2}^{2}-\widetilde{x}_{i,1}^{2}}\Big{]} \\ &&-\sum\limits_{i=1}^{n}\widetilde{x}_{i,2}\Big{[}f_{i}+\dot{a}_{i,1}x_{i,2}+ \dot{a}_{i,2}x_{i,2}^{2}\Big{]}+\sum\limits_{i=1}^{n}\widetilde{x}_{i,2}\left[- d_{i}\sum\limits_{j\in N_{i}}a_{ij}\
abla_{\widetilde{x}_{i,1}}\widetilde{U}_{i }+h_{i}\sum\limits_{j\in N_{i}}a_{ij}\big{(}\widetilde{x}_{j,2}-\widetilde{x}_ {i,2}\big{)}\right]\\ &&+a_{i}\sum\limits_{j=1}^{n}\frac{\widetilde{x}_{i,2}\widetilde{x}_{i,2}}{ \widetilde{x}_{i,2}-\dot{\Theta}_{i}\sum\limits_{j=1}^{n}\Big{(}\frac{\widetilde{ \Theta}_{i}\widetilde{\Theta}_{i}}{\widetilde{\Theta}_{i}}\Big{)}}\\ &\leq&\frac{1}{2}d_{i}\sum\limits_{j=1}^{n}a_{ij}\ddot{\widetilde{U}}_{i,j}- \ddot{\Theta}_{i}\sum\limits_{j=1}^{n}\psi^{2}(x_{i,2})\widetilde{x}_{i,2}^{2} +\dot{\Theta}_{i,i}^{2}\widetilde{x}_{i,2}^{2}(1+x_{i,2}+x_{i,2}^{2})^{2}\\ &&+\sum\limits_{i=1}^{n}\widetilde{x}_{i,2}\Bigg{[}-d_{i}\sum\limits_{j\in N_{i} }a_{ij}\
abla_{\widetilde{x}_{i,1}}\widetilde{U}_{i}\bigg{]}+\sum\limits_{i=1} ^{n}\widetilde{x}_{i,2}\Bigg{[}h_{i}\sum\limits_{j\in N_{i}}a_{ij}\big{(} \widetilde{x}_{j,2}-\widetilde{x}_{i,2}\big{)}\Bigg{]}\\ &&+\sum\limits_{i=1}^{n}\Bigg{(}\frac{\dot{\Theta}_{i}\psi^{2}(x_{i,2})\widetilde{ x}_{i,2}^{2}}{\widetilde{\theta}_{i}}\Big{)}\\ &=&\frac{1}{2}d_{i}\sum\limits_{j\in N_{i}}a_{ij}\ddot{\widetilde{U}}_{i,j}- \ddot{\Theta}_{i}\sum\limits_{j=1}^{n}\psi^{2}(x_{i,2})\widetilde{x}_{i,2}^{2} +\dot{\Theta}_{i,2}^{2}\psi^{2}(x_{i,2})\\ &&+\sum\limits_{i=1}^{n}\ddot{\widetilde{x}}_{i,2}\Bigg{[}-d_{i}\sum\limits_{j \in N_{i}}a_{ij}\
abla_{\widetilde{x}_{i,1}}\widetilde{U}_{i}\bigg{]}+\sum \limits_{i=1}^{n}\widetilde{x}_{i,2}\left[h_{i}\sum\limits_{j\in N_{i}}a_{ij} \big{(}\widetilde{x}_{j,2}-\widetilde{x}_{i,2}\big{)}\right]\\ &&+\sum\limits_{i=1}^{n}\Bigg{(}\frac{\ddot{\Theta}_{i}\psi^{2}(x_{i,2})\widetilde{ x}_{i,2}^{2}}{\widetilde{\theta}_{i}}\bigg{)}\end{array}  \tag{24}\]According to Equation (18) (\(\sum_{i=1}^{n}\sum_{j=1}^{n}a_{ij}\dot{\widetilde{U}}_{i,j}=2\sum_{i=1}^{n}\sum_{j= 1}^{n}a_{ij}\widetilde{x}_{i,2}\
abla_{\widetilde{x}_{i,1}}\widetilde{U}_{i,j}\)), Equation (24) is as follows:  
\[\dot{Q}_{2}=-h_{i}\widetilde{x}_{2}^{\mathrm{T}}L\widetilde{x}_{2} \tag{25}\]  
where \(\widetilde{x}_{2}=(\widetilde{x}_{1,2},\widetilde{x}_{2,2},\cdots,\widetilde{ x}_{n,2})^{\mathrm{T}}\). The specific analysis process is similar to Section 3.1. From Laplace matrices \(L\geq 0\) and \(h_{i}>0\), we know that \(\dot{Q}_{2}\leq 0\). By integrating Equation (25) from 0 to t, we can get that \(Q_{2}\) is bounded. Furthermore, from Equation (23) we know that \(\widetilde{U}_{i,j}\) is bounded. Thus, if \(\widetilde{U}_{i,j}\) wants to satisfy the continuity and boundedness, then for any \(t\geq 0\), \(l_{1}\leq\big{|}x_{i,j}\big{|}\leq l_{2}\); that is, the distance between two trains is kept within the safe range \((l_{1},l_{2})\). Therefore, the certain safety separation distance can be maintained between two neighboring trains to ensure the safety of multiple trains tracking operation. Additionally, from Equation (25), it is known that if \(\widetilde{x}_{2}(t)=0\), then \(\dot{Q}_{2}(t)=0\). Thus, for the error system of Equation (10), the set \(\Omega\big{\{}(\widetilde{x}_{i,1}(t),\widetilde{x}_{i,2}(t)|\widetilde{x}_{i,2}(t)=0)\big{\}}\) is the largest invariant set contained in the set \(\mathrm{B}=\Big{\{}\Big{(}\widetilde{x}_{i,1}(t),\widetilde{x}_{i,2}(t)\big{|} \dot{Q}_{2}(t)=0\Big{)}\Big{\}}\). According to the LaSalles invariance principle, each solution beginning from any original situation converges to the maximal invariant set in \(\Big{\{}\Big{(}\widetilde{x}_{i,1}(t),\widetilde{x}_{i,2}(t)\big{|}\dot{Q}_{2 }(t)=0\Big{)}\Big{\}}\).