1 Introduction

The potential field data plays a significant role in expected mineral resources under the earth's surface. Specifically, the magnetic method has a wide range of applications in visualising economic sources, their spatial distribution, including the depth, involved physical and geometric properties, and recognition of related geologic structures (Sharma 1987; Abdelrahman et al. 2003c; Lehmann et al. 2015; Biswas and Acharya 2016; Adewumi and Salako 2018; Mandal et al. 2020; Ramesh et al. 2020; Balkaya and Kaftan 2021; Biswas and Rao 2021; Mehanee et al. 2021; Essa and Diab 2022a; Essa et al. 2022a, b; Gokula and Sastry 2022; Mehanee 2022).

Graphical and numerical interpretation methods were widely recognised to assess the subsurface dykes parameters, such as methods using characteristic curves (Koulomzine et al. 1970), curve-matching approaches (Gay 1963; Dondurur and Pamukcu 2003), Werner deconvolution method (Werner 1953), spectral analysis using the power band of a magnetic anomaly (Sengupta and Das 1975), Gauss–Newton method (Won 1981), damped least-squares regression (Johnson 1969), derivative-based methods (Rao et al. 1972; Keating and Pilkington 1990), moving-average (Abdelrahman et al. 2007), Fourier transform approach (Bhimasankaram et al. 1978), a semi-automatic method (Cooper 2012), and modular neural network method (Al-Garani 2015). However, the main drawbacks of these methods are requiring a-priori information on subsurface geological conditions and using few data points on the magnetic anomalies profiles to remove the regional background from the real magnetic data. Also, the sensitivity of the impeded noise in the measured field and multi-models placed at several depths affected the results.

In addition to the above-mentioned methods, Cooper (2015) presented another approach that relied on the amplitude of the analytic signal to a depth of the upper surface, dip amount, and result of susceptibility and thickness of the dyke estimation. Essa and Elhussein (2017) deliberated a new semi-automatic approach that relies on a second horizontal gradient of the observed anomaly for delimiting inclined dykes targets. Kara et al. (2017) established a new methodology to evaluate the dipping dyke model parameters from magnetic anomalies by applying the even component. Essa and Elhussein (2019) established an algorithm for inferring magnetic data owing to dipping dyke-like geologic structures, which utilises the horizontal gradients achieved from the measured magnetic anomaly via filters of consecutive graticule spacings. The main difficulties within these approaches are their sensitivity to noise in data.

Here, we provide usage of the particle swarm algorithm to interpret residual magnetic anomalies measured along a profile of a 2-D inclined dyke-like geologic structure. A residual magnetic anomaly is deduced utilising the second moving average from the observed magnetic anomaly to exclude unwanted regional background up to a 3rd-order degree from the observed anomaly by applying various window lengths (s-values). The objective is to recover the characteristic inclined dyke parameters (dyke geometry parameters; figure 1), which are the magnetic dipole moment (K), depth (z), half-width (w), magnetisation angle (θ), and origin location of the dyke (d). The application of the particle swarm optimiser scheme (section 2) here was done through the utilisation of synthetic experiments (section 6), which include the presence of regional anomaly background and influence of neighbouring anomaly sources with and without random noise. In addition, it was tested on two field cases (section 7) related to mineral exploration from Brazil and Canada. Moreover, section 8 (Discussion) interprets and summarises the results attained from the present method. Finally, Conclusions (section 9) highlight and summarise the objective of the present approach.

Figure 1
figure 1

Schematic diagram for a 2-D inclined dyke and its parameters.

2 The particle swarm scheme

The particle swarm scheme is considered as one of the meta-heuristic optimisation algorithms and is motivated by Kennedy and Eberhart (1995) and has various uses such as technical engineering (Yin et al. 2018), electromagnetics (Ciuprina et al. 2002), clean and solar energy (Gionfra et al. 2019), and engineering design problems (Acitas et al. 2019). Also, it is used in interpreting different geophysics data (Yang et al. 2015; Singh and Biswas 2016; Godio and Santilano 2018; Abdullahi et al. 2019; Essa 2019; Essa and Munschy 2019; Li et al. 2019; Essa and Elhussein 2020; Essa 2021;  Qianwei et al. 2021; Roy et al. 2021; Essa and Diab 2022b; Essa et al. 2022a, b). The approach is explained metaphorically by considering a group of birds going on a trip for food. These birds are considered models; every model has a position and velocity. The process was initiated by giving haphazard models for the swarm employing the limits of the various variables. The velocity and location for all models are iteratively updated by the following formulas:

