CN108426571B - Local real-time calibration method and device for electronic compass - Google Patents

Local real-time calibration method and device for electronic compass Download PDF

Info

Publication number
CN108426571B
CN108426571B CN201810191456.9A CN201810191456A CN108426571B CN 108426571 B CN108426571 B CN 108426571B CN 201810191456 A CN201810191456 A CN 201810191456A CN 108426571 B CN108426571 B CN 108426571B
Authority
CN
China
Prior art keywords
measurement data
sample
geomagnetic measurement
magnetic interference
electronic compass
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810191456.9A
Other languages
Chinese (zh)
Other versions
CN108426571A (en
Inventor
刘昊扬
王春
戴若犁
刘东明
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
BEIJING NOITOM TECHNOLOGY Ltd
Original Assignee
BEIJING NOITOM TECHNOLOGY Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by BEIJING NOITOM TECHNOLOGY Ltd filed Critical BEIJING NOITOM TECHNOLOGY Ltd
Priority to CN201810191456.9A priority Critical patent/CN108426571B/en
Publication of CN108426571A publication Critical patent/CN108426571A/en
Application granted granted Critical
Publication of CN108426571B publication Critical patent/CN108426571B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01CMEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
    • G01C17/00Compasses; Devices for ascertaining true or magnetic north for navigation or surveying purposes
    • G01C17/38Testing, calibrating, or compensating of compasses

Landscapes

  • Engineering & Computer Science (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Remote Sensing (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Measuring Magnetic Variables (AREA)

Abstract

The embodiment of the invention relates to a local real-time calibration method and a local real-time calibration device for an electronic compass, wherein the method comprises the following steps: acquiring geomagnetic measurement data of the electronic compass; updating the geomagnetic measurement data sample model based on the geomagnetic measurement data and a preset geomagnetic measurement data sample model; obtaining hard magnetic interference and soft magnetic interference of the electronic compass through a preset ellipsoid fitting strategy based on the updated geomagnetic measurement data sample model; and calibrating the electronic compass based on the hard magnetic interference and the soft magnetic interference. After acquiring the geomagnetic measurement data, the embodiment of the invention is not stored but used for updating the geomagnetic measurement data sample model, and only the updated geomagnetic measurement data sample model needs to be stored, so that the electronic compass can update the geomagnetic measurement data sample model in real time when in normal use, and further calibrate the electronic compass in real time, and the electronic compass does not need to be calibrated independently, thereby improving the user experience and saving the space for storing the geomagnetic measurement data.

Description

Local real-time calibration method and device for electronic compass
Technical Field
The embodiment of the invention relates to a local real-time calibration method and device for an electronic compass.
Background
At present, electronic compasses have been widely used in the fields of aviation, aerospace, robots, navigation, and the like as navigation instruments, attitude sensors, or motion capture devices. The electronic compass measures the earth magnetic field, and the realization mechanism is that magnetometers are arranged on three orthogonal axes, and the earth magnetic field vector is synthesized through the measured values of the magnetometers arranged on the three orthogonal axes, so that the earth magnetic field strength and the earth magnetic field direction of the current environment of the electronic compass are obtained.
However, the geomagnetic field direction measured by the electronic compass is not accurate, the electronic compass must be calibrated before use because of noise and errors, otherwise, the calculated geomagnetic field direction may have a large deviation from the actual geomagnetic field direction.
The interference and noise of the electronic compass, such as zero drift, nonlinearity, installation error and the like, can be solved to a great extent through calibration before delivery. However, there are two types of interference that vary with the environment and require real-time calibration, which are hard magnetic interference and soft magnetic interference. Wherein the hard magnetic interference is equivalent to a magnetic field vector fixed relative to the electronic compass; soft magnetic interference is mainly caused by ferromagnetic materials inside the electronic compass, and is different due to different magnetization degrees. Taking the motion capture device as an example, because the environment is unknown and the electronic compass may contact with the ferromagnetic material during use, the electronic compass is magnetized, and hard magnetic interference and soft magnetic interference occur, which results in unnatural captured motion and malformation, and the electronic compass cannot be used normally.
Disclosure of Invention
In order to solve the problems in the prior art, at least one embodiment of the invention provides a local real-time calibration method and device for an electronic compass.
In a first aspect, an embodiment of the present invention discloses a local real-time calibration method for an electronic compass, including:
acquiring geomagnetic measurement data of the electronic compass;
updating the geomagnetic measurement data sample model based on the geomagnetic measurement data and a preset geomagnetic measurement data sample model;
obtaining hard magnetic interference and soft magnetic interference of the electronic compass through a preset ellipsoid fitting strategy based on the updated geomagnetic measurement data sample model;
and calibrating the electronic compass based on the hard magnetic interference and the soft magnetic interference.
Optionally, the geomagnetic measurement data sample model is a matrix S of 10 × 10;
accordingly, the updating the geomagnetic measurement data sample model includes:
updating the geomagnetic measurement data sample model by:
Si+1=Si+Hm
wherein HmFor geomagnetic measurement data, SiFor the ith updated geomagnetic measurement data sample model, Si+1For the geomagnetic measurement data sample model after the i +1 th update, i is a natural number, S0For the initial geomagnetic measurement data sample model, and S0Is a 10 x 10 zero matrix.
Optionally, the updating based on the geomagnetic measurement data sample model obtains the hard magnetic interference and the soft magnetic interference of the electronic compass through a preset ellipsoid fitting strategy, and includes:
fitting to obtain a coefficient vector of an ellipsoid equation through a preset ellipsoid fitting strategy based on the updated geomagnetic measurement data sample model; wherein the ellipsoid fitting strategy is as follows:
Figure BDA0001591822670000021
wherein, S is a geomagnetic measurement data sample model, v is a coefficient vector v ═ of an ellipsoid equation [ a, b, C, d, e, f, g, h, m, -1], λ is an eigenvector of S, and C is a constraint matrix;
determining an ellipsoid transformation model based on the coefficient vector of the ellipsoid equation; the ellipsoid transformation model is as follows:
Figure BDA0001591822670000031
wherein, Δ is a translation transformation matrix of 4 × 4, R is a rotation transformation matrix of 4 × 4, and Q is a scaling transformation matrix of 4 × 4;
obtaining hard magnetic interference and soft magnetic interference of the electronic compass based on the ellipsoid transformation model; wherein the hard magnetic interference is Delta and the soft magnetic interference is
Figure BDA0001591822670000032
R3A matrix of the first 3 rows and the first 3 columns of R, Q3A matrix of the first 3 rows and the first 3 columns of Q.
Optionally, after obtaining geomagnetic measurement data of the electronic compass, the method further includes:
extracting geomagnetic measurement data serving as verification samples from the multiple sets of acquired geomagnetic measurement data;
accordingly, before the calibrating the electronic compass based on the hard magnetic interference and the soft magnetic interference, the method further includes:
determining the distribution state of the verification sample through a preset sample distribution state model based on the extracted verification sample;
judging whether the distribution state of the verification sample is uniform distribution of a standard ellipsoid or not;
and if so, verifying that the hard magnetic interference and the soft magnetic interference of the electronic compass are reliable, and executing the step of calibrating the electronic compass based on the hard magnetic interference and the soft magnetic interference.
Optionally, the determining, based on the extracted verification sample, the distribution state of the verification sample through a preset sample distribution state model includes:
carrying out coordinate transformation on the extracted verification sample to obtain a first standard sample; the coordinate system of the first standard sample is a space rectangular coordinate system, and the coordinate system of the first standard sample is a space rectangular coordinate system;
projecting the first standard sample into a standard elliptical region of a plane rectangular coordinate system to obtain a projection sample;
counting the number of sub-regions with projection samples in each preset sub-region in the standard elliptical region;
judging whether the number of the sub-regions is larger than or equal to a preset first number threshold value or not;
and if so, determining that the distribution state of the verification sample is the uniform distribution of the standard ellipsoid.
Optionally, before determining the distribution state of the verification sample through a preset sample distribution state model based on the extracted verification sample, the method further includes:
determining whether the extracted verification sample is abnormal or not through a preset sample abnormity judgment model based on the hard magnetic interference and the soft magnetic interference of the electronic compass;
if the extracted geomagnetic sample is abnormal, extracting geomagnetic measurement data serving as a verification sample from the multiple groups of acquired geomagnetic measurement data again until the extracted verification sample is determined to be normal;
and if the verification sample is normal, executing the step of determining the distribution state of the verification sample based on the extracted verification sample through a preset sample distribution state model.
Optionally, the determining, based on the hard magnetic interference and the soft magnetic interference of the electronic compass, whether the extracted verification sample is abnormal or not through a preset sample abnormality determination model includes:
converting the extracted verification sample based on the hard magnetic interference and the soft magnetic interference of the electronic compass to obtain a second standard sample; the coordinate system of the second standard sample is a space rectangular coordinate system, and the second standard sample is distributed on the standard sphere;
calculating the distance between the second standard sample and the origin of the rectangular coordinate system;
counting the number of second standard samples with the distance within a preset distance range;
judging whether the number of the second standard samples is smaller than a preset second number threshold value or not;
and if so, determining that the extracted verification sample is abnormal.
In a second aspect, an embodiment of the present invention further discloses a local real-time calibration apparatus for an electronic compass, including:
the acquisition unit is used for acquiring geomagnetic measurement data of the electronic compass;
the updating unit is used for updating the geomagnetic measurement data sample model based on the geomagnetic measurement data and a preset geomagnetic measurement data sample model;
the determining unit is used for obtaining the hard magnetic interference and the soft magnetic interference of the electronic compass through a preset ellipsoid fitting strategy based on the updated geomagnetic measurement data sample model;
and the calibration unit is used for calibrating the electronic compass based on the hard magnetic interference and the soft magnetic interference.
Optionally, the geomagnetic measurement data sample model is a matrix S of 10 × 10;
accordingly, the updating unit is configured to update the geomagnetic measurement data sample model by:
Si+1=Si+Hm
wherein HmFor geomagnetic measurement data, SiFor the ith updated geomagnetic measurement data sample model, Si+1Is the ith+1 times updated geomagnetic measurement data sample model, i is natural number, S0For the initial geomagnetic measurement data sample model, and S0Is a 10 x 10 zero matrix.
Optionally, the determining unit is configured to:
fitting to obtain a coefficient vector of an ellipsoid equation through a preset ellipsoid fitting strategy based on the updated geomagnetic measurement data sample model; wherein the ellipsoid fitting strategy is as follows:
Figure BDA0001591822670000051
wherein, S is a geomagnetic measurement data sample model, v is a coefficient vector v ═ of an ellipsoid equation [ a, b, C, d, e, f, g, h, m, -1], λ is an eigenvector of S, and C is a constraint matrix;
determining an ellipsoid transformation model based on the coefficient vector of the ellipsoid equation; the ellipsoid transformation model is as follows:
Figure BDA0001591822670000061
wherein, Δ is a translation transformation matrix of 4 × 4, R is a rotation transformation matrix of 4 × 4, and Q is a scaling transformation matrix of 4 × 4;
obtaining hard magnetic interference and soft magnetic interference of the electronic compass based on the ellipsoid transformation model; wherein the hard magnetic interference is Delta and the soft magnetic interference is
Figure BDA0001591822670000062
R3A matrix of the first 3 rows and the first 3 columns of R, Q3A matrix of the first 3 rows and the first 3 columns of Q.
It can be seen that, in at least one embodiment of the present invention, after acquiring geomagnetic measurement data, the geomagnetic measurement data is not stored, but is used to update a geomagnetic measurement data sample model, only the updated geomagnetic measurement data sample model needs to be stored, so that the electronic compass can also update the geomagnetic measurement data sample model in real time when being used normally, and then calibrate the electronic compass in real time, and it is not necessary to calibrate the electronic compass separately, so as to improve user experience and save space for storing geomagnetic measurement data.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required to be used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to these drawings without inventive labor.
Fig. 1 is a flowchart of a local real-time calibration method for an electronic compass according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a process for determining a distribution status of a verification sample according to an embodiment of the present invention;
fig. 3 is a block diagram of a local real-time calibration apparatus for an electronic compass according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be obtained by a person skilled in the art without any inventive step based on the embodiments of the present invention, are within the scope of the present invention.
In a first aspect, as shown in fig. 1, an embodiment of the present invention discloses a local real-time calibration method for an electronic compass, which may include the following steps 101 to 103:
101. and acquiring geomagnetic measurement data of the electronic compass.
In this embodiment, the frequency for acquiring the geomagnetic measurement data may be determined according to an actual application scenario, or may be set to be a fixed frequency.
It should be noted that the geomagnetic measurement data is divided into groups, that is, a group of geomagnetic measurement data includes: as a set of geomagnetic measurement data, a measurement value of magnetometers arranged on three orthogonal axes (e.g., x-axis, y-axis, and z-axis of a spatial rectangular coordinate system) can be understood as a vector of 1 row and 3 columns.
102. And updating the geomagnetic measurement data sample model based on the geomagnetic measurement data and a preset geomagnetic measurement data sample model.
In the prior art, the processing method in the prior art is to store all samples, then calculate the intermediate variable S uniformly, and only after the calculation is completed, the stored samples can be cleared.
In this embodiment, as long as the geomagnetic measurement data is acquired in step 101, step 102 updates the geomagnetic measurement data sample model updated last time based on the acquired geomagnetic measurement data, so that the iterative processing of the geomagnetic measurement data is realized, the geomagnetic measurement data can be deleted after the geomagnetic measurement data sample model is updated, all the acquired geomagnetic measurement data do not need to be stored, and the space for storing the geomagnetic measurement data is saved.
103. And obtaining the hard magnetic interference and the soft magnetic interference of the electronic compass through a preset ellipsoid fitting strategy based on the updated geomagnetic measurement data sample model.
In this embodiment, considering that the magnetization of the electronic compass makes the geomagnetic measurement data be distributed in an ellipsoid shape in the electronic compass coordinate system, and therefore ellipsoid fitting needs to be performed, in this embodiment, the updated geomagnetic measurement data sample model is subjected to a preset ellipsoid fitting strategy, so as to obtain a coefficient vector of an ellipsoid equation corresponding to the ellipsoid distribution, and further obtain the calibration parameter.
In this embodiment, the preset ellipsoid fitting strategy may be a least square method with a constraint condition, and since the least square method cannot ensure that the fitted quadric surface is an ellipsoid, the constraint condition needs to be added, the setting of the constraint condition can continue to use the prior art, and it is ensured that the fitting result is an ellipsoid, which is not described in detail in this embodiment.
104. And calibrating the electronic compass based on the hard magnetic interference and the soft magnetic interference.
It can be seen that, the local real-time calibration method for an electronic compass disclosed in this embodiment is not a storage method, but is used for updating a geomagnetic measurement data sample model after acquiring geomagnetic measurement data, and only needs to store the updated geomagnetic measurement data sample model, so that the electronic compass can also update the geomagnetic measurement data sample model in real time when being used normally, and further calibrate the electronic compass in real time, and it is not necessary to calibrate the electronic compass alone, thereby improving user experience, and saving space for storing geomagnetic measurement data.
In a specific example, the geomagnetic measurement data sample model in step 102 is a matrix S of 10 × 10; accordingly, the updating the geomagnetic measurement data sample model in step 102 includes:
updating the geomagnetic measurement data sample model by:
Si+1=Si+Hm
wherein HmFor geomagnetic measurement data, SiFor the ith updated geomagnetic measurement data sample model, Si+1For the geomagnetic measurement data sample model after the i +1 th update, i is a natural number, S0For the initial geomagnetic measurement data sample model, and S0Is a 10 x 10 zero matrix.
In this embodiment, the geomagnetic measurement data sample model may be understood as an iterative matrix.
In this embodiment, considering that a set of geomagnetic measurement data can be understood as a vector of 1 row and 3 columns, in order to add the geomagnetic measurement data to the geomagnetic measurement data sample model, the vector of 1 row and 3 columns can be converted into a matrix X of 10 rows and 1 columns, and XXTIs a 10 × 10 matrix, and can be added with S matrix, Si+1=Si+HmIs converted into Si+1=Si+XXT
On the basis of the previous example, in this embodiment, the step 103 of obtaining the hard magnetic interference and the soft magnetic interference of the electronic compass through a preset ellipsoid fitting strategy based on the updated geomagnetic measurement data sample model includes the following steps 1031 to 1033 that are not shown in fig. 1:
1031. fitting to obtain a coefficient vector of an ellipsoid equation through a preset ellipsoid fitting strategy based on the updated geomagnetic measurement data sample model; wherein the ellipsoid fitting strategy is as follows:
Figure BDA0001591822670000091
wherein, S is a geomagnetic measurement data sample model, and v is a coefficient vector v ═ a, b, c, d, e, f, g, h, m, -1 of an ellipsoid equation]λ is the eigenvector of S, C is the constraint matrix, and accordingly, the ellipsoid equation is ax2+by2+cz2+2dyz+2exz+2fxy+2gx+2hy+2mz-1=0。
In this embodiment, the hard magnetic disturbance can be regarded as a fixed magnetic field vector relative to the electronic compass, which is denoted as HdThe soft magnetic interference can be equivalent to a soft magnetic interference matrix, which is marked as KsThe effect is to distort the geomagnetic vector, which should be distributed spherically, into an ellipsoid. Record the true geomagnetic field vector as HeGeomagnetic measurement data is HmThe distortion of the real geomagnetic vector is an ellipsoid under the hard magnetic interference and the soft magnetic interference, and can be described by the following equation:
Hm=KsHe+Hd
can prove HmThe distribution of (2) is ellipsoid.
1032. Determining an ellipsoid transformation model based on the coefficient vector of the ellipsoid equation; the ellipsoid transformation model is as follows:
Figure BDA0001591822670000101
q is a4 multiplied by 4 expansion transformation matrix which is used for transforming a unit sphere with the sphere center at the origin into an ellipsoid through expansion along a coordinate axis; a translation transformation matrix with delta of 4 multiplied by 4, which has the function of translating an ellipsoid with the center at the origin of coordinates to other positions; r is a4 × 4 rotational transformation matrix, which functions to rotate the ellipsoid to other poses.
1033. Obtaining hard magnetic interference and soft magnetic interference of the electronic compass based on the ellipsoid transformation model; wherein the hard magnetic interference is Delta and the soft magnetic interference is
Figure BDA0001591822670000102
R3A matrix of the first 3 rows and the first 3 columns of R, Q3A matrix of the first 3 rows and the first 3 columns of Q.
In this embodiment, the hard magnetic interference H is obtained in step 1033dInterfering with soft magnetism KsThereafter, step 104 is by Hm=KsHe+HdTo determine the true geomagnetic vector HeAnd the calibration of the electronic compass is realized.
In the prior art, soft magnetic interference of the electronic compass is obtained through Cholesky decomposition (namely, trigonometric decomposition), however, the Cholesky decomposition assumes that the soft magnetic interference matrix is a symmetric matrix, and ignores non-diagonal elements of the soft magnetic interference matrix, namely, inter-axis interference, so that there is an error in the soft magnetic interference obtained through Cholesky decomposition (namely, trigonometric decomposition).
Based on the embodiments disclosed above, in this embodiment, after the step 101 of acquiring the geomagnetic measurement data of the electronic compass, the method may further include the following step 101', which is not shown in fig. 1:
101', extracting geomagnetic measurement data as a verification sample from the acquired sets of geomagnetic measurement data.
In this embodiment, in step 101', geomagnetic measurement data serving as a verification sample may be randomly extracted from the multiple sets of acquired geomagnetic measurement data.
In this embodiment, it is considered that the hard magnetic interference and the soft magnetic interference obtained in step 103 may be inaccurate, and therefore, before the electronic compass is calibrated in step 104, the hard magnetic interference and the soft magnetic interference obtained in step 103 should be verified first to determine whether the hard magnetic interference and the soft magnetic interference are reliable, so that a verification sample needs to be obtained to verify whether the hard magnetic interference and the soft magnetic interference are reliable, and the verification sample is obtained in step 101'.
Accordingly, before the calibration of the electronic compass based on the hard magnetic interference and the soft magnetic interference in step 104, the method further includes the following steps a to C, which are not shown in fig. 1:
A. determining the distribution state of the verification sample through a preset sample distribution state model based on the extracted verification sample;
B. judging whether the distribution state of the verification sample is uniform distribution of a standard ellipsoid or not; if yes, executing the step C; otherwise, verifying that the hard magnetic interference and the soft magnetic interference of the electronic compass are unreliable, abandoning the hard magnetic interference and the soft magnetic interference, and re-executing the steps 101-103 to obtain new hard magnetic interference and new soft magnetic interference until the verification of the new hard magnetic interference and the new soft magnetic interference is reliable;
C. and verifying that the hard magnetic interference and the soft magnetic interference of the electronic compass are reliable, which shows that the hard magnetic interference and the soft magnetic interference are accurate and available, and executing step 104.
On the basis of the above example, in this embodiment, the determining the distribution state of the verification samples through a preset sample distribution state model based on the extracted verification samples in step a may include the following steps a1 to a 5:
a1, performing coordinate transformation on the extracted verification sample to obtain a first standard sample; the coordinate system of the first standard sample is a spatial rectangular coordinate system, that is, the process of changing to the middle diagram as shown in the left diagram of fig. 2, wherein the black dots in the left diagram of fig. 2 represent the extracted verification samples, and the black dots in the middle diagram of fig. 2 represent the first standard sample.
In this embodiment, step a1 is equivalent to transforming the extracted verification sample into the first standard sample distributed on the standard ellipsoid (i.e. the ellipsoid whose center is at the origin of coordinates and half-axis is on the coordinate axis).
A2, projecting the first standard sample into the standard elliptical area of the plane rectangular coordinate system to obtain a projection sample, namely, changing the middle diagram of FIG. 2 into the right diagram, wherein the black dots in the right diagram of FIG. 2 represent the projection sample.
And A3, counting the number of sub-regions with projection samples in each preset sub-region in the standard elliptical region.
In this embodiment, the division of each preset sub-region in the standard elliptical region is, for example, the region division in the right-side diagram of fig. 2.
A4, judging whether the number of the sub-regions is larger than or equal to a preset first number threshold value; if yes, go to step A5; otherwise, determining that the distribution state of the verification sample is not the standard ellipsoid uniform distribution.
In this embodiment, in an ideal state, each preset sub-region should have a projection sample, and in an actual state, some sub-regions may not have a projection sample, so a first number threshold needs to be preset, where the first number threshold indicates that the number of sub-regions having projection samples is the minimum when the distribution state of the verification sample is the uniform distribution of the standard ellipsoid, and a specific value of the first number threshold is not limited in this embodiment, and a person skilled in the art may set the first number threshold according to actual needs.
And A5, determining the distribution state of the verification sample as a standard ellipsoid uniform distribution.
In a specific example, before the step a of determining the distribution state of the verification samples through a preset sample distribution state model based on the extracted verification samples, the method may further include the following steps B1 and B2:
b1, determining whether the verification sample extracted in the step 101' is abnormal or not through a preset sample abnormity judgment model based on the hard magnetic interference and the soft magnetic interference of the electronic compass; if so, go to step B2; otherwise, executing the step A;
b2, re-executing the step 101' to extract the geomagnetic measurement data as the verification sample from the multiple sets of acquired geomagnetic measurement data until the step B1 determines that the extracted verification sample is normal.
On the basis of the above example, in this embodiment, the step B1 of determining whether the verification sample extracted in the step 101' is abnormal or not through a preset sample abnormality determination model based on the hard magnetic interference and the soft magnetic interference of the electronic compass includes the following steps B11 to B15:
b11, converting the extracted verification sample based on the hard magnetic interference and the soft magnetic interference of the electronic compass to obtain a second standard sample; and the coordinate system of the second standard sample is a space rectangular coordinate system.
In this embodiment, the step B11 is equivalent to transforming the extracted verification sample into a second standard sample distributed on a standard sphere (i.e. a sphere with a center at the origin of coordinates and a radius of 1).
And B12, calculating the distance between the second standard sample and the origin of the rectangular coordinate system.
And B13, counting the number of second standard samples with the distance within a preset distance range.
In this embodiment, in an ideal state, if the verification sample is normal, the second standard sample should be distributed on the standard sphere, that is, the distance between the second standard sample and the origin of the rectangular coordinate system is 1, but in an actual state, the normal verification sample may not be distributed on the spherical surface of the standard sphere after being converted into the second standard sample, but has a certain error, for this reason, the distance range is preset in this embodiment, the second standard sample within the preset distance range is considered to be normal, the preset distance range is, for example, 0.9 to 1.1, and the second standard sample with the distance less than 0.9 or greater than 1.1 may be considered to be abnormal.
B14, judging whether the number of the second standard samples is smaller than a preset second number threshold value; if yes, go to step B15; otherwise, executing step A.
In this embodiment, in an actual state, it is not guaranteed that all verification samples are normal, a second number threshold needs to be preset, the second number threshold may be determined according to the maximum allowable proportion of the number of abnormal samples in the extracted verification samples, a specific value of the maximum allowable proportion is not limited in this embodiment, for example, 5%, and a person skilled in the art may set the second number threshold according to actual needs.
B15, determining that the extracted verification sample is abnormal, and executing the step B2.
In a second aspect, as shown in fig. 3, an embodiment of the present invention discloses a local real-time calibration apparatus for an electronic compass, which may include the following units: an acquisition unit 31, an updating unit 32, a determination unit 33 and a calibration unit 34. The units are specifically described as follows:
an acquisition unit 31 for acquiring geomagnetic measurement data of the electronic compass;
an updating unit 32, configured to update the geomagnetic measurement data sample model based on the geomagnetic measurement data and a preset geomagnetic measurement data sample model;
the determining unit 33 is configured to obtain hard magnetic interference and soft magnetic interference of the electronic compass through a preset ellipsoid fitting strategy based on the updated geomagnetic measurement data sample model;
a calibration unit 34, configured to perform calibration of the electronic compass based on the hard magnetic interference and the soft magnetic interference.
The local real-time calibration device for the electronic compass disclosed in the above embodiments can implement the process of the local real-time calibration method for the electronic compass disclosed in each embodiment of the first aspect, and is not described again for avoiding repetition.
It is to be understood that the embodiments described herein may be implemented in hardware, software, firmware, middleware, microcode, or any combination thereof. For a hardware implementation, the Processing units may be implemented within one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), general purpose processors, controllers, micro-controllers, microprocessors, other electronic units configured to perform the functions described herein, or a combination thereof.
For a software implementation, the techniques described herein may be implemented by means of units performing the functions described herein. The software codes may be stored in a memory and executed by a processor. The memory may be implemented within the processor or external to the processor.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the embodiments of the present invention may be essentially implemented or make a contribution to the prior art, or may be implemented in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the methods described in the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program codes, such as a U disk, a removable hard disk, a ROM, a RAM, a magnetic disk, or an optical disk.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
It is noted that, in this document, relational terms such as "first" and "second," and the like, may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (6)

1. A local real-time calibration method for an electronic compass is characterized by comprising the following steps:
acquiring geomagnetic measurement data of the electronic compass;
updating the geomagnetic measurement data sample model based on the geomagnetic measurement data and a preset geomagnetic measurement data sample model, wherein the geomagnetic measurement data sample model is a matrix S of 10 × 10, and updating the geomagnetic measurement data sample model by the following formula:
Si+1=Si+Hm
Hmfor geomagnetic measurement data, SiFor the ith updated geomagnetic measurement data sample model, Si+1For the geomagnetic measurement data sample model updated for the (i + 1) th time, i is a natural number, S0For the initial geomagnetic measurement data sample model, and S0A zero matrix of 10 × 10;
fitting to obtain a coefficient vector of an ellipsoid equation through a preset ellipsoid fitting strategy based on the updated geomagnetic measurement data sample model; wherein the ellipsoid fitting strategy is as follows:
Figure FDA0002514983860000011
wherein, S is a geomagnetic measurement data sample model, v is a coefficient vector v ═ of an ellipsoid equation [ a, b, C, d, e, f, g, h, m, -1], λ is an eigenvector of S, and C is a constraint matrix;
determining an ellipsoid transformation model based on the coefficient vector of the ellipsoid equation; the ellipsoid transformation model is as follows:
Figure FDA0002514983860000012
wherein, Δ is a translation transformation matrix of 4 × 4, R is a rotation transformation matrix of 4 × 4, and Q is a scaling transformation matrix of 4 × 4;
obtaining hard magnetic interference and soft magnetic interference of the electronic compass based on the ellipsoid transformation model; wherein the hard magnetic interference is Delta and the soft magnetic interference is
Figure FDA0002514983860000021
R3A matrix of the first 3 rows and the first 3 columns of R, Q3A matrix of the first 3 rows and the first 3 columns of Q;
and calibrating the electronic compass based on the hard magnetic interference and the soft magnetic interference.
2. The method of claim 1, wherein after the obtaining of geomagnetic measurement data of the electronic compass, the method further comprises:
extracting geomagnetic measurement data serving as verification samples from the multiple sets of acquired geomagnetic measurement data;
accordingly, before the calibrating the electronic compass based on the hard magnetic interference and the soft magnetic interference, the method further includes:
determining the distribution state of the verification sample through a preset sample distribution state model based on the extracted verification sample;
judging whether the distribution state of the verification sample is uniform distribution of a standard ellipsoid or not;
and if so, verifying that the hard magnetic interference and the soft magnetic interference of the electronic compass are reliable, and executing the step of calibrating the electronic compass based on the hard magnetic interference and the soft magnetic interference.
3. The method according to claim 2, wherein the determining the distribution state of the verification samples through a preset sample distribution state model based on the extracted verification samples comprises:
carrying out coordinate transformation on the extracted verification sample to obtain a first standard sample; the coordinate system of the first standard sample is a space rectangular coordinate system;
projecting the first standard sample into a standard elliptical region of a plane rectangular coordinate system to obtain a projection sample;
counting the number of sub-regions with projection samples in each preset sub-region in the standard elliptical region;
judging whether the number of the sub-regions is larger than or equal to a preset first number threshold value or not;
and if so, determining that the distribution state of the verification sample is the uniform distribution of the standard ellipsoid.
4. The method according to claim 2, wherein before determining the distribution state of the verification samples through a preset sample distribution state model based on the extracted verification samples, the method further comprises:
determining whether the extracted verification sample is abnormal or not through a preset sample abnormity judgment model based on the hard magnetic interference and the soft magnetic interference of the electronic compass;
if the extracted geomagnetic sample is abnormal, extracting geomagnetic measurement data serving as a verification sample from the multiple groups of acquired geomagnetic measurement data again until the extracted verification sample is determined to be normal;
and if the verification sample is normal, executing the step of determining the distribution state of the verification sample based on the extracted verification sample through a preset sample distribution state model.
5. The method of claim 4, wherein the determining whether the extracted verification sample is abnormal or not through a preset sample abnormality judgment model based on the hard magnetic interference and the soft magnetic interference of the electronic compass comprises:
converting the extracted verification sample based on the hard magnetic interference and the soft magnetic interference of the electronic compass to obtain a second standard sample; the coordinate system of the second standard sample is a space rectangular coordinate system;
calculating the distance between the second standard sample and the origin of the rectangular coordinate system;
counting the number of second standard samples with the distance within a preset distance range;
judging whether the number of the second standard samples is smaller than a preset second number threshold value or not;
and if so, determining that the extracted verification sample is abnormal.
6. A local real-time calibration device for an electronic compass is characterized by comprising:
the acquisition unit is used for acquiring geomagnetic measurement data of the electronic compass;
an updating unit, configured to update the geomagnetic measurement data sample model based on the geomagnetic measurement data and a preset geomagnetic measurement data sample model, where the geomagnetic measurement data sample model is a matrix S of 10 × 10, and update the geomagnetic measurement data sample model by using the following formula:
Si+1=Si+Hm
Hmfor geomagnetic measurement data, SiFor the ith updated geomagnetic measurement data sample model, Si+1For the geomagnetic measurement data sample model updated for the (i + 1) th time, i is a natural number, S0For the initial geomagnetic measurement data sample model, and S0A zero matrix of 10 × 10;
the determining unit is used for fitting to obtain a coefficient vector of an ellipsoid equation through a preset ellipsoid fitting strategy based on the updated geomagnetic measurement data sample model; wherein the ellipsoid fitting strategy is as follows:
Figure FDA0002514983860000041
wherein, S is a geomagnetic measurement data sample model, v is a coefficient vector v ═ of an ellipsoid equation [ a, b, C, d, e, f, g, h, m, -1], λ is an eigenvector of S, and C is a constraint matrix; determining an ellipsoid transformation model based on the coefficient vector of the ellipsoid equation; the ellipsoid transformation model is as follows:
Figure FDA0002514983860000042
wherein, Δ is a translation transformation matrix of 4 × 4, R is a rotation transformation matrix of 4 × 4, and Q is a scaling transformation matrix of 4 × 4;
obtaining hard magnetic interference and soft magnetic interference of the electronic compass based on the ellipsoid transformation model; wherein the hard magnetic interference is Delta and the soft magnetic interference is
Figure FDA0002514983860000043
R3A matrix of the first 3 rows and the first 3 columns of R, Q3A matrix of the first 3 rows and the first 3 columns of Q;
and the calibration unit is used for calibrating the electronic compass based on the hard magnetic interference and the soft magnetic interference.
CN201810191456.9A 2018-03-08 2018-03-08 Local real-time calibration method and device for electronic compass Active CN108426571B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810191456.9A CN108426571B (en) 2018-03-08 2018-03-08 Local real-time calibration method and device for electronic compass

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810191456.9A CN108426571B (en) 2018-03-08 2018-03-08 Local real-time calibration method and device for electronic compass

Publications (2)

Publication Number Publication Date
CN108426571A CN108426571A (en) 2018-08-21
CN108426571B true CN108426571B (en) 2020-11-17

Family

ID=63157640

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810191456.9A Active CN108426571B (en) 2018-03-08 2018-03-08 Local real-time calibration method and device for electronic compass

Country Status (1)

Country Link
CN (1) CN108426571B (en)

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109633763B (en) * 2018-12-18 2020-07-24 中国电子科技集团公司第四十九研究所 Precise geomagnetic mapping system based on magnetometer and GPS and geomagnetic mapping method thereof
CN109561393B (en) * 2018-12-24 2021-01-26 北京全电智领科技有限公司 Low-speed carrier positioning method and device based on space optical communication technology
CN109737940A (en) * 2019-01-30 2019-05-10 深圳市沃感科技有限公司 A kind of electronic compass real-time, freedom calibration method and device
CN109737939B (en) * 2019-01-30 2021-05-14 深圳市沃感科技有限公司 Method and device for realizing omnibearing installation of electronic compass
CN109781144B (en) 2019-01-30 2021-03-19 京东方科技集团股份有限公司 Data correction method and device, electronic equipment and computer readable storage medium
CN110307857A (en) * 2019-04-23 2019-10-08 深圳市趣创科技有限公司 Compass calibration method, apparatus, computer equipment and storage medium
CN110398702B (en) * 2019-06-19 2021-07-23 北京摩高科技有限公司 Real-time online magnetic calibration method based on multi-sensor fusion
CN110426057B (en) * 2019-06-27 2021-08-20 华为技术有限公司 Magnetometer data calibration method and magnetometer data calibration device
CN114777755A (en) * 2022-03-08 2022-07-22 维沃移动通信有限公司 Electronic compass calibration method and device, electronic equipment and storage medium
CN114812532B (en) * 2022-05-30 2022-10-11 天津云圣智能科技有限责任公司 Magnetic compass parameter calibration method and unmanned aerial vehicle course angle determination method and device

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7451549B1 (en) * 2006-08-09 2008-11-18 Pni Corporation Automatic calibration of a three-axis magnetic compass
CN102252689A (en) * 2010-05-19 2011-11-23 北京国浩传感器技术研究院(普通合伙) Electronic compass calibration method based on magnetic sensor
CN104237958A (en) * 2014-09-29 2014-12-24 陕西宝成航空仪表有限责任公司 Geomagnetic field vector measuring error correcting method on basis of track constraints
CN107870001B (en) * 2017-11-27 2019-10-11 东南大学 A kind of magnetometer bearing calibration based on ellipsoid fitting

Also Published As

Publication number Publication date
CN108426571A (en) 2018-08-21

Similar Documents

Publication Publication Date Title
CN108426571B (en) Local real-time calibration method and device for electronic compass
Gebre-Egziabher et al. Calibration of strapdown magnetometers in magnetic field domain
WO2017063386A1 (en) Precision calibration method for attitude measurement system
JP4093861B2 (en) Compensation of large magnetic errors for electronic compass and all orientation operations
CN103941309B (en) Geomagnetic sensor calibrator (-ter) unit and its method
CN107917704B (en) A kind of magnetic compass calibration method and device, computer readable storage medium
JP2008076397A (en) Calibration method, device and medium for compass sensor with magnetic environment taken into consideration, and azimuth angle measuring method, instrument and medium using the same
JP6894593B2 (en) How to track the position of a magnet by differential measurement
KR101152095B1 (en) Magnetic data processing device, method, and computer readable storage medium
KR20130143576A (en) Apparatuses and methods for estimating the yaw angle of a device in a gravitational reference system using measurements of motion sensors and a magnetometer attached to the device
KR101698682B1 (en) Method and Apparatus of correcting output value of terrestrial magnetism sensor
CN113176529B (en) Magnetic gradiometer correction method, magnetic gradiometer correction device and storage medium
WO2017134695A1 (en) System and method for calibrating magnetic sensors in real and finite time
Aligia et al. An orientation estimation strategy for low cost IMU using a nonlinear Luenberger observer
Huang et al. Multi-sensor calibration through iterative registration and fusion
JP5712333B2 (en) Physical quantity data correction apparatus and physical quantity data correction method
JP5772265B2 (en) Geomagnetic measurement apparatus, offset determination method, and offset determination program
CN111982155B (en) Calibration method and device of magnetic sensor, electronic equipment and computer storage medium
CN106501868B (en) Three axis geomagnetic sensor real-time correction methods
CN110567486B (en) Mathematical model construction method for calibrating 3D rotation difference, calibration method and device thereof
Li et al. An efficient method for tri-axis magnetometer calibration
CN107063218B (en) Data processing method and device
Babaee et al. Calibration of triaxial magnetometers for IoT applications using metaheuristic methods
KR100735494B1 (en) Azimuth measurement device and azimuth measurement method
Menezes Filho et al. Accurate and computational-efficient analytical solutions for the extended two-step magnetometer calibration

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant