arXiv:1808.04779v2 [math.NA] 18 Oct 2018 A MATLAB PACKAGE FOR EMI DATA INVERSION G.P. DEIDDA, P. D ´ IAZ DE ALBA, C. FENU, AND G. RODRIGUEZ Abstract. Electromagnetic induction surveys are among the most popular techniques for non- destructive investigation of soil properties in order to detect the presence of either ground inhomo- geneities or of particular substances. This work introduces a MATLAB package for the inversion of electromagnetic data collected by a ground conductivity meter. Based on a nonlinear forward model used to describe the interaction between an electromagnetic field and the soil, the software reconstructs either the electrical conductivity or the magnetic permeability of the soil with respect to depth, by a regularized damped Gauss–Newton method. The regularization part of the algorithm is based on a low-rank approximation of the Jacobian of the nonlinear model. Both the relaxation parameter and the regularization parameter are chosen by automatic procedures. The package allows the user to experiment with synthetic data sets and different regularization strategies, in order to compare them and draw conclusions. 1. Introduction. Electromagnetic induction (EMI) techniques are often used for non-destructive investigation of soil properties which are affected by electromag- netic features of the subsurface layers, namely the electrical conductivity σ and the magnetic permeability µ. Knowing such parameters allows one to ascertain the pres- ence of particular substances, which is the essential in many important applications: hydrological characterizations [3, 4], hazardous waste studies [18], archaeological sur- veys [16, 20], precision-agriculture [9, 23], unexploded ordnance detection [15], etc. A ground conductivity meter (GCM) is the typical measuring instrument for frequency domain electromagnetic (FDEM) induction techniques. It is composed by two coils (a transmitter and a receiver) placed at a fixed distance. The dipoles may be aligned vertically or horizontally with respect to the ground level. An alternating sinusoidal current in the transmitter produces a primary magnetic field H P , which induces small eddy currents in the subsurface. These currents produce, in turn, a secondary magnetic field H S , which is sensed by the receiver. The complex ratio H S /H P of the secondary to the primary magnetic fields is measured by the device, providing information about the amplitude and the phase of the signal. The real part, or the in-phase component, is mainly affected by the magnetic permeability of the subsoil; the imaginary part, also called the out-of-phase or quadrature component, mainly by the electrical conductivity. In this work, we present a MATLAB package for the numerical inversion of a nonlinear model which describes the interaction between an electromagnetic field and the soil. The computation is performed by a Gauss–Newton method and regularized by means of either the truncated singular value decomposition (TSVD) or the gen- eralized truncated singular value decomposition (TGSVD). The computation of the forward model, as well as the analytical expression of its Jacobian matrix, is available through a function of the package. Either the electrical conductivity or the magnetic permeability of the soil with respect to depth can be computed, if an assumption can be made on the behaviour of the other quantity. The software has been first developed and used in [7], whose aim was to recon- struct the electrical conductivity of the soil assuming the permeability is known, taking as input only the quadrature component of the measurements. Here, the loop-loop device was assumed to use a single scanning frequency, and multiple measurements were obtained by varying the height of the instrument above the ground and the ori- entation of the two coils. An inversion method based on the low-rank approximation of the Jacobian of the function to be inverted was proposed. Also, the analytical 1