$${V}_{j}^{k+1}={c}_{3}{V}_{j}^{k}+{c}_{1}{\mathrm{rand}}\left({T}_{\mathrm{best}}-{x}_{j}^{k+1}\right)+{c}_{2}{\mathrm{rand}}\left({J}_{\mathrm{best}}-{x}_{j}^{k+1}\right),$$
(1)
$${x}_{j}^{k+1}={x}_{j}^{k}+{V}_{j}^{k+1},$$
(2)

where \({x}_{j}^{k}\) and \({V}_{j}^{k}\) denote the position and velocity of the particle j, correspondingly, at iteration k; rand denotes a randomised digit between [0, 1]; \({c}_{1} \; {\mathrm{and}} \; {c}_{2}\) are the acceleration coefficients and take a value equal to 2 (Essa et al. 2021); \({c}_{3}\) is an inertial weight that controls the model’s velocity and takes on a value of <1; \({T}_{\mathrm{best}}\) is the best location, which is acquired by a model, while \({J}_{\mathrm{best}}\) is the best global place reached by any model in the swarm. Afterwards, the achieved best solution (\({T}_{\mathrm{best}}\)) and the global best solution \({(J}_{\mathrm{best}})\) are stored in memory. The model’s velocity and place are updated through an iteration procedure, which terminates when the convergence happens (Kennedy et al. 2001; Engelbrecht 2007). The subsequent function is used to reach the convergence:

$${\Psi }_{ob}=\frac{1}{N}\sum_{j=1}^{N}{[{T}_{f}^{O}\left({x}_{j}\right)-{T}_{f}^{c}\left({x}_{j}\right)]}^{2},$$
(3)

where N is the data points, \({T}_{f}^{O}\) is the observed magnetic data and \({T}_{f}^{c}\) is the appraised magnetic data.

3 Forward modelling

The 2-D inclined dyke magnetic anomaly (figure 1) along a profile is given by McGrath and Hood (1970) and Essa and Elhussein (2017):

$$\begin{aligned} T\left( {x_{j } ,z,w, \theta , d} \right) & = K\left[ {\sin \theta \left( {{\text{tan}}^{ - 1} \left( { \frac{{\left( {x_{j} - d} \right) + w}}{z} } \right){-}{\text{tan}}^{ - 1} \left( { \frac{{\left( {x_{j} - d} \right) - w}}{z}} \right)} \right)} \right.\hfill \\ & \quad \left. { - \frac{\cos \theta }{2}{\text{ ln}} \left( {\frac{{\left( {\left( {x_{j} - d} \right) + w} \right)^{2} + z^{2} }}{{\left( {\left( {x_{j} - d} \right) - w} \right)^{2} + z^{2} }}} \right)} \right], \hfill \\ \end{aligned}$$
(4)

where xj is the horizontal observation points, z is the depth, w is the half-width, θ is the magnetisation angle, and K is the magnetic dipole moment, which depends on the magnetic susceptibility.

4 The second moving average method

The total magnetic anomaly involves the impacts of the residual and regional anomalies, which are related to shallower and deeper geologic structures and can be expressed as:

$${T}_{o}\left({x}_{j}\right)=T\left({x}_{j },z,w, \theta , d\right)+{\mathrm{Reg}}\left({x}_{j}\right) , j=1, 2, 3, \dots , N$$
(5)

where \({T}_{o}\left({x}_{j}\right)\) is the measured magnetic field, \(T\left({x}_{j },z,w, \theta , d\right)\) represents the magnetic field of the inclined dyke model (residual) and \({\mathrm{Reg}}\left({x}_{j}\right)\) is the regional anomaly owing to deep structures. One of the furthermost significant challenges in the processing of magnetic data is the elimination of undesirable anomalies. So, the second moving average operator usage has a benefit in this case.

Griffin (1949) is the first one to define the moving average residual magnetic anomaly. The second moving performance is one of the good techniques in unravelling the regional background anomaly proposed by a 3rd-order degree (Abdelrahman et al. 2003a, 2009).

Therefore, the second moving average residual magnetic anomaly is:

$${R}_{2}\left({x}_{j},z,s\right) =\frac {\left (\begin{array}{c}{ 6{T}_{o}\left({x}_{j},z\right)}\\-4{T}_{o}\left({x}_{j}+s,z\right)\\-4{T}_{o}\left({x}_{j}-s,z\right)\\+{T}_{o}\left({x}_{j}+2s,z\right)\\+{T}_{o}\left({x}_{j}-2s,z\right)\end{array}\right)} {4}$$
(6)

