Error correction method suitable for three-component magnetic sensor
By establishing a comprehensive error model and combining particle swarm optimization with the firefly algorithm, the error problem of the three-component magnetic sensor was solved, high-precision magnetic field data compensation and error correction were achieved, and the measurement accuracy and applicability of the method were improved.
Patent Information
- Application Number
- CN202511004009.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-21
- Publication Date
- 2025-09-16
AI Technical Summary
Existing three-component magnetic sensors have non-orthogonality errors, sensitivity errors and zero bias errors due to factors such as manufacturing process and material properties, which cause the output data to deviate from the true magnetic field value, affecting measurement accuracy and reliability.
An intelligent optimization strategy based on the fusion of particle swarm optimization and firefly algorithm is adopted to establish a comprehensive error model of non-orthogonality error, sensitivity error and zero bias error. By constructing a fitness function, using the geomagnetic field modulus measured synchronously by the magnetometer as a reference standard, and combining the three-component magnetic field data, the error parameters are solved and compensated with high precision.
The accuracy of magnetic field measurement is significantly improved, the complexity and calculation time of error parameter solution are reduced, the versatility and practicality of the method are enhanced, and the inherent error of the three-component magnetic sensor can be effectively corrected.
Smart Images

Figure CN120654198A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of sensor error correction, and in particular to an error correction method applicable to a three-component magnetic sensor. Background Art
[0002] Three-component magnetic sensors are widely used in fields such as geomagnetic measurement, geological exploration, and military navigation. Their measurement accuracy directly impacts system performance. However, due to factors such as manufacturing process limitations and material properties, practical three-component magnetic sensors contain inherent errors such as non-orthogonality error, sensitivity error, and bias error. These errors can cause the output data to deviate from the true magnetic field value, thus affecting the reliability of subsequent applications.
[0003] Currently, common error correction methods include the ellipse fitting method. This method estimates parameters by building an ellipsoidal model of the magnetic field in three-dimensional space. However, the introduction of a rotation matrix in the solution leads to rotational ambiguity. Furthermore, the theoretically infinite number of solutions results in high computational complexity, slow convergence, and limited accuracy. Summary of the Invention
[0004] The present invention proposes an error correction method for a three-component magnetic sensor. It adopts an intelligent optimization strategy based on the fusion of particle swarm optimization and firefly algorithm, which can effectively improve the magnetic field measurement accuracy, realize high-precision solution of error parameters and accurate compensation of magnetic field data.
[0005] The present invention adopts the following technical solutions.
[0006] A method for correcting errors in three-component magnetic sensors is proposed. The method establishes a comprehensive error model for non-orthogonality error, sensitivity error, and bias error, and solves the error parameters using an intelligent optimization strategy that fuses a particle swarm optimization algorithm with a firefly algorithm. Specifically, the method uses the geomagnetic field modulus value synchronously measured by a magnetometer as a reference standard, combines the collected three-component magnetic field data, constructs a fitness function, and uses a particle swarm optimization and firefly fusion algorithm to search for an optimal error parameter set to perform high-precision compensation on the magnetic field data.
[0007] The method comprises the following steps:
[0008] Step S1: using a three-component magnetic sensor to collect multiple sets of three-component geomagnetic field data at different postures, and simultaneously using a magnetometer to measure the local geomagnetic field modulus;
[0009] Step S2: Establish a comprehensive error model including non-orthogonality error, sensitivity error and zero bias error, where the true value of the magnetic field is B t =[B tx B ty B tz ] TCompared with the actual measured value B′ t =[B′ tx B′ ty B′ tz ] T The relationship is expressed as: B′ t =K sc K noe B t +B t0
[0010] Among them, K noe is the non-orthogonal error matrix; K sc is the sensitivity error matrix; B t0 is the bias error matrix;
[0011] Step S3: Construct a fitness function with the goal of minimizing the difference between the magnetic field measurement value after correction by the error synthesis model and the true value:
[0012]
[0013] Among them, Lo t is the location information of the potential solution including the error parameter; F t (Lo t ) represents the fitness function; N t Indicates the number of groups of collected data; and integrates the hybrid intelligent optimization strategy of particle swarm optimization algorithm and firefly algorithm to search for the optimal error parameter set in the solution space
[0014] Step S4: Substitute the error parameters obtained by the solution into the error model to correct the magnetic field measurement data to improve the accuracy of the magnetic field measurement.
[0015] In step S1, the locally measured geomagnetic field modulus during the acquisition process is used as a reference benchmark to avoid modeling errors caused by reliance on fixed reference values, thereby effectively eliminating the impact of regional differences in the geomagnetic field on the error parameter solution.
[0016] In step S2, the non-orthogonal error matrix is constructed according to the following method:
[0017] Define the ideal three-axis orthogonal coordinate system of the magnetic sensor as O-XYZ, and the coordinate system of the actual magnetic sensor as OX′Y′Z′; assume that the Z axis and Z′ axis of the two coordinate systems completely coincide, and the YOZ plane coincides with the Y′OZ′ plane, and there is a deviation angle between the other two coordinate axes; define the angle between the Y′ axis and the Y axis as The line-plane angle between the X′ axis and the XOY plane is η, and the angle between the projection of the X′ axis on the XOY plane and the X axis is γ; then the non-orthogonal error matrix is:
[0018]
[0019] The sensitivity error matrix is in the form of:
[0020]
[0021] Among them, μ x 、μ y 、μ z Respectively represent the sensitivity coefficient of each axis of the three-axis magnetic sensor;
[0022] The bias error matrix is expressed as:
[0023]
[0024] Among them, B x0 、B y0 、B z0 They respectively represent the deviation values output by the three-axis magnetic sensor when the excitation signal is applied.
[0025] The non-orthogonality error in step S2 is caused by the deviation of the actual axis system of the three-component magnetic sensor from the ideal orthogonal state, resulting in cross-coupling of magnetic field signals between different axes. This non-orthogonality error affects the measurement accuracy of the actual magnetic field.
[0026] In step S2, it is assumed that the true value of the magnetic induction intensity is B t =[B tx B ty B tz ] T , the actual measurement value of the three-axis magnetic sensor is B′ t =[B′ tx B′ ty B′ tz ] T , the non-orthogonal error mathematical model formed by the non-orthogonal error matrix is:
[0027]
[0028] Ideally, the three orthogonal measurement axes of a three-axis magnetic sensor accurately capture magnetic field information in space, with a strict correspondence between its output and the actual magnetic field. However, due to factors such as manufacturing processes and material properties, actual three-axis magnetic sensors deviate from this ideal model. These deviations primarily include non-orthogonality error, sensitivity error, and bias error.
[0029] In step S2, sensitivity error refers to the difference in the response of each measuring axis of the three-axis magnetic sensor to the external magnetic field, resulting in differences in the output changes caused by each axis under the same magnetic field. This inconsistency will directly affect the magnetic sensor's accurate perception of external magnetic field changes, thereby reducing the measurement accuracy of the overall system.
[0030] Assume that the three-axis sensitivity coefficients of the three-axis magnetic sensor are μ x 、μ y 、μ z , then the mathematical model of sensitivity error is:
[0031]
[0032] In step S2, the zero bias error refers to the deviation of the sensor output from the actual zero value due to the inherent characteristics of the internal components of the three-axis magnetic sensor of the three-component magnetic sensor in the absence of external magnetic field excitation, resulting in a fixed deviation, namely the so-called zero bias error. The existence of this error will affect the accuracy of subsequent measurement results.
[0033] Assume that the three-axis zero bias errors of the three-axis magnetic sensor are B x0 、B y0 、B z0 , then the zero bias error data model is expressed as:
[0034]
[0035] The comprehensive model of the inherent error of the three-axis magnetic sensor is: B′ t =K sc K noe B t +B t0 .
[0036] In step S3, the fusion of particle swarm optimization and firefly algorithm includes the following steps:
[0037] Step A1, initialization of the population and parameter setting: randomly generate the initial position and velocity of the particle swarm; set the algorithm parameters of the maximum number of iterations, inertia weight, acceleration factor, attraction coefficient, and step size factor;
[0038] Step A2, fitness function calculation: Calculate the fitness function value based on the current error parameter set to evaluate the quality of the solution;
[0039] Step A3: Execute the particle swarm update mechanism: According to the speed and position update formula of the particle swarm optimization algorithm, guide the particles to converge towards the individual historical optimal solution and the global optimal solution;
[0040] Step A4: Introduce the attraction mechanism of the firefly algorithm: Based on the brightness difference between individuals, guide individuals with low fitness to move towards the direction of high fitness, enhance local search ability, and improve convergence accuracy;
[0041] Step A5: Update individual optimal solutions and global optimal solutions: After each iteration, update the individual historical optimal solution and the global optimal solution based on the fitness function calculation results.
[0042] Step A6, termination condition judgment: When the preset maximum number of iterations is reached or the fitness value change is less than the set threshold, the iteration is stopped and the current global optimal solution is output as the error parameter estimate.
[0043] Step S3, when solving the error parameters of the three-component magnetic sensor error based on the particle swarm and firefly fusion algorithm, includes the following steps:
[0044] Step S31: Set the population size M s ; The population dimension is N s ;The maximum number of iterations is iter;The weight factor is ω s ; Acceleration factors c1, c2; Velocity boundary [Ve min ,Ve max ], position boundary [Lo min ,Lo max ]; initial attraction T0; light absorption coefficient ψ; step size factor σ;
[0045] Step S32: Update the particle's velocity and position according to the following formula:
[0046]
[0047] Among them, j s Represents dimension; r s1 and r s2 is a random number between 0 and 1;
[0048] Step S33: Calculate the individual fitness value and update the individual optimal pbest and the global optimal gbest;
[0049] Step S34: Introduce the attraction mechanism of the firefly algorithm to guide individuals with low fitness to move towards the direction of high fitness, thereby improving local search capabilities. The formula corresponding to the attraction mechanism is as follows:
[0050]
[0051] Among them, r gq represents the Cartesian distance between two fireflies in the solution space, and is expressed as follows:
[0052]
[0053] Among them, t f is the current iteration number of the algorithm; Po g (t f ) and Po q (t f ) represents the tth f The positions of fireflies g and q in the solution space at the iteration; D s represents the dimension of the solution space;
[0054] Step S35: Update the firefly position according to the following formula:
[0055] Po g (t f )=Po g (t f -1)+T gq (Po q (t f -1)-Po g (t f -1))+σ(r f -0.5)
[0056] Among them, r f is a random number between 0 and 1;
[0057] Step S36: Calculate the individual fitness value and update the individual optimum;
[0058] Step S37: Update the global optimum;
[0059] Steps S32 to S37 complete one iteration, and return to step S32 for the next iteration until the preset maximum number of iterations is reached or the fitness value change is less than the set threshold, then the iteration is stopped and the current global optimal solution is output as the error parameter estimate.
[0060] The magnetic field data acquisition method in step S1 is as follows: in an open area without obvious magnetic interference sources, 500 sets of three-component geomagnetic field data are collected in different postures using a three-component magnetic sensor, and the local geomagnetic field modulus is measured by a magnetometer to be 53862.4nT. 200 sets of data are randomly selected and brought into the B of the fusion algorithm fitness function. t ′, solve the error parameters;
[0061] The magnetic field data compensation and correction method in step S4 is as follows: the nine error parameter values obtained by the fusion algorithm are substituted into the inherent error comprehensive model, and the remaining 300 sets of three-component magnetic field data that have not been extracted are corrected. The correction mathematical model obtained according to the inherent error comprehensive model is:
[0062]
[0063] The deviation between the magnetic field modulus before and after correction and the actual magnetic field modulus is as follows Figure 3 As shown in the figure, the deviation between the magnetic field modulus and the actual magnetic field before correction is about 200nT. After the error parameter correction, the deviation is reduced to within 30nT, which proves that the correction method of this example can effectively correct the inherent error of the magnetic sensor.
[0064] The present invention discloses a method for error correction in three-component magnetic sensors. By establishing a comprehensive error model for non-orthogonality error, sensitivity error, and bias error, and designing an intelligent optimization strategy that integrates a particle swarm optimization algorithm with the firefly algorithm, a high-precision solution for the error parameters is achieved. This method uses the geomagnetic field modulus values measured synchronously by a magnetometer as a reference standard. Combined with the collected three-component magnetic field data, a fitness function is constructed. The particle swarm optimization and firefly fusion algorithms are then used to search for the optimal set of error parameters, achieving high-precision compensation for the magnetic field data. This method can significantly improve the measurement accuracy of the magnetic field and exhibits excellent convergence performance and practicality.
[0065] Compared with the prior art, the present invention has the following beneficial effects:
[0066] 1. The present invention uses the locally measured geomagnetic field modulus as a reference benchmark, avoiding the modeling error caused by relying on a fixed reference value, thereby effectively eliminating the impact of regional differences in the geomagnetic field on the error parameter solution.
[0067] 2. The method of the present invention combines the global search advantage of the particle swarm optimization algorithm with the local optimization ability of the firefly algorithm, which significantly improves the accuracy and efficiency of error parameter solution.
[0068] 3. The method of the present invention avoids the rotation ambiguity problem existing in the traditional ellipse fitting method, is applicable to various types of three-axis magnetic sensors, and only requires them to meet basic technical requirements, and has strong versatility. BRIEF DESCRIPTION OF THE DRAWINGS
[0069] The present invention is further described in detail below with reference to the accompanying drawings and specific embodiments:
[0070] Attachment Figure 1 It is a schematic diagram of the non-orthogonal error model of the three-axis magnetic sensor;
[0071] Attachment Figure 2 It is a flow chart of particle swarm and firefly fusion algorithm;
[0072] Attachment Figure 3 It is a schematic diagram of the deviation between the magnetic field modulus before and after correction and the actual magnetic field modulus. DETAILED DESCRIPTION
[0073] As shown in the figure, a method for error correction of three-component magnetic sensors is proposed. The method establishes a comprehensive error model of non-orthogonality error, sensitivity error and zero bias error, and solves the error parameters by integrating the particle swarm optimization algorithm and the firefly algorithm with an intelligent optimization strategy. Specifically, the geomagnetic field modulus value measured synchronously by the magnetometer is used as a reference standard. Combined with the collected three-component magnetic field data, a fitness function is constructed, and the particle swarm optimization and firefly fusion algorithm are used to search for the optimal error parameter set to perform high-precision compensation on the magnetic field data.
[0074] The method comprises the following steps:
[0075] Step S1: using a three-component magnetic sensor to collect multiple sets of three-component geomagnetic field data at different postures, and simultaneously using a magnetometer to measure the local geomagnetic field modulus;
[0076] Step S2: Establish a comprehensive error model including non-orthogonality error, sensitivity error and zero bias error, where the true value of the magnetic field is B t =[B tx B ty B tz ] T Compared with the actual measured value B′ t =[B′ tx B′ ty B′ tz ] T The relationship is expressed as: B′ t =K sc K noe B t +B t0
[0077] Among them, K noe is the non-orthogonal error matrix; K sc is the sensitivity error matrix; B t0 is the bias error matrix;
[0078] Step S3: Construct a fitness function with the goal of minimizing the difference between the magnetic field measurement value after correction by the error synthesis model and the true value:
[0079]
[0080] Among them, Lo t is the location information of the potential solution including the error parameter; F t (Lo t ) represents the fitness function; N t Indicates the number of groups of collected data; and integrates the hybrid intelligent optimization strategy of particle swarm optimization algorithm and firefly algorithm to search for the optimal error parameter set in the solution space
[0081] Step S4: Substitute the error parameters obtained by the solution into the error model to correct the magnetic field measurement data to improve the accuracy of the magnetic field measurement.
[0082] In step S1, the locally measured geomagnetic field modulus during the acquisition process is used as a reference benchmark to avoid modeling errors caused by reliance on fixed reference values, thereby effectively eliminating the impact of regional differences in the geomagnetic field on the error parameter solution.
[0083] In step S2, the non-orthogonal error matrix is constructed according to the following method:
[0084] like Figure 1 As shown in the figure, the ideal three-axis orthogonal coordinate system of the magnetic sensor is defined as O-XYZ, and the coordinate system of the actual magnetic sensor is OX′Y′Z′; it is assumed that the Z axis and Z′ axis of the two coordinate systems completely coincide with each other, and the YOZ plane coincides with the Y′OZ′ plane, and there is a deviation angle between the other two coordinate axes; the angle between the Y′ axis and the Y axis is defined as The line-plane angle between the X′ axis and the XOY plane is η, and the angle between the projection of the X′ axis on the XOY plane and the X axis is γ; then the non-orthogonal error matrix is:
[0085]
[0086] The sensitivity error matrix is in the form of:
[0087]
[0088] Among them, μ x 、μ y 、μ z Respectively represent the sensitivity coefficient of each axis of the three-axis magnetic sensor;
[0089] The bias error matrix is expressed as:
[0090]
[0091] Among them, B x0 、B y0 、B z0 They respectively represent the deviation values output by the three-axis magnetic sensor when the excitation signal is applied.
[0092] The non-orthogonality error in step S2 is caused by the deviation of the actual axis system of the three-component magnetic sensor from the ideal orthogonal state, resulting in cross-coupling of magnetic field signals between different axes. This non-orthogonality error affects the measurement accuracy of the actual magnetic field.
[0093] In step S2, it is assumed that the true value of the magnetic induction intensity is B t =[B tx B ty B tz ]T , the actual measurement value of the three-axis magnetic sensor is B′ t =[B′ tx B′ ty B′ tz ] T , the non-orthogonal error mathematical model formed by the non-orthogonal error matrix is:
[0094]
[0095] In step S2, sensitivity error refers to the difference in the response of each measuring axis of the three-axis magnetic sensor to the external magnetic field, resulting in differences in the output changes caused by each axis under the same magnetic field. This inconsistency will directly affect the magnetic sensor's accurate perception of external magnetic field changes, thereby reducing the measurement accuracy of the overall system.
[0096] Assume that the three-axis sensitivity coefficients of the three-axis magnetic sensor are μ x 、μ y 、μ z , then the mathematical model of sensitivity error is:
[0097]
[0098] In step S2, the zero bias error refers to the deviation of the sensor output from the actual zero value due to the inherent characteristics of the internal components of the three-axis magnetic sensor of the three-component magnetic sensor in the absence of external magnetic field excitation, resulting in a fixed deviation, namely the so-called zero bias error. The existence of this error will affect the accuracy of subsequent measurement results.
[0099] Assume that the three-axis zero bias errors of the three-axis magnetic sensor are B x0 、B y0 、B z0 , then the zero bias error data model is expressed as:
[0100]
[0101] The comprehensive model of the inherent error of the three-axis magnetic sensor is: B′ t =K sc K noe B t +B t0 .
[0102] In step S3, the fusion of particle swarm optimization and firefly algorithm includes the following steps:
[0103] Step A1, initialization of the population and parameter setting: randomly generate the initial position and velocity of the particle swarm; set the algorithm parameters of the maximum number of iterations, inertia weight, acceleration factor, attraction coefficient, and step size factor;
[0104] Step A2, fitness function calculation: Calculate the fitness function value based on the current error parameter set to evaluate the quality of the solution;
[0105] Step A3: Execute the particle swarm update mechanism: According to the speed and position update formula of the particle swarm optimization algorithm, guide the particles to converge towards the individual historical optimal solution and the global optimal solution;
[0106] Step A4: Introduce the attraction mechanism of the firefly algorithm: Based on the brightness difference between individuals, guide individuals with low fitness to move towards the direction of high fitness, enhance local search ability, and improve convergence accuracy;
[0107] Step A5: Update individual optimal solutions and global optimal solutions: After each iteration, update the individual historical optimal solution and the global optimal solution based on the fitness function calculation results.
[0108] Step A6, termination condition judgment: When the preset maximum number of iterations is reached or the fitness value change is less than the set threshold, the iteration is stopped and the current global optimal solution is output as the error parameter estimate.
[0109] like Figure 2 As shown, step S3 includes the following steps when solving the error parameters of the three-component magnetic sensor error based on the particle swarm and firefly fusion algorithm;
[0110] Step S31: Set the population size M s ; The population dimension is N s ;The maximum number of iterations is iter;The weight factor is ω s ; Acceleration factors c1, c2; Velocity boundary [Ve min ,Ve max ], position boundary [Lo min ,Lo max ]; initial attraction T0; light absorption coefficient ψ; step size factor σ;
[0111] Step S32: Update the particle's velocity and position according to the following formula:
[0112]
[0113] Among them, j s Represents dimension; r s1 and r s2 is a random number between 0 and 1;
[0114] Step S33: Calculate the individual fitness value and update the individual optimal pbest and the global optimal gbest;
[0115] Step S34: Introduce the attraction mechanism of the firefly algorithm to guide individuals with low fitness to move towards the direction of high fitness, thereby improving local search capabilities. The formula corresponding to the attraction mechanism is as follows:
[0116]
[0117] Among them, r gq represents the Cartesian distance between two fireflies in the solution space, and is expressed as follows:
[0118]
[0119] Among them, t f is the current iteration number of the algorithm; Po g (t f ) and Po q (t f ) represents the tth f The positions of fireflies g and q in the solution space at the iteration; D s represents the dimension of the solution space;
[0120] Step S35: Update the firefly position according to the following formula:
[0121] Po g (t f )=Po g (t f -1)+T gq (Po q (t f -1)-Po g (t f -1))+σ(r f -0.5)
[0122] Among them, r f is a random number between 0 and 1;
[0123] Step S36: Calculate the individual fitness value and update the individual optimum;
[0124] Step S37: Update the global optimum;
[0125] Steps S32 to S37 complete one iteration, and return to step S32 for the next iteration until the preset maximum number of iterations is reached or the fitness value change is less than the set threshold, then the iteration is stopped and the current global optimal solution is output as the error parameter estimate.
[0126] The magnetic field data acquisition method in step S1 is as follows: in an open area without obvious magnetic interference sources, 500 sets of three-component geomagnetic field data are collected in different postures using a three-component magnetic sensor, and the local geomagnetic field modulus is measured by a magnetometer to be 53862.4nT. 200 sets of data are randomly selected and brought into the B of the fusion algorithm fitness function. t ′, solve the error parameters;
[0127] The magnetic field data compensation and correction method in step S4 is as follows: the nine error parameter values obtained by the fusion algorithm are substituted into the inherent error comprehensive model, and the remaining 300 sets of three-component magnetic field data that have not been extracted are corrected. The correction mathematical model obtained according to the inherent error comprehensive model is:
[0128]
[0129] The deviation between the magnetic field modulus before and after correction and the actual magnetic field modulus is as follows Figure 3 As shown in the figure, the deviation between the magnetic field modulus and the actual magnetic field before correction is about 200nT. After the error parameter correction, the deviation is reduced to within 30nT, which proves that the correction method of this example can effectively correct the inherent error of the magnetic sensor.
[0130] The method described in this example can be used for various types of three-axis magnetic sensors that meet basic technical requirements. The above are preferred embodiments of the present invention. Any modifications made based on the technical solution of the present invention that produce functional effects within the scope of the technical solution of the present invention shall fall within the scope of protection of the present invention.
Claims
1. A method for correcting errors in a three-component magnetic sensor, characterized by: The method establishes a comprehensive error model of non-orthogonality error, sensitivity error and zero bias error, and solves the error parameters by integrating the particle swarm optimization algorithm and the firefly algorithm. Specifically, the geomagnetic field modulus value measured synchronously by the magnetometer is used as a reference standard. Combined with the collected three-component magnetic field data, a fitness function is constructed, and the particle swarm optimization and firefly algorithm are used to search for the optimal error parameter set to compensate the magnetic field data.
2. The error correction method for a three-component magnetic sensor according to claim 1, characterized in that: The method comprises the following steps: Step S1: using a three-component magnetic sensor to collect multiple sets of three-component geomagnetic field data at different postures, and simultaneously using a magnetometer to measure the local geomagnetic field modulus; Step S2: Establish a comprehensive error model including non-orthogonality error, sensitivity error and zero bias error, where the true value of the magnetic field is B t =[B tx B ty B tz ] T Compared with the actual measured value B′ t =[B′ tx B′ ty B′ tz ] T The relationship is expressed as: B′ t =K sc K noe B t +B t0 Among them, K noe is the non-orthogonal error matrix; K sc is the sensitivity error matrix; B t0 is the bias error matrix; Step S3: Construct a fitness function with the goal of minimizing the difference between the magnetic field measurement value after correction by the error synthesis model and the true value: Among them, Lo t is the location information of the potential solution including the error parameter; F t (Lo t ) represents the fitness function; N t Indicates the number of groups of collected data; and integrates the hybrid intelligent optimization strategy of particle swarm optimization algorithm and firefly algorithm to search for the optimal error parameter set in the solution space Step S4: Substitute the error parameters obtained by the solution into the error model to correct the magnetic field measurement data.
3. The error correction method for a three-component magnetic sensor according to claim 2, characterized in that: In step S1, the geomagnetic field modulus value measured locally during the acquisition process is used as a reference benchmark.
4. The error correction method for a three-component magnetic sensor according to claim 2, characterized in that: In step S2, the non-orthogonal error matrix is constructed according to the following method: Define the ideal three-axis orthogonal coordinate system of the magnetic sensor as O-XYZ, and the coordinate system of the actual magnetic sensor as OX′Y′Z′; assume that the Z axis and Z′ axis of the two coordinate systems completely coincide, and the YOZ plane coincides with the Y′OZ′ plane, and there is a deviation angle between the other two coordinate axes; define the angle between the Y′ axis and the Y axis as The line-plane angle between the X′ axis and the XOY plane is η, and the angle between the projection of the X′ axis on the XOY plane and the X axis is γ; then the non-orthogonal error matrix is: The sensitivity error matrix is in the form of: Among them, μ x 、μ y 、μ z Respectively represent the sensitivity coefficient of each axis of the three-axis magnetic sensor; The bias error matrix is expressed as: Among them, B x0 、B y0 、B z0 They respectively represent the deviation values output by the three-axis magnetic sensor when the excitation signal is applied.
5. The error correction method for a three-component magnetic sensor according to claim 4, characterized in that: The non-orthogonality error in step S2 is an error caused by the cross-coupling of magnetic field signals between different axes due to the deviation of the actual axis system of the three-component magnetic sensor from the ideal orthogonal state; In step S2, it is assumed that the true value of the magnetic induction intensity is B t =[B tx B ty B tz ] T , the actual measurement value of the three-axis magnetic sensor is B′ t =[B′ tx B′ ty B′ tz ] T , the non-orthogonal error mathematical model formed by the non-orthogonal error matrix is:
6. The error correction method for a three-component magnetic sensor according to claim 5, characterized in that: In step S2, the sensitivity error refers to the difference in the output variation caused by each axis under the same magnetic field, resulting from the different response of each measuring axis of the three-axis magnetic sensor to the external magnetic field. Assume that the three-axis sensitivity coefficients of the three-axis magnetic sensor are μ x 、μ y 、μ z , then the mathematical model of sensitivity error is:
7. The error correction method for a three-component magnetic sensor according to claim 6, characterized in that: In step S2, the zero bias error refers to the deviation of the sensor output from the actual zero value due to the inherent characteristics of the internal components of the three-axis magnetic sensor of the three-component magnetic sensor in the absence of external magnetic field excitation; Assume that the three-axis zero bias errors of the three-axis magnetic sensor are B x0 、B y0 、B z0 , then the zero bias error data model is expressed as: The comprehensive model of the inherent error of the three-axis magnetic sensor is: B′ t =K sc K noe B t +B t0 .
8. The error correction method for a three-component magnetic sensor according to claim 2, characterized in that: In step S3, the fusion of particle swarm optimization and firefly algorithm includes the following steps: Step A1, initialization of the population and parameter setting: randomly generate the initial position and velocity of the particle swarm; set the algorithm parameters of the maximum number of iterations, inertia weight, acceleration factor, attraction coefficient, and step size factor; Step A2, fitness function calculation: Calculate the fitness function value based on the current error parameter set to evaluate the quality of the solution; Step A3: Execute the particle swarm update mechanism: According to the speed and position update formula of the particle swarm optimization algorithm, guide the particles to converge towards the individual historical optimal solution and the global optimal solution; Step A4: Introduce the attraction mechanism of the firefly algorithm: Based on the brightness difference between individuals, guide individuals with low fitness to move towards the direction of high fitness, enhance local search ability, and improve convergence accuracy; Step A5: Update individual optimal solutions and global optimal solutions: After each iteration, update the individual historical optimal solution and the global optimal solution based on the fitness function calculation results. Step A6, termination condition judgment: When the preset maximum number of iterations is reached or the fitness value change is less than the set threshold, the iteration is stopped and the current global optimal solution is output as the error parameter estimate.
9. The error correction method for a three-component magnetic sensor according to claim 8, characterized in that: Step S3, when solving the error parameters of the three-component magnetic sensor error based on the particle swarm and firefly fusion algorithm, includes the following steps: Step S31: Set the population size M s ; The population dimension is N s ;The maximum number of iterations is iter;The weight factor is ω s ; Acceleration factors c1, c2; Velocity boundary [Ve min ,Ve max ], position boundary [Lo min ,Lo max ]; initial attraction T0; light absorption coefficient ψ; step size factor σ; Step S32: Update the particle's velocity and position according to the following formula: Among them, j s Represents dimension; r s1 and r s2 is a random number between 0 and 1; Step S33: Calculate the individual fitness value and update the individual optimal pbest and the global optimal gbest; Step S34: Introduce the attraction mechanism of the firefly algorithm to guide individuals with low fitness to move towards the direction of high fitness, thereby improving local search capabilities. The formula corresponding to the attraction mechanism is as follows: Among them, r gq represents the Cartesian distance between two fireflies in the solution space, and is expressed as follows: Among them, t f is the current iteration number of the algorithm; Po g (t f ) and Po q (t f ) represents the tth f The positions of fireflies g and q in the solution space at the iteration; D s represents the dimension of the solution space; Step S35: Update the firefly position according to the following formula: Po g (t f )=Po g (t f -1)+T gq (Po q (t f -1)-Po g (t f -1))+σ(r f -0.5) Among them, r f is a random number between 0 and 1; Step S36: Calculate the individual fitness value and update the individual optimum; Step S37: Update the global optimum; Steps S32 to S37 complete one iteration, and return to step S32 for the next iteration until the preset maximum number of iterations is reached or the fitness value change is less than the set threshold, then the iteration is stopped and the current global optimal solution is output as the error parameter estimate.
10. The error correction method for a three-component magnetic sensor according to claim 9, characterized in that: The magnetic field data collection method in step S1 is as follows: in an open area without obvious magnetic interference sources, a three-component magnetic sensor is used to collect multiple sets of three-component geomagnetic field data in different postures, and a magnetometer is used to measure the local geomagnetic field modulus. Some sets of data are randomly selected and brought into the B′ of the fusion algorithm fitness function. t In , the error parameters are solved; The magnetic field data compensation and correction method in step S4 is specifically as follows: the nine error parameter values obtained by the fusion algorithm are substituted into the inherent error comprehensive model, and the remaining unextracted three-component magnetic field data of each group are corrected. The correction mathematical model obtained according to the inherent error comprehensive model is:
Citation Information
Cited By
Non-shielded serf magnetic survey three-axis magnetic field measurement data correction method and system
CN122410400A