Method, device and equipment for resisting magnetic interference based on attitude reference system

By adding multiple magnetometers to the attitude reference system to determine and eliminate interfering magnetic fields and calibrate gyroscope data, the problems of attitude angle measurement error and magnetic interference in the attitude reference system are solved, and the determination accuracy and control of the carrier attitude are improved. efficiency.

CN118362123BActive Publication Date: 2024-08-30BEIJING WHITEWATER TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410781039.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-18
Publication Date
2024-08-30
Estimated Expiration
2044-06-18

AI Technical Summary

Technical Problem

The existing attitude reference system has large errors when measuring the attitude angle information of the carrier, which affects the control efficiency and accuracy. It is also susceptible to interference from external magnetic fields, making it difficult to accurately identify the interfering magnetic field, resulting in measurement deviations.

Method used

Add multiple magnetometers to the attitude reference system. By determining the output vector and magnetic field parameter information of the magnetometer, calculate the target magnetic field strength of the magnetometer and determine whether there is an interference magnetic field. If not, based on the accelerometer and gyroscope Calibrate the data to improve the accuracy of attitude angle determination.

Benefits of technology

It effectively reduces the error in attitude angle measurement, improves the determination accuracy of the carrier's attitude, enhances the anti-magnetic interference performance, and ensures accurate control of the carrier.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118362123B
    Figure CN118362123B
Patent Text Reader

Abstract

The present application provides a method, device and equipment for resisting magnetic interference based on an attitude reference system. An attitude reference system is deployed in a carrier, and the attitude reference system includes a gyroscope, an accelerometer, and at least two magnetometers. The method includes: determining the output vector and magnetic field parameter information of the magnetometer; the magnetic field parameter information represents the influencing factors of the magnetometer when measuring the magnetic field strength; determining the target magnetic field strength of the magnetometer according to the output vector and magnetic field parameter information of the magnetometer; the target magnetic field strength includes the projection vector of the earth's magnetic field in the magnetometer coordinate system and the projection vector of the interference magnetic field in the magnetometer coordinate system; if it is determined that there is no interference magnetic field in the environment according to the target magnetic field strength of each magnetometer, then determining the attitude angle information of the carrier according to the output vector of the accelerometer, the output vector of the gyroscope, and the target magnetic field strength; the attitude angle information represents the rotation angle of the carrier.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to computer technology, robotics technology and aerospace technology, and in particular to a method, device and equipment for resisting magnetic interference based on a heading reference system. Background Art

[0002] The carrier's attitude refers to the attitude of the carrier relative to the three-dimensional space reference coordinate system, which is usually expressed in three angles: roll, pitch, and yaw. When the carrier is moving, the carrier's motion state can be determined by obtaining the carrier's attitude angle information, thereby controlling the carrier.

[0003] AHRS (Attitude and Heading Reference SystemAttitude and headingreference systemAttitude and heading reference system, attitude reference system) is a general term for a type of three-dimensional space motion sensing system. It can be installed on a moving carrier such as a car, ship, airplane, robot, etc. to obtain the carrier's real-time attitude angle information. However, the information measured by the current AHRS has a large error, which affects the control efficiency and accuracy of the carrier. How to accurately obtain the carrier's attitude angle information through AHRS is a problem that needs to be solved urgently. Summary of the invention

[0004] The present application provides a method, device and equipment for resisting magnetic interference based on a heading reference system, so as to improve the accuracy of determining the attitude of a carrier and avoid interference from an external magnetic field.

[0005] In a first aspect, the present application provides a method for resisting magnetic interference based on a heading reference system, wherein a heading reference system is deployed in a carrier, and the heading reference system includes a gyroscope, an accelerometer, and at least two magnetometers; the method includes:

[0006] Determine the output vector and magnetic field parameter information of the magnetometer; wherein the output vector of the magnetometer represents the magnetic field strength measured by the magnetometer, and the magnetic field parameter information represents the influencing factors of the magnetometer when measuring the magnetic field strength;

[0007] Determine the target magnetic field strength of the magnetometer according to the output vector and magnetic field parameter information of the magnetometer; wherein the target magnetic field strength includes the projection vector of the earth's magnetic field in a preset magnetometer coordinate system and the projection vector of the interference magnetic field in the preset magnetometer coordinate system;

[0008] If it is determined based on the target magnetic field strength of each of the magnetometers that there is no interfering magnetic field in the environment in which the carrier is located, then the attitude angle information of the carrier is determined based on the output vector of the accelerometer, the output vector of the gyroscope, and the target magnetic field strength; wherein the output vector of the accelerometer represents the gravity vector measured by the accelerometer, the output vector of the gyroscope represents the angular velocity of the carrier, and the attitude angle information represents the rotation angle of the carrier.

[0009] In a second aspect, the present application provides a device for resisting magnetic interference based on a heading reference system, wherein a heading reference system is deployed in a carrier, and the heading reference system includes a gyroscope, an accelerometer, and at least two magnetometers; the device includes:

[0010] An information determination module, used to determine the output vector and magnetic field parameter information of the magnetometer; wherein the output vector of the magnetometer represents the magnetic field strength measured by the magnetometer, and the magnetic field parameter information represents the influencing factors of the magnetometer when measuring the magnetic field strength;

[0011] A magnetic field determination module, used to determine the target magnetic field strength of the magnetometer according to the output vector of the magnetometer and the magnetic field parameter information; wherein the target magnetic field strength includes the projection vector of the earth's magnetic field in a preset magnetometer coordinate system and the projection vector of the interference magnetic field in the preset magnetometer coordinate system;

[0012] An angle determination module is used to determine the attitude angle information of the carrier according to the output vector of the accelerometer, the output vector of the gyroscope, and the target magnetic field strength if it is determined that there is no interfering magnetic field in the environment of the carrier according to the target magnetic field strength of each of the magnetometers; wherein the output vector of the accelerometer represents the gravity vector measured by the accelerometer, the output vector of the gyroscope represents the angular velocity of the carrier, and the attitude angle information represents the rotation angle of the carrier.

[0013] In a third aspect, the present application provides an electronic device, comprising: a processor, and a memory communicatively connected to the processor;

[0014] The memory stores computer-executable instructions;

[0015] The processor executes the computer-executable instructions stored in the memory to implement the method as described in the first aspect of the present application.

[0016] In a fourth aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, they are used to implement the method described in the first aspect of the present application.

[0017] In a fifth aspect, the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the method described in the first aspect of the present application.

[0018] The present application provides a method, device and equipment for resisting magnetic interference based on an attitude reference system. A plurality of magnetometers are arranged in the attitude reference system. By determining the output vector and magnetic field parameter information of the magnetometer, the target magnetic field strength of the magnetometer can be determined. The target magnetic field strength can include two parts, namely, the projection vector of the earth's magnetic field in a preset magnetometer coordinate system and the projection vector of the interference magnetic field in a preset magnetometer coordinate system. According to the target magnetic field strength of each magnetometer, it is determined whether there is an external interference magnetic field in the environment where the carrier is located. If not, the output vector of the gyroscope is calibrated according to the output vector of the accelerometer and the target magnetic field strength to obtain accurate attitude angle information of the carrier. By adding a magnetometer to the AHRS, it can be determined whether there is an interference magnetic field. In the absence of an interference magnetic field, the data of the gyroscope is calibrated to improve the determination accuracy of the carrier's attitude, thereby accurately controlling the carrier. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0020] Figure 1 A schematic flow chart of a method for resisting magnetic interference based on a heading reference system provided in an embodiment of the present application;

[0021] Figure 2 A schematic diagram of placing a magnetometer in a carrier provided in an embodiment of the present application;

[0022] Figure 3 A schematic flow chart of a method for resisting magnetic interference based on a heading reference system provided in an embodiment of the present application;

[0023] Figure 4 A schematic flow chart of a method for resisting magnetic interference based on a heading reference system provided in an embodiment of the present application;

