1 Introduction

The self-potential (SP) method is a geophysical method based on measurements of the natural electrical potential in the earth due to various mechanisms. As an efficient and common geophysical method about cost and implementation, SP method have been applied on the current applications in geophysics such as groundwater investigation (Göktürkler et al. 2008; Bai et al. 2021), mineral exploration (Shao et al. 2017; Yang et al. 2019) and subsurface reservoirs (Alarouj et al. 2021). Interpretation of SP anomalies involves with depth and shape estimations of the buried structures using different methods of modeling and inversion. These approaches generally use some geometrical models such as 2D inclined sheet, semi-infinite vertical cylinder, horizontal cylinder with finite or semi-infinite length, and sphere to approximate the subsurface structure.

In the last two decades, global search methods such as nature- or bio-inspired metaheuristic algorithms have become more popular for the model parameter estimations in geophysical inversion problems. Despite their high computational cost, metaheuristics are preferred to solve optimization problems because of their success to find the global optimum of a function. Apart from traditional derivative-based optimization methods, metaheuristic methods avoid local minima and do not need a good initial model to get the global minimum (Blum and Roli 2003; Göktürkler 2011).

A wide range of metaheuristics is available in geophysics for the solutions of inverse problems. Various metaheuristic methods have been used to invert SP anomalies including genetic algorithm-GA (e.g. Göktürkler and Balkaya 2012), differential evolution-DE (e.g. Li and Yin 2012; Balkaya 2013), particle swarm optimization-PSO (e.g. Göktürkler and Balkaya 2012; Ekinci et al. 2020; Essa 2019), simulated annealing-SA (e.g. Göktürkler and Balkaya 2012), very fast simulated annealing-VFSA (e.g. Biswas 2017), crow search algorithm-CSA (e.g. Haryono et al. 2020), whale optimization algorithm-WOA (e.g. Abdelazeem et al. 2019), black hole algorithm-BHA (e.g. Sungkono 2018), cuckoo search algorithm-CSA (e.g. Turan-Karaoğlan and Göktürkler 2021), and Bat optimizing algorithm-BOA (Essa et al. 2023). Recent studies about the geophysical inversions focus on latest developments using various metaheuristic methods with SP data and field investigations (Gobashy and Abdelazeem 2021). Elhussein and Essa (2021) carried out an inversion study to estimate the model parameters and compared the results of SP data obtained by various methods such as least-squares minimization, particle swam optimization, and neural network methods. Another inversion study with SP including synthetic and field data sets was investigated by Abdelrahman and Gobashy (2021) to determine the model parameters of buried bodies of simple SP geometry using a fast method. Rao et al. (2021) used 2D inclined plate model for synthetic and field SP anomaly using VFSA and the inversion results are given with 2D anomaly graphs and 3D cross-plots including true values and uncertainty boundaries. Ekinci et al. (2020) investigated comprehensive inversion studies about various near surface potential anomalies including SP using PSO, DE, and differential search algorithm. In addition to model parameter estimation of SP anomalies, they carried out uncertainty analysis by Metropolis–Hastings (M–H) sampling algorithm and reliability analysis by probability density functions. Biswas et al. (2022) used VFSA for the inversion of various SP field anomalies with 2D thin layer modeling and investigated the uncertainty analysis in the problem.

Each metaheuristic algorithm has some advantages and disadvantages; consequently each one can perform well in solving some problems but show some weaknesses in solving others. To enhance the performance of the metaheuristics, a large number of hybrid metaheuristic algorithms have been proposed recently. Such algorithms aim at combining the advantages of each algorithm and minimizing any substantial weakness of each one. The performance results of the inversions by the hybridization show some improvements about computational accuracy or speed (Blum et al. 2011; Talbi 2013; Ting et al. 2015).

PSO (Kennedy and Eberhart 1995) and DE (Storn and Price 1997) methods are well-studied and popular algorithms in research community, because they are simple to understand, code, and tune. PSO is a swarm-based algorithm able to keep the history information of the candidate solutions, while DE is an evolutionary algorithm reputable as accurate and fast technique able to keep the diversity of the population (Salman et al. 2007; Sayah and Hamouda 2013). Despite the strong characteristics of the algorithms, they have some weak features. Some researchers (e.g. Sengupta et al. 2018; Shami et al. 2022) have reported the possibility of premature convergence of PSO. For DE, its performance can be influenced negatively by high sensitivity to control parameters choice (e.g. Salman et al. 2007; Eltaeib and Mahmood 2018). PSO is known as flexible algorithm to hybridize, and it has been mostly combined with DE by researchers. A well-designed DE/PSO (differential evolution and particle swarm optimization) hybrid approach is expected to make up for the disadvantages of DE and PSO.

