# Fault Prediction Modeling for High-Impact Recorders Based on IPSO-SVM
## 2 Materials
### IPSO Algorithm  
To enhance the recognition accuracy of the SVM fault prediction model, it is essential to optimize its penalty parameter and kernel function parameters. This paper introduces an enhancement to the PSO algorithm.  
The standard PSO algorithm initializes multiple particles within a D-dimensional search space to find the optimal solution. Each particle begins at a random position with a random velocity and iteratively updates its velocity and position according to Equations (3) and (4) [17].  
\[v_{id}(t+1)=wv_{id}(t)+c_{1}r_{1}(\mathit{Pbest}_{id}(t)-x_{id}(t))+c_{2}r_{2 }(\mathit{Gbest}_{d}(t)-x_{id}(t)) \tag{3}\]\[x_{id}(t+1)=x_{id}(t)+v_{id}(t+1) \tag{4}\]  
To tackle the issues of premature convergence and being trapped in local optima, which are common in the early stages of the standard PSO algorithm, this paper introduces the Improved Particle Swarm Optimization (IPSO) algorithm, which incorporates the following modifications to the particle swarm optimization process:  
1. The particle swarm is divided into an exploration group and an exploitation group. The role of the exploration group is to enhance the algorithm's global search capability. Particles in this group are less influenced by the global best position and can accept inferior solutions with a certain probability, allowing them to escape local optima. In contrast, the exploitation group aims to converge quickly. Particles in this group are more strongly influenced by the global best position and remain within the vicinity of the local optimum. A dynamic grouping method is designed for the particle grouping ratio. In the early stages of the search, a larger number of particles are allocated to global exploration. As the search progresses, more particles gradually transition to the exploitation group. As shown in Equation (5), where \(k\in(0,1)\), its function is to control the timing of when all particles in the exploration group transition to the exploitation group. When \(s_{i}=-1\), the particle belongs to the exploration group; when \(s_{i}=1\), it belongs to the exploitation group. If \(t>kT\), all particles transition to the exploitation group. \[s_{i}=\left\{\begin{array}{l}-1\ n_{i}-n_{\max}(L_{1}+L_{2}\times(\frac{t}{ kT})^{j})>0\\ 1\ n_{i}-n_{\max}(L_{1}+L_{2}\times(\frac{t}{kT})^{j})\leq 0\end{array}\right.\] (5) In this equation, \(L_{1}\) and \(L_{2}\) control the initial ratio of the two groups of particles, and their sum equals \(1\). In this paper, the values of \(L_{1}\) and \(L_{2}\) are 0.2 and 0.8, respectively. The parameter \(j\) is a positive number that regulates the speed at which the exploration group transitions to the exploitation group, with a value of 1 in this study. 2. For the exploration group of particles, the introduction of dynamic inertia weights aims to minimize their influence from the global best position in the early stages. As iterations progress, these weights gradually lead to convergence at the global optimum. The inertia weight is expressed in Equation (6). \[w(t)=(w_{max}-w_{min})(\frac{T-t}{T})^{0.5}+w_{min}\] (6) For the exploitation group of particles, a larger inertia weight facilitates rapid convergence, and the dynamic inertia weight increases quickly. The inertia weight formula for the exploitation group is defined in Equation (7). \[w(t)=(w_{\max}-w_{\min})(1-1/(1+e^{-(t-T\times 0.2)}))+w_{\min}\] (7)
3. One of the drawbacks of PSO is its tendency to become trapped in local optima. To address this issue, inspired by the simulated annealing algorithm, the algorithm accepts a new position generated during iterations with a poor fitness value with a certain probability. This approach allows the algorithm to escape local optima. The acceptance probability is defined in Equation (8). \[p=\left\{\begin{array}{l l}1&if:f(x_{new})<f(x_{current})\\ e^{-\frac{(x_{new})-f(x_{current})}{2}}&if:f(x_{new})\geq f(x_{current})\end{array}\right.\] (8)