Introduction

The main aim of gravity data interpretation in geophysical exploration is to estimate the density distribution and geometrical properties (i.e., shape and location) of the causative bodies. Toward this, gravity inverse modeling plays the final and indispensable role. Solving the gravity inverse modeling problem involves reconstruction of the model parameters from a set of measurements of the gravity anomaly field. The well-known major problems in geophysical inverse problem and specifically with gravity inverse modeling are the non-uniqueness of the solution, lack of depth resolution, and insatiability of the process (Al-Chalabi 1971; Silva et al. 2002). The standard technique to solve such an ill-posed problem, according to the regularization theory (Tikhonov et al. 2013; Zhdanov 2015), is a minimization of a general objective function. The objective function includes two parts where the trade-off between them is controlled by a regularization parameter: a data fidelity or misfit functional which measures how well the predicted data reproduce the observed data and stabilizing functional that stabilize the solution.

The choice of the stabilizing functional, in potential field inversion procedures, depends on the desired model features that are to be recovered. Several types of stabilizing functions have been developed and implemented in potential filed inversion, which mainly fell into two categories. The first category belongs to smooth stabilizing functions which use L2 -norm of the model or gradient of the model parameters (e.g., Li and Oldenburg 1996, 1998; Pilkington 1997; Boulanger and Chouteau 2001; Cella and Fedi 2012). Despite the popularity and the good stability of such methods, the resulting solutions are typically characterized by smooth features especially blurred boundaries (Farquharson 2008; Rezaie et al. 2016). Consequently, these methods have difficulties in recovering blocky structures or non-smooth distributions that have sharp boundaries or abrupt changes in physical properties (Sun and Li 2014; Utsugi 2019).

The second group of the stabilizing functions belongs to a non-smooth stabilizer that uses L1 or L0-norm directly on the model or on the gradient of the model parameters. In contrast to L2 –norm smooth stabilizers the non-smooth stabilizers produce focused and sharp images of the subsurface. Numerous non-smooth stabilizers have been proposed and implemented in geophysical inversion algorithms, for instance, minimum gradient support functional (Portniaguine and Zhdanov 1999), total variation stabilizer (Bertete-Aguirre et al. 2002), exponential stabilizer (Zhao et al. 2016), adjustable exponential stabilizer (Hu et al. 2019), zero-order minimum entropy stabilizer (Rezaie 2019), and a sigmoid stabilizing function (Rezaie 2020). Particularly, the L0-norm stabilizing functional proposed by Last and Kubik (1983), named as compactness constraint, and its generalization the minimum support stabilizer (Portniaguine and Zhdanov 1999; Zhdanov 2002) is a well-known non-smooth stabilizer. Relying on the pioneer work of Last and Kubik (1983) this L0-norm stabilizing functional has been borrowed and applied by a large number of researchers in various inversion methods, while constantly enhancing its efficiency and practicality. For example, in gravity inversion (Lewi 1997; Rezaie et al. 2016; Feng et al., 2020), for magnetic inversion (Stocco et al. 2009; Varfinezhad et al. 2020), direct current resistivity data inversion (Varfinezhad et al. 2022) and for seismic tomography (Ajo-Franklin et al., 2007).

It is well-known that gravity data inversion, like other potential field inversions, has no intrinsic depth resolution. Hence, the depth resolution is a critical problem in gravity inversion. To overcome this problem, several approaches have been proposed by a number of researchers (e.g., Li and Oldenburg 1998; Portniaguine and Zhdanov 2002; Commer 2011; Cella and Fedi 2012). Especially, the depth weighting function proposed by Li and Oldenburg (1996, 1998) is the most popular approach and has been used in numerous potential field inversion methods (e.g., Boulanger and Chouteau 2001; Pilkington 2008; Oldenburg and Li. 2005; Namaki et al. 2011, Cheyney et al. 2015; Rezaie 2020). However, the choice of the parameter (the exponent) in this depth weighting function, which strongly affects the results, needs to be done manually (by trial and error) and there are no set criteria to select this parameter. To resolve this limitation, a new depth weighting function has been introduced in this paper. Simultaneously, an improved gravity inversion method that produces compact and sharp images of the subsurface density distribution is presented using the proposed depth-weighting function. The inversion method is obtained from the minimization of an objective function, which consists of data misfit and L0-norm stabilizing functions, by iteratively reweighted least-squares (IRLS) algorithm.

The paper is structured in such a way that it first introduces the forward and inverse modeling approaches and simultaneously, describes and examines the depth weighting function that has been suggested by Li and Oldenburg, (1996, 1998) by making use of the behavior of gravity kernel. Then a new depth weighting function, which overcomes shortcomings of the former depth weighting function and also effectively counteracts the decay of the gravity kernel, will be discussed. In addition to the effectiveness of the new depth weighting function, its advantage in the automatic determination of its parameters will also be discussed. This depth weighting function will later be incorporated in the improved gravity inversion method. The other improvement is the implementation of the element -by-element physical parameter inequality constraint algorithm. Before a conclusive remark is given, the improved inversion method is evaluated by making use of various synthetic and real data tests. Finally, concluding remarks will be given based on synthetic and real data inversion results.

Methodology

Parameterization of the model

In potential field modeling, the subsurface is commonly represented using digitized finite number of right rectangular prisms (Boulanger and Chouteau 2001; Commer 2011; Vatankhah et al. 2015), because of the simplicity of the approach. As rectangular prisms are used as building blocks for 3D modeling, parallelograms are used as building blocks for two-dimensional (2D) gravity modeling. The 2D approximation of the subsurface model can be obtained from the 3D case by assuming that each rectangular prism is infinitely long in the Y-direction with invariant density, while variations in densities are only allowed along the X and Z directions.

Figure 1 shows the cross section of the 2D discretization of the subsurface under a hypothetical gravity profile. Each rectangular element has known constant size and position as presented in Fig. 1. The density contrasts within each elementary cell are assumed to be a constant, which is prescribed in the forward problem, but an unknown parameter in the inverse problem. This type of 2D discretization has been applied in several 2D gravity modeling methods proposed by a number of investigators (Last and Kubik 1983; Grandis and Dahrin 2014; Vatankhah et al. 2014; Ghalehnoe et al. 2016). In the present work, for the sake of simplicity, we will deal with the 2D problem.

Fig. 1
figure 1

2D discretization of the earth model under the survey area with square cells. Gravity stations at the ground surface are positioned at midpoints of the blocks indicated by the ▽ symbols

Forward modeling

In this work, the forward and inverse gravity modeling are addressed by considering the 2D subsurface model shown in Fig. 1. For this model, the geometry of the model structure remains constant, only the densities of the rectangular blocks are variable parameters. The relationship between the model parameters of each block and the vertical gravitational field data is linear in the way the formulation is subsequently presented. For such discretized model the vertical gravitational attraction caused by each block can be calculated individually. Then the sum of the contributions from each of the individual blocks produces the vertical gravity field data \({g}_{i}\) at \({i}^{th}\) measurement point, which can be given by:

$$g_{i} = \mathop \sum \limits_{j = 1}^{M} a_{ij} \rho_{j} + e_{i } j = 1,2, \ldots \ldots .M,$$
(1)

where M is the number of rectangular blocks, \({\rho }_{j}\) is the density of \({j}^{th}\) rectangular block and it is assumed to be constant within the cell, \({\mathrm{e}}_{\mathrm{i}}\) is a random noise associated with \({\mathrm{i}}^{\mathrm{th}}\) measurement point, \({\mathrm{a}}_{\mathrm{ij}}\) is a kernel matrix element, depends upon the geometry of the discretization, and determines the gravitational influence of the \({\mathrm{j}}^{\mathrm{th}}\) cell on the \({i}^{th}\) observation point. The analytical formula employed for computation of \({a}_{ij}\) for each cell, considering the 2D model (Fig. 1), is given by the following equation (Last and Kubik 1983):

