Next Article in Journal
Effect of Adding Waste Polyethylene and GGBFS on the Engineering Properties of Cement Mortar
Next Article in Special Issue
Disaster Precursor Identification and Early Warning of the Lishanyuan Landslide Based on Association Rule Mining
Previous Article in Journal
An Improved Shoulder Line Extraction Method Fusing Edge Detection and Regional Growing Algorithm
Previous Article in Special Issue
Submarine Landslide Susceptibility and Spatial Distribution Using Different Unsupervised Machine Learning Models
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Parallel Computation for Inversion Algorithm of 2D ZTEM

1
School of Information Engineering, China University of Geosciences, Beijing 100083, China
2
School of Geophysics and Information Technology, China University of Geosciences, Beijing 100083, China
*
Author to whom correspondence should be addressed.
Appl. Sci. 2022, 12(24), 12664; https://doi.org/10.3390/app122412664
Submission received: 9 November 2022 / Revised: 4 December 2022 / Accepted: 5 December 2022 / Published: 10 December 2022

Abstract

:
ZTEM refers to the Z-axis tipper electromagnetic method. The ZTEM method is an airborne magnetotelluric sounding method based on the difference in rocks’ resistivity using the native electromagnetic field. The method is effective in exploring large-scale structures when the ground is fluctuant. The paper introduces the inversion algorithm of 2D ZTEM named the conjugate gradient method. This method, which avoids solving the Jacobi matrix, is very effective but not effective enough when the model is divided into a big grid. This study can perform further computation using parallel computation and then receive the processed data. We compare the results of the serial algorithm with the result of the parallel algorithm, which proves that the parallel algorithm is correct. When the number of processes is between three and six, the speedup ratio is between 1.74 and 3.19. It improves the effectiveness of the parallel algorithm of 2D ZTEM.

1. Introduction

The ZTEM (Z-axis tipper electromagnetic method) method is a native electromagnetic field exploration method. The ZTEM method is developed based on the MT. The abbreviation of magnetotelluric is MT. We can collect magnetic data in a helicopter using the ZTEM method. The method has special advantages in mineral deposit exploration and environmental exploration [1,2,3]. We need to spend a great deal of time collecting MT data on the ground when the MT method is applied to explore the area. If we can collect data in a helicopter, we can save more time and money. It is very difficult to collect data on the electric field, but tipper data are available from a helicopter. The tipper is the ratio of the vertical magnetic field and horizontal magnetic field.
With the development of this instrument, MT data processing technology has matured. The ZTEM method became possible. Domestic and foreign researchers have conducted research on the ZTEM inversion. Xu Zhibo performed research on 2D ZTEM inversion [4], Li ziqiang performed research on 3D ZTEM [5], Gu performed research on a parallel algorithm of 3D MT inversion [6], Holtham conducted research on 3D ZTEM inversion [7], and Sasaki conducted research on 3D ZTEM [8]. The research on the parallel algorithm of 2D ZTEM inversion is limited, so it is essential to perform research on the parallel algorithm of 2D ZTEM inversion. Two-dimensional conjugate gradient inversion is an effective method. The model is divided into m columns and n rows. When the number is large, more computation time is required. The model is divided into 400 × 400 in this paper, and the run time is 9804 s. We need to develop a parallel algorithm to solve the problem. First, we introduce the parallel algorithm.
The rest of this paper is organized as follows. Section 2 introduces 2D modeling and inversion. Section 3 introduces the MPI technology and how to realize the parallel algorithm. Section 4 shows the results and analysis of the parallel algorithm. Section 5 summarizes this paper and proposes an outlook for future work.

2. 2D ZTEM Forward Modeling and Inversion

2.1. ZTEM Forward Modeling

