# A Novel Rolling Bearing Fault Diagnosis Method Based on MFO-Optimized VMD and DE-OSELM
## 3 MFO Algorithm and Its Improvement  
### MFO Algorithm  
Inspired by the natural phenomenon of moths fighting fire, the MFO algorithm assumes that the moth population flies around the flame population in the form of a logarithmic spiral curve. If a new position is found to be better than the original flame position, the position will be updated. The matrix \(M\) represents the initial moth position, and the matrix \(OM\) represents the initial moth fitness value, as given below.  
\[M=\begin{pmatrix}M_{1}\\ M_{2}\\ \vdots\\ M_{n}\end{pmatrix}=\begin{pmatrix}m_{1,1}m_{1,2}\cdots m_{1,d}\\ m_{2,1}m_{2,2}\cdots m_{2,d}\\ \vdots\vdots\vdots\ddots\vdots\\ m_{n,1}m_{n,2}\cdots m_{n,d}\end{pmatrix} \tag{7}\]  
where; \(M_{i}\) is the position of the \(i-th\) moth in the solution space of the moth population \(M\); \(n\) is the population number; and \(d\) is the dimension of the solution space.  
\[OM=\begin{pmatrix}OM_{1}\\ OM_{2}\\ \vdots\\ OM_{n}\end{pmatrix} \tag{8}\]  
where; \(OM_{i}\) is the fitness value of the \(i-th\) moth.  
Each moth has a unique flame corresponding to it. The flame represents the local optimal solution found by each moth in the search process. The flame position is represented by the matrix \(F\), and the matrix \(OF\) represents the flame fitness value.  
\[F=\begin{pmatrix}F_{1}\\ F_{2}\\ \vdots\\ F_{n}\end{pmatrix}=\begin{pmatrix}f_{1,1}&f_{1,2}&\cdots&f_{1,d}\\ f_{2,1}&f_{2,2}&\cdots&f_{2,d}\\ \vdots&\vdots&\ddots&\vdots\\ f_{n,1}&f_{n,2}&\cdots&f_{n,d}\end{pmatrix} \tag{9}\]  
where; \(F_{i}\) is the position of the \(i-th\) flame in the solution space of flame population \(F\); \(n\) is the number of flame population; and \(d\) is the dimension of solution space.  
\[OF=\begin{pmatrix}OF_{1}\\ OF_{2}\\ \vdots\\ OF_{n}\end{pmatrix} \tag{10}\]  
where; \(OF_{i}\) is the fitness value of the \(i-th\) flame.  
Moth \(M_{i}\) will move towards the corresponding flame \(F_{j}\) in the form of a logarithmic spiral curve due to phototaxis. The movement formula is defined as Equation (11), and the matrix \(S(M_{i},F_{j})\) represents the updated position of the moth.  
\[S(M_{i},F_{j})=D_{i}\cdot e^{bt}\cdot\cos(2\pi t)+F_{j} \tag{11}\]  
where; \(M_{i}\) is the \(i-th\) moth; \(F_{j}\) is the \(j-th\) flame; \(D_{i}\) is the distance between the \(i-th\) moth and the \(j-th\) flame; \(b\) is a constant related to the shape of the spiral function; and \(t\) is a random number in the interval \([-1,1]\).  
The algorithm adaptively reduces the number of flames based on Equation (12), thereby enhancing its efficiency and ensuring that the population of moths is converging towards the optimal flame.  
\[ flameno=round(N-l\frac{N-1}{T}) \tag{12}\]  
where; \( flameno\) is the number of current flames; \(N\) is the number of original flame population; \(l\) is the number of current iterations; and \(T\) is the maximum number of iterations.  
For the MFO algorithm, a good moth population and flame population after the initial position of the each moth are usually around the corresponding search flame area, and moths will follow the flame along into local optimum only if the flame in a local optimum. Thus, the original MFO is unable to jump out from the local optimum, which leads to the relatively low convergence accuracy and slow convergence speed.