$$a_{ij} = 2\gamma \left[ {\left( {X_{i} - X_{j} + \frac{{\text{d}}}{2}} \right)log\left( {\frac{{r_{2} r_{3} }}{{r_{1} r_{4} }}} \right) + {\text{d}}log\left( {\frac{{r_{4} }}{{r_{3} }}} \right) - \left( {Z_{j} + \frac{h}{2}} \right)\left( {\theta_{4} - \theta_{3} } \right) + \left( {Z_{j} - \frac{h}{2}} \right)\left( {\theta_{3} - \theta_{1} } \right)} \right],$$
(2)

where \(h\) and \(d\) are height and width of each cell, respectively; \({X}_{j}\) and \({\mathrm{Z}}_{\mathrm{j}}\) are the horizontal and the vertical distance from the center of the reference point to the center of the \({j}^{th}\) cell and \(\gamma\) is the universal gravitational constant and:

\(r_{1}^{2} = \left( {Z_{j} - \frac{h}{2}} \right)^{2} + \left( {X_{i} - X_{j} + \frac{d}{2}} \right)^{2}\) \(r_{2}^{2} = \left( {Z_{j} + \frac{h}{2}} \right)^{2} + \left( {X_{i} - X_{j} + \frac{d}{2}} \right)^{2}\).

\(r_{3}^{2} = \left( {Z_{j} - \frac{h}{2}} \right)^{2} + \left( {X_{i} - X_{j} - \frac{d}{2}} \right)^{2}\) \(r_{4}^{2} = \left( {Z_{j} + \frac{h}{2}} \right)^{2} + \left( {X_{i} - X_{j} - \frac{d}{2}} \right)^{2}\),

\(\theta_{1} = {\text{arctan}}\left( {\frac{{X_{i} - X_{j} + \frac{d}{2}}}{{Z_{j} - \frac{h}{2}}}} \right),\; \theta_{2} = {\text{arctan}}\left( {\frac{{X_{i} - X_{j} + \frac{d}{2}}}{{Z_{j} + \frac{h}{2}}}} \right).\)

\(\theta_{3} = {\text{arctan}}\left( {\frac{{X_{i} - X_{j} - \frac{d}{2}}}{{Z_{j} - \frac{h}{2}}}} \right),\; \theta_{4} = {\text{arctan}}\left( {\frac{{X_{i} - X_{j} - \frac{d}{2}}}{{Z_{j} + \frac{h}{2}}}} \right).\)

Here the vector \({\varvec{\rho}}\), which can be written as \({\left[{\rho }_{1},{ \rho }_{2},\dots ..{\rho }_{M }\right]}^{T}\) and \({\varvec{g}}\) that can also be written as \({\left[{g}_{1}, {g}_{2},\dots ..{g}_{N} \right]}^{T}\) represents the density contrast of the rectangular cells and vertical gravity data vectors, respectively. N is the number of available observation points, and \(T\) denotes the vectors transpose. Then the linear forward modeling problem relating the model parameter vector \({\varvec{\rho}}\) to the gravity data vector \({\varvec{g}}\) can be expressed using Eq. 3:

$${\varvec{g}}_{Nx1} = {\varvec{A}}_{NM} {\varvec{\rho}}_{M1} + {\varvec{e}}_{N1},$$
(3)

where \({\varvec{e}}\) represents the N-dimensional noise vector and \({\varvec{A}}\) the N × M kernel matrix with elements [\(a_{ij}\)]; i = 1, 2… N; j = 1, 2,…, M. In the present work the forward modeling that is the calculation of the predicted gravity anomalies (or theoretical data) for a known subsurface density contrast is accomplished using Eq. 3.

Inverse modeling

The principal aim of the gravity inverse modeling is to obtain a geologically reasonable density model based on the given observed gravity data. Since the gravity inverse problem is usually an ill-posed problem, the standard way to determine the model parameters \({\varvec{\rho}}\) is minimizing the following objective function (\(\Phi\)), which is the combination of prediction error or data misfit functional \(({\Phi }_{d})\) and stabilizing functional (\(S(m)\)) and it is given by:

$$\Phi = {\Phi }_{d} + \mu^{2} S\left( m \right)),$$
(4)

where \(\mu\) is the regularization parameter, which controls the relative balance between the stabilizing term and the data misfit. The data misfit functional \({\Phi }_{\mathrm{d}}\) measures how well the predicted data reproduce the observed data, and hence usually defined as a \({L}_{2}\)-norm of difference between observed and computed field (Menke 1989):

$$\Phi _{d} = \left| {\left| {{\mathbf{W}}_{e} \left( {\user2{A}\varvec{\rho } - \user2{g}^{{obs}} } \right)} \right|} \right|_{2}^{2},$$
(5)

where the diagonal matrix \({\mathbf{W}}_{e}\) defines the relative contribution of each individual error to the total prediction error. Depending on the type of desired model features to be recovered through the inversion, there are several choices for the stabilizing functional. Following Menke (1989) the classical weighted \({\mathrm{L}}_{2}\)–norm stabilizing functional can be defined as follows:

$$S\left( m \right) = {\varvec{W}}_{m } \left( {{\varvec{\rho}} - {\varvec{\rho}}_{F} } \right)_{2}^{2},$$
(6)

where \({{\varvec{\rho}}}_{F}\) is a prior reference model vector, and \({{\varvec{W}}}_{m}\) is diagonal weighting matrix. By suitably choosing \({{\varvec{\rho}}}_{F}\) and \({{\varvec{W}}}_{m}\) one can quantify a variety solution with different model features. Using Eqs. 5 and 6 the conventional L2-norm objective function can be formed as:

$$\Phi_{{L_{2} }} = \left| {\left| {{\mathbf{W}}_{e} \left( {\user2{A}\varvec{\rho } - {\varvec{g}}^{obs} } \right)} \right|} \right|_{2}^{2} + \mu^{2} {\varvec{W}}_{m } \left( {{\varvec{\rho}} - {\varvec{\rho}}_{F} } \right)_{2}^{2}.$$
(7)

In Eq. 7, the L2-norm measure is applied on both the data misfit and stabilizing functions. The minimization of this type of L2-norm measure objective function has been widely used in potential filed inverse modeling problems (Li and Oldenburg 19961998; Cella and Fedi 2012). However, as mentioned in the introduction section models recovered from procedures following this approach are usually characterized by smooth features, especially poorly defined boundaries (Farquharson 2008; Utsugi 2019). This is mainly problematic in areas where the geology of the study area is known to have sharp discontinuities such as distinct layering or formation of localized bodies. To deal with such problems designing an objective function that use different measures (i.e., non -L2) for the stabilizing function has dominated the literature over the past few decades. In this paper, to obtain compact and sharp models, the widely used L0-norm measure stabilizing function is used. Following the conventional way, we write \({\Vert {\varvec{\rho}}\Vert }_{0}\) as zero norm (L0-norm) of a vector which refers for the number of nonzero components of the vector \({\varvec{\uprho}}\). Analogous to the \({\mathrm{L}}_{2}\)–norm regularized objective function, presented in Eq. 7, the commonly \({\mathrm{L}}_{0}\)–norm regularized objective function \({\Phi }_{{L}_{0}}\) can be written in the following form:

$$\Phi_{{L_{0} }} = \left| {\left| {{\varvec{W}}_{e} \left( {\user2{A}\varvec{\rho } - {\varvec{g}}^{obs} } \right)} \right|} \right|_{2}^{2} + \mu^{2} {\varvec{\rho}}_{0}.$$
(8)