Hendtlass (2001) suggested the first DE/PSO hybrid algorithm, in which PSO was used as the main operator to update the candidate solutions, but in some steps with user-defined intervals, DE operated on the swarm to enhance their fitnesses. The success of the DE/PSO causes many DE/PSO hybrid applications with various forms of combinations about DE and PSO. Most of the typical examples are the hybrid algorithms that incorporated DE or DE operators into PSO (e.g. Zhang and Xie 2003; Liu et al. 2010). Kannan et al. (2004) also used DE operations to optimize the control parameters of PSO in hybrid DE/PSO application. However, DE and PSO are hybridized in parallel in some DE/PSO hybrid algorithms (e.g. Elragal et al. 2011). Additionally, there are also problem-dependent DE/PSO hybrids in different optimization problems such as economic dispatch problem (Sayah and Hamouda 2013), and optimal design for water distribution systems (Sedki and Ouazar 2012).

According to the literature in geophysics, a hybridized metaheuristic algorithm yields better results than a single metaheuristic to estimate the model parameters in an inversion. The hybrid metaheuristic algorithms can be divided into two categories as combination of a metaheuristic method with local search algorithms (e.g. Gobashy et al. 2021), and combination of two metaheuristic algorithms or using some components of a metaheuristic algorithm into another metaheuristic algorithm (e.g. Khajezadeh et al. 2022). There are some recent applications of hybrid metaheuristics in inversion of potential-field anomalies. A hybrid metaheuristic algorithm was proposed by Li et al. (2021) including DE and PSO in a joint scheme to invert the geoelectric structure parameters from the transient electromagnetic data. Jamasb et al. (2018) introduced a combination of PSO and evolution strategies (ES) called PSO/ES to invert three-dimensional gravity anomalies. Di Maio et al. (2016, 2019) proposed a new approach based on the genetic-price hybrid algorithm (GPA) and used it to determine the model parameters of SP anomalies. The method (GPA) was applied on magnetic anomalies to recover the source parameters, as well (Di Maio et al. 2020). Sohouli et al. (2022) used a hybrid of PSO and GA to estimate the model parameters of magnetic sources with simple geometric shapes.

This study presents the inversion of SP anomalies by a hybrid metaheuristic optimization algorithm consisted of DE and PSO algorithms called DE/PSO hybrid algorithm. The DE/PSO is defined as a teamwork hybridization representing cooperative optimization model that both DE and PSO algorithms maintain self-contained and explore their own search spaces separately while they exchange their information during iterations. DE/PSO hybrid algorithm is implemented in R programming language environment, which is released in open-source form under the conditions of the GNU General Public License (R Core Team 2021). According to the literature survey on geophysical inversion studies and hybrid metaheuristic methods, the inversion of the synthetic and field SP anomalies has not been investigated by a DE/PSO hybrid algorithm. Therefore, here a parameter tuning study for the determination of the control parameters of the hybrid algorithm and inversion studies for test functions, synthetic and field SP anomalies are performed.

2 Methodology of DE/PSO hybrid algorithm

Proposed hybrid algorithm is comprised of DE and PSO for the inversion study. DE algorithm was proposed by Storn and Price (1997) as a stochastic vector-based metaheuristic algorithm. DE evolves several candidate solutions (population) iteratively. The set of candidate solutions initializes with a randomly distributed individuals within the search space of an optimization problem. In each generation, new solutions are created through three operations: mutation, crossover or recombination, and selection. For each solution (target vector), a mutant vector (v) is created using mutation operator. It is done by mutation of a randomly selected base vector (x) using Eq. (1) (Storn and Price 1997; Balkaya 2013; Balkaya et al. 2017; Ekinci et al. 2019).

$${\varvec{v}} = {\varvec{x}} + F \cdot \left( {{\varvec{r}}_{1} {-} {\varvec{r}}_{2} } \right),$$
(1)