where s is the graticule spacings. Moreover, the quantitative interpretation contains quite a long profile length. For short profile length, we overcome this problem by increasing the number of measurement points or increasing number of digitising intervals.

5 Estimation of dyke parameters

The dyke parameters estimation is the main objective of this study. So, the start dyke parameters (K, z, w, θ, and d) were refined and updated through the iteration progression to reach the best-fit anomaly by minimising the least-squares error (RMSE)

$${\mathrm {RMSE}}=\sqrt{\frac{1}{N}\sum_{i=1}^{N}{[{T}_{f}^{O}\left({x}_{i}\right)-{T}_{f}^{c}\left({x}_{i}\right)]}^{2}} .$$
(7)

Finally, figure 2 reveals the flow chart for the offered scheme involves the following steps. (1) Read the magnetic data. (2) Employ the second moving average scheme with several graticule spacings to exclude the influence of the regional field. (3) Apply the particle swarm scheme to every second moving average residual anomaly to appraise the dyke parameters. (4) Compare the forward model (predicted) response, which is obtained from the calculated parameters, with the observed ones. (5) Terminate the process by a suitable closure criterion.

Figure 2
figure 2

The flow chart of the algorithm based on particle swarm optimisation scheme.

6 Synthetic experiment

Here, we include two models to investigate the efficacy of the algorithm.

6.1 Model 1: Presence of regional anomaly background

The 120-m long composite magnetic anomaly (Tc) (black asterisk) composed of a 2-D inclined dyke model (= 1200 nT, θ = 35°, z = 7 m, w = 3 m, and d = 0) (residual; white circles) response combined with a third order regional anomaly (black circles) is shown in figure 3.

Figure 3
figure 3

Inclined dyke model (K = 1200 nT, θ = 35°, z = 7 m, w = 3 m, d = 0, and profile length = 120 m) (white circles) and a 3rd-order regional background (black circles). Upper panel: The misfit. Middle panel: Observed (black and red asterisk) and predicted anomalies (green cross-circles). Lower panel: Geologic section.

The procedure (figure 4) of the interpretation steps involved the separation of residual anomaly by employing the second moving average operator for numerous s-values (s = 2, 3, 4, 5, 6, and 7 m) and the particle swarm process was utilised to find the dyke parameters (table 1). The optimum parameters were obtained after 200 iterations. Also, all parameter ranges are included in table 1 for K (200–2000 nT), z (1–10 m), w (1–10 m), θ (0–90°), and d (–10 to 10 m). Furthermore, the anticipated outcomes for every parameter are explained.

Figure 4
figure 4

Residual anomaly plots for figure 3 (noise-free).

To check the performance reliability of the current approach, we added a 10% noise into the magnetic data of the above-mentioned model (red asterisk) (figure 3). Furthermore, figure 5 illustrates the residual anomalies for s-value equals 2, 3, 4, 5, 6, and 7 m. The predicted dyke parameters by employing the particle swarm scheme for the presumed noisy data are presented in table 1, which demonstrates the average value (ϕ) for K, z, w, θ, and d as 1183.9 nT, 6.9 m, 2.9 m, 34.1°, and 0.1 m, the e-values are 1.3%, 1.4%, 3.9%, 2.5%, and 6.6%, respectively, and the RMSE equals 16.5 nT.

Figure 5
figure 5

Residual anomaly plots for figure 3 (noisy).

Table 1 Numerical results for the synthetic example: model 1 without and with a 10% random noise.

The obtained results demonstrate that the suggested method can produce accurate dyke parameters and is capable of minimising the influence of regional background and noise.

6.2 Model 2: Influence of neighbouring sources

A composite magnetic profile (black asterisk) of 120 m in length due to the inclined dyke (K = 1500 nT, z = 8 m, w = 3 m, θ = 50°, d = 5 m) (white circles), a vertical sheet (K = 2000 nT, z = 8 m, θ = 30°, d = 20 m) (black circles), and a horizontal cylinder (K = 6000 nT, z = 5 m, θ = 55°, d = –35 m) (black triangles) was produced and shown in figure 6.

Figure 6
figure 6

Inclined dyke model (K = 1500 nT, z = 8 m, w = 3 m, θ = 50°, d = 5 m) (white circles) affected by neighbouring structures (thin sheet is black circles and horizontal cylinder is black triangle). Upper panel: The misfit. Middle panel: Observed (black and red asterisk) and predicted anomalies (green cross-circles). Lower panel: Geologic section.