[0024] Figure 5 A schematic diagram of a carrier coordinate system provided in an embodiment of the present application;

[0025] Figure 6 A structural block diagram of a device for resisting magnetic interference based on a heading reference system provided in an embodiment of the present application;

[0026] Figure 7 A structural block diagram of a device for resisting magnetic interference based on a heading reference system provided in an embodiment of the present application;

[0027] Figure 8 A structural block diagram of an electronic device provided in an embodiment of the present application;

[0028] Fig. 9 A structural block diagram of an electronic device provided in an embodiment of the present application.

[0029] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION

[0030] In order to make the objectives, technical solutions and advantages of the present application more clear, the embodiments of the present application will be further described in detail below with reference to the accompanying drawings.

[0031] It should be clear that the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present application.

[0032] When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Instead, they are only examples of devices and methods consistent with some aspects of the present application as detailed in the attached claims.

[0033] In the description of the present application, it should be understood that the terms "first", "second", "third", etc. are only used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence, nor can they be understood as indicating or implying relative importance. For those of ordinary skill in the art, the specific meanings of the above terms in the present application can be understood according to the specific circumstances. In addition, in the description of the present application, unless otherwise specified, "multiple" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the objects associated before and after are in an "or" relationship.

[0034] It should be noted that due to space limitations, this application specification does not list all optional implementation methods. After reading this application specification, those skilled in the art should be able to think that as long as the technical features do not contradict each other, any combination of technical features can constitute an optional implementation method. Each embodiment is described in detail below.

[0035] AHRS is a general term for a type of three-dimensional space motion sensing system. It is installed on a carrier, which can be any moving object, for example, various aircraft such as cars, ships, airplanes, and spacecraft, as well as human bodies, robots, etc. AHRS can be used to obtain the real-time three-dimensional space motion parameters of the carrier, for example, the carrier's attitude, angular velocity and other motion parameters can be obtained. AHRS usually uses a gyroscope as the core. The gyroscope is used to measure the angular velocity of the carrier when it moves in three-dimensional space. By integrating the measured angular velocity, the angular change of the carrier's motion at each moment can be obtained, and further the attitude of the carrier relative to the preset inertial reference coordinate system can be obtained.

[0036] However, the data measured by the gyroscope contains large measurement errors and noise. In addition, the gyroscope only measures angular velocity. In order to obtain the angle information of the attitude, the measurement results need to be integrated over time, which further amplifies the impact of measurement errors and noise, causing the error of the attitude angle to quickly increase to an unacceptable level over time. Therefore, it is necessary to find a way to calibrate and suppress it.

[0037] An accelerometer can be added to the AHRS. When the carrier is in a state of zero acceleration, the accelerometer measures the projection of the gravity vector in the carrier coordinate system. Through simple calculations, the pitch angle and roll angle can be obtained, which can be used to calibrate the gyroscope pitch and roll angle calculation errors, but cannot be used to calibrate the gyroscope yaw angle error, so the accurate carrier attitude cannot be obtained.

[0038] Furthermore, a magnetometer can be added to the AHRS system, and the magnetometer measures the projection of the geomagnetic vector in the carrier coordinate system, so that the yaw error of the gyroscope can be calibrated. However, since the magnetometer is easily affected by the interfering magnetic field in the environment, its measured values ​​may include wild points that deviate seriously from the true value. If these wild points cannot be accurately and reliably identified, the erroneous magnetometer measurement values ​​will be used to calibrate the gyroscope, causing serious deviations in the output of the entire AHRS system.

[0039] The present application provides a method, device and equipment for resisting magnetic interference based on a heading reference system, aiming to solve the above technical problems in the prior art.

[0040] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.

[0041] Figure 1The present invention is a flowchart of a method for resisting magnetic interference based on a heading reference system provided in an embodiment of the present invention. The method can be performed by a device for resisting magnetic interference based on a heading reference system. A heading reference system is deployed in the carrier, and the heading reference system includes a gyroscope, an accelerometer, and at least two magnetometers. Figure 1 As shown, the method comprises the following steps:

[0042] S101, determining an output vector and magnetic field parameter information of a magnetometer; wherein the output vector of the magnetometer represents the magnetic field strength measured by the magnetometer, and the magnetic field parameter information represents the influencing factors of the magnetometer when measuring the magnetic field strength.

[0043] Exemplarily, the AHRS is deployed in a carrier, and the attitude angle information of the carrier can be obtained in real time. The attitude angle information can represent the attitude of the carrier, for example, it can be determined that the carrier is accelerating parallel to the ground or the carrier is rotating along a vertical axis, etc. The AHRS may include a gyroscope, an accelerometer, and a magnetometer, etc., wherein a plurality of magnetometers may be provided, for example, there may be two magnetometers. Multiple magnetometers may be placed as far apart as possible within the allowable range of the carrier, for example, two magnetometers may be placed on the left and right sides of the carrier, respectively. The carrier contains ferromagnetic objects, which may include hard magnetic objects and soft magnetic objects. Multiple magnetometers may be as far away from the ferromagnetic objects in the carrier as possible, and may be placed symmetrically along the soft magnetic objects in the carrier as much as possible. Since the external interference magnetic field is usually local, and the magnetic lines of force of the external interference magnetic field are usually not parallel to the line connecting the two magnetometers, the two magnetometers will produce different readings in the presence of an interference magnetic field. There may also be three or four magnetometers in the AHRS, for example, the AHRS includes three magnetometers, and the placement positions of the three magnetometers are not collinear. In this way, the external interference magnetic field cannot be co-linear with the three pairs of magnetometers formed by the three magnetometers at the same time, which can avoid the problem that when only two magnetometers are used, the magnetic field lines of the interference magnetic field are parallel to the line connecting the two magnetometers, resulting in a decrease in interference resolution. For another example, four magnetometers can be used and arranged non-coplanarly, thereby avoiding the problem that when only three magnetometers are used, the magnetic field lines of the interference magnetic field are co-planar with the plane formed by the three magnetometers, resulting in a decrease in interference resolution.

[0044] Figure 2 Schematic diagram of the placement of the magnetometer in the carrier. Figure 2 The carrier in the mobile phone is a mobile phone, the magnetometer in the mobile phone may include a magnetometer A and a magnetometer B, and the soft magnetic object in the mobile phone may be a battery. The magnetometer A may be placed on the left side of the mobile phone, and the magnetometer B may be placed on the right side of the mobile phone.

[0045] The magnetometer can measure the magnetic field strength of the environment where the carrier is located, and obtain the output vector of the magnetometer in real time. The output vector of the magnetometer is the magnetic field strength measured by the magnetometer, and the output vector of each magnetometer can be obtained. The magnetic field parameter information of each magnetometer can also be determined, and the magnetic field parameter information can characterize the influencing factors of the magnetometer when measuring the magnetic field strength. For example, the magnetic field parameter information can be a zero-mean Gaussian white noise vector of the magnetometer. The magnetic field parameter information can be determined when the magnetometer leaves the factory. When it is necessary to determine the carrier posture, the preset magnetic field parameter information can be directly obtained.

[0046] S102. Determine the target magnetic field strength of the magnetometer according to the output vector and magnetic field parameter information of the magnetometer; wherein the target magnetic field strength includes the projection vector of the earth's magnetic field in a preset magnetometer coordinate system and the projection vector of the interference magnetic field in the preset magnetometer coordinate system.

[0047] Exemplarily, after obtaining the output vector and magnetic field parameter information of the magnetometer, the target magnetic field strength of the magnetometer can be determined. The target magnetic field strength can include two parts, namely, the projection vector of the earth's magnetic field in the preset magnetometer coordinate system and the projection vector of the interference magnetic field in the preset magnetometer coordinate system. The interference magnetic field is a magnetic field outside the carrier in the environment where the carrier is located. For example, the carrier is a vehicle, and there is a mobile phone outside the vehicle, which interferes with the vehicle. The magnetic field caused by the mobile phone is the interference magnetic field of the vehicle. If there are two magnetometers in the AHRS, for each magnetometer, the target magnetic field strength of the magnetometer is determined according to the output vector and magnetic field parameter information of the corresponding magnetometer.