where r1 and r2 are randomly selected solutions, and F is mutation constant and a user-defined parameter. Here it should be noted that randomly selected solutions, base vector and target vector should be different from each other. After mutation step is done, the crossover operation generates a trial vector (offspring) using the recombination of target vector and its corresponding mutant vector. The crossover operation uses a crossover probability (Cr) in the range of [0, 1] that determines how many elements of the mutant vector to participate in the trial vector. According to DE algorithm introduced by Storn and Price (1997), the crossover operation increases the diversity of populations and ensures that the trial vector will not be a copy of the target vector. After producing the trial vector with combination of the target vector and the mutant vector, the target or trial vector is selected by the algorithm based on their fitness values to enter the next generation. The better new solutions replace inferior ones in the population. The operations reiterate until a stop criterion (e.g. reaching a defined number of generations) is satisfied and finally a solution is yielded (Storn and Price 1997; Balkaya 2013).

As another algorithm of the investigated hybrid algorithm, PSO imitates the social behavior of birds or fishes when they try to reach food sources. The initialization of the algorithm is carried out by locating a population of random positions. For implementing PSO, the particle positions change iteratively up to a criterion of termination is satisfied. Each particle (i) has a position in space (xi), which changes with velocity (vi). The positions and velocities are updated in each iteration:

$${\varvec{v}}_{i}^{{\left( {k + 1} \right)}} = \omega {\varvec{v}}_{i}^{\left( k \right)} + c_{1} rand()\left( {{\varvec{pbest}}_{i} - {\varvec{x}}_{i}^{\left( k \right)} } \right) + c_{2} rand()\left( {{\varvec{gbest}} - {\varvec{x}}_{i}^{\left( k \right)} } \right),$$
(2)
$${\varvec{x}}_{i}^{{\left( {k + 1} \right)}} = {\varvec{x}}_{i}^{\left( k \right)} + {\varvec{v}}_{i}^{{\left( {k + 1} \right)}} ,$$
(3)

where k is iteration number, ω is a weighting factor (0 < ω < 1) called the inertia weight; c1 and c2 are cognitive and social scaling factors, respectively; and rand() is a random number uniformly distributed in [0, 1]. According to the formula, each particle’s velocity will be updated considering: its current position (\({\varvec{x}}_{i}^{\left( k \right)}\)), current velocity (\({\varvec{v}}_{i}^{\left( k \right)}\)), the best position in its search history (pbesti), and the global best position explored by all current particles (gbest). The gbest of the final swarm is considered as the solution of the problem (Göktürkler and Balkaya 2012). The pbesti and gbest components are evaluated based on objective function of the inversion problem.

The hybrid DE/PSO scheme in this study follows the one by Li et al. (2021). Similarly it is initialized by two different random populations, and it runs PSO and DE simultaneously. Parameter setting of the hybrid algorithm includes the control parameters of F, Cr, ω, c1, and c2. The population size (Npop) and the number of generations per each algorithm \(\left( {N_{gen}^{DE} , N_{gen}^{PSO} } \right)\) are defined for DE and PSO together with the maximum iteration number of the hybrid (Itmax). In each iteration, each single algorithm independently yields a premature solution (two independent implementations can be executed in a parallel code scheme) through a number of generations (\(N_{gen}^{DE}\) for DE and \(N_{gen}^{PSO}\) for PSO). Then, the hybrid algorithm compares these solutions based on their objective function values and selects the better one as the best individual. In this step, there are two populations: \(N_{gen}^{DE} th\) generation of DE and \(N_{gen}^{PSO} th\) generation of PSO. One of these populations contains the best individual, and the premature solution of the other population is replaced by the best individual. In this way, the populations share the best individual and go to the next iteration. The optimum solution after a user-defined Itmax will be the final best individual. In other words, the hybrid algorithm iterates the shared information resulted from two parallel populations evolving through the generations of DE and PSO.

The flowchart of the DE/PSO hybrid algorithm is given in Fig. 1. The steps of the hybrid algorithm are given as the following:

Fig. 1
figure 1

Flowchart of DE/PSO (after Li et al. 2021)

Step 1 Assigning values to the parameters, F, Cr, ω, c1, c2, Npop, \(N_{gen}^{DE}\), \(N_{gen}^{PSO}\), and Itmax.

Step 2 Population initialization: two different random populations (popDE and popPSO) of size Npop are generated.