According to the convention of the 2D ZTEM problem, the earth is regarded as a Half space conductor ( z 0 ) and the insulated air layer is above the earth. The electromagnetic field source is above the ground (z = −j). The ZTEM vertical field is collected in different positions using the MT method, and the horizontal field is the same as in the MT method.
(1)
Math-physical model
The Maxwell equation differential form is expressed as:
× E = i ω μ 0 H
× H = σ E
Usually, a Descartes rectangular coordinate system is used. The origin of the coordinate is on the ground, the z-axis is straight down, and the y-axis is horizontal. E is the electric field, H is the magnetic field, μ 0 is the magnetic conductivity, σ is the conductivity, and ω is the angular frequency. There are two polarization models in Maxwell equations.
We set the height of the helicopter as h, and the positive z-axis is down to the earth in the coordinate system. The tipper T is as follows:
Hz = TzxHx + TzyHy
Because the Hz is only in the TE mode, Equation (3) is simplified as:
Hz = TzyHy
(2)
The finite differential method is used to solve the 2D ZTEM forward model problem
We use the finite differential method to determine the 2D ZTEM forward modeling problem. The main work of the forward problem is to solve the partial differential equation. We set the boundary condition of the equation, and we can obtain the result of the problem.
K v = s
K is the coefficient matrix. v is the magnetic field. s is the right vector of the equation. We solve the equation and obtain the magnetic field. Finally, we can obtain the tipper.

2.2. 2D Inversion Modeling

The forward model is as follows:
d = F ( m ) + e
d is the data vector, m is the model vector, e is the error vector, and F is the forward function [9,10,11].
The data vector d = d 1 , d 2 , , d N T , d i is the tipper in an observation point. The model vector is m = m 1 , m 2 , , m M T . The number of the grid is M, and m j is the resistivity of the unit.
The objective function is as follows:
ψ ( m ) = ( d F ( m ) ) T V 1 ( d F ( m ) ) + λ m T L T L m
λ is the regularization parameter; V is the variance of error vector e; the matrix L is the Laplace operator. The first item is the data-fitting difference, and the second item is the model-smoothing item [12,13,14].
Because a great deal of time is spent computing the Jacobi matrix, in order to save run time, the non-linear conjugate gradient inversion algorithm avoids computing the Jacobi matrix. It computes the product of the Jacobi matrix (or the Jacobi transpose matrix) and a vector x. We need to perform two pseudo-forwards and then obtain A T V 1 e and Ap. Figure 1 shows the flow chart of inversion.
This requires a great deal of time to compute the conjugate of the object function g = 2 A T V 1 e + 2 λ L T L m and f = A p . When we obtain the value of A T V 1 e and A p [15], we can obtain the step length α and update the model m = m + α p .

3. Parallel Algorithm

3.1. MPI Technology

We can realize data casting, sending, receiving, and synchronizing. The MPI supports several data types [16], including complex. The MPI program is one program, but every process can perform different computations. Every process has an ID, and we can allocate tasks to every process by ID.
The variable’s name is the same, but the values of the variables in different processes can be different. If the processes want to share the data, they need to communicate with each other.

3.2. Parallel Algorithm of ZTEM Inversion