[0048] The preset magnetometer coordinate system may be a three-dimensional coordinate system, that is, the magnetic coordinate system may include an X-axis, a Y-axis, and a Z-axis. The projection vector of the earth's magnetic field in the preset magnetometer coordinate system may represent the magnetic field strength of the earth's magnetic field, and the projection vector of the interference magnetic field in the preset magnetometer coordinate system may represent the magnetic field strength of the interference magnetic field.

[0049] According to the output vector of the magnetometer and the magnetic field parameter information, the projection vector of the earth's magnetic field in the preset magnetometer coordinate system and the projection vector of the interference magnetic field in the preset magnetometer coordinate system can be calculated to obtain the target magnetic field strength. The calculation formula of the magnetic field strength can be preset. For example, the calculation formula of the magnetic field strength of the earth's magnetic field can be preset to calculate the projection vector of the earth's magnetic field in the preset magnetometer coordinate system, and the calculation formula of the magnetic field strength of the interference magnetic field can also be preset to calculate the projection vector of the interference magnetic field in the preset magnetometer coordinate system. In this embodiment, the preset calculation formula is not specifically limited.

[0050] S103. If it is determined that there is no interfering magnetic field in the environment where the carrier is located based on the target magnetic field strength of each magnetometer, the attitude angle information of the carrier is determined based on the output vector of the accelerometer, the output vector of the gyroscope, and the target magnetic field strength; wherein the output vector of the accelerometer represents the gravity vector measured by the accelerometer, the output vector of the gyroscope represents the angular velocity of the carrier, and the attitude angle information represents the rotation angle of the carrier.

[0051] Exemplarily, after the target magnetic field strengths of multiple magnetometers are obtained, it can be determined whether there is an interfering magnetic field in the environment where the carrier is located according to the target magnetic field strengths of the multiple magnetometers. A judgment rule for the interfering magnetic field can be preset. For example, a magnetic field strength threshold can be preset. If the multiple target magnetic field strengths are all greater than the preset magnetic field strength threshold, it is determined that there is an interfering magnetic field in the environment where the carrier is located. In this embodiment, the preset judgment rule for the interfering magnetic field is not specifically limited.

[0052] If it is determined that there is an interfering magnetic field in the environment where the carrier is located, it means that the data points measured by each magnetometer are wild points. Wild points refer to measurement values ​​that deviate significantly from the preset measurement model. Wild points cannot be used to calibrate the output vector of the gyroscope. Therefore, when it is determined that there is an interfering magnetic field in the environment where the carrier is located, the gyroscope is not calibrated. If it is determined that there is no interfering magnetic field in the environment where the carrier is located, the data measured by the magnetometer is determined to be a legal value, and the gyroscope can be calibrated to obtain more accurate attitude angle information of the carrier. The attitude angle information can characterize the rotation angle of the carrier. For example, it can include the rotation angle of the carrier along the X-axis, the rotation angle along the Y-axis, and the rotation angle along the Z-axis, so as to obtain the current attitude of the carrier.

[0053] The attitude angle information of the carrier can be determined according to the output vector of the accelerometer, the output vector of the gyroscope, and the target magnetic field strength, that is, according to the output vector of the accelerometer and the target magnetic field strength, the output vector of the gyroscope is calibrated to obtain the attitude angle information of the carrier. The accelerometer measures the gravity vector. The pitch angle and roll angle of the carrier can be obtained by calculating the gravity vector through a preset method. According to the calculated pitch angle and roll angle, the pitch angle and roll angle of the gyroscope are calibrated for error respectively, but the accelerometer cannot be used to calibrate the yaw angle error of the gyroscope. For example, if the carrier rotates around the gravity axis in the horizontal plane, the accelerometer reading carried by the carrier will not change, so the error in the calculation of the yaw angle cannot be suppressed by the accelerometer alone. The calculation error of the yaw angle of the gyroscope can be calibrated by the output vector of the magnetometer or by the target magnetic field strength. In this embodiment, the error calibration process is not specifically limited.

[0054] In this embodiment, the method further includes: if the acceleration of the carrier is determined to be zero based on a preset acceleration determination algorithm, determining the attitude angle information of the carrier according to the output vector of the accelerometer, the output vector of the gyroscope, and the target magnetic field strength.

[0055] Specifically, after determining that there is no interfering magnetic field in the environment where the carrier is located, it is determined whether the current acceleration of the carrier is zero. If not, the output vector of the gyroscope is not calibrated; if so, the attitude angle information of the carrier can be determined according to the output vector of the accelerometer, the output vector of the gyroscope, and the target magnetic field strength.

[0056] An acceleration determination algorithm may be preset, and according to the preset acceleration determination algorithm, the current acceleration of the carrier is determined to determine whether the current acceleration is zero. For example, according to the preset zero acceleration algorithm, it may be determined whether there is linear acceleration, and if so, it is determined that the acceleration is not zero; if not, it is determined that the acceleration is zero. In this embodiment, the preset acceleration determination algorithm is not specifically limited.

[0057] The beneficial effect of such a setting is that when the carrier is in a state of zero acceleration, the accelerometer measures the projection of the gravity vector in the carrier coordinate system, and the gyroscope can be calibrated according to the output vector of the accelerometer. That is, by judging the current acceleration, the suppression effect of the gyroscope error is improved, thereby improving the accuracy of attitude determination.

[0058] In this embodiment, a plurality of magnetometers are arranged in the attitude reference system. By determining the output vector and magnetic field parameter information of the magnetometer, the target magnetic field strength of the magnetometer can be determined. The target magnetic field strength can include two parts, namely, the projection vector of the earth's magnetic field in the preset magnetometer coordinate system and the projection vector of the interference magnetic field in the preset magnetometer coordinate system. According to the target magnetic field strength of each magnetometer, it is determined whether there is an external interference magnetic field in the environment where the carrier is located. If not, the output vector of the gyroscope is calibrated according to the output vector of the accelerometer and the target magnetic field strength to obtain accurate attitude angle information of the carrier. By adding a magnetometer to the AHRS, it can be determined whether there is an interference magnetic field. In the absence of an interference magnetic field, the data of the gyroscope is calibrated to improve the determination accuracy of the carrier's attitude, and then the carrier is accurately controlled. This embodiment can accurately determine the constant or time-varying interference magnetic field in the environment, so that the wild point in the magnetometer measurement value can be reliably detected, thereby greatly improving the anti-magnetic interference performance of the entire attitude reference system.

[0059] Figure 3 A flowchart of a method for resisting magnetic interference based on a heading reference system is provided in an embodiment of the present application. This embodiment is an optional embodiment based on the above embodiment.

[0060] In this embodiment, the magnetic field parameter information includes the projection vector of the magnetic field of the hard magnetic material in the carrier in the preset magnetometer coordinate system, the magnetometer zero value offset vector, the magnetometer scale error factor matrix, the magnetometer installation error factor matrix, and the secondary magnetic field excitation matrix of the soft magnetic material in the carrier; determining the output vector and magnetic field parameter information of the magnetometer includes: obtaining the output vector of the magnetometer; using a preset sphere fitting method to determine the projection vector of the magnetic field of the hard magnetic material in the carrier in the preset magnetometer coordinate system, the magnetometer zero value offset vector, the magnetometer scale error factor matrix, and the magnetometer installation error factor matrix; using a preset ellipsoid fitting method to determine the secondary magnetic field excitation matrix of the soft magnetic material in the carrier.

[0061] like Figure 3 The method comprises the following steps:

[0062] S301, obtaining the output vector of the magnetometer; using a preset sphere fitting method to determine the projection vector of the magnetic field of the hard magnetic material in the carrier in the preset magnetometer coordinate system, the magnetometer zero value offset vector, the magnetometer scale error factor matrix, and the magnetometer installation error factor matrix; using a preset ellipsoid fitting method to determine the secondary magnetic field excitation matrix of the soft magnetic material in the carrier.