Step 3 PSO yields \(N_{gen}^{PSO}\) times generations, and provides a [premature] solution.

Step 4 DE yields \(N_{gen}^{DE}\) times generations, and provides a [premature] solution.

Step 5 The solutions from the steps 3 and 4 are compared based on their objective function values, then popDE or popPSO are updated with the best individual.

Step 6 The algorithm terminates when the iteration number reaches Itmax. Otherwise, it goes to step 3 and loops.

The algorithm proposed by Li et al. (2021) obtains the first generations of DE and PSO in steps 2, and 3. As a new and different approach for more improvement in the results, we obtain \(Nth\) generations of DE and PSO in these steps.

3 Implementation of DE/PSO hybrid algorithm

The test studies with mathematical functions, synthetic and field SP anomalies were implemented in R programming language version 4.0.5 released on (2021–03-31). R includes a variety of packages for optimization. All R packages are categorized by topic in web pages known as Comprehensive R Archive Network (CRAN) task views, which provide tools for browsing guidance information in special interest areas. A comprehensive listing of packages for optimization algorithms is available in CRAN task view on “Optimization and Mathematical Programming” (Theussl and Borchers 2018) including GA, DE, PSO, and SA. Packages (the names of R packages are written in italics) called GA (Scrucca 2013) and genalg provide functions for optimization using GAs. DEoptim (Mullen et al. 2011) package implements DE. Packages called pso and psoptim implement PSO. There are some other packages such as metaheuristicOpt (Riza and Nugroho 2018) containing functions for 21 evolutionary optimization algorithms, and NMOFFootnote 1 (Gilli et al. 2019) offering implementations of several optimization algorithms (Table 1). The overview of the cited R packages are presented in the Table 11 of the Appendix.

Table 1 Metaheuristic algorithms offered by NMOF R package

Considering the goal of DE/PSO hybridization, we decided to use NMOF package because it contains functions for both DE and PSO algorithms, respectively called as DEopt and PSopt. The other reason is the argument options offered by these functions and the returned outputs. The functions have some optional arguments (initial population, store solutions, etc.) and return all of the generated populations, which the hybrid algorithm requires. The functions also return a list of objective function values. This enables us to investigate the convergence characteristics of DE, PSO, and DE/PSO hybrid via the error energy plots.

4 Self-potential anomaly

4.1 Simple geometric shape model

An SP anomaly observed over a polarized body is given as potential measure in a point with x [m] horizontal distance along a profile. The mathematical expression below calculates the potential [V] due to the subsurface body idealized with simple geometric shape (Yüngül 1950; Göktürkler and Balkaya 2012):

$$V\left( {x,\; x_{0} ,\;K, \;\theta ,\; z_{0} , \;q} \right) = K\frac{{\left( {x - x_{0} } \right)\cos \theta + z_{0} sin\theta }}{{\left[ {\left( {x - x_{0} } \right)^{2} + z_{0}^{2} } \right]^{q} }},$$
(4)

where K is the electric dipole moment [mVm2q−1], θ is the polarization angle measured clockwise from the horizontal axis [], z0 and x0 are the depth and position of the causative body [m], respectively. q is shape factor (dimensionless) which equals 0.5, 1.0, and 1.5, respectively for a semi-infinite vertical cylinder, infinitely long horizontal cylinder, and sphere. Modeling of synthetic and field SP anomalies in this work were carried out using simple geometric shape forward model where the SP inversion problem aims to estimate the model parameters of K, θ, z0, q, and x0 (Fig. 2).

Fig. 2
figure 2

Illustration of model parameters for sphere as an example for simple geometric shape

4.2 2D inclined sheet model

A 2D inclined sheet can model a geological structure such as fracture or fault. The SP anomaly is given as potential measures in points with x [m] horizontal distances along a profile. The profile is perpendicular to the strike of the inclined sheet. The potential [V] due to a horizontally infinite and inclined sheet in two dimensions is calculated by following mathematical expression (Murthy and Haricharan 1985):

$$V\left( {x, \;x_{0} ,\;U_{0} , \;\alpha ,\;h,\;a} \right) = U_{0} {\text{ln}}\left\{ {\frac{{\left[ {\left( {x - x_{0} } \right) - a\;cos\alpha } \right]^{2} + \left( {h - a\;sin\alpha } \right)^{2} }}{{\left[ {\left( {x - x_{0} } \right) + a\;cos\alpha } \right]^{2} + \left( {h + a\;sin\alpha } \right)^{2} }}} \right\},$$
(5)

where U0 is the polarization amplitude [mV], α is the inclination angle [], h and x0 are the depth and position of the sheet center [m], respectively. a is half-width of the sheet [m]. In addition to simple geometric shape model, 2D inclined sheet model was also used to interpret KTB field anomaly (Germany). In this model, SP inversion problem aims to estimate the model parameters of U0, α, h, a, and x0 (Fig. 3).

Fig. 3
figure 3

Illustration of 2D inclined sheet model parameters. The plot is modified from Murthy and Haricharan (1985)

5 Synthetic data

A synthetic noise-free SP anomaly was calculated using Eq. (4) through a horizontal profile of 400 m in points with 5-m intervals. The considered model is a spherical body with the parameters of K = − 20,000 mVm2q−1, θ = 25, z0 = 30 m, q = 1.5, and x0 = 220 m (Fig. 4). The anomaly shows variation from positive to negative values between maximum and minimum amplitudes around 4 and − 14 mV. The data set was used for parameter tuning of DE, PSO, and DE/PSO. A comparison of the hybrid algorithm performance with the other two algorithms (DE and PSO) was investigated using this data set.

Fig. 4
figure 4

Synthetic SP anomaly for a spherical body

6 Parameter tuning for the hybrid algorithm

Firstly, to obtain the optimum control parameters for DE and PSO as the components of the hybrid algorithm, we carried out parameter tuning studies for each algorithm separately. The tables of DE and PSO parameter tuning are given in the Appendix (Tables 12, 14). The optimum values of F, Cr, ω, c1, and c2 were used in the hybrid algorithm introduced in this study. The hybrid algorithm has several control parameters to be optimized: Npop, Itmax, and \(\left( {N_{gen}^{DE} , N_{gen}^{PSO} } \right)\). Secondly, the optimum values for these parameters were determined. The simulations in the parameter tuning studies included five independent runs. The minimum, maximum, mean, and the standard deviation (SD) of root mean square (rms) values were considered in the statistical analysis of the results. All implementations were done in computer with 2.4 GHZ processor and 4 GB of memory. The mean elapsed time [s] for execution of DE, PSO, and DE/PSO hybrid functions were also reported. We considered the following formula for error energy (E) or objective function during parameter estimation (Göktürkler 2011):

$$E = \frac{1}{N}\mathop \sum \limits_{i = 1}^{N} \left( {V_{i}^{obs} - V_{i}^{cal} } \right)^{2} ,$$
(6)

where N is the number of the data, Vobs and Vcal are the observed (synthetic or field) and calculated data, respectively, and i denotes each observation. The rms value is square root of the error energy (Table 2).

Table 2 Parameter tuning of DE/PSO along with comparison of the inversion results from noise-free data using three methods DE, PSO, and DE/PSO hybrid algorithm

DE parameter tuning study was done for pairs of F and Cr taken from [0.1, 1] by steps of 0.1 with fixed Npop of 50, and generation number of 100. Parameter tuning study for PSO also was carried out by constant Npop of 50, and generation number of 150 based on its [PSO] slow convergence rate. We used five sets of the control parameters (ω, c1, and c2) suggested by some previous studies to tune the PSO. Table 13 in the Appendix lists these references. The optimum control parameters for DE and PSO are given in Table 3.

Table 3 The optimum parameters used in test studies of this work

The parameter tuning studies also included some trial–error studies with the noise-free data set to obtain optimum values for the parameters of Npop, Itmax, and \(\left( {N_{gen}^{DE} , N_{gen}^{PSO} } \right)\). It was observed that the parameters, \(\left( {N_{gen}^{DE} , N_{gen}^{PSO} } \right)\) had substantial effect on the accuracy of the results and the rate of convergence. Comparisons of the performances of each algorithm (DE, PSO, and hybrid algorithm) are given in Table 2 and Fig. 5. Each algorithm used the same initial population of 50 individuals. Number of 100 was set to Itmax and the number of generations of PSO and DE were set to 100, 200, 300, and 400. In this way, an equivalent comparison condition was set to consider the computational cost of 1, 2, 3, and 4 values for \(\left( {N_{gen}^{DE} , N_{gen}^{PSO} } \right)\) parameters in the hybrid algorithm. The plots illustrate the first 50 iterations for the sake of comparison. The results and plots in the Table 2 and Fig. 5, altogether show that the increase in the values of the parameters \(\left( {N_{gen}^{DE} , N_{gen}^{PSO} } \right)\) results in faster convergence rates, and substantial decreases in rms values. The increase in the elapsed time seems unavoidable because of the serial implementation of DE and PSO in our coding approach. It can be avoidable, when the two metaheuristics run simultaneously. The optimum value for the parameters \(\left( {N_{gen}^{DE} , N_{gen}^{PSO} } \right)\), was selected as 3 for a desired accuracy (Table 2).

