# Online Learning Based Underwater Robotic Thruster Fault Detection
## 4 Propulsion System Online Modeling
### Multi-Center Particle Swarm Optimization Algorithm with Memory Ability
#### 4.2.2 Multi-Center Collaborative Search  
During the search process of the PSO algorithm, all particles learn from the particle with the best current fitness, which has a larger weight. If the particles with the best fitness currently fall into a local optimum, this may cause the entire population to gather in the local optimum area. At this time, even if strategies such as mutation and second search are used in order to try to jump out of the local optimal area, many search iterations are wasted. In addition, judging whether the population has fallen into a local optimum is difficult. To improve this problem, we propose a multi-center collaborative search strategy. The basic idea is to allow the independent exploration of particles, which are far away from the current optimal particle with better fitness during the search process, guiding some particles to search collaboratively in the outer area of the current optimal particle. In other words, there are multiple search centers in the entire population. Among them, there is a main center with the best fitness, which guides most particles to search around it. In addition, there are multiple sub-centers with good fitness, thus guiding some particles to search in other areas. The multi-center collaborative search strategy mainly affects the speed update process of the PSO algorithm. After determining the optimal particle fitness, before the particle position update, the algorithm mainly includes three processes: calculating the weighted fitness, selecting the learning center, and speed update. It is agreed, in this article, that the closer the particle is to the optimal position, the smaller its fitness. Note that during the kth iteration of the PSO algorithm, the current position of particle i, the individual's optimal position, and the individual's optimal fitness are \(\mathbf{x}_{i}^{k}\), \(\mathbf{p}_{ibest}^{k}\) and \(f_{ibest}^{k}\), respectively. Assuming that the particle with the optimal fitness of the optimal individual in the population at this time is particle c, then c is called the central particle in the iteration process. At this time, the optimal position and optimal fitness of the entire population are \(\mathbf{p}_{gbest}^{k}=\mathbf{p}_{chest}^{k}\) and \(f_{gbest}^{k}=f_{chest}^{k}\), respectively. Based on the above agreement, the specific implementation process of the multi-center collaborative search strategy is as follows. Step 1: Sort each particle i in the population in ascending order, according to the optimal fitness of the individual, and mark the set of particles with the top 50% of optimal fitness \(f_{ibest}^{k}\) of the individual as \(X_{top}^{k}\). Step 2: For particle i in \(X_{top}^{k}\), calculate the Euclidean distance between its individual optimal position \(\mathbf{p}_{best}^{k}\) and the population optimal position \(\mathbf{p}_{gbest}^{k}\):  
\[d_{ipg}^{k}=d(\mathbf{p}_{ibest}^{k},\mathbf{p}_{gbest}^{k})=\sqrt{\sum_{j=1}^{D}{(p_{ ibest,j}^{k}-p_{gbest,j}^{k})}^{2}} \tag{10}\]  
Figure 2: Comparison of data point distribution. Step 3: For particle i in \(X_{top}^{k}\), calculate its weighted fitness as follows:  
\[f_{iw}^{k}=\frac{d_{ipg}^{k}}{f_{hist}^{k}} \tag{11}\]  
The larger the weighted fitness, the more suitable the particle is as the auxiliary center. Step 4: Calculate the weighted fitness of all particles in \(X_{top}^{k}\), and sort the particles in descending order of weighted fitness. According to the number of auxiliary centers set in advance, the sorted particles are sequentially selected as auxiliary center particles, where the individual optimal position of the auxiliary center particles is used as the auxiliary center. In this paper, the number of auxiliary centers is set to 2. Assuming that the auxiliary center particles are particle m and particle n, the corresponding auxiliary centers are \(\mathbf{p}_{mbst}^{k}\) and \(\mathbf{p}_{mbst}^{k}\), respectively. Step 5: For the central particle c and auxiliary central particles m and n, set their learning centers to their individual optimal positions.