The algorithm needs to perform the calculation many times. A calculation has three parts, namely, solving the equation forward (obtaining the value of T), the first pseudo-forward solution to the equation of inversion (obtaining the value of Aty), and the second pseudo-forward solution to the equation of inversion (obtaining the value of Ap). We analyzed the algorithms of forward and inversion and found that solving the equation is the main work and costs a large proportion of the running time. As with six frequencies, when the frequency is different, we can obtain the k, and k is also different. K is in the equation kv = s. In order to obtain the new m, we need to solve the equation 18 times in an iteration process. When there are three processes in the algorithm, every process needs to solve the equation six times. The process needs to solve the equation 18 times in the serial algorithm. The process in the parallel program needs to do less work than the serial program, so the parallel program needs less time to execute the inversion algorithm than the serial program. Therefore, the parallel efficiency is higher [17].
The six frequencies are freq(1)…freq(6) 400, 200, 100, 50, 20, and 10 Hz. When the frequency is higher than other frequencies, solving the equation needs less time. Two kinds of processes exist in the algorithm. One is the main process and the other is the subprocess. The 0 process is the main process. It owns the global data, distributes the work, sends the data, receives the data, and writes the result files. The subprocesses receive data from the 0 process, perform the work, and send the result to the 0 process. When there are three processes in the parallel program, the 0 process is the main process and the first and second processes are the subprocesses. The 0 process also needs to perform the work in the algorithm. We will introduce the main procedure.
(1)
MPI_INIT(), In the MPI environment. The main process reads the file, obtains the frequencies, models the information, and observes the data. MPI_Bcast() is the main process, which broadcasts the data to the other processes. The beginning resistivity of the object model is set as the background resistivity.
(2)
In Table 1, the allocated frequencies and process ID information are shown. Every process needs to solve the equation of the relevant frequencies separately. We obtain the apparent Tipper of the observed point after solving the forward equation. We obtain the A T V 1 e (the symbol is named aty_mpi in the program). In MPI_recv(), the main process obtains the moderestm_all and aty_all of other processes. Aty_all has six vectors of different frequencyies. Aty is the sum of six vectors. Mode_restm_all has six modrestm_mpi, and the sequence is 1, 2, 3, 4, 5, and 6. Then, we obtain the modrestm to continue computing.
In MPI_Bcast(), the main process broadcasts the data, including m and Aty, to the other processes.
(3)
After computing the value of object function ψ , the main process can obtain the rms. If rms is less than 1.5, we proceed to step 4; otherwise, we compute the second pseudo-forward equation. Every process needs to perform computing separately. Process can obtain the Ap_mpi. MPI_recv(), and the main process receives Ap_mpi from the other processes. The process puts it together and obtains the value of Ap_all. Ap_all has six Ap_mpi, of which the order is 1, 2, 3, 4, 5, and 6. We obtain the Ap. In MPI_Bcast(), the main process broadcasts Ap to the subprocesses, and we obtain the value of step length α . We can obtain the new model m = m + αp, go to step 2.
(4)
The main process writes the m data in the result file. In MPI_FINALIZE(), we finish the parallel environment. The flow chart of the parallel computing of 2D inversion is shown in Figure 2.

3.3. Computing Environment

The program is developed in the environment as shown in Table 2.

4. Results

4.1. Two Low Resistivity Targets Model

The depth of the object rock is 350 m from the ground, and both of the objects are 300 m × 350 m. The width is 300 m, and the height is 350 m. The background resistivity is 100 Ω · m . The object rock’s resistivity is 10 Ω · m . The distance between the two objects is 900 m. H z data are collected in the air above the horizon. The height is 100 m. H y data are collected on the ground. The size of the model’s grid is 400 × 400, and the observed points are from point 1 to point 70 on the ground. The six frequencies range from 400 Hz to 10 Hz. We obtain the forward result including the tipper’s real part and imaginary part from the parallel program.
In Figure 3, the horizontal axis is in the point position, and we choose points 12, 14, 16…68, and 70 to draw the figure. When the frequency is 50 Hz, we set the result of the real part’s computation to o and set the result of the real part’s parallel computation to +; the result is the same. We set the result of the imaginary part’s computation to , and set the result of the imaginary part’s parallel computation to *; the results are the same.
Figure 4 shows the inversion figure of parallel computation.
We set 5% of the forward data as the random error. We add the random error to the forward data and obtain the synthetic data. We take the synthetic data as the collected data and perform inversion computation. When the rms is less than 1.5, we stop the inversion and obtain the inversion result. The color bar value indicates the resistivity. The background resistivity is 100 Ω · m . The object rocks’ resistivity is 10 Ω · m . We can determine that the program’s result shows two object rocks‘ positions correctly, and the value of resistivity is approximately 10 Ω · m in the figure.

4.2. Proving the Validity of the Program

We analyze the serial program and find that the program calculates the equation of different frequencies separately, so the parallel algorithm distributes the work to every process and receives a result from every process. The parallel calculation result is the same as the result of the serial algorithm. The study compares the forward result of the two algorithms in Figure 3, and the data are the same. Figure 4 is the inversion result. We can observe that the experiment results show the object rocks’ positions, sizes, and resistivity values correctly, so it proves the validity of the algorithm.

