## 3 Methodology
### Structure Deterioration Identification
#### 3.2.2 Application of Particle Swarm Optimization Algorithm in Parameter Selection  
In 1995, inspired by the regularities observed in the foraging behavior of bird flocks, [PERSON] and [PERSON] developed a simplified algorithmic model [41]. After years of refinement, this model evolved into the particle swarm optimization (PSO)algorithm, also known as the particle swarm algorithm. PSO is characterized by its fast convergence, minimal parameter requirements, and simple implementation, making it advantageous for high-dimensional optimization problems where it converges to the optimal solution more quickly than genetic algorithms. However, PSO also has the drawback of potentially getting trapped in local optima, thus relying on effective initialization [42; 43].  
In the process of particle swarm optimization (PSO), the fundamental principles and steps can be divided into the following three components:  
(1) Inertia Component: Comprising the inertia weight and the particle's own velocity, this component represents the particle's reliance on its previous motion state.  
(2) Cognitive Component: This represents the particle's own thinking, reflecting its personal experience. It can be understood as the distance and direction between the particle's current position and its own historical best position.  
(3) Social Component: This represents information sharing and cooperation among the particles, derived from the experiences of other successful particles in the swarm. It can be understood as the distance and direction between the particle's current position and the swarm's historical best position.  
In summary, the direction of a particle's next iterative move is determined by a combination of the inertia direction, the individual best direction, and the global best direction. Figure 7 illustrates the basic principles of the particle swarm algorithm, direction determination, and its mapping in the bridge crack identification process.  
Therefore, since the crack detection problem may involve nonlinear and complex objective functions, and given that the particle swarm optimization (PSO) algorithm has strong global search capabilities that can prevent the parameter optimization process from getting trapped in local optima, it is well suited for this task. By leveraging information sharing among particles, PSO can more effectively search for the global optimum. Additionally, PSO has relatively few parameters and is easy to adjust, making it suitable for handling complex multi-parameter optimization problems. Therefore, for the bridge crack detection model proposed earlier, the PSO algorithm should be selected to optimize the relevant parameters for determining sparse locations. The PSO algorithm will iteratively search for the optimal solution, involving objective functions and equality constraints. The solve function is used to find the parameters that meet specific target values, minimizing the objective function (i.e., the absolute difference between the number of sparse locations and the target sparse size). The detailed process of the particle swarm optimization algorithm is shown in Figure 8.  
Figure 7: Diagram of the correspondence between flocking principles and particle swarm optimization algorithm.  
Therefore, considering the actual parameter optimization conditions and constraints in bridge engineering, the following velocity update formula exists:  
\[v_{id}^{k+1}=\omega v_{id}^{k}+c_{1}r_{1}\Big{(}p_{id,pbest}^{k}-x_{id}^{k} \Big{)}+c_{2}r_{2}\Big{(}p_{d,gbest}^{k}-x_{id}^{k}\Big{)} \tag{4}\]  
In the formula,  
N--the swarm size;  
i--the particle index (i = 1,2,..., N);  
D--the dimensionality of the particle;  
d--the dimension index of the particle;  
k--the iteration number;  
\(\omega\)--the inertia weight, used to control the particle's inertia; dynamically adjusting the inertia weight can balance global convergence and convergence speed.