## 3 Design of the Control Scheme
### Design of Improved Particle Swarm Optimization  
Particle swarm optimization (PSO) is widely used to solve optimization problems. It originated from research on the predation behavior of birds, and its idea is to find the optimal solution through cooperation and information sharing between individuals in the group [34]. Defining the particle search dimension is \(D\), the number of particles in the population is \(N\), and the number of iterations is \(M\). During the search, the position of the particle \(n\) at the \(m\)-\(th\) iteration is denoted as \(x_{n}^{m}=\left(x_{m1}^{m},x_{m2}^{m}\ldots x_{nD}^{m}\right)\) and the velocity is denoted as \(v_{n}^{m}=\left(v_{n1}^{m},v_{n2}^{m}\ldots v_{nD}^{m}\right)\). During each iteration, the function value of the current position of each particle will be calculated according to the objective function, and the individual optimal solution and the global optimal solution will be updated in real-time. In the next iteration, each particle will update its velocity and position according to the individual and global optimal solutions. Meanwhile, the position interval \([x_{\text{min}},~{}x_{\text{max}}]\) and velocity interval \([v_{\text{min}},~{}v_{\text{max}}]\) of the particle are set to optimize the particle within the specified range. In this paper, the purpose of IPSO optimization is to ensure the minimum speed tracking error of all carriages by adjusting the parameters of two LADRC. The optimization process is shown in Figure 2.  
During optimization, the position and velocity of each particle are updated according to the following equation:  
\[\left\{\begin{array}{l}v_{n}^{m+1}=w_{0}v_{n}^{m}+c_{1}rand_{1}(pbest_{n}-x_{ n}^{m})+c_{2}rand_{2}(gbest_{m}-x_{n}^{m})\\ x_{n}^{m+1}=x_{n}^{m}+v_{n}^{m+1}\end{array}\right. \tag{5}\]  
where \(pbest_{n}\) is the position of the individual optimal of particle \(n\), and \(gbest_{m}\) is the position of the global optimal of \(m\)-\(th\) iteration. \(c_{1}\) and \(c_{2}\) are the learning factors to regulate the maximum step size of learning. \(rand_{1}\) and \(rand_{2}\) are the random numbers to increase the randomness of the search, and their range is \([0~{},~{}1]\), whilst \(w_{0}\) is the inertia weight.  
From (5), the value of \(w_{0}\) affects the velocity of particle movement. When \(w_{0}\) is large, it is beneficial to the global search of the population, but it will lead to the low accuracy of the local search in the later stage. When \(w_{0}\) is small, it is beneficial to improve the accuracy of the local optimization of the population, but it may cause the population to fall into the  
Figure 2: IPSO algorithm optimization process.  
local optimal solution. Therefore, the inertia weight with linear decline is selected, and its updating equation is as follows:  
\[w_{0}=w_{\max}-m(w_{\max}-w_{\min})/M \tag{6}\]  
where \(w_{\max}\) is the maximum inertia weight and \(w_{\min}\) is the minimum inertia weight. Since the beginning of the search, \(w_{0}\) decreases linearly from \(w_{\max}\) to \(w_{\min}\) in order to ensure the global search and local search ability of the population.  
In this paper, the integral of the absolute value of error criterion (IAE) is adopted as the objective function of IPSO, and the calculation equation is as follows:  
\[J_{IAE}=\sum_{i=1}^{4}\;\int_{0}^{T}\mid v_{d}-v_{i}\mid\ dt \tag{7}\]  
where \(i\) is the number of the carriage and \(T\) is the total operation time of the HST. The optimization objective of IPSO is to ensure that the value of the objective function is as small as possible.