Inversion algorithms that employ minimization of \({\mathrm{L}}_{0}\)–norm type regularized objective function, similar to the one given in Eq. 8, are known to yield focused and sharp images of the subsurface structures. For this reason, it has been extensively used in several geophysical inversion algorithms, particularly when it can be assumed that the subsurface targets are localized and compact and/or have sharp edges. For instance, it was utilized in the seismic data inversion (Chen et al. 2013; Liu et al. 2018; Dai and Yang 2021), for potential field inversion (Zhao et al. 2016; Meng 2018; Hu et al. 2019; Feng et al., 2020) and many others.

It is well known that the minimization of Eq. 8 is an NP-hard problem so it is very difficult to directly find the solution (Chen et al. 2013; Wang, et al. 2013; Meng 2018). To overcome this difficulty, several approximate mathematical approaches have been developed and employed successfully in a variety of applications. For a comprehensive review of the developed methods and possible applications, the reader can refer to Zhang et al. (2015) and the references therein. Particularly, the iteratively reweighted least-squares (IRLS) algorithm (Chartrand and Yin 2008; Daubechies et al. 2010) is one of the most common techniques and has superior performance in a variety of geophysical inversion methods (e.g., Farquharson 2008; Silva et al. 2009; Stocco et al. 2009; Sun and Li 2014; Gholami and Aghamiry 2017). In the current study, taking the flexibility advantage offered by the IRLS algorithm and using a suitably chosen weighting matrix \({{\varvec{W}}}_{m}\) the solution for Eq. 8 is obtained by minimizing Eq. 7 (Chen et al. 2013; Wang et al. 2019). In other words, the L0-norm minimization is approximated by iteratively re-weighted L2-norm minimization and it is carried out as follows. Minimizing the L2-norm objective function \({\Phi }_{{L}_{2}}\) in Eq. 7 using the standard weighted-damped least-square optimization, the estimated density distribution (\({{\varvec{\rho}}}^{k+1}\)) at k + 1 iteration in matrix notation can be given by (Menke 1989):

$${\varvec{\rho}}^{k + 1} = {\varvec{\rho}}_{F}^{k} + \left[ {\left[ {{\varvec{W}}_{m}^{k} } \right]^{ - 1} {\varvec{A}}^{T} \left( {{\varvec{A}}\left[ {{\mathbf{W}}_{m}^{k} } \right]^{ - 1} {\varvec{A}}^{T} + \mu^{2} \left[ {{\varvec{W}}_{e}^{k } } \right]^{ - 1} } \right)^{ - 1} {\varvec{g}}_{r}^{k} } \right],$$
(9)

where \({{\varvec{\rho}}}_{F}^{k}\) and \({{\varvec{W}}}_{e}^{k}\) are the kth iteration reference density vector and error weighting matrix, respectively. The computation of \({{\varvec{\rho}}}_{F}^{k}\) will be explained in detail in the next subsections. \({{\varvec{g}}}_{r}^{k}={{\varvec{g}}}^{{\varvec{o}}{\varvec{b}}{\varvec{s}}}-{\varvec{A}}{{\varvec{\rho}}}_{F}^{k}\) represents reduced data vector computed at each iteration. The parameter \(\mu\) (Eq. 9) is a nonnegative scalar and controls the tradeoff between the data misfit and the stabilization term. With a small value of \(\mu\), reconstructed models have highly oscillatory artificial structures and a large value of \(\mu\) leads to a big misfit value between the observed and predicted data (Silva and Barbosa 2006). Consequently, choosing an appropriate value of \(\mu\) is crucial to obtain a reasonable model, achieve stability, and also improve convergence. Here depending on the noise level of the data points, a suitable \(\mu\) value is chosen by trial and error (Barbosa and Silva 2006; Silva and Barbosa 2006; Ghalehnoe et al. 2016).

In this work, \({{\varvec{W}}}_{m}^{k}\) is a product of three different diagonal matrices such as L0-norm stabilizer \(\left({{\varvec{W}}}_{{L}_{o}}^{k}\right)\), hard constraint \(\left({{{\varvec{W}}}_{h}}^{k}\right)\) and depth weighting \(\left({{\varvec{W}}}_{zn}\right)\). Mathematically, \({{\varvec{W}}}_{m}^{k}\) is expressed as:

$${\varvec{W}}_{m}^{k} = {\varvec{W}}_{{L_{o} }}^{k} {\varvec{W}}_{zn} {\varvec{W}}_{h}^{k}.$$
(10)

The matrices \({{{\varvec{W}}}_{h}}^{k}\) and \({{\varvec{W}}}_{zn}\) will be described in the next subsections. During the inversion process, except \({{\varvec{W}}}_{zn}\) which has a fixed value during the iterative process, the values of all the other weighting matrices changes at each iteration. The L0-norm stabilizing matrix \({{\varvec{W}}}_{{L}_{0}}^{k}\) applied in this work is the one, which is originally proposed by Last and Kubik (1983) and further developed by Portniaguine and Zhdanov (1999). The diagonal elements of this matrix can be obtained using:

$$\left[ {{\varvec{W}}_{{L_{0} }}^{k} } \right]_{jj}^{ - 1} = \left[ {\rho_{j}^{k} } \right]^{2} + \varepsilon,$$
(11)

where \(\varepsilon\) is a focusing parameter, which determines the compactness of the generated model. A large value of the focusing parameter provides a smooth model, while a very small value leads to the singularity of the stabilizing function (Hu et al. 2019). Thus, in order to obtain a compact model with sharp edges it is very essential to choose an optimal value of \(\varepsilon\) (Zhao et al. 2016). In previous studies for instance the pioneering work of Last and Kubik (1983), and Lewi (1997) the parameter \(\varepsilon\) was assigned a value close to machine precision ( \({10}^{-11}\)to \({10}^{-15}\)). On the other hand, Zhdanov and Tolstaya (2004) introduced a trade-off curve method, similar to the L-curve technique, to select \(\varepsilon\) by calculating model objective for the current model estimate with different values of \(\varepsilon\). However, as pointed out by Ajo-Franklin et al. (2007) setting \(\varepsilon\) to values near machine precision results in severe instability as \({\rho }_{j} \to 0\) and the approach of Zhdanov and Tolstaya (2004) often yields trade-off curves with poorly defined corners. Therefore, it is better to fix \(\varepsilon\) at a reasonable value determined by experience, typically between 1 \({0}^{-4}\) and \({10}^{-7}\) (Ajo-Franklin et al., 2007). Therefore, based on several numerical simulation tests the value 1 \({0}^{-6}\) is assigned for all inversions considered in the present work. Updating the matrix \({{\varvec{W}}}_{{L}_{0}}^{k}\), in Eq. 11, at each iteration and applying in the regularized least square solution (Eq. 9), is exactly equivalent to minimization of the objective function with L0-norm stabilizer in Eq. 8 (Sun and Li 2014). Consequently, L0-norm stabilization that leads to a compact and sharp solution is implemented through the iterative \({{{\varvec{W}}}_{{L}_{o}}}^{k}\). Here, the error weighting diagonal matrix \({{\varvec{W}}}_{e}^{k}\) is computed at each iteration. We adopted the expression that has been proposed by Last and Kubik (1983) and implemented by many authors (e.g., Guillen and Menichetti 1984; Barbosa and Silva 1994; Ghalehnoee et al. 2016):

$${\varvec{W}}_{e}^{k} = diag\left( {{\varvec{A}} {\varvec{W}}_{m}^{k} {\varvec{A}}^{T} } \right),$$
(12)

where \(diag\) stands for diagonal.

Depth weighting