[0063] Exemplarily, the magnetometer can output a vector data in real time, and the data output by the magnetometer is determined as the output vector of the magnetometer. The output vector of the magnetometer can characterize the magnetic field strength measured by the magnetometer. The vector has magnitude and direction, that is, the output vector of the magnetometer can indicate the magnitude of the magnetic field strength and the direction of the magnetic field. The output vector of the magnetometer can be the components of the magnetic field on the three axes of XYZ. The output vector of the magnetometer can be directly obtained.

[0064] The magnetic field parameter information may include the projection vector of the magnetic field of the hard magnetic material in the carrier in the preset magnetometer coordinate system, the magnetometer zero value offset vector, the magnetometer scale error factor matrix, the magnetometer installation error factor matrix, and the secondary magnetic field excitation matrix of the soft magnetic material in the carrier. Each magnetometer corresponds to its own magnetometer coordinate system, and the magnetometer coordinate system is a three-dimensional coordinate system. The earth's magnetic field is a magnetic field that exists in a large range, the carrier hard magnetic material magnetic field is the magnetic field generated by the hard magnetic material on the carrier itself, and the secondary magnetic field excitation matrix of the soft magnetic material in the carrier refers to the excitation matrix of the secondary magnetic field generated by the temporary magnetization of the soft magnetic material in the carrier. The zero value offset vector is a random variable that changes with time, the magnetometer scale error factor matrix is ​​a matrix composed of the scale error factors of the three axes of the magnetometer, and the magnetometer installation error factor matrix is ​​a matrix composed of the installation error factors of the three axes of the magnetometer. The scale error factor matrix and the installation error factor matrix can be calibrated once when the magnetometer leaves the factory and is installed on the carrier, so that they can be regarded as constant values ​​and have no influence on the measurement results during use.

[0065] The scale error factor matrix of the magnetometer can be expressed as:

[0066] ;

[0067] in, is the magnetometer scale error factor matrix, Indicates the scale error of the magnetometer on the X-axis, Indicates the scale error of the magnetometer on the Y axis, Indicates the scale error of the magnetometer on the Z axis.

[0068] The installation error factor matrix of the magnetometer can be expressed as:

[0069] ;

[0070] in, is the installation error factor matrix of the magnetometer, Indicates the installation error of the magnetometer on the X-axis, Indicates the installation error of the magnetometer on the Y axis, Indicates the installation error of the magnetometer on the Z axis.

[0071] Before using the magnetometer, the magnetic field parameter information can be determined in advance. For each magnetometer, the magnetic field parameter information corresponding to the magnetometer can be determined respectively. Different magnetic field parameter information can be determined by different determination methods. The determination algorithm of the magnetic field parameter information is pre-set. For example, a preset sphere fitting method can be used to determine the projection vector of the magnetic field of the hard magnetic material in the preset magnetometer coordinate system, the magnetometer zero value offset vector, the magnetometer scale error factor matrix, and the magnetometer installation error factor matrix. The preset ellipsoid fitting method is used to determine the secondary magnetic field excitation matrix of the soft magnetic material. In this embodiment, the determination algorithm of the magnetic field parameter information is not specifically limited.

[0072] S302. Determine the target magnetic field strength of the magnetometer according to the output vector and magnetic field parameter information of the magnetometer; wherein the target magnetic field strength includes the projection vector of the earth's magnetic field in a preset magnetometer coordinate system and the projection vector of the interference magnetic field in the preset magnetometer coordinate system.

[0073] Exemplarily, according to the output vector of the magnetometer and the magnetic field parameter information, based on a preset calculation formula, the target magnetic field strength of the magnetometer can be calculated. The target magnetic field strength can be the sum of the projection vector of the earth's magnetic field in the preset magnetometer coordinate system and the projection vector of the interference magnetic field in the preset magnetometer coordinate system.

[0074] In this embodiment, the target magnetic field strength of the magnetometer is determined based on the output vector and magnetic field parameter information of the magnetometer, including: based on the output vector of the magnetometer, the projection vector of the magnetic field of the hard magnetic material in the carrier in the preset magnetometer coordinate system, the magnetometer zero value offset vector, the magnetometer scale error factor matrix, the magnetometer installation error factor matrix, and the secondary magnetic field excitation matrix of the soft magnetic material in the carrier, determining the sum of the projection vector of the earth's magnetic field in the preset magnetometer coordinate system and the projection vector of the interference magnetic field in the preset magnetometer coordinate system as the target magnetic field strength of the magnetometer.

[0075] Specifically, a calculation formula for the target magnetic field strength is pre-set, and the output vector of the magnetometer, the projection vector of the magnetic field of the hard magnetic material in the carrier in the preset magnetometer coordinate system, the magnetometer zero value offset vector, the magnetometer scale error factor matrix, the magnetometer installation error factor matrix, and the secondary magnetic field excitation matrix of the soft magnetic material in the carrier are substituted into the preset calculation formula to calculate the target magnetic field strength. In this embodiment, the preset calculation formula is not specifically limited.

[0076] The magnetic field parameter information can also be screened, and the information retained after the screening can be substituted into the preset calculation formula. For example, obviously wrong magnetic field parameter information can be screened out to reduce the error of subsequent calculations. Different thresholds can be set for different parameters, and the parameters can be screened according to the preset thresholds.

[0077] The beneficial effect of such a setting is that the target magnetic field strength of different magnetometers can be quickly calculated based on the magnetic field parameter information, so as to determine whether there is an interfering magnetic field based on the target magnetic field strength of different magnetometers, thereby improving the efficiency of determining the carrier posture.

[0078] In this embodiment, the target magnetic field strength of the magnetometer is:

[0079] ;

[0080] Where H is the target magnetic field strength, is the projection vector of the Earth's magnetic field in the preset magnetometer coordinate system, is the projection vector of the interfering magnetic field in the preset magnetometer coordinate system, I is the preset unit matrix, is the magnetometer scale error factor matrix, is the installation error factor matrix of the magnetometer, It is the secondary magnetic field excitation matrix of the soft magnetic material in the carrier. is the output vector of the magnetometer, is the magnetometer zero value offset vector, It is the projection vector of the magnetic field of the hard magnetic material in the carrier in the preset magnetometer coordinate system.

[0081] Specifically, the target magnetic field strength is the sum of the projection vector of the earth's magnetic field in the preset magnetometer coordinate system and the projection vector of the interference magnetic field in the preset magnetometer coordinate system. The calculation formula of the target magnetic field strength can be derived from a preset magnetometer measurement model, which can be:

[0082] ;

[0083] Among them, I can be a 3×3 identity matrix, that is, I can be expressed as .

[0084] is the zero-mean Gaussian white noise vector of the magnetometer, which has little effect on the external interference magnetic field and can be ignored when calculating the target magnetic field strength.

[0085] The secondary magnetic field excitation matrix of the soft magnetic material in the carrier can be expressed as .

[0086] The secondary magnetic field excitation matrix of the soft magnetic material in the carrier indicates that the soft magnetic material is excited by the magnetic field to generate a secondary magnetic field with a direction and intensity different from that of the magnetic field.

[0087] Assuming that there are two magnetometers in the AHRS, since the positions of the two magnetometers and the soft magnetic material in the carrier cannot be consistent, even if there is no external interference magnetic field, only the secondary magnetic field generated by the earth's magnetic field and the magnetic field of the carrier's hard magnetic material excitation of the carrier's soft magnetic material will cause the readings of the two magnetometers to be inconsistent. Therefore, before using the magnetometer, it is necessary to calibrate it to obtain an accurate secondary magnetic field excitation matrix and other magnetic field parameter information. Since the positions of the hard magnetic material, soft magnetic material, and each magnetometer on the carrier are different, it is necessary to obtain the magnetic field parameter information of each magnetometer separately.

