1 Introduction

The electromagnetic methods are the most common for the inspection of metallic components. This is based on the interaction of electromagnetic fields with the inspected conductive specimens. The induced eddy currents (EC) extend to the surface of the tested material. At each position of the probe, the density of the currents depends on local properties of the specimen. Variation of EC densities cause changes in the distribution field and it permits the detection and the characterization of a defect in conductive materials [1,2,3].

The aim of ECT is to evaluate the change in impedance as a function of the scan of the target. Three-dimensional finite element simulations were conducted to obtain eddy current signals resulting from a crack in a plate using Flux code [4, 5]. The parameter optimization of the sensor is essential for the economic and efficient production [6]. The probe parameters play a big role in the performance factors for defect characterization. The main goal of this paper is to obtain a probe featuring good sensitivity for the characterization of the cracks in the metal plates. This sensor is designed with a model where the template has an external, internal radius and a height. The coil is mounted in this pattern for to design the sensor.

This paper focuses on sensor parameter optimization for the characterization of the defect in the target. In this work we are, uses eddy current probe parameter optimization using a genetic algorithm (GA) and simultaneous perturbation stochastic approximation (SPSA) algorithm. The optimization objective is to attain coil geometry with better sensitivity to the changes of frequency excitation of the sensor [7, 8]. In fact, the developed model is very important since it permits to quickly optimize the parameters of the sensor and allows a good characterization of the defect. The results demonstrate that the ability of ECT to the evaluation of the hole crack [7, 9].

2 Methodology

2.1 Geometry Model of Study

Figure 1 shows the geometry of the model under study. The numerical method used to calculate the impedance of a cylindrical air-cored probe designed in the GEEPS laboratory Fig. 2 placed above the plate with a hole flaw is based on the finite element solution given by the Flux 3D software [10, 11].

Fig. 1
figure 1

Configuration of the 2D problem

Fig. 2
figure 2

Probe designed in the GEEPS laboratory

2.2 Minimization of Objective Function

In this work the objective function is denoted by H. A. Wheeler’s formula [12]:

$$ L = \frac{{0.8a^{2} N^{2} }}{6a + 9b + 10c} $$
(1)
$$ a = \frac{{(r_{1} + r_{2} )}}{2} $$
(2)
$$ c = r_{2} - r_{1} $$
(3)

The Eq. (1) formula represented the inductance of multilayer air coils, with L as inductance in micro Henries, r1 as inside coil radius in inches, r2 as outside coil radius in inches, b as coil length in inches, N equal of turns total, a as average winding radius in inches, c as diff between r2 and r1 in inches shows in Fig. 3.

Fig. 3
figure 3

Multilayer air coils representation

The inductance values are calculated by the proposed Eq. (1) and compared to those of experimental impedance meters and finite element method (FEM) as reported in Table 1 at the resonance frequency given by an Agilent HP4294A. In the FEM the inductance value is calculated by considering the coil with a rectangular cross section [13, 14].

Table 1 Values of the coil inductance at the resonance frequency

2.3 Optimization

The main goal of this optimization is the identification of the coil parameters using the GA and the SPSA. In this case, if the identification values are approached of the experimental values we consider this approach is best of the others. We consider the difference of the amplitude of the experimental and optimized signal is minimal. Table 2 characterizes the impedance relative error calculated between the maximum experiments values and the Real, the SPSA and the GA values respectively.

Table 2 Comparison of the Max ΔZ calculated by the experiments and the Real, SPSA and GA in the presence of the crack

2.3.1 GA Approximation

Genetic algorithms (GAs) are efficient in the optimization processes [15]. They efficiently exploit historical information to speculate on the new offspring with improved performance. GA uses only the objective function for optimization [16], where they have wanted to maximize or to minimize this.

In GA usually the evolution of the objective function is essential, because, the fitness of an individual in a GA is the value of an objective function for its phenotype. For calculating fitness, the chromosome has to be first decoded and the objective function has to be evaluated [17]. The fitness not only indicates how good the solution is, but also corresponds to how close the chromosome is to the optimal one. The objective function values can be scalar or vectorial and are necessarily the same as the fitness values.

The objective function used in this work for the optimization of the coil’s parameters is described by Eqs. (1), (2) and (3). For the optimization of the coil’s parameters the GA algorithm was started with the number of 128 individuals in a population. The number of generations to be counted for the termination criteria was extended up to 80 generations. The number of generations that the program will produce before stopping was equal to 500. The probability that a crossover will occur between two parents was equal to 85% and the probability that a mutation will occur in any given gene was equal to 5%. The range that the fitness must change in the termination criteria ε = 1%.

The individuals with the number traits of elements with each element specifying the upper and lower limits on each trait are represented in Table 3 in mm.

Table 3 Limits parameters introduced in GA approximation and SPSA

2.3.2 Simultaneous Perturbation Stochastic Approximation (SPSA) Approximation Algorithm

Stochastic optimization has become one of the important modelling approaches. An efficient method to solve stochastic approximation problems is the simultaneous perturbation stochastic approximation (SPSA), due to its proven power to converge to suboptimal solutions in the presence of stochasticity and its ease of implementation [18].

It is similar to other evolutionary algorithms; SPSA is an efficient method for stochastic gradient approximation, proposed by Spall [19], has been successfully applied to many optimization problems.

A simultaneous perturbation vector Δkϵ Rd is used in each iteration. Given Δk, the gradient approximation is computed by the following equation:

$$ \hat{g}_{k} \left( {\hat{\theta }_{k} } \right) = \left[ {\begin{array}{*{20}c} {\frac{1}{{\Delta_{k1} }}} \\ \ldots \\ {\frac{1}{{\Delta_{kd} }}} \\ \end{array} } \right] \cdot \frac{{y\left( {\hat{\theta }_{k} + C_{k} \Delta_{k} } \right) - y\left( {\hat{\theta }_{k} - C_{k} \Delta_{k} } \right)}}{{2C_{k} }} $$
(4)