4.3. Parallel Efficiency

In order to evaluate the efficiency of the parallel program for different nodes, we calculate parallel speedup and parallel efficiency. Parallel speedup is the time of serial program/the time of parallel for N processes; parallel efficiency is the parallel speedup/the number of processes N. Table 3 shows the statistics of the time for the algorithm of 2D ZTEM forward modeling and inversion.
We can observe that the efficiency of the three processes is higher than the efficiency of the six processes in Table 2. The speedup changes and the efficiency decreases when the number of processes in the experiment is six. This is because the higher the number of processes, the more time exchanging data the processes need. Every process needs to perform computation. The computation of higher frequencies needs less time and the computation of lower frequencies needs more time. The process that performs high-frequency computation needs to wait for the process that performs the low-frequency computation. When the number of processes is six, the efficiency is lower than when the number is three. We will perform further study on the parallel algorithm.

5. Conclusions and Future Work

The computation of 2D ZTEM requires a great deal of time, so determining how to save the running time is key to this problem. We found that the parallel method can solve the problem. This study designed the parallel algorithm for 2D ZTEM forward and inversion in windows os. The experiment proved that the algorithm is correct and efficient. We will perform further study for 3D ZTEM forward and inversion based on the study.
Future work will mainly include two aspects: (1) We will optimize the algorithm with openMP and MPI mixed programming by performing an experiment, recording the running time, and calculating the efficiency of the mixed programming. Furthermore, (2) We will design the parallel algorithm for 3D ZTEM inversion.

Author Contributions

Conceptualization, H.T.; methodology, M.W. and H.T.; software, M.W.; validation, C.L. and M.P.; writing—original draft preparation, M.W.; writing—review and editing, Y.W. and M.P.; supervision, Y.W. All authors have read and agreed to the published version of the manuscript.

Funding

This study was supported by research grants from the State Key Program of National Natural Science Foundation of China (No.41830429).

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

Data sharing is not applicable.

Conflicts of Interest

The authors declare no conflict of interest. The funders had no role in the design of the study; in the collection, analyses, or interpretation of data; in the writing of the manuscript, or in the decision to publish the results.

References

  1. Tan, H.; Yu, Q.; John, B.; Wei, W. Three-dimensional rapid relaxation inversion for the magnetotelluric method. Chin. J. Geophys. 2003, 46, 850–855. (In Chinese) [Google Scholar] [CrossRef]
  2. Newman, G.A.; Recher, S.; Tezkan, B.; Neubauer, F.M. 3D inversion of a scalar radio magnetotelluric field data set. Geophysics 2003, 68, 791–802. [Google Scholar] [CrossRef]
  3. Sasaki, Y. Three-dimensional inversion of static-shifted magnetotelluric data. Earth Planets Space 2004, 56, 239–248. [Google Scholar] [CrossRef] [Green Version]
  4. Xu, Z.H.B. Research of 2D ZTEM Forward Modeling and Inversion with Uneven Topography; China University of Geosciences: Beijing, China, 2016. [Google Scholar]
  5. Li, Z.Q. Research on ZTEM 3D Forward Modeling and Inversion; China University of Geosciences: Beijing, China, 2016. [Google Scholar]
  6. Gu, G.W.; Wu, W.L.; Liang, M. The design and realization of 3D MT parallel algorithm. Geophys. Geochem. Explor. 2014, 38, 601–606. [Google Scholar]
  7. Holtham, E.; Oldenburg, D.W. Three-dimensional inversion of ZTEM data. Geophys. J. Int. 2010, 182, 168–182. [Google Scholar] [CrossRef] [Green Version]
  8. Sasaki, Y.; Yi, M.-J.; Choi, J. 3D inversion of ZTEM data from uranium exploration. ASEG Ext. Abstr. 2013, 2013, 1–4. [Google Scholar]
  9. Zhdanov, M.S.; Tolstaya, E. Minimum support nonlinear parametrization in the solution of a 3D magnetotelluric inverse problem. Inverse Probl. 2004, 20, 937–952. [Google Scholar] [CrossRef]
  10. Siripunvaraporn, W.; Uyeshima, M.; Egbert, G. Three-dimensional inversion for Network- Magnetotelluric data. Earth Planets Space 2004, 56, 893–902. [Google Scholar] [CrossRef]
  11. Siripunvaraporn, W.; Egbert, G.; Lenbury, Y.; Uyeshima, M. Three-dimensional magnetotelluric inversion: Data-space method. Phys. Earth Planet. Inter. 2005, 150, 3–14. [Google Scholar] [CrossRef]
  12. Hu, Z.Z.; Hu, X.Y. Review of three dimensional magnetotelluric inversion methods. Prog. Geophys. 2005, 20, 214–220. (In Chinese) [Google Scholar]
  13. Mackie, R.L.; Madden, T.R. Three-dimensional magnetotelluric inversion using conjugate gradients. Geophys. J. Int. 1993, 115, 215–229. [Google Scholar] [CrossRef] [Green Version]
  14. Siripunvaraporn, W. Three-Dimensional Magnetotelluric Inversion: An Introductory Guide for Developers and Users. Surv. Geophys. 2012, 33, 5–27. [Google Scholar] [CrossRef]
  15. Lin, C.H.; Tan, H.D.; Tong, T. The possibility of obtaining nearby 3D resistivity structure from magnetotelluric 2D profile data using 3D inversion. Chin. J. Geophys. 2011, 54, 245–256. (In Chinese) [Google Scholar] [CrossRef]
  16. Zhang, W.S.; Xue, W. MPI on Parallel Programming Tutorial; Qinghua University Press: Beijing, China, 2009. [Google Scholar]
  17. Maris, V.; Wannamaker, P.E. Parallelizing a 3D finite difference MT inversion algorithm on a multicore PC using OpenMP. Comput. Geosci. 2010, 36, 1384–1387. [Google Scholar] [CrossRef]