It is widely known that gravity data inversion has no intrinsic depth resolution. As a result of this, the reconstructed model from the inversion process tends to concentrate close to the surface, irrespective of the actual depth of the anomalous body. This is a direct indication of the natural decay of the gravity kernel values with increasing depth from observation locations. The decay of the kernel with depth from the surface observation point is demonstrated in Fig. 2 where panels (a) and (b) display the kernel decay for different cell sizes discretization. The kernel values were calculated using Eq. 2 for a mesh along a single column of cells at a single observation point. In order to overcome this problem various approaches have been developed, by a number of researchers ( e.g., Portniaguine and Zhdanov 2002; Commer 2011; Cella and Fedi 2012). Particularly, the first and the most common approach to counteract the kernel’s decay and hence solve the lack of depth resolution is the depth weighting function introduced by Li and Oldenburg (1996) for 3D magnetic inversion. It has been proved that the application of a weighting function in magnetic inversion prevented the concentration of recovered susceptibility at the surface (Li and Oldenburg 1996). Similarly, Li and Oldenburg (1998) introduced and used a depth weighting function that approximately compensates for the gravity kernel’s decay in gravity inversion. The depth weighting function formerly suggested by Li and Oldenburg (1996, 1998) has the form:

$$w_{z} \left( z \right) = \frac{1}{{\left( {z_{j} + z_{o} } \right)^{{\frac{\beta }{2}}} }},$$
(13)
Fig. 2
figure 2

Comparison of the gravity kernel decay and wz (z) (Eq. 13) directly beneath the observation point for different values of β. The corresponding computed zo values are also presented. Both curves are normalized with their respective maximum value. a Displays for 10 × 10 m cell size discretization. b Displays for 500 × 500 m cell size discretization

where \({z}_{j}\) is the mean depth variable of the jth cell and \({z}_{o}\) and \(\beta\) are adjustable parameters. The parameter \({z}_{o}\) depends on the cell size and the observation height of the data. \({z}_{o}\) is calculated in such a way that the decay of the weighting function mimics the decay of the kernel at an observation point with \({w}_{z}(z)\) for a known value of \(\beta\). The commonly chosen \(\beta\) value is to reproduce the power-law decay of the gravity kernel. Hence based on numerical tests Li and Oldenburg (1998) suggested the β values be \(1.5<\beta \le 2\), and the most acceptable value of β is 2 for gravity inversion. Latter Oldenburg and Li (2005) pointed out that the appropriate value of β used in a particular inversion could be chosen in the range between 1.5 and 2, by finding the best performance of different β values applied on synthetic data from forward models that resembles the expected solution. Nevertheless, the choice of a test model that resembles the real one might not always be an easy task. Cella and Fedi (2012) suggested that a suitable value of exponent β should be the structural index of the anomalous body. In other words, rather than selecting the value of β depending on the decay of the gravity kernel, it can be chosen by relating it with the structural index of the expected geometry of the source body. This implies that the anomalous bodies with different geometry need a specific value of β depending on the structural index which is on the other hand is dependent on a prior information. Accordingly, the limitation of Cella and Fedi (2012) approach is that when a priori information about the geometry of the causative body is not available, the depth of the body may not be adequately recovered (Cheyney et al. 2015). The exponent β is very crucial in determining the final model and there are no other methods mentioned so far on how to choose an acceptable value of β for specific inversion.

Hence, it is extremely important to look for a method that determines an optimal value to get geologically plausible results. Moreover, comparative analysis between \({w}_{z}(z)\) (Eq. 13) and the gravity kernel is also very important, it is only so far being done for the magnetic inversion (e.g., Li and Oldenburg 1996; Oldenburg and Li 2005; Cheyney et al. 2015).

Comparison of the gravity kernel with weighting function (Eq. 13) as a function of depth is shown in Fig. 2. The values for the weighting function were computed for different values of β such as 1.5, 2, as suggested by Li and Oldenburg (1998) and additionally with 1 and 3. Then optimum \({z}_{o}\) value is approximated by using the nonlinear least-squares optimization (Virtanen et al. 2020) between the actual kernel values and \({w}_{z}(z)\) for these β values. The obtained optimum parameters for different cell sizes are also presented in Fig. 2. We can see that \({z}_{o}\) values insignificantly vary with β values for the same cell size. In contrast, comparing the values in Fig. 2a and b, \({z}_{o}\) values dramatically vary with cell size for the same β value. The values for the weighting function were computed using the parameter obtained this way. In Fig. 2 all the values are normalized with respect to their maximum value. As we can see from the figure, \({w}_{z}\left(z\right)\) decays in the same manner as the gravity kernel at very shallow depths, up to about the cell size and then more rapidly in shallower depths greater than the cell size. At higher depths, both curves asymptotically approach 0 value. This is found to be true for all cell sizes. Finally, at deeper depth, it decays smoothly but still at a different rate relative to the gravity kernel. In all the presented cases we notice a significant discrepancy between \({w}_{z}\left(z\right)\) and the gravity kernel especially near the elbow of the curves. As shown in Fig. 2b for large cell sizes the behavior of the weighting function curve becomes the same for all β. Hence, we can say that for large cell sizes the behavior of the curve is independent of β values in ranges \(1<\beta \le 3\). In contrast for small cell sizes, the curve shows some differences for different β values (Fig. 2a). This variation of the characteristic of \({w}_{z}\left(z\right)\) with cell size, could make it hard to choose the best β value for specific inversion. Consequently, this behavior of the weighting function curve may also yield some effect on the inversion result. Moreover, numerical tests that were done for \(\beta =3.5\) and \(\beta =4\), where the results not presented here demonstrate that \({w}_{z}\left(z\right)\) shows different unacceptable characteristics depending on the cell size as compared to the kernel function. Hence, based on the results, here we suggest the appropriate range of β values to be \(1<\beta \le 3\). The usage of the different values of β within this range will be tested with synthetic examples in the next subsections.

Considering the aforementioned shortcomings, it was necessary to modify the depth weighting function (Eq. 13) by introducing a better function that can counteract the natural decay of the kernel functions. Toward this we propose a new depth weighting function \({w}_{zn}\left(z\right)\) which is given by:

$$w_{zn} \left( z \right) = \left( {az_{j} + c_{o} } \right)^{ - \tau}.$$
(14)

Then the diagonal elements of \({{\varvec{W}}}_{zn}\) are given as:

$${\varvec{W}}_{zn} = {\varvec{diag}}\left( {w_{zn} \left( z \right)} \right),$$
(15)

where \({z}_{j}\) is the mean depth variable of the jth cell and \(a\), \({c}_{o}\) and \(\tau\) are adjustable parameters. The optimal values of the three parameters were determined by optimizing \({w}_{zn}\left(z\right)\) to match with the gravity kernel function (the actual kernel values) using nonlinear least-squares optimization (Virtanen et al. 2020). Figure 3 represents, the result of the optimization using Eq. 14, for those two examples in Fig. 2. As it is shown in Fig. 3, the graph of the depth weighting function and the kernel matches very well at all depths for all cell sizes. This is also found to be true in many other tests, whose results are not presented here. Thus, the modified depth weighting function approximates the kernel decay more properly and hence it is more appropriate to compensate for the kernel’s natural decay in a better way at any depths. The implementation of \({w}_{zn}\left(z\right)\) will be tested in the following sections by inverting synthetic and measured data.

Fig. 3
figure 3

Comparison of the gravity kernel and wzn (z) from Eq. 14 directly beneath the observation point. Both curves are normalized with their respective maximum value. a Displays for 10 × 10 m cell size discretization. b Displays for 500 × 500 m cell size discretization

Physical parameter inequality constraint algorithm (PPICA)