where θ is assumed to be a p-dimensional vector, this vector denotes the coil parameters (θ1 = r1, θ2 = r2, and θ3 = b) represented in Table 3. Δk is a vector of d mutually we choose each Δkl to be independently symmetrically Bernoulli distributed (+ 1 or − 1 with equal probability) [18]. Y can be iteratively optimized by stepwise gradient descent and ck denotes a small positive number that usually gets smaller as k gets larger. The coefficients a, A, c, α, and γ may be determined based on the practical guidelines in Spall [19]. In this work, the parameters in SPSA are determined as follows: a = 0.16, c = 1, A = 100, α = 0.602, γ = 0.101. The number of iterations N is equal to 1000.

Here A represents stability constant strictly positive allows for larger a (possibly faster convergence), α and A can usually be pre-specified; a represents critical coefficient usually is chosen by “trial-and-error”; c represents standard deviation of the measurement noise.

For the implementation of SPSA in this work, the steps of a simulation of this algorithm are presented in the following:

  • In the initial step, we define the number of iterations, determine the initial guess θ0min, θmax) given in Table 3 and nonnegative coefficients for SPSA gain sequences.

  • The vector of Simultaneous Perturbation is generated by Monte Carlo simulation a p-dimensional random perturbation vector ∆k, where the choice for each component of ∆k is to utilize a Bernoulli (+ 1 or − 1) distribution with probability of 1/2 for each (+ 1 or − 1) outcome [19].

  • The objective function based on the wheeler’s formula given in Eq. (1).

  • In the next step, we have to generate the gradient approximation of the SPSA in function to the unknown gradient \( \hat{g}_{k} \left( {\hat{\theta }_{k} } \right) \) given by Eq. (4).

  • Update \( \hat{\theta }_{k} \) to a new value \( \hat{\theta }_{k + 1} \) by using the following equation.

    $$ \hat{\theta }_{k + 1} = \hat{\theta }_{k} - a_{k} \hat{g}_{k} \left( {\hat{\theta }_{k} } \right) $$
    (5)

Let \( \hat{\theta }_{k} \) denote the estimate for θ at the K iteration so that the stochastic optimization algorithm has the standard recursive form of Eq. (5).

  • The convergence criteria can be selected as either reaching the maximum allowable number of iterations, or checking the relative difference between the consecutive iterates obtained [18].

3 Experimental Setup

In this setup, the impedance is measured using a low-frequency impedance analyzer. The probe was moved along the specimen with a crack hole in steps of 1 mm in the x direction.

Figure 4 shows the complex impedance variation ΔZ due to the presence of the crack. The experimental probe signals due to the increase of the excitation frequencies. The real parameters of the eddy current coil measured by using a caliper are presented in the Table 4. The frequency variations cause an apparent change in the amplitude of the parameters of impedance.

Fig. 4
figure 4

Representation complex impedance variation of experimental results for defect

Table 4 The probe, plate and flaws dimension

4 Simulation Results

The optimization technique which estimated the coil parameters are a genetic algorithm (GA) approximation and simultaneous perturbation stochastic approximation (SPSA) algorithm. The optimization methods have been implemented in Matlab software package and applied to the estimate of sensor parameters. The dimensions of the probe are adjusted for to approach the real values of the sensor. The convergence of numerical methods is studied in this paper for a number of iterations and the results of the best individual are described in Table 5. These values are neighbors of the real values. The Evaluations of the best individual parameters with generation values are presented in Fig. 5 for the GA optimization and in Fig. 6 for SPSA algorithm. In this way, we observe the best individual signals converge with a minimal variation in the end of the generation.

Table 5 Optimization parameters with GA and SPSA
Fig. 5
figure 5

Evaluation of best individual parameters with generation values by GA

Fig. 6
figure 6

Evaluation of individual parameters with generation values by SPSA

The optimal values are introduced in the FEM code under Flux software for crack detection. Three frequencies are used for the crack depiction. The results have been presented in the following figures with the identical meshing. The optimization criteria are to minimize the difference between the experimental and the identification values. Figure 7 shows the comparison between calculated and experimental signals in the presence of the crack.

Fig. 7
figure 7

Comparison of calculated and experimental results of complex impedance variation

5 Discussion

In fact, to analyse the effect of excitation frequency of the defect, the excitation frequencies are changes 50, 100, 300 kHz, respectively. The experiments were carried out to acquire probe signals due to the given of the defect, shown in Fig. 4. It is observed that for the defect both the resistance and reactance signals increase when the excitation frequency increases.

During the experimental investigation, the change in the complex impedance variation of the designed coil was measured as a function of the real parameters of the coil given by caliper and the variation of frequencies. The comparison shows that the results obtained by the finite element method uses of the reals and the optimal parameters of the coil are in good agreement with that of experimental measurement. From a scanned eddy-current induced signals represented in the figures the SPSA algorithms were proven to be an effective method compared to the GA algorithms for the solution of the optimization of the coil parameters. Whence the amplitudes of the signals for the SPSA are near to the experiments signals compared to the others (Real and GA). This result is specific to the optimization parameters presented in Table 5.

6 Conclusions

This study evaluates the capabilities of numerical methods by the optimization of the coil parameters. These parameters are introduced in conventional eddy current testing in the evaluation of the crack with the aid of numerical simulations. The numerical simulations give the profile of a crack, where a comparison is realized between the experimental and simulation results. The results show an excellent promise using the SPSS algorithm as an efficient technique for the identification, design problem of the coil parameters compared to the GA algorithm.