Fig. 5
figure 5

Convergence curves of the PSO, DE, and DE/PSO hybrid algorithms. \((N_{gen}^{DE} , N_{gen}^{PSO} )\) parameters are equal to 1, 2, 3, 4 in a, b, c, and d plots respectively

To optimize the hybrid algorithm further we carried out parameter tuning studies (Table 15 in the Appendix) by using noise-free data and a random population. Based on these studies the optimized values of the parameters Npop, and Itmax were obtained as 25 and 40, respectively. Following test studies with two-dimensional mathematical test functions, noise-free, noisy, and field data sets (single anomalies) were implemented by using the parameter values of 25 for Npop, 40 for Itmax, and 3 for \(\left( {N_{gen}^{DE} , N_{gen}^{PSO} } \right)\). The Npop, Itmax, and \(\left( {N_{gen}^{DE} , N_{gen}^{PSO} } \right)\) parameters used for test studies through high-dimensional mathematical test functions and multiple SP anomalies (KTB anomaly) were obtained by trial and error. The considered parameters are presented in the related sections.

7 The hybrid algorithm testing

To investigate the reliability of DE/PSO hybrid algorithm, four typical test functions were adopted from unimodal and multi-modal mathematical functions: Sphere, Rosenbrock, Griewank, and Himmelblau.Footnote 2 Sphere (bowl-shaped) and Rosenbrock (valley-shaped) are unimodal functions with one global minimum where the best solution is located. Griewank and Himmelblau are multi-modal functions, which have many local minima with unique global minimum (Hussain et al. 2017). The details of these functions are given in Table 4. The table also includes the solutions obtained by DE/PSO hybrid for the test functions with two dimensions. For each function, the best results by the proposed hybrid algorithm were selected among five independent runs. The statistical information of the five runs is presented in Table 16 of the Appendix. Figure 6 illustrates the color images by soobench R package (Mersmann et al. 2020) of the test functions with the locations of their corresponding global minima, and the solutions obtained by DE/PSO hybrid.

Table 4 The mathematical test functions and the solutions obtained by the hybrid algorithm
Fig. 6
figure 6

The colored plots of the test functions with their corresponding global minima (red points). The blue pluses show the solutions obtained by the hybrid algorithm. The plot of Griewank function is zoomed-in for a better resolution. (Color figure online)

The performance of the hybrid algorithm was also evaluated for Sphere, Rosenbrock, and Griewank functions having three different dimensions, 10, 20, and 30. A different set of control parameters for the hybrid algorithm were used to solve the high-dimensional functions. We considered 100 for Npop, 500 for Itmax, and 5 for \(\left( {N_{gen}^{DE} , N_{gen}^{PSO} } \right)\) parameters to obtain the results in Table 5.

Table 5 The results from the hybrid algorithm for high− dimensional test functions

8 Performance analysis of DE/PSO hybrid algorithm

8.1 Numerical test studies with synthetic data

Synthetic data includes both noise-free and noisy data sets. To generate the noisy data, normally distributed pseudo-random numbers with zero mean and standard deviation of ± 0.5 mV (Galassi et al. 2009) was added to the noise-free data. The hybrid algorithm was applied to noise-free and noisy synthetic data sets and the best estimated parameters among five independent runs are given in Table 6. The table also contains the maximum and minimum bounds of search spaces considered for the model parameters. The fit of the calculated and observed data, and the observed SP versus calculated SP anomalies for the synthetic data are illustrated in Fig. 7. The corresponding plots of the error energy variation with respect to iteration number are also shown in the figure, which characterize relatively fast rate of convergence. The results with the noise-free data are very close to the true model parameters. The solution for the noisy data set has obtained with the rms value around 0.46 mV, which seems compatible with the standard deviation of the added noise (± 0.5 mV). Figure 8 shows the convergence curves of the model parameters through 40 iterations for noise-free and noisy data sets.