Implementation of physical inequality constraints can improve the solution of inverse problems in potential field data by producing stable and geologically plausible results. It is also effective in reducing solution ambiguity (Silva et al. 2001; Oldenburg and Li 2005). Several physical parameter constraint techniques such as the transform function approach (Kim et al. 1999; Lelievre and Oldenburg 2006; Commer and Newman 2008), logarithmic barrier approach (Li and Oldenburg 2003; Oldenburg and Li 2005) and gradient projection approach (Lelièvre et al. 2009) have been proposed and implemented in different inversion schemes.

With regards to compact or focused gravity inversion methods, as compared to the above-cited approaches, a direct upper and lower bound density constraint function is effective and commonly implemented approach (Barbosa and Silva 1994; Portniaguine and Zhdanov 1999; Silva et al. 2009; Meng 2018; Rezaie 2020). Thus, we have chosen to apply the direct minimum and maximum physical parameter (density contrasts) values as a constraint function that provides a powerful means of enforcing the inversion results within a region or unit cell to a geologically reasonable range. This implies that at kth iteration density contrast of each rectangular block must full fill element by element inequality constraint which can be expressed by:

$${\varvec{\rho}}_{min} \le {\varvec{\rho}}_{j}^{k} \le {\varvec{\rho}}_{max},$$
(16)

where \({{\varvec{\rho}}}_{min}\) and \({{\varvec{\rho}}}_{max}\) are the minimum and maximum density limit vectors. Density contrasts of the minimum and maximum bounds of the inequality constraints can be obtained from prior information such as geological maps in conjunction with published density values of rocks, well-logging, and/or laboratory tests. Because the developed inversion method recovers density contrasts not true densities, the minimum and maximum density constraints of each cell must be provided as density contrast values rather than true densities. Density contrasts are determined by subtracting the background density value from the target anomalous density value where both are obtained from a priori information.

In this work, a Physical Parameter Inequality Constraint Algorithm (PPICA) is developed, to incorporate the inequality constraint at each iteration in the inversion process. The inequality constraint algorithm imposes by computing the hard constraint matrix (\({{{\varvec{W}}}_{h}}^{k})\) (Boulanger and Chouteau 2001) and the reference density vector \({{\varvec{\rho}}}_{F}^{k}\) at each iteration as follows:

The diagonal elements of \({{{\varvec{W}}}_{h}}^{k}\) are either \(\varepsilon\) or 1.0. When prior information is available to provide the initial value of density contrast of the \({j}^{th}\) specific cells (\({{\varvec{\rho}}}_{j}^{apr})\), then these values are assigned to the corresponding \({\left[{{\varvec{\rho}}}_{F}\right]}_{j}\). Similarly, the corresponding diagonal elements of \({\left[{{{\varvec{W}}}_{h}}^{k}\right]}_{jj}\) are fixed at \(\varepsilon\). During the inversion process, if the \({j}^{th}\) elements of estimated density values (\({{\varvec{\rho}}}_{j}^{k}\)) fall out of any of the inequality constraint limits defined by \({{\varvec{\rho}}}_{min}\) and \({{\varvec{\rho}}}_{max}\) then \({\left[{{\varvec{\rho}}}_{F}^{k}\right]}_{j}\) and the estimated density values \({{\varvec{\rho}}}_{j}^{k}\) will be fixed at the violated bound density itself and \({\left[{{{\varvec{W}}}_{h}}^{k}\right]}_{jj}\) is fixed at \(\varepsilon\). On the other hand, if \({{\varvec{\rho}}}_{j}^{k}\) did not exceed its bounds (i.e., lies between the limits), then \({\left[{{{\varvec{W}}}_{h}}^{k}\right]}_{jj}\) and \({\left[{{\varvec{\rho}}}_{F}^{k}\right]}_{j}\) will be given a value that amounts to \(1.0\) and \(0.0\) respectively, while the density remains unchanged as \({{\varvec{\rho}}}_{j}^{k}\). Mathematically, in case \({{\varvec{\rho}}}_{j}^{k}\) takes a value beyond the limits can be described as:

