A natural electric field source inversion method based on genetic algorithm
By using a genetic algorithm-based method for inverting natural electric field sources, and through data augmentation and population optimization, the problems of local extrema and multiple solutions in natural electric field inversion are solved, improving the inversion accuracy and stability, and achieving more efficient source localization.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHINA UNIV OF MINING & TECH
- Filing Date
- 2022-11-23
- Publication Date
- 2026-04-17
AI Technical Summary
Existing natural electric field inversion methods suffer from local extrema and multiple solutions in complex models, resulting in low inversion accuracy and large source location errors. Furthermore, traditional optimization algorithms require multi-parameter inversion, which affects the stability and accuracy of electric field inversion.
A natural electric field source inversion method based on genetic algorithm is adopted. Data is expanded by data partitioning and interpolation, the population distribution space is reduced, the optimization variables are reduced, and penalty terms and dual threshold settings are added to improve the inversion accuracy and stability.
It effectively solves the problem of insufficient data in natural electric field inversion, improves the accuracy and stability of field source inversion, reduces the running time of genetic algorithm, reduces the number of optimization variables, and enhances the accuracy and consistency of inversion.
Smart Images

Figure CN115906636B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of geophysical inversion technology, and in particular to a method for inverting natural electric field sources based on genetic algorithms. Background Technology
[0002] To construct more effective and accurate natural electric field inversion models, scholars both domestically and internationally continue their efforts in this field. In recent years, the natural electric field method has been mainly applied to leakage detection, groundwater surveys, and porosity detection. In these applications, anomalous electric field sources can typically be approximated as simple geometric models such as single spheres, cylinders, or plates. As natural electric field inversion research models mature, there are two main types of methods: those based on graphical and numerical algorithms, and those based on intelligent optimization algorithms. Graphical and numerical electric field inversion methods primarily achieve electric field inversion by constructing forward and inverse equations for the natural electric field and reducing the fitting error. Examples include the feature point method, curve fitting method, least squares method, gradient method, Fourier analysis method, and corrected average residual anomaly method. However, due to interference from sensor data and the inherent ambiguity of geophysics in practical applications, the results of traditional equation-based inversion calculations are often significantly affected, resulting in large fluctuations. Therefore, it is necessary to adopt methods with strong anti-interference capabilities to invert the natural electric field. The basic idea of intelligent optimization algorithms is to randomly initialize a group of individuals, treat each individual as a feasible solution for inversion, and determine the quality of an individual by the inversion error. The optimal solution is obtained through multiple iterations.
[0003] Currently, nonlinear algorithms such as simulated annealing and particle swarm optimization (PSO) are applied to the inversion of natural electric fields. PSO uses the depth, polarization angle, shape factor, coordinates of the anomalous source, and electric dipole moment to represent the anomalous electric field. It combines this with the formula for the natural potential anomaly of the subsurface anomalous source at the surface obtained from the forward modeling equations to evaluate the quality of feasible solutions represented by different particles. Each particle then seeks the current best particle, and the optimal solution is obtained through multiple iterations. For underwater electric field inversion, simulated annealing modeling uses the coordinates of the equivalent source, spatial depth, and dielectric conductivity to describe the electric field. It combines the electric field response formulas generated by horizontal and vertical electric dipoles in different component directions from the forward modeling equations as an evaluation of the quality of the atom. New models are generated randomly and the Metropolis reception criterion is used to receive new models, and the optimal solution is obtained through multiple iterations.
[0004] Previous studies have shown that inversion models based on traditional linear methods often fall into local extrema and multiple solutions. Inversion methods using optimization algorithms can effectively reduce the large fluctuations and errors in the results caused by these problems. However, in complex models, optimization algorithms based on traditional models require a large number of inversion parameters, resulting in low electric field inversion accuracy and large field source location errors. Summary of the Invention
[0005] This application provides a method for inverting natural electric field sources based on genetic algorithms, with the technical objective of improving the accuracy of natural electric field source inversion.
[0006] The above-mentioned technical objective of this application is achieved through the following technical solution:
[0007] A method for inverting natural electric field sources based on genetic algorithms includes:
[0008] S1: Given input electrical resistivity data E, partition and sort the electrical resistivity data E, and then perform interpolation processing to obtain augmented data E. expended For expanded data E expended The center point of each partition and dispersion measure Perform calculations;
[0009] S2: Location of the center point of the partition and dispersion measure The center point P and radius R of the population distribution space are calculated, and the population distribution space is initialized using the center point P and radius R, while the population is also initialized.
[0010] S3: After initializing the population, calculate the electrical intensity at each electrical data source location, obtain the individual fitness function through the electrical intensity, optimize the individual through the genetic algorithm based on the individual fitness function, and reconstruct the population distribution space. Iterate until the radius of the population distribution space and the individual fitness meet the preset threshold, and obtain the final individual by weighting the optimal result according to fitness.
[0011] The beneficial effects of this application are as follows: (1) It effectively solves the problem of insufficient data in the natural electric field inversion problem. The application of first-to-last cross-interpolation expands the data and reduces the number of data sources required by the genetic algorithm; (2) The preprocessing operation based on extreme values reduces the population distribution space and reduces the running time of the genetic algorithm; (3) Unlike the traditional natural electric field inversion algorithm, it uses the field source charge as the electric field description method, which reduces the number of optimization variables and improves the accuracy and stability of the field source inversion; (4) In order to suppress the occurrence of the field source optimization result being located in the hollow structure, a penalty term based on the distance between the field source and the center of the structure is added to the fitness function to improve the inversion accuracy and stability; (5) The dual threshold setting is adopted, and the fitness and population distribution space radius are optimized by cross-iteration to improve the inversion accuracy and stability. Attached Figure Description
[0012] Figure 1 This is a schematic diagram of the natural electric field source inversion method based on genetic algorithm described in this application;
[0013] Figure 2 This is a schematic diagram of the dual-threshold genetic algorithm.
[0014] Figure 3 This is a schematic diagram comparing the algorithm inversion effects in different structures. Detailed Implementation
[0015] The technical solution of this application will be described in detail below with reference to the accompanying drawings.
[0016] The natural electric field source inversion method based on genetic algorithm described in this application includes:
[0017] S1: Given input electrical resistivity data E, partition and sort the electrical resistivity data E, and then perform interpolation processing to obtain augmented data E. expended For expanded data E expended The center point of each partition and dispersion measure Perform the calculation.
[0018] Specifically, the data involved in the natural electric field inversion is electrical resistivity data, and the input electrical resistivity data E is defined as E={e0,e1,...,e n The electrical resistivity data E is partitioned, including dividing the electrical resistivity data E into four partitions based on the location of the data points. The partitioned electrical resistivity data E is then represented as E = {E...} i}={E 0 E 1 E 2 E 3}; Sort the data in each partition in descending order based on data size, then the sorted data is represented as i represents the partition number.
[0019] The interpolation process is performed using a first-to-last cross-interpolation method, consisting of N rounds of interpolation. Each round of interpolation includes two interpolations, i.e.:
[0020] The first interpolation point is represented as: The data set after the first interpolation and ascending sort is represented as:
[0021] The second interpolation point is represented as: The data set restored after the second interpolation, sorted according to the original positions of the data points, is represented as follows:
[0022] The first round of interpolation, consisting of the first and second interpolations, is completed. The N-1 rounds of interpolation follow the same pattern. After N rounds of interpolation, the augmented data E is obtained. expended Represented as:
[0023] Where f(.) represents the interpolation function; j and k both represent the index of the data in the partition, j means traversing from the first data to the last; for each j, k means traversing from the next j to the last. Represents the interpolation point of the i-th partition; This represents the original data after being sorted in ascending order. This represents the original data after being sorted in reverse order.
[0024] For each Extract the values greater than the 3rd / 4th digit (the 75th percentile value after ascending order) and sort them in descending order of value. Denote this as... Then, the expanded data E expended The center point of each partition and dispersion measure The calculation is performed and expressed as follows:
[0025]
[0026]
[0027]
[0028] in, Let represent the center point of the i-th partition, p(.) represent the coordinates of the extracted data point, α is a hyperparameter representing the confidence level in the extreme points, and Eu(.) represents the Euclidean distance metric in three-dimensional space. This represents a measure of the dispersion of the i-th partition.
[0029] S2: Location of the center point of the partition and dispersion measure The center point P and radius R of the population distribution space are calculated, and the population distribution space is initialized using the center point P and radius R, while the population is also initialized.
[0030] Specifically, by selecting the two sets of center points and dispersion measures that intersect the data partition surfaces with the largest values in the center point location and dispersion measure, the parameter calculation of the population distribution space can be expressed as follows:
[0031]
[0032]
[0033] Here, `cross(.)` calculates the intersection of two lines, and `perp(.)` constructs a line passing through the point and perpendicular to the data partition plane to which the point belongs. Thus, the population distribution space is constructed.
[0034] Population initialization includes: defining an individual code as ind[m,p], and initializing the population according to the individual code ind[m,p]; where m represents the number of source charges, p represents the position of each charge, and p = [p0,...,p...]. m-1 ]=[[x0,y0,z0],...,[x m-1 ,y m-1 ,z m-1 ]).
[0035] S3: After initializing the population, calculate the electrical intensity at each electrical data source location, obtain the individual fitness function through the electrical intensity, optimize the individual through the genetic algorithm based on the individual fitness function, and reconstruct the population distribution space. Iterate until the radius of the population distribution space and the individual fitness meet the preset threshold, and obtain the final individual by weighting the optimal result according to fitness.
[0036] Specifically, step S3 includes:
[0037] S31: After initializing the population, the electrical resistivity is calculated at each electrical resistivity data source location, and expressed as:
[0038]
[0039] in, q represents the electric field strength generated at the location of the electric field source, with an individual as the electric field source; i' ε represents the charge intensity of the i'th source charge; ε represents the dielectric constant of the medium along the propagation path; Δx i' Δy i' Δz i' These represent the positional differences between the i'-th source charge and the source of the electrical method in the x, y, and z directions, respectively. These represent the normal vectors in the x, y, and z directions, respectively.
[0040] S32: The individual fitness function is expressed as:
[0041]
[0042]
[0043] Where Fit(.) represents the fitness function, and the lower the function value, the better the fit; Q(.) represents the electric field fit difference, and β is a hyperparameter representing the strength of the penalty term; This represents the reciprocal of the average distance between the source charge and the center of the structure. This is used as a penalty term for exceeding the boundary conditions. Since the crack described by the natural electric field can only appear inside the structure wall, this penalty term is set to prevent the fitted source from falling into the hollow part of the structure. This represents the calculated electric field data; "i" indicates the location of the electric field data source.
[0044] S33: At the end of each iteration, if the optimal fitness function value is not less than Th fit Then select several individuals with the best fitness, and supplement the population according to the crossover and mutation operations. Then repeat steps S31 to S32 to recalculate the fitness of individuals; if the optimal fitness function value is less than Th fit Then proceed to step S34.
[0045] S34: Is the radius of the current population distribution space smaller than Th? R If the fitness is not less than the target value, select the K individuals with the best fitness. Then, recalculate the parameters of the population distribution space of the K individuals with the best fitness to obtain a new population distribution space. Repeat steps S31 to S32 to calculate the fitness of individuals in the new population distribution space.
[0046] Specifically, the parameters of the new population distribution space are calculated as follows:
[0047]
[0048]
[0049] Where P' represents the spatial center of the updated population distribution; R' represents the position of the i'th charge in the k'th individual; R' represents the spatial radius of the updated population distribution; and dif(.) represents the distance function for calculating the distance between the centers of each individual.
[0050] The crossover operation is represented as:
[0051] [x',y',z']=θ[x a ,y a ,z a ]+(1-θ)[x b ,y b ,z b ];
[0052] The mutation operation is represented as:
[0053] [x',y',z']=[x min +rand(0,x max -x min ),y min +rand(0,ymax -y min ),z min +rand(0,z max -z min )];
[0054] Where θ is a hyperparameter representing the mixing ratio in the crossover operation; rand(·) represents generating a random floating-point number between the left and right boundaries.
[0055] S35: Iterate until the radius of the population distribution space and the individual fitness meet the preset threshold. Then, fit the obtained n optimal sets of field source center results with a fitness-weighted average to obtain the final individual, represented as:
[0056]
[0057] In summary, the fitness and population distribution space are iteratively optimized. When both the optimal fitness and the current population distribution space are less than a preset threshold, the best individual in the current population is taken as the final optimization result.
[0058] Figure 1 The main principles and process of the genetic algorithm natural electric field source inversion method system are shown, which mainly includes three steps: 1) partitioning and expansion of the original electrical resistivity data; 2) initialization of population distribution space; 3) optimization by dual-threshold genetic algorithm.
[0059] The partitioning and expansion of the raw electrical resistivity data includes: First, dividing the raw electrical resistivity data E into four regions {E} based on the location of the data source. 0 E 1 E 2 E 3 Second, each data partition is subjected to a first-to-last cross quadruple interpolation to obtain the expanded dataset E. expended Third, obtain the center point location of each expanded data partition. and dispersion measure
[0060] Population distribution space initialization includes: First, using the center point location of each partition. and dispersion measure First, calculate the center point P and radius R of the population distribution space; second, randomly generate the population IND in the population distribution space.
[0061] The dual-threshold genetic algorithm optimization includes: First, fixing the spatial radius of the population distribution and calculating the fitness (FIT) of each individual; Second, selecting several individuals and using them as a basis to reconstruct the population (IND) through mutation and crossover, iterating until the fitness threshold (Th) is reached. fitRequirements: Third, select the optimal K individuals from the population, recalculate the parameters of the population distribution space, and iterate until the radius of the population distribution space meets the radius threshold Th. R Require.
[0062] Figure 2 This paper demonstrates the specific optimization process of the dual-threshold genetic algorithm, mainly including optimizing the distribution of source individuals and optimizing the population distribution space. Optimizing the distribution of source individuals includes: First, randomly initializing n_g individuals within the constructed population distribution space; Second, calculating the fitness sequence FIT of the population; Third, selecting several optimal individuals according to the fitness sequence FIT; Fourth, using the excellent individuals obtained in the previous step, obtaining several new individuals through crossover and mutation, and concatenating them with their parent individuals to form a new population of n_g individuals; Fifth, updating the fitness sequence FIT of the population again and calculating the optimal fitness; Sixth, comparing the optimal fitness with the fitness threshold Th. fit If the conditions are met, proceed to the next step; otherwise, repeat the selection, crossover, and mutation process to update the population until the requirements are met.
[0063] Optimizing the population distribution space includes: first, calculating the population distribution space radius R; second, comparing the population distribution radius R with the radius threshold Th. R If the conditions are met, the best individual in the current population is output; otherwise, the best K individuals are selected from the current population, and their average center point and dispersion are used as the center point and radius of the new population distribution space. The first step of optimizing the distribution of field source individuals is repeated until the requirements are met.
[0064] Figure 3 The diagrams show the experimental results in cubic and hollow cylindrical structures, respectively. Figure 3 In the middle (a) and (c), the electric field visualizations radiated by the simulated source are shown. Figure 3 Figures (b) and (d) show the electric field visualizations radiated by the fitted field sources. All field sources in the figures are located in the same orientation of the structure, and the deviation between the center positions of the fitted and simulated field sources has no significant impact on the electric field visualization.
[0065] Table 1. Parameter settings for structure and simulated field source
[0066] X_min X_max Y_max Z_max Field source charge number Charge distribution x Charge distribution y Charge z-distribution 0 40 40 40 8 7~8 7~8 7~8 15 20 6.2831 40 8 15~16 3.1415~3.2415 20~21
[0067] Table 1 shows the relevant information. Figure 3The corresponding structural and simulated field source parameters are set, where X_min represents the distance from the inner wall of the hollow cylinder to the center, X_max, Y_max, and Z_max represent the length, width, and height of the cubic structure or the distance from the outer wall of the hollow cylinder to the center, the circumferential angle, and the height, respectively. The field source charge number indicates how many positive and negative charges are used to represent the cracks in the structure, and the charge x distribution, charge y distribution, and charge z distribution represent the locations of all charges in the simulated field source.
[0068] Table 2. Fitting results of field sources for the structure.
[0069]
[0070] Table 2 shows the results related to... Figure 3 The corresponding field source fitting results, where the center position of the fitted field source is obtained by weighted averaging of multiple sets of results based on the electric field fitting difference, and can be calculated by the following formula:
[0071]
[0072] Based on the obtained final fitted field source center, the field source localization error is defined as follows:
[0073]
[0074] To reduce the problem of multiple solutions in the Earth's natural field, the results of ten sets of genetic algorithms with the same parameters but different initial populations were averaged and used as the final fitted field source center. This reduced the fitting errors of the cubic structure and the hollow cylinder to 0.5001 and 0.5902, respectively, thus ensuring the fitting accuracy.
[0075] The above are exemplary embodiments of this application, and the scope of protection of this application is defined by the claims and their equivalents.
Claims
1. A method for inverting natural electric field sources based on genetic algorithms, characterized in that, include: S1: Given input electrical resistivity data For the electrical resistivity data After partitioning and sorting the data, interpolation is performed to obtain augmented data. For expanded data The center point of each partition and dispersion measure Perform calculations; S2: Location of the center point of the partition and dispersion measure The center point of the population distribution space and radius Perform calculations, through the center point and radius The population distribution space is initialized, and the population is initialized at the same time; S3: After initializing the population, calculate the electrical intensity at each electrical data source location, obtain the individual fitness function through the electrical intensity, optimize the individuals through the genetic algorithm based on the individual fitness function, and reconstruct the population distribution space. Iterate until the radius of the population distribution space and the individual fitness meet the preset threshold, and obtain the final individual by weighted averaging the optimal results according to fitness. Step S3 includes: S31: After initializing the population, the electrical resistivity is calculated at each electrical resistivity data source location, and expressed as: ; in, This represents the electrical intensity generated at the location of the electrical data source, with an individual as the source of the electric field. Indicates the first The charge intensity of each source charge; Indicates the dielectric constant of the medium along the propagation path; , , They represent the first The positional differences of each source charge from the source of the electrical method in the x, y, and z directions. , , These represent the normal vectors in the x, y, and z directions, respectively. S32: The individual fitness function is expressed as: ; ; in, Represents the fitness function; This indicates the difference in electric field fit. The hyperparameter represents the strength of the penalty term; This represents the reciprocal of the average distance between the source charge and the center of the structure, and is used as a penalty term for exceeding the boundary conditions; Represents actual electric field data; This represents the calculated electric field data; Indicates the location of the electric field data source; S33: If the optimal fitness function value is not less than Then select several individuals with the best fitness, and supplement the population according to the crossover and mutation operations. Then repeat steps S31 to S32 to recalculate the fitness of individuals; if the optimal fitness function value is less than Proceed to step S34; S34: Is the radius of the current population distribution space smaller than... If the fitness is not less than the target value, select the K individuals with the best fitness. Then, recalculate the parameters of the population distribution space of the K individuals with the best fitness to obtain a new population distribution space. Repeat steps S31 to S32 to calculate the fitness of individuals in the new population distribution space. The parameters of the new population distribution space are calculated as follows: ; ; Indicates the spatial center location of the updated population distribution; Indicates the first The first individual The position of each charge; Indicates the spatial radius of the updated population distribution; This represents a function for calculating the distance between the centers of each volume; The crossover operation is represented as: ; The mutation operation is represented as: ; in, This is a hyperparameter representing the mixing ratio in the crossover operation; This indicates that a random floating-point number is generated between the left and right boundaries; S35: Iterate until the radius of the population distribution space and the individual fitness meet the preset threshold. Then, fit the obtained n optimal sets of field source center results with a fitness-weighted average to obtain the final individual, represented as: 。 2. The method as described in claim 1, characterized in that, In step S1, the electrical resistivity data Represented as ; for the electrical resistivity data Data partitioning includes: partitioning the electrical resistivity data according to the location of the data points. Divided into four partitions, the electrical resistivity data after partitioning Represented as Sort the data in each partition in descending order of data size; the sorted data is then represented as follows: , , Indicates the partition number.
3. The method as described in claim 2, characterized in that, In step S1, the interpolation process is performed using the first-to-last cross-interpolation method, which includes N rounds of interpolation, with each round consisting of two interpolations: The first interpolation point is represented as: Then, the data set after the first interpolation and sorting in ascending order is represented as: ; The second interpolation point is represented as: Then, the set of data points restored after the second interpolation, sorted according to their original positions, is represented as: ; After N rounds of interpolation, the resulting augmented data Represented as: ; in, Represents the interpolation function; and Both represent the sequence number of the data within the partition. This indicates iterating from the first data item to the last; for each... , Indicates from Iterate from the last one to the last one; Indicates the first Interpolation points of the partition; This represents the original data after being sorted in ascending order. This represents the original data after being sorted in reverse order.
4. The method as described in claim 3, characterized in that, In step S1, the expanded data is... The center point of each partition and dispersion measure The calculation is performed and expressed as follows: ; ; ; in, Indicates the first The location of the center point of the partition. This indicates the location coordinates of the retrieved data points. The hyperparameter represents the degree of confidence in the extreme points. Represents the Euclidean distance metric in three-dimensional space. Indicates the first A measure of the dispersion of partitions.
5. The method as described in claim 4, characterized in that, In step S2, the center point of the partition is used. and dispersion measure The parameters of the population distribution space are calculated and expressed as follows: ; ; in, This indicates the calculation of the intersection point of two lines. This represents a straight line that passes through the point and is perpendicular to the data partition surface to which the point belongs.
6. The method as described in claim 5, characterized in that, In step S2, initializing the population includes: defining the individual code as... According to individual codes The population is initialized; among which, Indicates the number of source charges. Indicates the position of each charge, and .
Citation Information
Patent Citations
A controlled source audio-frequency magnetotellurics one-dimensional inversion method using an improved genetic algorithm
CN106021859A
Path planning method and system for unmanned surface vehicle based on improved genetic algorithm
LU102400A1