[0088] The beneficial effect of this arrangement is that, according to the measurement model of the magnetometer, the , thereby determining whether there is an external interfering magnetic field and improving the accuracy and efficiency of determining the carrier's posture.

[0089] S303. If it is determined that there is no interfering magnetic field in the environment where the carrier is located based on the target magnetic field strength of each magnetometer, the attitude angle information of the carrier is determined based on the output vector of the accelerometer, the output vector of the gyroscope, and the target magnetic field strength; wherein the output vector of the accelerometer represents the gravity vector measured by the accelerometer, the output vector of the gyroscope represents the angular velocity of the carrier, and the attitude angle information represents the rotation angle of the carrier.

[0090] Exemplarily, this step may refer to the above-mentioned step S103 and will not be described in detail.

[0091] In this embodiment, a plurality of magnetometers are arranged in the attitude reference system. By determining the output vector and magnetic field parameter information of the magnetometer, the target magnetic field strength of the magnetometer can be determined. The target magnetic field strength can include two parts, namely, the projection vector of the earth's magnetic field in the preset magnetometer coordinate system and the projection vector of the interference magnetic field in the preset magnetometer coordinate system. According to the target magnetic field strength of each magnetometer, it is determined whether there is an external interference magnetic field in the environment where the carrier is located. If not, the output vector of the gyroscope is calibrated according to the output vector of the accelerometer and the target magnetic field strength to obtain accurate attitude angle information of the carrier. By adding a magnetometer to the AHRS, it can be determined whether there is an interference magnetic field. In the absence of an interference magnetic field, the data of the gyroscope is calibrated to improve the determination accuracy of the carrier's attitude, and then the carrier is accurately controlled. This embodiment can accurately determine the constant or time-varying interference magnetic field in the environment, so that the wild point in the magnetometer measurement value can be reliably detected, thereby greatly improving the anti-magnetic interference performance of the entire attitude reference system.

[0092] Figure 4 A flowchart of a method for resisting magnetic interference based on a heading reference system is provided in an embodiment of the present application. This embodiment is an optional embodiment based on the above embodiment.

[0093] In this embodiment, determining that there is no interfering magnetic field in the environment of the carrier according to the target magnetic field strength of each magnetometer includes: if the target magnetic field strength of each magnetometer is the same, determining that there is no interfering magnetic field in the environment of the carrier.

[0094] like Figure 4 The method comprises the following steps:

[0095] S401, determining an output vector and magnetic field parameter information of a magnetometer; wherein the output vector of the magnetometer represents the magnetic field strength measured by the magnetometer, and the magnetic field parameter information represents the influencing factors of the magnetometer when measuring the magnetic field strength.

[0096] Exemplarily, this step may refer to the above-mentioned step S101 and will not be described in detail.

[0097] S402. Determine the target magnetic field strength of the magnetometer according to the output vector and magnetic field parameter information of the magnetometer; wherein the target magnetic field strength includes the projection vector of the earth's magnetic field in a preset magnetometer coordinate system and the projection vector of the interference magnetic field in the preset magnetometer coordinate system.

[0098] Exemplarily, this step may refer to the above-mentioned step S102 and will not be described in detail.

[0099] S403: If the target magnetic field strengths of the magnetometers are the same, it is determined that there is no interfering magnetic field in the environment where the carrier is located, and the attitude angle information of the carrier is determined according to the output vector of the accelerometer, the output vector of the gyroscope, and the target magnetic field strength.

[0100] For example, after obtaining the target magnetic field strength corresponding to each magnetometer, it can be determined whether there is an interfering magnetic field in the environment where the carrier is located according to the target magnetic field strength of each magnetometer. For example, magnetometer A and magnetometer B are provided in the AHRS, and the target magnetic field strength of magnetometer A is , the target magnetic field strength of magnetometer B is . judge and Are they the same? equal , that is, the target magnetic field strength of each magnetometer is the same, then it can be determined that there is no interfering magnetic field in the environment where the carrier is located; if Not equal to , it can be determined that there is an interfering magnetic field in the environment where the carrier is located.

[0101] The target magnetic field strength includes the projection vector of the earth's magnetic field in the preset magnetometer coordinate system and the projection vector of the interference magnetic field in the preset magnetometer coordinate system. The earth's magnetic field is a large-scale magnetic field. For the carrier, the magnetic field strength of the earth's magnetic field at different positions on the carrier is very close, that is, for magnetometer A and magnetometer B, the measured If there is no interfering magnetic field around the carrier, the target magnetic field strength is the magnetic field strength of the earth's magnetic field, that is, and equal.

[0102] The interference magnetic field is a small-scale magnetic field. For example, the magnetic field generated by a passing car, a nearby screwdriver, or a primary switch of a nearby power supply can all be interference magnetic fields. Magnetometers at different locations can measure different magnetic field strengths of the interference magnetic field. If there is an interference magnetic field around the carrier, the magnetometer can measure both the earth's magnetic field and the interference magnetic field. and different.

[0103] In this embodiment, if the target magnetic field strengths of each magnetometer are the same, it is determined that there is no interfering magnetic field in the environment in which the carrier is located, including: if the target magnetic field strength of each magnetometer changes within a preset time period, and the target magnetic field strengths of each magnetometer are the same, it is determined that the posture of the carrier has changed, and there is no interfering magnetic field in the environment in which the carrier is located.

[0104] Specifically, if it is determined that the target magnetic field strength of each magnetometer is the same, the target magnetic field strength of each magnetometer can be obtained for a period of time. It is determined whether the target magnetic field strength of each magnetometer has changed. If the target magnetic field strength of each magnetometer changes within a preset time period, and the target magnetic field strength of each magnetometer has always been the same, it is determined that the posture of the carrier has changed, that is, the carrier is in a moving state, and there is no interfering magnetic field in the environment where the carrier is located.

[0105] The target magnetic field strength of the magnetometer changes within a preset time period, and the target magnetic field strengths of different magnetometers are the same, which means that the target magnetic field strengths of different magnetometers change synchronously. That is, the target magnetic field strengths of the magnetometers change synchronously in magnitude and in direction within the preset time period.

[0106] The beneficial effect of such a setting is that determining whether the carrier is moving facilitates the subsequent determination of whether the acceleration of the carrier is zero. Only when the acceleration is zero can the gyroscope be calibrated to improve the accuracy of determining the carrier's attitude.

[0107] In this embodiment, if the target magnetic field strengths of each magnetometer are the same, it is determined that there is no interfering magnetic field in the environment in which the carrier is located, including: if the target magnetic field strength of each magnetometer does not change within a preset time period, and the target magnetic field strengths of each magnetometer are the same, it is determined that the posture of the carrier does not change, and there is no interfering magnetic field in the environment in which the carrier is located.

[0108] Specifically, if it is determined that the target magnetic field strengths of each magnetometer are the same, the target magnetic field strengths of each magnetometer can be obtained for a period of time. It is determined whether the target magnetic field strengths of each magnetometer have changed. If the target magnetic field strength of each magnetometer does not change within a preset time period, and the target magnetic field strengths of each magnetometer are the same, it is determined that the posture of the carrier has not changed, and there is no interfering magnetic field in the environment where the carrier is located that can be sensed by the magnetometer.

[0109] That the target magnetic field strength of the magnetometer does not change within a preset time period means that the target magnetic field strengths of different magnetometers maintain a constant value within a period of time, and the magnitude and direction of the target magnetic field strengths of each magnetometer are the same.

[0110] The beneficial effect of such a setting is that determining whether the carrier is moving facilitates the subsequent determination of whether the acceleration of the carrier is zero. Only when the acceleration is zero can the gyroscope be calibrated to improve the accuracy of determining the carrier's attitude.

[0111] In this embodiment, the method further includes: if the target magnetic field strengths of the magnetometers are different, determining that there is an interfering magnetic field in the environment where the carrier is located, and determining the attitude angle information of the carrier according to the output vector of the gyroscope.