Table 6 Tests with synthetic data
Fig. 7
figure 7

The results from (ac) noise-free and (d–f) noisy data

Fig. 8
figure 8

Convergence characteristics of the model parameters for (ae) noise-free and (fj) noisy synthetic data sets. The dashed lines show the true parameter values. The estimations for each parameter by the hybrid algorithm are indicated on the panels

The error energy maps are one of the approaches to analyze the inverse problem at hand (Fernández-Martínez et al. 2013; Ekinci et al. 2017, 2021). It is known that more than one model (equivalent parameters) can fit the observed data because of the non-unique nature of inverse problems. The error energy topography map for the selected parameter couples is obtained by the calculation of the objective function values over the corresponding ranges of the search space. The global minimum (true model parameters) locates in the valley of the lowest objective function value. The shape of contour lines is an indicator of how uniquely a model parameter is estimated. According to the interpretations regarding error energy maps in the literature, the contour lines are preferred to have closed shapes with relatively small low-error region. A large low-error region indicates existence of many solutions with low errors. Figure 9 shows the error energy maps for some selected parameter couples. There is not any prominent feature in the maps indicating the difficulty of unique estimation of the related model parameters. The locations of the estimated parameters by the hybrid algorithm for noise-free and noisy synthetic data are also shown on the maps. Considering the close estimations to the true solution, we can conclude that the hybrid algorithm is successful in estimations of the model parameters.

Fig. 9
figure 9

Error energy maps produced for synthetic noise-free data. The locations of true model parameters have shown by red diamonds. The results by the hybrid algorithm for noise-free and noisy data have shown respectively by blue circles and stars

8.2 Numerical test studies with field data

8.2.1 Süleymanköy anomaly (Türkiye)

The SP measurements over a shallow ore deposit in Süleymanköy, Ergani (Türkiye) was used as first example for field data (Yüngül 1950). Ergani district is 65 km southeast of the city of Elazığ, eastern Türkiye. Figure 10 illustrates the SP anomaly along a profile of 260 m varying from positive to negative values between maximum and minimum amplitudes around 100 mV and − 225 mV. We considered the search spaces as K ∈ [-60,000, -10,000], θ ∈ [5, 50], z0 ∈ [20, 50], q ∈ [0.5, 1.5], and x0 ∈ [50, 100]. The results from the hybrid algorithm are illustrated in Fig. 10. A comparison between the estimated parameters using DE/PSO hybrid algorithm with those obtained from some prior studies given in Table 7 indicates that the hybrid algorithm retrieves similar results to the estimated parameters from different methods. The retrieved model parameters of z0 and q from the hybrid algorithm are in agreement with the estimated parameters from previous methods. The estimated value of q near 1.0 is interpreted as an infinitely long horizontal cylinder in subsurface. A plot of visual comparison (Fig. 15) between the results from the present study and the prior ones cited in the Table 7 is available in the Appendix.

Fig. 10
figure 10

The results from Süleymanköy anomaly

Table 7 Tests with field data (Süleymanköy anomaly)

8.2.2 Safford deposit anomaly (Arizona, USA)

The SP survey over a deep ore deposit (Safford) in Arizona (Corry 1985; Biswas 2017) was used as second example for field data. Drilling data revealed that the caused polarized body was in the depth of 550 m (Corry 1985). Figure 11 illustrates the SP anomalies with negative values, along a profile of 2900 m approximately, which reaches maximum amplitude around − 600 mV. We considered the search spaces as K ∈ [− 1500, − 10], θ ∈ [60, 120], z0 ∈ [10, 600], q ∈ [0, 2], and x0 ∈ [− 100, 100]. The results from the hybrid algorithm are illustrated in Fig. 11. Table 8 contains the result from DE/PSO hybrid algorithm for Safford deposit anomaly and those obtained from some previous studies. The retrieved model parameters of θ, z0, and q from the hybrid algorithm are in agreement with the estimated parameters from previous methods. The estimated value of q near 0.5 is interpreted as a semi-infinite vertical cylinder in subsurface. A plot of visual comparison plot (Fig. 16) between the results from the present study and the prior ones cited in the Table 8 is available in the Appendix.