Estimation outlined procedure was implemented. First, the second moving average approach was employed for the combined anomaly utilising several s-values (s = 2, 3, 4, 5, 6, and 7 m) (figure 7). Second, the particle swarm is exploited to assess the dyke parameters (table 2). Table 2 explains that the e-values and the RMSE value are zero.

Figure 7
figure 7

Residual anomaly plots for figure 6 (noise-free).

Table 2 Numerical results for the synthetic example: model 2 without and with a 10% random noise.

To further assess the accuracy of the established scheme, a 10% random was impeded in the combined magnetic field (red asterisk) to scrutinise the attainability of the present approach. Figure 8 illustrates the second moving average residual magnetic anomalies for the equivalent s-values. The particle swarm scheme was exploited to calculate the subsurface dyke parameters (table 2). Table 2 presents the ϕ value for K, z, w, θ, and d, which are 1428.5 nT, 7.4 m, 2.9 m, 44.8°, and 4.6 m, the amount of e-value in each parameter is 4.8%, 8.1%, 3.3%, 9%, and 4.6%, respectively, and RMSE equals 52.1 nT.

Figure 8
figure 8

Residual anomaly plots for figure 6 (noisy).

7 Case studies

To investigate the rationality and the stability of the offered scheme, two published real data sets of mineral exploration case studies from Brazil and Canada. The particle swarm optimisation scheme was implemented to these data to accomplish the optimal fit for the buried dyke parameters (K, z, w, θ, and d) and matched these results with existing geologic information and any additional geophysical outcomes.

7.1 Parnaiba basin field example, Brazil

The Parnaiba basin (figure 9) in the northeast of Brazil is considered a Phanerozoic sedimentary basin in South America. This basin is situated amongst the Amazonian and São Francisco cratons, inspired by moderate dense lithosphere of the request of 160–180 km. The Precambrian crust accumulated and balanced out amid the Neoproterozoic Brasiliano orogeny (McKenzie and Priestley 2008; Cordani et al. 2013; Daly et al. 2014). Fortes (1978) proposed that ‘the structural tectonic history and shape of this basin are identified with the renaissance of prior bedrock structures.’ On the premise of geologic provincial and isotope investigations of a couple of core samples. Neves et al. (1984) suggested ‘the presence of a particular yet hidden bedrock mass underneath the central-western part of the basin, caught amongst the craton of Amazon and Borborema orogenic belt’.

Figure 9
figure 9

Geological map of the Parnaiba basin (blue line) and its Precambrian basement structures (red lines) (after de Castro et al. 2016).

Figure 10 demonstrates the observed magnetic anomaly (black circles) due to a structure meddled in the Paleozoic sediments, Parnaiba, Brazil (Abdelrahman et al. 2003b). The profile length was 22.4 m and digitised 0.385 m intervals. The digitised anomaly was employed to calculate the dyke parameters employing the particle swarm method for available residual anomalies produced from applying the second moving average method (figure 11) utilising s = 0.770, 1.155, 1.540, 1.925, 2.310, and 2.695 m. The particle swarm input parameters are the acceleration values equal to 2, inertia value is 0.8, the number of particles is 50, and 400 iterations. Moreover, the range for each dyke parameter is demonstrated in table 3 as (K = –58.4 nT, z = 3.6 m, w = 2.3 m, θ = 141.4°, and d = 0.6 m) and also the outcomes. The results of the present inversion method matched well with that given in literary works by other approaches (table 4). Figure 10 shows the predicted anomaly (red circles) compared with the real ones (observed anomaly; black circles). The relationship between the observed and the predicted anomalies exhibited that we found a contrast between them. Silva (1989) demonstrates the distinction because of the weathering of the upper part of the thin sheet.

Figure 10
figure 10

Upper panel: The misfit. Middle panel: Observed (black circles) and predicted anomalies (red circles) for the Parnaiba basin field example, Brazil. Lower panel: Geologic section.

Figure 11
figure 11

Residual anomaly plots for figure 10.

Table 3 Numerical results for the interpretation of magnetic anomaly of the Parnaiba basin field example, Brazil.
Table 4 Numerical results achieved compared with other results from different approaches for the Parnaiba basin field example, Brazil.

7.2 Pishabo Lake field example, Canada