[0112] Specifically, if the target magnetic field strengths of the magnetometers are different, that is, Not equal to , it is determined that there is an interfering magnetic field in the environment where the carrier is located. The current measurement value of the magnetometer is a wild point and cannot be used for gyroscope calibration. The attitude of the carrier can be determined directly based on the output vector of the gyroscope. For example, the angular velocity measured by the gyroscope is integrated to obtain the attitude angle information of the carrier, and the attitude angle information of the carrier represents the attitude of the carrier.

[0113] The beneficial effect of this arrangement is that if Not equal to , it is impossible to determine whether the carrier has a posture change at this time, but it can be determined that there is an external interference magnetic field that can be sensed by the magnetometer. The current measurement value is a wild point and cannot be used for gyroscope calibration. This avoids the situation where the error caused by calibrating the gyroscope through wild points, and improves the accuracy of determining the carrier's posture.

[0114] In this embodiment, the attitude angle information includes a pitch angle, a roll angle, and a yaw angle; the attitude angle information of the carrier is determined according to the output vector of the accelerometer, the output vector of the gyroscope, and the target magnetic field strength, including: determining the pitch angle and roll angle of the carrier according to the output vector of the accelerometer and the output vector of the gyroscope; determining the yaw angle of the carrier according to the target magnetic field strength and the output vector of the gyroscope.

[0115] Specifically, the attitude angle information of the carrier may include the pitch angle, roll angle, and yaw angle of the carrier. Figure 5 Schematic diagram of the carrier coordinate system. Figure 5 The origin of the coordinate system can be the center point of the carrier, Figure 5 The carrier in the figure is an airplane. The roll angle of the carrier can be obtained by rotating the carrier along the X-axis, the pitch angle of the carrier can be obtained by rotating the carrier along the Y-axis, and the yaw angle of the carrier can be obtained by rotating the carrier along the Z-axis.

[0116] The accelerometer can be used to calibrate the pitch and roll angles of the gyroscope. However, if the carrier rotates around the gravity axis, that is, the Z axis, in the horizontal plane, the accelerometer reading carried by the carrier will not change, so the accelerometer alone cannot suppress the error in the yaw angle calculation. The magnetometer can calibrate the calculation error of the yaw angle of the gyroscope by measuring the geomagnetic vector, that is, the magnetometer can be used to calibrate the yaw angle of the gyroscope. According to the output vector of the accelerometer and the output vector of the gyroscope, a more accurate pitch and roll angle of the carrier can be determined. According to the output vector of the magnetometer and the output vector of the gyroscope, a more accurate yaw angle of the carrier can be determined. In the absence of an interfering magnetic field, the target magnetic field strength is the geomagnetic vector. Therefore, the accurate yaw angle of the carrier can be obtained based on the target magnetic field strength and the output vector of the gyroscope.

[0117] A fusion algorithm may be preset, and the output vector of the accelerometer and the output vector of the gyroscope may be fused according to the preset fusion algorithm, and the target magnetic field strength and the output vector of the gyroscope may be fused. In this embodiment, the preset fusion algorithm is not specifically limited. For example, Kalman filtering and its multiple variants are used to achieve fusion of multi-sensor information under the minimum mean square error criterion, thereby improving the accuracy of the entire system.

[0118] The beneficial effect of such a setting is that, by fusing the output vectors of multiple sensors, the error of the gyroscope can be suppressed, and the accuracy of determining the carrier's attitude can be effectively improved.

[0119] In this embodiment, a plurality of magnetometers are arranged in the attitude reference system. By determining the output vector and magnetic field parameter information of the magnetometer, the target magnetic field strength of the magnetometer can be determined. The target magnetic field strength can include two parts, namely, the projection vector of the earth's magnetic field in the preset magnetometer coordinate system and the projection vector of the interference magnetic field in the preset magnetometer coordinate system. According to the target magnetic field strength of each magnetometer, it is determined whether there is an external interference magnetic field in the environment where the carrier is located. If not, the output vector of the gyroscope is calibrated according to the output vector of the accelerometer and the target magnetic field strength to obtain accurate attitude angle information of the carrier. By adding a magnetometer to the AHRS, it can be determined whether there is an interference magnetic field. In the absence of an interference magnetic field, the data of the gyroscope is calibrated to improve the determination accuracy of the carrier's attitude, and then the carrier is accurately controlled. This embodiment can accurately determine the constant or time-varying interference magnetic field in the environment, so that the wild point in the magnetometer measurement value can be reliably detected, thereby greatly improving the anti-magnetic interference performance of the entire attitude reference system.

[0120] Figure 6 The structural block diagram of a device for resisting magnetic interference based on a heading reference system provided in an embodiment of the present application. For the convenience of explanation, only the parts related to the embodiment of the present disclosure are shown. A heading reference system is deployed in the carrier, and the heading reference system includes a gyroscope, an accelerometer, and at least two magnetometers. Figure 6 The device includes: an information determination module 601, a magnetic field determination module 602 and an angle determination module 603.

[0121] The information determination module 601 is used to determine the output vector and magnetic field parameter information of the magnetometer; wherein the output vector of the magnetometer represents the magnetic field strength measured by the magnetometer, and the magnetic field parameter information represents the influencing factors of the magnetometer when measuring the magnetic field strength;

[0122] A magnetic field determination module 602 is used to determine the target magnetic field strength of the magnetometer according to the output vector of the magnetometer and the magnetic field parameter information; wherein the target magnetic field strength includes the projection vector of the earth's magnetic field in a preset magnetometer coordinate system and the projection vector of the interference magnetic field in the preset magnetometer coordinate system;

[0123] The angle determination module 603 is used to determine the attitude angle information of the carrier according to the output vector of the accelerometer, the output vector of the gyroscope, and the target magnetic field strength if it is determined that there is no interfering magnetic field in the environment where the carrier is located according to the target magnetic field strength of each of the magnetometers; wherein the output vector of the accelerometer represents the gravity vector measured by the accelerometer, the output vector of the gyroscope represents the angular velocity of the carrier, and the attitude angle information represents the rotation angle of the carrier.

[0124] Figure 7 A structural block diagram of a device for resisting magnetic interference based on a heading reference system provided in an embodiment of the present application, Figure 6 Based on the embodiment shown, Figure 7 As shown, the information determination module 601 includes a vector acquisition unit 6011 , a first determination unit 6012 and a second determination unit 6013 .

[0125] The magnetic field parameter information includes the projection vector of the magnetic field of the hard magnetic material in the carrier in the preset magnetometer coordinate system, the magnetometer zero value offset vector, the magnetometer scale error factor matrix, the magnetometer installation error factor matrix, and the secondary magnetic field excitation matrix of the soft magnetic material in the carrier;

[0126] A vector acquisition unit 6011, used to acquire an output vector of the magnetometer;

[0127] The first determining unit 6012 is used to determine the projection vector of the magnetic field of the hard magnetic material in the carrier in a preset magnetometer coordinate system, the magnetometer zero value offset vector, the magnetometer scale error factor matrix, and the magnetometer installation error factor matrix by using a preset sphere fitting method;

[0128] The second determination unit 6013 is used to determine the secondary magnetic field excitation matrix of the soft magnetic material in the carrier by using a preset ellipsoid fitting method.

[0129] In one example, the magnetic field determination module 602 is specifically configured to:

[0130] According to the output vector of the magnetometer, the projection vector of the magnetic field of the hard magnetic material in the carrier in the preset magnetometer coordinate system, the zero-value offset vector of the magnetometer, the scale error factor matrix of the magnetometer, the installation error factor matrix of the magnetometer, and the secondary magnetic field excitation matrix of the soft magnetic material in the carrier, the sum of the projection vector of the earth's magnetic field in the preset magnetometer coordinate system and the projection vector of the interference magnetic field in the preset magnetometer coordinate system is determined as the target magnetic field intensity of the magnetometer.

