## 2 Methods
### Constraint Method  
During the computation process of optimization algorithms, precision (i.e., the objective function) is given priority. However, if only Equation (8) is used as the objective function, the algorithm's optimization direction would solely focus on obtaining a forward-modeled anomaly curve that is similar to the observed anomaly, resulting in inaccurate inversion results. Such precision values are not true. In such cases, the physical significance and reasonableness of parameters are easily overlooked, making it difficult to obtain more accurate fault layer parameters. This is clearly not an ideal situation because, in gravity inversion, the non-uniqueness of solutions is a very common and major challenge. Different combinations of fault parameters might result in forward-model gravity anomalies that are quite similar. Therefore, we considered adding constraint terms to the objective function. From Tables 2-4, it is evident that, after adding random noise at 5%, 10%, and 15% levels, RMS errors of predicted gravity anomalies from the traditional PSO algorithm are 6.26 mGal, 12.30 mGal, and 21.51 mGal, respectively, while those from C-AWPSO algorithm are 2.21 mGal, 4.25 mGal, and 6.98 mGal, respectively. Compared with the traditional PSO algorithm, the accuracy of RMS errors increased by 64.7%, 65.44%, and 67.55%, respectively. Clearly, the C-AWPSO algorithm significantly outperforms the traditional PSO algorithm, demonstrating stronger noise-resistance capabilities. Especially for amplitude factor \(M\), inversion error rate e stays at a remarkably low level, specifically 0.01%, 0.09%, and 0.17%. Observing the tables, we notice that, as the noise proportion rises, the parameter error rates do not necessarily increase. For example, in Tables 3 and 4, with a higher noise proportion, the error rate of fault dip angle \(\theta\) actually decreases. This suggests coupling relationships between the two methods. \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline \multirow{2}{*}{**Parameters**} & **Used** & **Mahmoud** & \multirow{2}{*}{**e (\%)**} & **RMS** & **C-AWPSO** & \multirow{2}{*}{**e (\%)**} & **RMS** \\  & **Ranges** & **Elhussein** & **(2021)** [9]** & & **(mGal)** & **Method** & \\ \hline \(M\) (mGal) & 50–200 & 142.2 & 5.13 & 21.51 & 149.74 & 0.17 & 6.98 \\ \(z\) (m) & 1–9 & 5.2 & 13.33 & 6.13 & 2.  
exist among parameters. It is also possible that increased noise alters fitness trends, offering the algorithm an opportunity to \"escape local optimal solutions.\"  
Testing Model  
In the previous section, we found that the error rate of amplitude factor M consistently remained at a very low level. This might be because its magnitude is inherently large, having a greater impact on inversion accuracy. Therefore, during the optimization process, the algorithm prioritizes optimizing this parameter. To verify this hypothesis, we set the values of the fault parameters \(\mathbf{x}(M,z,\theta,w,x_{0})\) in the test model as follows: \(M=15\) mGal, \(z=5\) m, \(\theta=30^{\circ}\), \(w=15\) m, and \(x_{0}=5\) m. Similarly, we inverted gravity anomaly profiles with no noise, 5% noise, 10% noise, and 15% noise. The observed and predicted gravity anomalies obtained are shown in Figure 3, and the corresponding numerical results are presented in Table 5.  
Figure 3: Comparison of the gravity anomalies and predicted gravity anomalies of the inclined faulted layer model (\(M=15\) mGal, \(z=5\) m, \(\theta=30^{\circ}\), \(w=15\) m, \(x_{0}=5\) m) under noise-free conditions (**a**), 5% noise (**b**), 10% noise (**c**), and 15% noise (**d**). From Figure 3 and Table 5, it can be seen that, when the parameters of the inclined faulted layer model change significantly (especially when there is a change in the magnitude of the amplitude factor), the C-AWPSO algorithm still performs excellently. After adding random noise at 5%, 10%, and 15% levels, the RMS of predicted gravity anomalies obtained using the C-AWPSO algorithm is 0.41 mGal, 0.94 mGal, and 1.52 mGal, respectively.