$$if~~[\varvec{\rho }^{k} ]_{j} ~ \ge [\varvec{\rho }_{{\max ~}} ]_{j} \left\{ {\begin{array}{*{20}l} {\left[ {\varvec{\rho }_{F}^{k} } \right]_{j} \quad \;\, = [\varvec{\rho }_{{\max ~}} ]_{j} } \hfill \\ {[\varvec{\rho }^{k} ]_{j} \quad \;\;\; = [\varvec{\rho }_{{\max ~}} ]_{j} } \hfill \\ {\left[ {\varvec{W}_{h} ^{k} } \right]_{{jj}} \;\, = \varepsilon } \hfill \\ \end{array} } \right.$$
(17)

or

$$if~~~[\varvec{\rho }^{k} ]_{j} ~ \le [\varvec{\rho }_{{min}} ]_{j} \left\{ {\begin{array}{*{20}l} {\left[ {\varvec{\rho }_{F}^{k} } \right]_{j} \;\;\, = [\varvec{\rho }_{{min}} ]_{j} } \hfill \\ {[\varvec{\rho }^{k} ]_{j} \;\;\;\;\, = [\varvec{\rho }_{{min}} ]_{j} } \hfill \\ {\left[ {\varvec{W}_{h} ^{k} } \right]_{{jj}} = \varepsilon }. \hfill \\ \end{array} } \right.$$
(18)

In general, by employing PPICA, the inversion algorithm will force the value back to the exceeded limit or the known value, when any blocks whose density is known from a priori information or exceeds the density constraint limit. Similarly, using \({{{\varvec{W}}}_{h}}^{k}\) when the density of a block exceeds the density constraint limit, the algorithm will automatically freeze this cell in the next iteration by assigning a very small weight to it. Simultaneously, \({{\varvec{\rho}}}_{F}^{k}\) obtained at each iteration from this algorithm is used to remove the gravity effects of the cells, whose estimated densities are greater than the density constraint limit or equal to the target density, from total gravity anomaly \({{\varvec{g}}}^{{\varvec{o}}{\varvec{b}}{\varvec{s}}}\). This is accomplished by computing the reduced data vector \({{\varvec{g}}}_{r}^{k}={{\varvec{g}}}^{{\varvec{o}}{\varvec{b}}{\varvec{s}}}-{\varvec{A}}{{\varvec{\rho}}}_{F}^{k}\) in Eq. 9 of the inversion algorithm.

Stopping criteria

Stopping the iterative process after an optimal number of iterations is an important aspect of iterative inversion methods. The frequently applied criteria to terminate iterative inversion procedures is based on the \(misfit\) between the observed data and computed data produced by the predicted model (e.g., Rezaie and Moazam 2017; Feng et al. 2018; Rezaie 2020). Accordingly, the iterative inversion process, in the present work, will terminate when one of the following stopping criteria is met:

  • (I) The maximum number of iterations, which is preset by the user (\({k}_{max}\)) is reached;

  • (II) The \(misfit\) in Eq. 19 reaches the required level. In other terms, the condition \({misfit}^{k}\le \delta\) must be fulfilled. Where \(\updelta\) is the target threshold value (the random noise level).

    $$misfit = \left( {\frac{{\mathop \sum \nolimits_{i = 1}^{N} \left( { g_{i}^{obs} - g_{i}^{cal} } \right)^{2} }}{{\mathop \sum \nolimits_{i = 1}^{N} \left( {g_{i}^{obs} } \right)^{2} }}} \right)^{{{\raise0.7ex\hbox{$1$} \!\mathord{\left/ {\vphantom {1 2}}\right.\kern-\nulldelimiterspace} \!\lower0.7ex\hbox{$2$}}}},$$
    (19)

where, \({g}_{i}^{obs}\) is the observed gravity anomaly and \({g}_{i}^{cal}\) the calculated data produced by the predicted model.

Computational procedure for the inversion

The inverse modeling consists of an iterative procedure in which the weighting matrices are changing at each iteration until an acceptable convergence of the solution is obtained. In summary, the iterative process is shown in Fig. 4 and it consists the following steps:

Fig. 4
figure 4

A flowchart showing the iterative inversion process

Input: mesh grid including the measurement points, \({\varvec{A}}\),\({{\varvec{g}}}^{obs}\), \({{\varvec{\rho}}}_{min}\) and \({{\varvec{\rho}}}_{max}\),\(\mu\), maximum number of iterations (kmax).

  1. (1)

    Compute \({{\varvec{W}}}_{zn} or {{\varvec{W}}}_{z}\) and \({{\varvec{A}}}^{{\varvec{T}}}\).

  2. (2)

    At iteration k = 1, solution for \({\varvec{\rho}}\) satisfying the inequality constraints is obtained by using Eq. 9 and setting \({{{\varvec{W}}}_{h}}^{k}\)=\({{\varvec{W}}}_{{L}_{0}}^{k}\)  = I;\({{\varvec{\rho}}}_{F}^{k}\) = zero vector.

  3. (3)

    Forward modeling: compute the predicted gravity anomaly \({{\varvec{g}}}^{cal}\) and then \({{\varvec{g}}}_{r}^{k}\) using the inversion result from the previous iteration.

  4. (4)

    Evaluate \({{{\varvec{W}}}_{h}}^{k}\) and \({{\varvec{\rho}}}_{F}^{k}\) with PPICA using previous iteration result.

  5. (5)

    Compute \({{\varvec{W}}}_{{L}_{0}}^{k}\) using Eq. 11 and subsequently \({{\varvec{W}}}_{m}^{k}\) using Eq. 10.

  6. (6)

    Compute \({{\varvec{W}}}_{e}^{k}\) with Eq. 12.

  7. (7)

    Carrying out the inversion through Eq. 9.

  8. (8)

    Impose the inequality constraints on \({{\varvec{\rho}}}^{k}\) as discussed in the preceding section.

  9. (9)

    Test for stopping criteria. If the stopping criterion is satisfied, the iteration terminates and obtained results are stored and plotted. Or else increment k and go to step 3.

Synthetic model tests

In this section, we verify the efficiency of the proposed inversion method with the new depth weighting function through tests on four different synthetic models. Particularly, the synthetic model tests were performed with two major objectives: The first one is to further practically examine the effect of different values of β in using \({w}_{z}\left(z\right)\) (Eq. 13) and also to validate the usage of β = 1 and β = 3. The optimum \({z}_{o}\) value for all cases is approximated as described above. The second one is to illustrate the practicability of the proposed depth weighting function \({w}_{zn}\left(z\right)\) (Eq. 14) and to evaluate the capability of the method in resolving the position of causative bodies both horizontally and vertically. In each example different cell size digitization was applied in order to test the effectiveness of \({w}_{zn}\left(z\right)\) (Eq. 14) for various cell sizes.

Synthetic model I: Single rectangular block

In the first synthetic model examples, the anomalous source consists of a single rectangular block (Fig. 5). The top of the anomalous block is placed 500 m below the surface. The density contrast of the anomalous rectangular block was set to be \(2000 \frac{kg}{{m}^{3}}\) with zero background density. In this synthetic test, the entire model domain is divided into 60 × 20 = 1200 square cells in the horizontal and vertical directions, respectively. The dimension of each square cell is 100 m × 100 m. The synthetic gravity data were computed at 60 observation points on the surface with a regular sample spacing of 100 m. Then the computed data were contaminated with 3% Gaussian noise.

Fig. 5
figure 5

Results of synthetic data inversion, for anomalous rectangular block, to illustrate the effect of different values of β in using wz (z) and practicability of the proposed depth weighting function wzn (z). The panels from (a) to (c) are results from the inversion of the synthetic data when different values of β were applied in using wz (z) and the panel (d) shows the result with wzn (z). The black solid line indicates the outlines of the true location of the causative body

To make it easier to compare the inversion results in using \({w}_{z}\left(z\right)\) (Eq. 13) and \({w}_{zn}(z)\) (Eq. 14), we perform the inversion by using the two functions separately. At first, the noise-contaminated data were inverted using the described method with the former depth weighting function \({w}_{z}\left(z\right)\). Note that, to illustrate further the effect of different values of β in using \({w}_{z}\left(z\right)\) (Eq. 13), the inversion was performed with different values β within the range \(1.5\le \beta \le 3\). During the inversion, the parameter \(\mu\) was given a value of 0.55 and the minimum density limit for the inequality constraint was chosen as \({{\varvec{\rho}}}_{min}=0.0\) and the elements of the maximum density limit \({{\varvec{\rho}}}_{max}\) were assigned a value of 2000 kg/m3. Keeping all the inversion parameters the same for comparison, the data were then inverted using the proposed depth weighing function \({w}_{zn}(z)\). The three parameters of \({w}_{zn}(z)\) are determined automatically according to the procedure described in the previous section. Figure 5 shows the recovered density models, including the true outline (black solid line) of the anomalous block. In addition, the Root-Mean-Square (RMS) errors of the difference between the data and the predicted data and model recovery RMS (Zhang et al 2012) are calculated to measure the quality of the solution and shown in Table 1.

Table 1 Number of iterations and the RMS errors when applying the developed method with the two depth weighting functions \({w}_{z}(z)\) and \({w}_{zn}\left(z\right)\) for the inversion of the first synthetic example

The inversion results (Fig. 5a-c) obtained with \({\mathrm{w}}_{\mathrm{z}}(\mathrm{z})\) using different β values clearly indicate that the function worked well even after crossing the upper limit which was set to be 2 (Li and Oldenburg 1996) for gravity inversion. This can suggest the possibility of using \({\mathrm{w}}_{\mathrm{z}}(\mathrm{z})\) (Eq. 13) with β = 3. However, different β values produce different results with different qualities (Table 1). As a result, we can infer that the results of the inversion with \({w}_{z}(z)\) (Eq. 13) have a certain degree of dependence on the selection of the exponent β, and the best model produced by the inversion method with \({w}_{z}(z)\) need a suitable β. On the other hand, the new depth weighting function \({w}_{zn}(z)\) with automatic determination of its parameters can yield a reasonable result (Fig. 5d), thus avoiding the problem of choosing the exponent β. As one can see from Table 1 the recovered model using \({w}_{zn}(z)\) has a better quality (i.e., relatively better model recovery with smaller RMS of the data) than the models obtained with \({\mathrm{w}}_{\mathrm{z}}(\mathrm{z})\). Furthermore, the final solution of the inverse problem using both weighting functions has been achieved after the same number of iterations, and also the recovered models are compact and sharp.

Synthetic model II: Vertical and horizontal blocks

For the second synthetic model example, the anomalous source consists of two separate vertical and horizontal rectangular blocks. The anomalous bodies have different sizes and are buried at different depths. The density contrast of the horizontal and vertical blocks ware set to different densities of \(2000 \frac{kg}{{m}^{3}}\) and \(3000 \frac{kg}{{m}^{3}}\) with zero background density. In this synthetic test, the 2D model domain is divided into 50 × 12 = 600 square cells. In order to test the functionality of the method, when large cell sizes are used, a cell size with a dimension of 400 m × 400 m is used in the X and Z directions, respectively. The gravity data were computed on the surface at 50 observation points with a sampling interval of 400 m. Later the computed data were contaminated with 2% Gaussian noise.

Like the previous example, the inversions were performed using the two depth weighting functions \({w}_{zn}(z)\) and \({w}_{z}(z)\) separately. In order to compare the results, we used two different β values such as 1 and 2 when the inversion was performed with \({w}_{z}(z)\) (Eq. 13). Here, the minimum density limits for the inequality constraint were chosen as \({{\varvec{\rho}}}_{min}=0.0\), and the maximum density limit \({{\varvec{\rho}}}_{max}\) was given two different values for two different sections of the model domain. These maximum density values are \(2000 \frac{kg}{{m}^{3}}\) for the left section and \(3000 \frac{kg}{{m}^{3}}\) for the right section. The parameter \(\mu\) was set to be 0.6. In Fig. 6, the inversion results including the outlines of the true boundary of the two blocks (black solid line) are displayed. In addition, Table 2 shows the corresponding misfit RMS and model recovery RMS of the inversions.

Fig. 6
figure 6

Second example inversion results: in each figure (ac) the lower panel shows the density distribution of the synthetic source which consists of two separate vertical and horizontal blocks at different depths. The black solid line indicates the outlines of the boundary of true anomaly. Similarly, the top panel shows the corresponding fits between synthetic data (star dots) and calculated data (line)

Table 2 Number of iterations and the RMS errors when applying the developed method with the two depth weighting functions \({w}_{zn}(z)\) and \({w}_{z}(z)\) for the inversions of the second third, fourth synthetic examples

Comparing the results, the data fit (upper panel) and the recovered models (lower panel), in Figs. 6a and b the function \({w}_{z}(z)\) worked well after crossing the lower limit which was set to be 1.5 (Li and Oldenburg 1996). Besides, Table 2 shows less misfit RMS and model recovery RMS when β = 1 compared with β = 2 which implies in some situations β = 1 may give a better result than β = 2 which is the typical value for gravity inversion. This can indicate the possibility of using \({\mathrm{w}}_{\mathrm{z}}(\mathrm{z})\) (Eq. 13) with β = 1, and the necessity of a suitable choice of β to obtain the best result. On the other hand, the function \({w}_{zn}(z)\) with automatic determination of its parameters produced an acceptable result (Fig. 6c). As shown in Table 2, like the former example the model recovery RMS and the misfit RMS are less when \({w}_{zn}(z)\) is incorporated in the inversion method than when \({\mathrm{w}}_{\mathrm{z}}(\mathrm{z})\) suggesting the better quality of the results when \({w}_{zn}(z)\) was used. In other words, the inversion using \({w}_{zn}(z)\) recovered the causative sources at the depth consistent with the true depth, and with the true model’s boundary adequately. This means that the approach described here is capable of producing physically realistic models, even if the model space has multiple causative sources having different densities and are located at different depths.

Synthetic model III: Vertical and horizontal blocks with negative density contrast

The third synthetic case is composed of two rectangular blocks. The anomalous structures have different dimensions and are located at different depths. The top of the first block is placed at a depth of 400 m and its density contrast is \(-1000 \frac{kg}{{m}^{3}}\) while the top of the second block is placed at a depth of 500 m and has a density contrast of \(1000 \frac{kg}{{m}^{3}}\). The densities of the causative bodies are given relative to the zero density of the uniform background. In this synthetic test, the subsurface was discretized using a mesh of 100 × 20 square cells with dimensions of 100 m × 100 m in the X and Z directions, respectively. The gravity data are computed at 100 data points with a sample spacing of 100 m. The top panel of Fig. 7 (blue stars) shows the gravity anomaly from these models after contaminating it with 2% Gaussian noise.

Fig. 7
figure 7

Gravity anomaly caused by two rectangular structures with different sizes and densities. The anomalous structures are also placed at different depths. The outlines of the true causative bodies are indicated by the black solid line. The panels in the bottom show the model domain and those on the top show the data domain with fits between the synthetic and calculated data

For the current synthetic example, the inversion process was commenced by assigning an initial zero density to each cell and by setting the parameter \(\mu\) = 0.7. The lower bound density constraint \({{\varvec{\rho}}}_{min}\) was set to zero for the right section and \(-1000 \frac{kg}{{m}^{3}}\) for the left part. The upper bound \({{\varvec{\rho}}}_{max}\) was also given two different values for two different sections: zero for the left section and \(1000 \frac{kg}{{m}^{3}}\) for the right section of the model domain. The inversion was again carried out separately using the former (Eq. 13) with β = 1.5, and the proposed (Eq. 14) depth weighting functions. The parameters for the proposed depth weighting functions are once again determined automatically. In Fig. 7 (lower panel) the inverted density models with the outlines of the true bodies overlaid are presented. The corresponding fits between synthetic data (star dots) and calculated data (solid line) are shown in the upper panel. As one can see from the figure, the inversions using both functions \({\mathrm{w}}_{\mathrm{zn}}\left(\mathrm{z}\right)\) and \({\mathrm{w}}_{\mathrm{z}}(\mathrm{z})\) generated acceptable models. The location, geometry, and densities of the synthetic causative bodies that were used to generate the synthetic gravity data are fully recovered. Besides, the fit between noise- contaminated data and predicted responses from the recovered model are acceptable for both cases (Fig. 7). However, as the previous cases, the solution of the inverse problem using \({\mathrm{w}}_{\mathrm{zn}}\left(\mathrm{z}\right)\) has less model recovery RMS and misfit RMS rather than the method that utilizes the \({\mathrm{w}}_{\mathrm{z}}(\mathrm{z})\) function (Table 2). This can suggest that the proposed function (Eq. 14) is suitable for the positive and negative anomaly bodies in producing better results as compared with the former function (Eq. 13).

Synthetic model IV: Three different shaped sources

The fourth synthetic model is rather more complicated including three different geometric bodies that are placed at different depths, with different density contrast values and dimensions. The different shapes, dimensions, and depths of closely located anomalous bodies have been considered to test the vertical and horizontal resolving power of the inversion method, and its capability to recover the true densities of multiple bodies. In the forward modeling the top part of the first body, which is a horizontal rectangular block, is located at 100 m depth and has a density contrast of \(1000\frac{kg}{ {m}^{3}}\). The second body is a vertical block and its top part is located at a depth of 200 m and has a density contrast that amounts to \(2000 \frac{kg}{{m}^{3}}\). The third body is a dipping dyke with a density contrast of \(3000 \frac{kg}{{m}^{3}}\) and its top part is located at a depth of 150 m. The densities of all the causative bodies are given relative to the zero density of a uniform background. In this synthetic test, the model space is constructed using 90 × 20 = 1800 square cells with side lengths of 50 m in X and Z directions. The gravity data are then computed on 90 data points with a sample spacing of 50 m.

To demonstrate the strength of the method in recovering the true density, we first inverted the noise-free data obtained from the forward model, and the result is presented in the bottom panel of Fig. 8a. The noise-free computed gravity data (the black stars) and the model generated one (the black solid line) are presented on the top panel of Fig. 8a. Later the computed gravity data were contaminated with uncorrelated 2% Gaussian noise. These data are shown with black stars on the top panel of Fig. 8b. The inversion process was initialized by assigning an initial zero density to each cell and by setting the value of \(\mu\) = 0.5. The lower bound for the inequality constraint \({{\varvec{\rho}}}_{min}\) is set to zero for both cases, whereas the upper bound density constraint \({{\varvec{\rho}}}_{max}\) was defined based on the location of the expected anomalous bodies. These \({{\varvec{\rho}}}_{max}\) values are: \(1000 \frac{kg}{{m}^{3}}\) for the left section, \(2000 \frac{kg}{{m}^{3}}\) for the middle section, and \(3000 \frac{kg}{{m}^{3}}\) for the right section of the model domain. The density model, recovered with the improved inversion method that makes use of the new depth weighting function, together with the outlines of the true causative bodies (black solid line) are presented in the lower panel of Fig. 8a and b. The corresponding fits between synthetic data (star dots) and calculated data (solid line) are shown in the upper panels of the same figures.

Fig. 8
figure 8

The fourth synthetic model and the model obtained for three separate anomalous bodies having different shape and density contrast and located at different depths. The outlines of the true bodies are indicated by the black solid line in the recovered mod model. Where the top panel shows the corresponding fits between data and predicted data. Inversion was performed using the proposed depth weighting function wzn (z)

As shown in Fig. 8, the level of the data fit is completely perfect for the one without noise and it is very good for the one that is contaminated with noise. Looking at the recovered density distributions, one can conclude that the inversion method, which makes use of the new depth weighting function, has delivered an excellent result. It leads to a very good data fit within the noise level that has been used to contaminate the data. Both the top and the bottom depths are determined adequately including the horizontal extent of the bodies. The density contrasts of all the shallower and deeper sources are also recovered sufficiently. The results from this example, therefore confirm the capability of the method in producing geologically reasonable models, in case multiple bodies with different densities, shapes, sizes, and locations are present in the subsurface. Furthermore, like the previous examples, the recovered models are compact and have sharp boundaries.

Based on the synthetic tests presented above, we suggest to use β = 1 and β = 3 in the inversion of gravity data, if one prefers to use the function \({w}_{z}(z)\) (Eq. 13). This implies that the appropriate range of β values for gravity inversion is \(1<\beta \le 3\). The synthetic inversion done with different β values, also suggests that in applying \({w}_{z}(z)\), which is given in Eq. 13, the appropriate β value is a critical parameter not only to locate the recovered model at the proper depth, but also in recovering the density distribution. Hence, it is very important to choose an appropriate value for β depending on the depth of anomaly. For shallow depth anomalies, small values of β shall be used and large values of β for deep anomalous source reconstruction are recommended. This is, however, true if we only have prior information about the depth of the causative bodies. As mentioned in the previous sections and as per the result of the synthetic data inversion the major limitations of using \({w}_{z}(z)\) are: (I) the selection of the appropriate value of β through trial and error is tedious and challenging and (II) even if we are able to select the appropriate β value, the inversion algorithm may lead to an unrealistic solution when the anomalous sources are placed at some specific depths, due to the difference in rate decay between the kernel and the depth weighting function. This is also pointed out by Barbosa et al., (2002). On the other hand, using the improved depth weighting function \({w}_{zn}(z)\) reproduces a geologically acceptable model no matter where the sources are located. Therefore, according to the results, we can say that using \({w}_{zn}(z)\) as given in Eq. (14) can reduce the problem that might be caused by inappropriate choice β as in the case of \({w}_{z}(z)\). The function \({w}_{zn}(z)\) becomes even more advantageous when we do not have prior depth information because all the parameters are obtained through optimization between the weighting function and the gravity kernel. This way of implementation of \({w}_{zn}(z)\) can avoid the inconvenience in choosing appropriate β and the process is not tedious. In general, all the synthetic test results demonstrate the successful implementation of the improved methodology in producing geologically reasonable compact models with sharp boundaries and also confirm the efficiency and effectiveness of the proposed depth weighting function \({w}_{zn}(z)\).

Real data example

In this section, we illustrate the practicality and robustness of the suggested approach by applying it to a real gravity data.

Woodlawn ore body

As a field example, we have inverted gravity data that were collected over Woodlawn orebody, New South Wales, Australia (Templeton 1981). The Woodlawn orebody, which has a complex shape and it contains a massive sulfide deposit. Based on a priori information, the average estimated density of the footwall (host rock) ore is \(2900 \frac{kg}{{m}^{3}}\), and of the massive sulfide ore is of about \(3900 \frac{kg}{{m}^{3}}\). Hence, the target density contrast is equal to \(1000 \frac{kg}{{m}^{3}}\) which is the difference between host rock and the massive sulfides ore body. Further detail about the measurement and geology of the area can be found in Whiteley (1981). In our case, the residual anomaly data used to perform the inverse modeling is obtained, by digitizing the data in Fig. 7a of the paper by Last and Kubik (1983). The profile length is about 305 m and the residual anomaly on this profile was digitized at regular intervals of 5 m producing a total of 61 measurement points. The top panel of Fig. 9 displays this digitized residual anomaly, which is presented using stars, over the Woodlawn massive sulfide ore body.

Fig. 9
figure 9

Inversion results of real gravity data from Woodlawn ore body, New South Wales (after Last and Kubik, 1981). The top panel shows the observed gravity data (blue star dotes) and the calculated data from inverse model (solid line). The bottom panel on the other hand represents the recovered density model and the outlines of the ore body indicated by the red solid line. The Inversion was performed using the improved weighting function using wzn (z), as given in Eq. 14

The subsurface model containing the ore body was discretized into 61 × 30 = 1830 rectangular cells with dimensions 5 × 5 m in the X- and Z-directions, respectively. Using the procedure described above the new depth weighting function (Eq. 14) is incorporated in the inversion process with its automatically determined parameters. The inversion was commenced by using the parameter \(\mu =0.6\). Based on the prior information, the lower and the upper density bounds of the cells are taken as \({{\varvec{\rho}}}_{min}=-600.0 \frac{kg}{{m}^{3}}\) and \({{\varvec{\rho}}}_{max }=1000 \frac{kg}{{m}^{3}}\). The given upper density bound is similar to the target density contrast. The maximum number of iterations was set to 20. In Fig. 9 the final reconstructed.

Density model and its gravity response using the proposed inversion methodology are displayed. Figure 9 top panel shows the fit between the observed data (blue stars) and the gravity response of the density model resulted from the inversion process (red solid line). As one can see from the figure, there is good agreement between the observed gravity data and the inverse model-generated data. The bottom panel in Fig. 9 depicts the final recovered density model together with the outlines (solid line) of the massive sulfide ore body, which is verified by drilling (Templeton 1981). As depicted in the figure, the recovered density distribution is compatible with the real density contrast of the subsurface that is obtained from prior information. The extent, position, and dip of the sulfide ore body are defined adequately except at the upper part of the ore body. As it can see from the data, this is due to the absence of high frequency information on the measured data at this particular location. Therefore, this can be taken as additional evidence that the proposed method works properly and that it can be effectively applicable to real data.

Conclusion

In this paper, we have presented an improved gravity inversion method that can recover sharp discontinuities and blocky features such as distinct layering or formation of localized bodies in the subsurface. The developed method is based on the minimization of an objective function, which comprises L2-norm data misfit and L0-norm stabilizing functions, by iteratively reweighted least-squares (IRLS) algorithm. The main contribution of the improved method is a newly introduced depth weighting function that counteracts the natural decay of the kernel appropriately, for various cell size discretization, so that the inversion results can provide realistic depth information. A crucial feature of the depth weighting function is the automated determination of its parameters using the standard optimization method before the inversion process is commenced. This is a significant advantage to avoid the selection of the parameter β through trial and error, using the previously proposed function, whenever there is no a priori depth information. Apart from this, to impose the physical inequality constraints on density contrasts from the inversion process an efficient algorithm named Physical Parameter Inequality Constraint Algorithm (PPICA) has also been developed and incorporated in the inversion procedure. The PPICA allows enforcing localized density constraints at different localities of the model space to allow the recovery of multiple causative bodies having different densities.

To verify the applicability and effectiveness of the new depth weighting function, we carried out inversion of synthetic and real data tests. The inversion of synthetic data sets, contaminated with different noise levels, from multiple and complicated geometry sources revealed that the method has successfully recovered the causative subsurface densities. The results also reveal that the method has an adequate resolution capability in the vertical and lateral directions. Moreover, the inversion results of real data sets also confirmed the practicality and effectiveness of the presented method in producing geologically acceptable models which were confirmed through drilling.