[0131] In an example, the target magnetic field strength of the magnetometer is:

[0132] ;

[0133] Wherein, H is the target magnetic field strength, is the projection vector of the Earth's magnetic field in the preset magnetometer coordinate system, is the projection vector of the interfering magnetic field in the preset magnetometer coordinate system, I is the preset unit matrix, is the magnetometer scale error factor matrix, is the installation error factor matrix of the magnetometer, It is the secondary magnetic field excitation matrix of the soft magnetic material in the carrier. is the output vector of the magnetometer, is the magnetometer zero value offset vector, It is the projection vector of the magnetic field of the hard magnetic material in the carrier in the preset magnetometer coordinate system.

[0134] In one example, the angle determination module 603 includes:

[0135] The interference judgment unit is used to determine that there is no interference magnetic field in the environment where the carrier is located if the target magnetic field strengths of the magnetometers are the same.

[0136] In one example, the interference determination unit is specifically configured to:

[0137] If the target magnetic field strength of each magnetometer changes within a preset time period and the target magnetic field strengths of the magnetometers are the same, it is determined that the posture of the carrier has changed and there is no interfering magnetic field in the environment where the carrier is located.

[0138] In one example, the interference determination unit is specifically configured to:

[0139] If the target magnetic field strength of each magnetometer does not change within a preset time period and the target magnetic field strengths of each magnetometer are the same, it is determined that the posture of the carrier does not change and there is no interfering magnetic field in the environment where the carrier is located.

[0140] In one example, it also includes:

[0141] The interference existence module is used to determine that there is an interference magnetic field in the environment where the carrier is located if the target magnetic field strengths of the magnetometers are different, and determine the attitude angle information of the carrier according to the output vector of the gyroscope.

[0142] In one example, the attitude angle information includes a pitch angle, a roll angle, and a yaw angle; the angle determination module 603 includes:

[0143] a third determining unit, configured to determine a pitch angle and a roll angle of the carrier according to an output vector of the accelerometer and an output vector of the gyroscope;

[0144] The fourth determining unit is used to determine the yaw angle of the carrier according to the target magnetic field strength and the output vector of the gyroscope.

[0145] In one example, it also includes:

[0146] The acceleration determination module is used to determine the attitude angle information of the carrier according to the output vector of the accelerometer, the output vector of the gyroscope, and the target magnetic field strength if the acceleration of the carrier is determined to be zero based on a preset acceleration determination algorithm.

[0147] Figure 8 A structural block diagram of an electronic device provided in an embodiment of the present application, such as Figure 8 As shown, the electronic device includes: a memory 81 and a processor 82; the memory 81 is a memory for storing instructions executable by the processor 82.

[0148] The processor 82 is configured to execute the method provided in the above embodiment.

[0149] The electronic device further includes a receiver 83 and a transmitter 84. The receiver 83 is used to receive instructions and data sent by other devices, and the transmitter 84 is used to send instructions and data to external devices.

[0150] Fig. 9 It is a block diagram of an electronic device according to an exemplary embodiment, which device may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.

[0151] Device 900 may include one or more of the following components: a processing component 902 , a memory 904 , a power component 906 , a multimedia component 908 , an audio component 910 , an input / output (I / O) interface 912 , a sensor component 914 , and a communication component 916 .

[0152] The processing component 902 generally controls the overall operation of the device 900, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 902 may include one or more processors 920 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 902 may include one or more modules to facilitate the interaction between the processing component 902 and other components. For example, the processing component 902 may include a multimedia module to facilitate the interaction between the multimedia component 908 and the processing component 902.

[0153] The memory 904 is configured to store various types of data to support operations on the device 900. Examples of such data include instructions for any application or method operating on the device 900, contact data, phone book data, messages, pictures, videos, etc. The memory 904 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.

[0154] The power supply component 906 provides power to the various components of the device 900. The power supply component 906 can include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device 900.

[0155] The multimedia component 908 includes a screen that provides an output interface between the device 900 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 908 includes a front camera and / or a rear camera. When the device 900 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.

[0156] The audio component 910 is configured to output and / or input audio signals. For example, the audio component 910 includes a microphone (MIC), and when the device 900 is in an operating mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 904 or sent via the communication component 916. In some embodiments, the audio component 910 also includes a speaker for outputting audio signals.

[0157] I / O interface 912 provides an interface between processing component 902 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: home button, volume button, start button, and lock button.

[0158] The sensor assembly 914 includes one or more sensors for providing various aspects of status assessment for the device 900. For example, the sensor assembly 914 can detect the open / closed state of the device 900, the relative positioning of components, such as the display and keypad of the device 900, and the sensor assembly 914 can also detect the position change of the device 900 or a component of the device 900, the presence or absence of user contact with the device 900, the orientation or acceleration / deceleration of the device 900, and the temperature change of the device 900. The sensor assembly 914 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 914 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 914 may also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.

[0159] The communication component 916 is configured to facilitate wired or wireless communication between the device 900 and other devices. The device 900 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 916 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 916 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.

[0160] In an exemplary embodiment, the device 900 may be implemented by 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), controllers, microcontrollers, microprocessors, or other electronic components to perform the above methods.

[0161] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 904 including instructions, and the instructions can be executed by the processor 920 of the device 900 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0162] A non-temporary computer-readable storage medium, when the instructions in the storage medium are executed by a processor of a terminal device, enables the terminal device to execute the above-mentioned method for resisting magnetic interference based on a heading reference system of the terminal device.

[0163] The present application also discloses a computer program product, including a computer program, which implements the method described in this embodiment when executed by a processor.

[0164] Various embodiments of the systems and techniques described above in the present application can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include: being implemented in one or more computer programs, which may be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general programmable processor, which may receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0165] The program code for implementing the method of the present application can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code can be executed entirely on the machine, partially on the machine, partially on the machine as a stand-alone software package and partially on a remote machine, or entirely on a remote machine or electronic device.

[0166] In the context of the present application, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0167] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0168] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data electronic device), or a computing system that includes middleware components (e.g., an application electronic device), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.

[0169] The computer system may include a client and an electronic device. The client and the electronic device are generally far away from each other and usually interact through a communication network. The relationship between the client and the electronic device is generated by computer programs running on corresponding computers and having a client-electronic device relationship with each other. The electronic device may be a cloud electronic device, also known as a cloud computing electronic device or a cloud host, which is a host product in a cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services ("Virtual Private Server", or "VPS" for short). The electronic device may also be an electronic device of a distributed system, or an electronic device combined with a blockchain. It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this application may be executed in parallel, sequentially, or in different orders, as long as the desired results of the technical solution disclosed in this application can be achieved, and this document is not limited here.

[0170] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary techniques in the art that are not disclosed in the present application. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the following claims.

[0171] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.

Claims