Fig. 11
figure 11

The results from Safford deposit anomaly

Table 8 Tests with field data (Safford deposit anomaly)

8.2.3 KTB anomaly (Germany)

The SP measurements around the KTB boreholes in the Oberpfalz (NE Bavaria, Germany) (Stoll et al. 1995; Biswas 2017) were considered as third example for field data. KTB boreholes were drilled during the German Continental Deep Drilling Program. Drilling site was a faulty zone located above Nottersdorf fault zone. According to drilling data, graphite deposits joined with steeply inclined sheer planes were exposed in the holes (Bigalke and Grabner 1997). KTB anomaly along a profile of 1800 m (Figs. 12a, 13a) is caused by multiple sources and shows two negative anomalies reaching maximum amplitudes around − 400 mV (anomaly 1) and − 600 mV (anomaly 2). It is presumed that the high magnitudes of anomalies are related to high conductivity of graphitic layers in the faulty zone (Stoll et al. 1995). We tried to test the DE/PSO hybrid algorithm for KTB field anomaly with two different possible approaches. Then, the total potential was calculated from undersurface sources using two simple geometric shape bodies (approach-I) and two 2D inclined sheets (approach-II). In approach-I, the search spaces were considered as K ∈ [− 9000, − 100], θ ∈ [0, 180], z0 ∈ [1, 500], q ∈ [0, 2], and x0 ∈ [0, 1800] for both anomalies. In approach-II, the search spaces were considered as U0 ∈ [− 3000, − 10], α ∈ [0, 180], h ∈ [10, 1000], a ∈ [1, 2000], and x0 ∈ [0, 1800] for both anomalies. We assigned 150 for Npop, 300 for Itmax, and 5 for \(\left( {N_{gen}^{DE} , N_{gen}^{PSO} } \right)\) parameters to obtain the results. Ten model parameters were estimated due to inversion of KTB anomaly in each approach. The illustrations of the results and the estimated parameters from DE/PSO hybrid algorithm are presented for approach-I (Fig. 12, and Table 9) and approach-II (Fig. 13, and Table 10). The results for KTB anomaly in present study and those obtained from some previous studies are given in the tables. The comparison of the results from the two approaches shows that approach-I provides a smaller rms value (12.15 mV) than approach-II (19.80 mV).

Fig. 12
figure 12

The results from KTB anomaly using simple geometric shape model

Fig. 13
figure 13

The results from KTB anomaly using 2D inclined sheet model

Table 9 Tests with field data (KTB anomaly) using simple geometric shape model
Table 10 Tests with field data (KTB anomaly) using 2D inclined sheet model

Figure 14 shows the geometrical characteristics of the subsurface structures obtained from inversion of KTB anomaly using the hybrid algorithm DE/PSO. The used model was 2D inclined sheet in this estimation.

Fig. 14
figure 14

KTB anomaly and the corresponding subsurface model including 2D inclined sheets

9 Conclusions

In this work, a hybrid metaheuristic algorithm (DE/PSO) was implemented. The algorithm hybridizes DE with PSO in a cooperative approach, in which DE or PSO takes/gives its best [premature] solution from/to the other iteratively. Simulations by noise-free synthetic SP anomalies indicated that the hybrid algorithm provides faster and more accurate estimations of the true model parameters in comparison to those estimated by each single metaheuristic. The hybrid algorithm yielded a satisfactory result even with small size of population 25 and iteration number 40 for noise-free, and noisy data sets. The results by the application of the hybrid on some high-dimensional test functions ensured the good validation of the algorithm. During test studies with synthetic anomalies including noise-free and noisy data, the estimated model parameters were close to true model parameters. Single SP anomalies over shallow (Turkey) and deep (USA) ore deposits were considered as field data sets to test the hybrid algorithm. For testing the hybrid algorithm on multiple SP anomalies, the well-published anomaly from the KTB borehole site (Germany) was selected. This anomaly was interpreted with two different approaches using simple geometric shape and 2D inclined sheet models. For the field examples including single and multiple anomalies, the calculated SP anomaly fitted well with the observed data. We conclude that implementation of the presented hybrid algorithm provides us with accurate and reliable solutions. It is also worth to mention that R programming language is a feasible tool for application of metaheuristics to solve geophysical inverse problems hence of providing accurate results and a variety of R packages.