The Pishabo Lake is situated in the Cassels Township, District of Nipissing, Ontario, Canada. The north and northwest are characterised by including mafic dykes commonly intruded in the felsic plutonic rocks. These dykes consist of diabase, minor lamprophyre, and plagioclase porphyritic diabase, which are referred to as Matachewan diabase dykes. In addition, this lake is composed of augite, light green and vine, plagioclase, apatite, some biotite, and huge patches of magnetite. Moreover, these dykes are generally 1–3 m wide but reach a maximum of 100 m (Todd 1925; McGrath and Hood 1970; Born 1989; Al-Garni 2017). Naturally, the diabase is huge and fine-to-medium grained with dark grey-green-coloured fresh and weathered surfaces. The minerals consist of actinolite (weakly pleochroic), plagioclase, epidote, quartz, granophyre (plagioclase and quartz intergrowth), per cent chlorite, titanite, and lesser opaque grains.

The magnetic anomaly at Pishabo Lake was described by McGrath and Hood (1970) and Abdelrahman et al. (2003b) (figure 12). The profile has 1760 m length and is digitised using a 22-m sampling interval. The second moving average residual anomalies were attained for s = 44, 66, 88, 110, 132, and 154 m (figure 13) using the elucidation processes described above. The particle swarm scheme was applied to those anomalies to estimate the dyke parameters (table 5). The outcomes in table 4 are; K = 1400.2 nT, z = 308.3 m, w = 74.2 m, θ = 110.3°, and d = 0.2 m.

Figure 12
figure 12

Upper panel: The misfit. Middle panel: Observed (black circles) and predicted anomalies (red circles) for the Pishabo Lake field example, Canada. Lower panel: Geologic section.

Figure 13
figure 13

Residual anomaly plots for figure 12.

Table 5 Numerical results for the interpretation of magnetic anomaly of the Pishabo Lake field example, Canada.

The results attained from the proposed method are matched alongside those of McGrath and Hood (1970), Tlas and Afahani (2011), Abdelrahman et al. (2012), and Essa and Elhussein (2017) (table 6). This table recommends that the approach established here is more beneficial than earlier available methods because it can remove the impeded regional effect and noise in data and execute the optimal buried source parameters with acceptable uncertainties, which are beneficial in exploration geophysics. Figure 12 is explained a judgment amongst the observed (black circles) and predicted (red circles) magnetic anomalies from the proposed method and their misfit.

Table 6 Numerical results achieved compared with other results from different approaches for the Pishabo Lake field example, Canada.

8 Discussion

In synthetic experiments, we initiate this assessment by utilising the number of particles equals 50 because it depends on the number of unknowns, i.e., the ratio between them is the number of particles equal 8–12 times the unknowns.

Our results of synthetic experiments, which included noise and regional anomalies, explain that the proposed method has proficiency in avoiding the noise and regional anomaly background in the collected magnetic data and gives a respectable view for deducing the subsurface dyke parameters (the magnetic dipole moment, depth, half-width, magnetisation angle, and origin location). Besides, the error in each parameter and the RMSE (misfit) reflect the stability in the obtained results. Furthermore, the attained results for two field cases reflected the accuracy of the present method.

Magnetic anomaly in the Parnaiba basin (Brazil) for a structure meddled in the Palaeozoic sediments (figure 10) has been investigated. The attained results for the impeded dyke structure are matched with available geologic and geophysical information (table 4). For example, the depth deduced by Silva (1989) is 3.5 m and our inversion method is 3.6 m. Also, a magnetic anomaly in the Pishabo Lake area (Canada) to detect a Matachewan diabase dykes (figure 12) was studied. The results achieved were compared alongside those of McGrath and Hood (1970), Tlas and Afahani (2011), Abdelrahman et al. (2012), and Essa and Elhussein (2017) (table 6) and found acceptable uncertainties. The patterns of the estimated magnetic anomaly in the two cases matched well the observed anomalies.

Finally, the motivation for exploiting the particle swarm scheme is to capitalise on its benefits in overwhelming the instability and non-uniqueness of the magnetic anomalies inversion. Also, the method is robust and well-organised in attaining a global solution. Synthetic and field cases declared above explain the power of the proposed method.

9 Conclusions

The use of the particle swarm process along with second moving average anomalies, is likely to be beneficial in geophysical exploration because it proposes various advantages, including (i) it eliminates the influence of deep structure (regional anomaly), (ii) it eradicates the weight of neighbouring structures and noise responses, and (iii) it accurately deduces the inclined dyke model parameters. The proposed method is simple, automatic, and does not need any graphical support. The synthetic examples investigated demonstrated that the suggested scheme is stable in terms of noise and neighbouring bodies effect. It has additionally been successfully applied to two real data sets from Brazil and Canada acquired over mineral deposits and produced positive results. From the validation of the results, this method is robust and firm.