1. A method for resisting magnetic interference based on an attitude reference system, characterized in that: A heading reference system is deployed in the carrier, and the heading reference system includes a gyroscope, an accelerometer, and at least two magnetometers; the method includes: Determine the output vector and magnetic field parameter information of the magnetometer; wherein the output vector of the magnetometer represents the magnetic field strength measured by the magnetometer, and the magnetic field parameter information represents the influencing factors of the magnetometer when measuring the magnetic field strength; Determine the target magnetic field strength of the magnetometer according to the output vector and magnetic field parameter information of the magnetometer; wherein the target magnetic field strength includes the projection vector of the earth's magnetic field in a preset magnetometer coordinate system and the projection vector of the interference magnetic field in the preset magnetometer coordinate system; If it is determined that there is no interfering magnetic field in the environment where the carrier is located according to the target magnetic field strength of each of the magnetometers, then the attitude angle information of the carrier is determined according to the output vector of the accelerometer, the output vector of the gyroscope, and the target magnetic field strength; wherein the output vector of the accelerometer represents the gravity vector measured by the accelerometer, the output vector of the gyroscope represents the angular velocity of the carrier, and the attitude angle information represents the rotation angle of the carrier; The magnetic field parameter information includes a projection vector of the magnetic field of the hard magnetic material in the carrier in a preset magnetometer coordinate system, a magnetometer zero value offset vector, a magnetometer scale error factor matrix, a magnetometer installation error factor matrix, and a secondary magnetic field excitation matrix of the soft magnetic material in the carrier; determining the output vector and magnetic field parameter information of the magnetometer includes: Obtaining an output vector of the magnetometer; Using a preset sphere fitting method, determine the projection vector of the magnetic field of the hard magnetic material in the carrier in a preset magnetometer coordinate system, the magnetometer zero value offset vector, the magnetometer scale error factor matrix, and the magnetometer installation error factor matrix; Using a preset ellipsoid fitting method, a secondary magnetic field excitation matrix of the soft magnetic material in the carrier is determined; Determining the target magnetic field strength of the magnetometer according to the output vector of the magnetometer and the magnetic field parameter information includes: Determine the sum of the projection vector of the earth's magnetic field in the preset magnetometer coordinate system and the projection vector of the interference magnetic field in the preset magnetometer coordinate system as the target magnetic field intensity of the magnetometer according to the output vector of the magnetometer, the projection vector of the magnetic field of the hard magnetic material in the carrier in the preset magnetometer coordinate system, the zero value offset vector of the magnetometer, the scale error factor matrix of the magnetometer, the installation error factor matrix of the magnetometer, and the secondary magnetic field excitation matrix of the soft magnetic material in the carrier; The target magnetic field strength of the magnetometer is: ; Wherein, H is the target magnetic field strength, is the projection vector of the Earth's magnetic field in the preset magnetometer coordinate system, is the projection vector of the interfering magnetic field in the preset magnetometer coordinate system, I is the preset unit matrix, is the magnetometer scale error factor matrix, is the installation error factor matrix of the magnetometer, It is the secondary magnetic field excitation matrix of the soft magnetic material in the carrier. is the output vector of the magnetometer, is the magnetometer zero value offset vector, It is the projection vector of the magnetic field of the hard magnetic material in the carrier in the preset magnetometer coordinate system.

2. The method according to claim 1, characterized in that Determining, according to the target magnetic field strength of each of the magnetometers, whether there is no interfering magnetic field in the environment where the carrier is located, comprises: If the target magnetic field strengths of the magnetometers are the same, it is determined that there is no interfering magnetic field in the environment where the carrier is located.

3. The method according to claim 2, characterized in that If the target magnetic field strengths of the magnetometers are the same, determining that there is no interfering magnetic field in the environment where the carrier is located includes: If the target magnetic field strength of each magnetometer changes within a preset time period and the target magnetic field strengths of the magnetometers are the same, it is determined that the posture of the carrier has changed and there is no interfering magnetic field in the environment where the carrier is located.

4. The method according to claim 2, characterized in that: If the target magnetic field strengths of the magnetometers are the same, determining that there is no interfering magnetic field in the environment where the carrier is located includes: If the target magnetic field strength of each magnetometer does not change within a preset time period and the target magnetic field strengths of each magnetometer are the same, it is determined that the posture of the carrier does not change and there is no interfering magnetic field in the environment where the carrier is located.

5. The method according to claim 1, characterized in that: Also includes: If the target magnetic field strengths of the magnetometers are different, it is determined that there is an interfering magnetic field in the environment where the carrier is located, and the attitude angle information of the carrier is determined according to the output vector of the gyroscope.

6. The method according to claim 1, characterized in that The attitude angle information includes a pitch angle, a roll angle, and a yaw angle; determining the attitude angle information of the carrier according to the output vector of the accelerometer, the output vector of the gyroscope, and the target magnetic field strength, including: Determining a pitch angle and a roll angle of the carrier according to an output vector of the accelerometer and an output vector of the gyroscope; The yaw angle of the carrier is determined according to the target magnetic field strength and the output vector of the gyroscope.

7. The method according to any one of claims 1 to 6, characterized in that Also includes: If the acceleration of the carrier is determined to be zero based on a preset acceleration determination algorithm, the attitude angle information of the carrier is determined according to the output vector of the accelerometer, the output vector of the gyroscope, and the target magnetic field strength.

8. A device for resisting magnetic interference based on a heading reference system, characterized in that: A heading reference system is deployed in the carrier, and the heading reference system includes a gyroscope, an accelerometer, and at least two magnetometers; the device includes: An information determination module, used to determine the output vector and magnetic field parameter information of the magnetometer; wherein the output vector of the magnetometer represents the magnetic field strength measured by the magnetometer, and the magnetic field parameter information represents the influencing factors of the magnetometer when measuring the magnetic field strength; A magnetic field determination module, used to determine the target magnetic field strength of the magnetometer according to the output vector of the magnetometer and the magnetic field parameter information; wherein the target magnetic field strength includes the projection vector of the earth's magnetic field in a preset magnetometer coordinate system and the projection vector of the interference magnetic field in the preset magnetometer coordinate system; An angle determination module, for determining the attitude angle information of the carrier according to the output vector of the accelerometer, the output vector of the gyroscope, and the target magnetic field strength if it is determined that there is no interfering magnetic field in the environment of the carrier according to the target magnetic field strength of each of the magnetometers; wherein the output vector of the accelerometer represents the gravity vector measured by the accelerometer, the output vector of the gyroscope represents the angular velocity of the carrier, and the attitude angle information represents the rotation angle of the carrier; The magnetic field parameter information includes a projection vector of the magnetic field of the hard magnetic material in the carrier in a preset magnetometer coordinate system, a magnetometer zero value offset vector, a magnetometer scale error factor matrix, a magnetometer installation error factor matrix, and a secondary magnetic field excitation matrix of the soft magnetic material in the carrier; the information determination module includes: A vector acquisition unit, used to acquire an output vector of the magnetometer; A first determination unit is used to determine the projection vector of the magnetic field of the hard magnetic material in the carrier in a preset magnetometer coordinate system, the magnetometer zero value offset vector, the magnetometer scale error factor matrix, and the magnetometer installation error factor matrix by using a preset sphere fitting method; A second determining unit is used to determine the secondary magnetic field excitation matrix of the soft magnetic material in the carrier by using a preset ellipsoid fitting method; The magnetic field determination module is specifically used for: Determine the sum of the projection vector of the earth's magnetic field in the preset magnetometer coordinate system and the projection vector of the interference magnetic field in the preset magnetometer coordinate system as the target magnetic field intensity of the magnetometer according to the output vector of the magnetometer, the projection vector of the magnetic field of the hard magnetic material in the carrier in the preset magnetometer coordinate system, the zero value offset vector of the magnetometer, the scale error factor matrix of the magnetometer, the installation error factor matrix of the magnetometer, and the secondary magnetic field excitation matrix of the soft magnetic material in the carrier; The target magnetic field strength of the magnetometer is: ; Wherein, H is the target magnetic field strength, is the projection vector of the earth's magnetic field in the preset magnetometer coordinate system, is the projection vector of the interfering magnetic field in the preset magnetometer coordinate system, I is the preset unit matrix, is the scale error factor matrix of the magnetometer, is the installation error factor matrix of the magnetometer, It is the secondary magnetic field excitation matrix of the soft magnetic material in the carrier. is the output vector of the magnetometer, is the magnetometer zero value offset vector, It is the projection vector of the magnetic field of the hard magnetic material in the carrier in the preset magnetometer coordinate system.

9. An electronic device, characterized in that: include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 7 when executed by a processor.

11. A computer program product, characterized in that The invention comprises a computer program, which implements the method according to any one of claims 1 to 7 when being executed by a processor.

Citation Information

Patent Citations

  • Automatic magnetometer correction assisted AHRS (altitude and heading reference system) and method

    CN105588567A

  • Monitoring device for three-dimensional posture, mechanical device and monitoring method for three-dimensional posture

    CN106647791A