Figure 1. The flow chart of inversion.
Figure 1. The flow chart of inversion.
Applsci 12 12664 g001
Figure 2. The flow chart of parallel computing for 2D magnetotelluric.
Figure 2. The flow chart of parallel computing for 2D magnetotelluric.
Applsci 12 12664 g002
Figure 3. Forward result figure.
Figure 3. Forward result figure.
Applsci 12 12664 g003
Figure 4. Inversion figure.
Figure 4. Inversion figure.
Applsci 12 12664 g004
Table 1. The allocated frequencies.
Table 1. The allocated frequencies.
Process IDThe Frequency
0freq(1), freq(2)
1freq(3), freq(4)
2freq(5), freq(6)
Table 2. Development environment.
Table 2. Development environment.
OS:Win10Develop language:fortran
CPU:intel core i7 2.9 GHz support 8 processesCompiler:visual studio 2019
Memory:16 GBParallel environment:oneAPI HPC
Table 3. The statistics of the time for the algorithm.
Table 3. The statistics of the time for the algorithm.
The Mode of ProgramThe Amount of ProcessesThe Amount of the Frequency Distributed for ProcessThe Running Time of Program (s)Parallel SpeedupParallel Efficiency
Serial program169804emptyempty
Parallel32, 2, 256321.7458%
program61, 1, 1, 1, 1, 130693.1953.2%
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Wang, M.; Tan, H.; Wang, Y.; Lin, C.; Peng, M. Parallel Computation for Inversion Algorithm of 2D ZTEM. Appl. Sci. 2022, 12, 12664. https://doi.org/10.3390/app122412664

AMA Style

Wang M, Tan H, Wang Y, Lin C, Peng M. Parallel Computation for Inversion Algorithm of 2D ZTEM. Applied Sciences. 2022; 12(24):12664. https://doi.org/10.3390/app122412664

Chicago/Turabian Style

Wang, Mao, Handong Tan, Yuzhu Wang, Changhong Lin, and Miao Peng. 2022. "Parallel Computation for Inversion Algorithm of 2D ZTEM" Applied Sciences 12, no. 24: 12664. https://doi.org/10.3390/app122412664

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop