A method for compensating magnetic error of three-component magnetic sensor body
By using the marine predator algorithm to solve the nine-dimensional error matrix, the problem of large error in magnetic sensors in underwater magnetic target detection is solved, and fast and accurate magnetic error correction is achieved, avoiding local optimal solution and computational complexity.
Patent Information
- Application Number
- CN202210624988.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-02
- Publication Date
- 2025-05-09
- Estimated Expiration
- 2042-06-02
AI Technical Summary
Due to the large error in underwater magnetic target detection, existing magnetic sensors reduce the accuracy of the exploration resources. In addition, existing algorithms have high calculation costs during calibration, complex parameter adjustments, and are prone to fall into local optimal solutions.
A three-component magnetic sensor is used to collect geomagnetic data and total magnetic field values, and an error correction algorithm for setting a nine-dimensional error matrix is used to solve the optimal solution to correct the error.
It realizes rapid and accurate compensation of magnetic errors of the magnetic sensor body, avoids local optimal solutions, and reduces calculation costs and parameter adjustment complexity.
Smart Images

Figure CN115016016B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of magnetic correction of a magnetic sensor body, and in particular relates to a method for compensating a magnetic error of a three-component magnetic sensor body. Background Art
[0002] Magnetic exploration is an important means of exploring marine mineral resources. It analyzes the magnetic anomaly signals in the test area to detect underwater magnetic targets. The underwater magnetic target detection system is widely used in underwater anti-submarine, underwater archaeology, marine prospecting, etc. When using magnetic exploration for underwater resources, the magnetic sensor measurement may reduce the accuracy of resource exploration due to large errors in the collected data.
[0003] In order to reduce the error, most existing methods use some intelligent algorithms to compensate and correct the error, transforming the error correction into a problem of finding the optimal solution for a complex high-dimensional numerical function. In the optimization process, because there are too many parameters to be transformed, the dimension of the solution space is too high, which makes the solution complicated and the computational cost too high. Classic particle swarm optimization, genetic algorithm, simulated annealing algorithm and other algorithms have also been applied to magnetic correction, but the adjustment of some algorithm parameters is also complicated, or the accuracy is not enough and the convergence is slow during correction, which easily leads to local optimal solutions, resulting in the inability to correct the magnetism of the body. Summary of the invention
[0004] Based on the above-mentioned shortcomings and deficiencies in the prior art, one of the objects of the present invention is to at least solve one or more of the above-mentioned problems in the prior art. In other words, one of the objects of the present invention is to provide a three-component magnetic sensor body magnetic error compensation method that meets one or more of the above-mentioned needs.
[0005] In order to achieve the above-mentioned object of the invention, the present invention adopts the following technical solutions:
[0006] A method for compensating magnetic errors of a three-component magnetic sensor body specifically comprises the following steps:
[0007] S1. Collect several sets of three-component geomagnetic data and total magnetic field values using a three-component magnetic sensor;
[0008] S2, setting an error correction algorithm according to the non-orthogonal error, sensitivity error, and scale factor error of the three-component geomagnetic data, and setting the parameters of the error correction algorithm to a nine-dimensional error matrix;
[0009] S3, using the ocean predator algorithm, setting the residual of the three-component geomagnetic data corrected by the error correction algorithm and the total magnetic field value as the fitness function, and solving the optimal solution of the nine-dimensional error matrix;
[0010] S4. Correct the three-component geomagnetic data of the three-component magnetic sensor using the optimal solution of the nine-dimensional error matrix.
[0011] As a preferred solution, step S3 specifically includes the following steps:
[0012] S31, setting the population size, solution dimension, search range upper and lower bounds, maximum number of iterations and fitness function; the fitness function is set to the residual of the three-component geomagnetic data and the total magnetic field value after correction by the error correction algorithm;
[0013] S32, select individuals within the upper and lower bounds of the search range, and initialize the prey matrix and the elite matrix; the elite matrix is copied from the individual with the largest fitness value in the prey matrix;
[0014] S33, updating the position of each individual in the prey matrix according to the current number of iterations to obtain a new prey matrix;
[0015] S34, comparing the fitness of individuals in the prey matrix and the elite matrix, and using individuals with higher fitness in the prey matrix to replace individuals in the elite matrix;
[0016] S35, solve the FADs effect;
[0017] S35, enter the next iteration, return to step S33, until the maximum number of iterations is reached, and the optimal solution of the nine-dimensional error matrix is obtained.
[0018] As a preferred solution, step S33 is specifically as follows:
[0019] The individual position update formula is divided into three types according to the following three situations:
[0020] When the current number of iterations is less than one third of the maximum number of iterations;
[0021] When the current number of iterations is greater than or equal to one third of the maximum number of iterations, but less than two thirds of the maximum number of iterations;
[0022] When the current iteration number is greater than two-thirds of the maximum iteration number.
[0023] As a further preferred solution, when the current number of iterations is less than one third of the maximum number of iterations, the individual position update formula is:
[0024]
[0025] Among them, stepsize is the vector of moving steps; R B It is a standard normal distribution random number vector based on Brownian motion, representing Brownian motion; P=0.5 is a constant; R is a vector composed of random numbers uniformly distributed between [0, 1].
[0026] As a further preferred solution, when the current number of iterations is greater than or equal to one third of the maximum number of iterations, but less than two thirds of the maximum number of iterations, the individual is updated in two parts, and the position update formula of the first half is:
[0027]
[0028] stepsize is the vector of moving steps, R L is a random number vector based on Lévy distribution; R is a vector of random numbers uniformly distributed between [0, 1];
[0029] The position update formula for the second half is:
[0030]
[0031] Among them, stepsize is the vector of moving steps, R B is a random number vector based on Brownian motion.
[0032] As a further preferred solution, when the current number of iterations is greater than two-thirds of the maximum number of iterations, the individual position update formula is:
[0033]
[0034] Among them, stepsize is the vector of moving steps, R L is a vector of random numbers based on the Lévy distribution.
[0035] As a preferred solution, the formula for solving the FADs effect is:
[0036]
[0037] Prey i is an individual in the prey matrix, Xmin and Xmax are the lower and upper bounds of the search range respectively, U is a binary vector containing 0 and 1, r is a random number uniformly distributed between [0,1], r1 and r2 are two random subscripts of Prey, 1≤r1, r2≤the population size n.
[0038] As a preferred solution, the three-component geomagnetic data and the total magnetic field value are collected by orbiting within a certain range, and the total magnetic field value is calculated by averaging the total magnetic field value during the orbiting process.
[0039] As a preferred solution, the correction in step S4 is specifically: importing the numerical value of the nine-dimensional error matrix into the error correction algorithm to correct the three-component geomagnetic data.
[0040] Compared with the prior art, the present invention has the following beneficial effects:
[0041] The method of the present invention solves the error matrix through the marine predator algorithm, thereby achieving the effect of compensating the magnetic error of the main body, with fast solving speed, simple parameter adjustment and avoiding falling into the local optimal solution as much as possible, and can quickly and accurately complete the compensation of the magnetic error of the main body;
[0042] The error compensation method adopted by the present invention has certain adaptability and can automatically update parameters as the measurement environment changes, thereby reducing the acquisition error. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] Figure 1 is a flow chart of a method for compensating a magnetic error of a three-component magnetic sensor body according to an embodiment of the present invention;
[0044] Figure 2 It is a schematic diagram of correction of three-component geomagnetic data according to an embodiment of the present invention. DETAILED DESCRIPTION
[0045] In order to more clearly illustrate the embodiments of the present invention, the specific implementation methods of the present invention will be described below with reference to the accompanying drawings. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those of ordinary skill in the art, other accompanying drawings and other implementation methods can be obtained based on these accompanying drawings without creative work.
[0046] Embodiment: This embodiment provides a method for compensating the magnetic error of a three-component magnetic sensor body, and its flow chart is as follows: Figure 1 As shown, the specific method is as follows:
[0047] First, step S1 is performed to collect magnetic data samples of the area to be detected using a three-component magnetic sensor to obtain m magnetic data samples, where the magnetic data samples consist of three-component magnetic field data and a total magnetic field value Bmean.
[0048] Furthermore, in order to improve the accuracy of magnetic data sampling, this embodiment collects magnetic data samples in a certain range, and the device equipped with the three-component magnetic sensor detects around the set area to be detected to obtain m magnetic data samples in the area, and then takes the average value of the three-component geomagnetic data during the surrounding process as the three-component vector geomagnetic data of the area, and takes the average value of the total magnetic field value during the surrounding process as the total magnetic field value B of the geomagnetic signal in the area. mean .
[0049] After the acquisition of the original data is completed, the process proceeds to step S2, setting an error correction algorithm for correcting the three-component magnetic field data, and setting the parameters used by the error correction algorithm as an error matrix.
[0050] Specifically, in this step, the error types existing in the three-component magnetic sensor in actual situations are first analyzed, and the data detected by the three-component magnetic sensor in actual situations is set to B=[B x , B y , B z ] T , and set the corrected magnetic output data as
[0051] Since the errors of the three-component magnetic sensor are mainly non-orthogonal error, sensitivity error and scale factor error, the setting is the scale factor error matrix. Then assume that the OZ axis and the OZ' axis coincide, α, β and γ represent the angle between OX and X'OZ', the angle between OY and Z'OY' and the angle between OX and X'OY' respectively, and set is a non-orthogonal error matrix. Set b = [b x , b y , b z ] T =[m,n,l] T is the zero bias error. Based on the above formula, the mathematical model of the three-component magnetic sensor correction is Then the corrected magnetic data output is obtained make Then we get That is, the error correction algorithm required for correction includes six error parameters of the error matrix C and three error parameters of the error matrix b. In order to optimize it, these nine error parameters are set as a nine-dimensional error matrix for solution.
[0052] After that, the correction algorithm with the minimum total error can be obtained by finding the optimal solution for the above nine-dimensional error matrix. In order to improve the solution speed, reduce the difficulty of solution and avoid falling into the local optimal solution, step S3 is implemented, the marine predator algorithm is used, and the residual of the sum of the three-component geomagnetic data corrected by the error correction algorithm and the total magnetic field value is set as the fitness function. Ideally, the sum of the three-component geomagnetic data should be equal to the total magnetic field value. Since the error of the total magnetic field value is extremely small, when the fitness function is minimum, it means that the sum of the three-component geomagnetic data is very close to the total magnetic field value, that is, the case of the minimum error.
[0053] The optimal solution of the nine-dimensional error matrix can be obtained by using the above-mentioned marine predator iterative operation to minimize the fitness function. The specific steps include:
[0054] S31, set the population size n, the solution dimension d, and the search range lower bound X min With upper bound X max , maximum number of iterations Max_Iter and fitness function
[0055] Specifically, the lower bound of the search range can be set to X min =[0.9 -0.1 -0.1 0.9 -0.1 0.9 -5000 -5000-5000], the upper limit of the search range can be set as X max =[1.1 0.1 0.1 1.1 0.1 1.1 5000 5000 5000].
[0056] S32. Randomly select individuals within the upper and lower bounds of the search range, and use the individuals to form a population to initialize the generated prey matrix Where X i =X min +rand(X max -X min ), n is the population size, which is 50 in this embodiment, and d is the dimension of the solution, which is equal to 9.
[0057] Then calculate the fitness value of each individual in the prey matrix, and copy the individual with the best fitness n times to form an elite matrix The dimensions of the Elite Matrix are the same as those of the Prey Matrix.
[0058] S33, update the position of each individual in the prey matrix according to the current number of iterations to obtain a new prey matrix. The position update is divided into three cases. When the number of iterations is less than one-third of the maximum number of iterations, the prey runs faster than the predator, the predator remains motionless, and the prey runs randomly based on Brownian motion. The prey position update formula is as follows:
[0059]
[0060] Among them, stepsize is the vector of moving steps, R B is a standard normal distribution random number vector based on Brownian motion, representing Brownian motion, R B Multiplying it with Prey simulates the exploration of prey in a Brownian motion. The symbol .* represents the multiplication of corresponding elements of the matrix. P=0.5 is a constant. R is a vector of random numbers uniformly distributed between [0,1].
[0061] When the current number of iterations is greater than or equal to one third of the maximum number of iterations, but less than two thirds of the maximum number of iterations, the population is divided into two parts for update. The first half of the population is helpful for development, and the individual position update formula is:
[0062]
[0063] Among them, stepsize is the vector of moving steps, RL is a random number vector based on Lévy distribution, representing Lévy motion, RL and Prey are multiplied to simulate the exploitation of prey in the Lévy way, the symbol .* represents the multiplication of corresponding elements of the matrix, and R is a vector composed of random numbers uniformly distributed between [0,1].
[0064] The second half of the population is helpful for exploration, and its individual position update formula is:
[0065]
[0066] Among them, stepsize is the vector of moving steps, RB is a random number vector based on Brownian motion, representing Brownian motion, RB and Elite are multiplied to simulate the predator's exploration in a Brownian motion manner, and the symbol .* represents the multiplication of corresponding elements of the matrix.
[0067] When the current number of iterations is greater than two-thirds of the maximum number of iterations, the position update formula of individuals in the population is:
[0068]
[0069] Among them, stepsize is the vector of moving steps, RL is a random number vector based on Lévy distribution, representing Lévy motion, RL and Elite are multiplied to simulate the predator being developed in the Lévy way, and the symbol .* represents the multiplication of corresponding elements of the matrix.
[0070] The above iterative process of changing the position update formula according to the number of iterations introduces Brownian motion and Lévy motion to update the prey position, thereby improving the efficiency of optimization.
[0071] S34. The ocean memory updates the optimal position and optimal fitness value of the saved memory, and compares the fitness value of each individual in the prey matrix with the fitness value of the corresponding individual in the current elite matrix. If the individual fitness value in the prey matrix is higher, it will replace the corresponding individual in the elite matrix.
[0072] S35, solve the eddy current and fish aggregation effect (FADs effect), let the algorithm jump out of the local optimal solution as much as possible during the iteration process to achieve better optimization effect. The specific algorithm for solving the FADs effect is:
[0073]
[0074] Prey i is an individual in the prey matrix, X min and X maxare the lower and upper bounds of the search range, U is a binary vector containing 0 and 1, r is a random number uniformly distributed between [0,1], r1 and r2 are two random subscripts of Prey, 1≤r1, r2≤the number of population n.
[0075] Thus, one iteration is completed between steps S33-S35, and the process returns to step S33 to enter the next iteration, and this process continues until the number of iterations reaches the preset maximum number of iterations, and finally the optimal solution of the nine-dimensional error matrix is obtained, the first 6 of which are the parameters of the error matrix C, and the last 3 are the parameters of the error matrix B.
[0076] When solving the error matrix, the above-mentioned marine predator algorithm has a large position change in the early iteration, a fast solution speed, and does not need to adjust too many parameters during the iteration process. It also avoids falling into the local optimal solution as much as possible, and can quickly and accurately complete the compensation of the body magnetic error.
[0077] After obtaining the optimal solution of the nine-dimensional error matrix, use its value as the nine error compensation parameters of the magnetic sensor body for error compensation. Use the first six elements as the six elements a, b, c, d, e, f of the error matrix C, and the last three elements as the three elements m, n, l of the error matrix b, and substitute them into the three-component magnetic sensor correction mathematical model. The corrected three-component geomagnetic data output is obtained. The comparison diagram of the three-component geomagnetic data before and after correction is shown in the figure. Figure 2 As shown, the darker color is the data before correction, and the lighter color is the data after correction, which proves that the correction method of this embodiment has a good effect.
[0078] It should be noted that the above embodiments are only detailed descriptions of the preferred embodiments and principles of the present invention. For ordinary technicians in this field, there will be changes in the specific implementation methods based on the ideas provided by the present invention, and these changes should also be regarded as the scope of protection of the present invention.
Claims
1. A method for compensating magnetic errors of a three-component magnetic sensor body, characterized in that: The specific steps include: S1. Collect several sets of three-component geomagnetic data and total magnetic field values using a three-component magnetic sensor; S2, setting an error correction algorithm according to the non-orthogonal error, sensitivity error, and scale factor error of the three-component geomagnetic data, and setting the parameters of the error correction algorithm as a nine-dimensional error matrix; S3, using the marine predator algorithm, setting the residual of the sum of the three-component geomagnetic data corrected by the error correction algorithm and the total magnetic field value as a fitness function, and solving the optimal solution of the nine-dimensional error matrix; S4, using the optimal solution of the nine-dimensional error matrix to correct the three-component geomagnetic data of the three-component magnetic sensor; The step S3 specifically includes the following steps: S31, setting the population size, solution dimension, search range upper and lower bounds, maximum number of iterations and fitness function; the fitness function is set to the residual of the three-component geomagnetic data and the total magnetic field value after correction by the error correction algorithm; S32, selecting individuals within the upper and lower bounds of the search range, and initializing a prey matrix and an elite matrix; the elite matrix is copied from the individual with the largest fitness value in the prey matrix; S33, updating the position of each individual in the prey matrix according to the current number of iterations to obtain a new prey matrix; S34, comparing the fitness of individuals in the prey matrix and the elite matrix, and using individuals with higher fitness in the prey matrix to replace individuals in the elite matrix; S35, solve the FADs effect; S35, enter the next iteration, return to step S33, until the maximum number of iterations is reached, and the optimal solution of the nine-dimensional error matrix is obtained.
2. A method for compensating magnetic errors of a three-component magnetic sensor body as claimed in claim 1, characterized in that: The step S33 is specifically as follows: The individual position update formula is divided into three types according to the following three situations: When the current number of iterations is less than one third of the maximum number of iterations; When the current number of iterations is greater than or equal to one third of the maximum number of iterations, but less than two thirds of the maximum number of iterations; When the current number of iterations is greater than two thirds of the maximum number of iterations.
3. A method for compensating magnetic errors of a three-component magnetic sensor body as claimed in claim 2, characterized in that: When the current number of iterations is less than one third of the maximum number of iterations, the position update formula of the individual is: Among them, stepsize is the vector of moving steps; R B It is a standard normally distributed random number vector based on Brownian motion, representing Brownian motion; P=0.5 is a constant; R is a vector composed of random numbers uniformly distributed between [0,1].
4. A method for compensating magnetic errors of a three-component magnetic sensor body as claimed in claim 2, characterized in that: When the current number of iterations is greater than or equal to one third of the maximum number of iterations, but less than two thirds of the maximum number of iterations, the individual is updated in two parts, and the position update formula of the first half is: stepsize is the vector of moving steps, R L is a random number vector based on Lévy distribution; R is a vector of random numbers uniformly distributed between [0,1]; The position update formula for the second half is: Among them, stepsize is the vector of moving steps, R B is a random number vector based on Brownian motion.
5. A method for compensating magnetic errors of a three-component magnetic sensor body as claimed in claim 2, characterized in that: When the current number of iterations is greater than two-thirds of the maximum number of iterations, the position update formula of the individual is: Among them, stepsize is the vector of moving steps, R L is a vector of random numbers based on the Lévy distribution.
6. A three-component magnetic sensor body magnetic error compensation method as claimed in claim 1, characterized in that: The formula for solving the FADs effect is specifically: Prey i is an individual in the prey matrix, X min and X max are the lower bound and upper bound of the search range respectively, U is a binary vector containing 0 and 1, r is a random number uniformly distributed between [0,1], r1 and r2 are two random subscripts of Prey, 1≤r1, r2≤population size n.
7. A three-component magnetic sensor body magnetic error compensation method as claimed in claim 1, characterized in that: The three-component geomagnetic data and the total magnetic field value are collected by orbiting within a certain range, and the total magnetic field value is calculated by averaging the total magnetic field value during the orbiting process.
8. A method for compensating magnetic errors of a three-component magnetic sensor body as claimed in claim 1, characterized in that: The correction in step S4 specifically includes: importing the numerical value of the nine-dimensional error matrix into the error correction algorithm to correct the three-component geomagnetic data.
Citation Information
Patent Citations
Method for comprehensively compensating geomagnetic vector measurement error on basis of linear model
CN104199115A
Three-axis fluxgate aeromagnetic measurement system and correction and compensation method therefor
CN109541704A