## 2 Reconstruction Algorithm
### The Strain Reconstruction Algorithm  
The authors of [14] found that a simulated spectrum based on an improved transfer-matrix algorithm exhibited a high degree of matching with a real-world experimental spectrum. A simulated spectrum obtained by such means can, therefore, be used for the strain reconstruction of an FBG sensor. This can be achieved by iterating the error between the simulated spectrum and the target experimental spectrum under unknown strain distribution until the error requirements are matched. A GWO algorithm can then be used for parameters of global optimization of error between the experimental and simulated spectra. An arithmetic flow chart of the strain reconstruction algorithm of FBGs can be presented in Figure 2 as follows:  
This section briefly presents the mathematical model of the strain reconstruction of the FBG. Step 1: The FBG simulated spectra database  
When the modified TMM algorithm is used to simulate the reflection spectrum of FBG, the grating is divided into M-segments, and the strain distribution of each segment is presented approximately as uniform using the mean-field approximation method [19]. The inhomogeneous strain distribution sensed by the FBGs can then be transformed into the uniform strain distribution sensed by the M-segment of the FBGs. The reconstruction problem may also then be transformed, from a continuous and non-uniform strain distribution reconstruction problem into a discrete and uniform problem, greatly reducing the computational difficulty of the algorithm. The choice of M is limited by the spatial resolution used for the reconstruction strain profile. For example, if the reconstruction accuracy of the 10 mm FBG sensor is 0.1 mm, then the value of M is set as 100. The key to the strain reconstruction method is the establishment of a simulated spectrum database of FBGs by the modified TMM method. The reconstruction strain distribution is calculated by comparing the simulated spectrum and experimental re  
Figure 1: Flow chart of grey wolf optimizer algorithm. flection spectra to obtain the minimum error. The simulation spectrum is calculated by the modified transfer matrix algorithm on the basis of a theoretical understanding, as follows: By dividing the non-uniform strain distribution \(\varepsilon(z)\) sensed by the FBGs into enough discrete pieces, the M-segments can be presented as the uniform strain. The reconstructed non-uniform strain can then be expressed in terms of the uniform strain pieces of \(\varepsilon^{(n)}=[\varepsilon_{1}^{(n)},\varepsilon_{2}^{(n)},\cdots, \varepsilon_{M}^{(n)}]\), \(n=1,\cdots,N\), and the Bragg wavelength segment of FBGs can be expressed as \(\lambda_{0}=[\lambda_{0},\lambda_{1},\cdots,\lambda_{\text{H}}]\). The modified transfer-matrix algorithm can be used to calculate the simulation spectrum of FBGs under assumed strain distribution. In the calculation function, \(\varepsilon_{m}^{(n)}\) (\(1\leq m\leq M\)) indicates the uniform strain value of the M\({}_{\text{th}}\) grating segment along the FBGs. Previous research [4] has indicated that the FBGs under non-uniform strain are mainly influenced by the strain gradient. Therefore, the first derivative \(\varepsilon^{\prime}(z)\) of the strain gradient should be used for the simulation spectrum calculation. However, the second derivative is too small and can be ignored for calculation purposes. The simulation reflection spectrum of FBGs at the Bragg wavelength of \(r^{(n)}=r_{1}^{(n)},r_{2}^{(n)},\cdots,r_{H}^{(n)}\) can then be calculated using the modified transfer-matrix method. Step 2: The strain reconstruction algorithm  
As stated above, the non-uniform strain along FBG sensors can be expressed as a reconstruction problem that can be transformed into an optimization problem by minimizing the fitness sensitivity equations.