## 4 Methodology
### Laser Shock Peenting Parameter Optimization  
The DNN for predicting the extended RUL after the LSP remanufacturing process uses a set of input parameters that include laser power density \(P\), overlapping rate \(O\), spot diameter \(D\), and the current remaining life \(\text{RUL}_{\text{current}}\)[35]. The output of the network is the predicted remaining life after LSP remanufacturing \(\text{RUL}_{\text{extended}}\).  
The DNN can be represented by the following equation:  
\[\text{RUL}_{\text{extended}}=\text{f}_{\text{DNN}}(P,O,D,\text{RUL}_{\text{ current}}). \tag{10}\]  
where \(\text{f}_{\text{DNN}}\) represents the DNN function mapping the inputs to the output. The network consists of multiple hidden layers. For a given hidden layer \(l\), the transformation is defined as follows:  
\[\text{h}^{(\text{l})}=\sigma\Big{(}\text{W}^{(\text{l})}\text{h}^{(\text{l}-1 )}+\text{b}^{(\text{l})}\Big{)}. \tag{11}\]  
where \(\text{h}^{(\text{l})}\) is the output of the \(l\)-th hidden layer, \(\text{h}^{(\text{l}-1)}\) is the input to the \(l\)-th layer (or the input features for \(\text{l}=1\), \(\text{W}^{(\text{l})}\) and \(\text{b}^{(\text{l})}\) are the weights and biases of the \(l\)-th layer, and \(\sigma\) is the activation function (ReLU). The output layer of the DNN generates the predicted extended RUL:  
\[\text{RUL}_{\text{extended}}=\text{W}^{(\text{L})}\text{h}^{(\text{L}-1)}+ \text{b}^{(\text{L})}. \tag{12}\]  
where L is the total number of layers in the DNN. The network is trained using a dataset of different LSP parameter combinations and corresponding extended RUL values. The training process minimizes the MSE between the predicted \(\text{RUL}_{\text{extended}}\) and the actual RUL values.  
Based on the trained DNN, the fruit fly optimization (FFO) algorithm is employed to optimize the LSP parameters for maximizing the extended RUL of bearing [36; 37]. The FFO algorithm begins with an initial population of fruit flies, where each individual represents a candidate solution comprising a unique set of LSP parameters: laser power density, overlapping rate, and spot diameter. The fitness function is calculated as follows:  
\[\text{Fitness}=\text{RUL}_{\text{extended}}=\text{f}_{\text{DNN}}(P,O,D, \text{RUL}_{\text{current}}). \tag{13}\]  
where \(P\), \(O\), and \(D\) are the laser power density, overlapping rate, and spot diameter, respectively. Each fruit fly computes its fitness value, representing the predicted improvement in RUL based on its LSP parameter set. Figure 4 shows the structure of DNN and optimization function.  
During the optimization process, the fruit flies adjust their positions in the search space by moving towards the fruit fly with the highest fitness value; the swarm behavior is  
Figure 4: The structure of DNN and optimization function.  
simulated in locating the optimal food source [38]. The new position \(\left(P,O,D\right)_{\text{new}}\) for each fruit fly is updated:  
\[\left(P,O,D\right)_{\text{new}}=\left(P,O,D\right)_{\text{best}}+\lambda\cdot \text{random}(0,1). \tag{14}\]  
where \(\left(P,O,D\right)_{\text{best}}\) is the position of the best-performing fruit fly, \(\lambda\) is a scaling factor, and \(\text{random}(0,1)\) is a random Gaussian noise to introduce variability in the search. The final set of parameters is expected to maximize the bearing's extended RUL.