# An Improved Shuffled Frog Leaping Algorithm for Electrical Resistivity Tomography Inversion
## 4 Numerical Simulation
### Inversion Results  
The LS inversion method, due to its theoretical completeness and the flexibility of regularization, has become the most mainstream linear inversion method in commercial resistivity tomography. Therefore, this paper selects this method as the benchmark for inversion comparison. Based on the forward model data, this paper adds 5% Gaussian noise to simulate the observational data, replicating the noise environment encountered in field data collection. The probability density function of the Gaussian noise follows a Gaussian distribution (normal distribution), and its one-dimensional probability density function formula is  
\[f(x)=\frac{1}{\sigma\sqrt{2\pi}}\text{exp}\left(-\frac{(x-\mu)^{2}}{2\sigma^{ 2}}\right) \tag{8}\]  
Here, \(x\) is the random variable, \(\mu\) is the mean, and \(\sigma\) is the standard deviation, which controls the amplitude range of the noise. In the field of resistivity inversion, Gaussian noise is commonly encountered in both field data collection and indoor processing, primarily originating from thermal noise in measurement instrument electronic components, geomagnetic field interference, and random fluctuations in contact resistance. Such noise causes the observational data to exhibit deviations that follow a normal distribution, which is consistent with the statistical characteristics of the Gaussian noise mentioned above. To prevent negative apparent resistivity values due to large variations in resistivity, the natural logarithm of the model resistivity was applied. This transformation reduces the resistivity range and enhances the stability of the inversion process. In the inversion procedure, the parameters were set as follows: a total of 3600 frogs, divided into 60 groups, with 60 frogs in each subgroup, and a maximum of 800 iterations. The improved SFLA was then employed for data inversion. The inversion results were compared with those obtained using LS and the standard SFLA to validate the reliability of the proposed method. In the inversion process using the improved SFLA, the resistivity value range is set from 2 to 1100 \(\Omega\)-m. After applying the natural logarithm, this range is transformed to 0.693 to 7.003. The fitness value variation curve throughout the inversion process using the improved SFLA is shown in Figure 3. As depicted in the figure, following the inversion with the improved SFLA, the fitness curves of the three models initially exhibit a substantial decrease. After 20 iterations, the rate of decrease in the fitness value slows, indicating that the search step size is decreasing as iterations progress, allowing for a more refined search  
Figure 2: Three different geoelectric models and their forward modeling results. (**a1,b1,c1**) are schematic diagrams of the models, and (**a2,b2,c2**) are the forward modeling results. for the global optimum. Upon reaching 400 iterations, the fitness values of the three models show only minimal changes, suggesting that the optimization process has nearly converged to the global optimal solution. In addition, to study the inversion performance of the SFLA, this paper uses the root mean square error (RMSE) to measure the fit between the inversion model and the actual measured data. The smaller the RMSE value, the smaller the difference between the predicted values of the model and the actual observed values, which provides a good measure of the inversion accuracy. The calculation formula is as follows:  
\[RMSE=\sqrt{\frac{1}{N}{\sum_{i=1}^{N}\left(\frac{\rho_{i}^{obs}-\rho_{i}^{ cal}}{\rho_{i}^{obs}}\right)^{2}}} \tag{9}\]  
In the formula, \(i\) represents the number of measurement points, \(N\) is the total number of measurement points, \(\rho_{i}^{obs}\) is the actual observed value at the \(i\)-th measurement point, and \(\rho_{i}^{cal}\) is the forward calculated value at the \(i\)-th measurement point.