Magnetic compass parameter calibration method and device, computer equipment and storage medium

文档序号:612695 发布日期:2021-05-07 浏览:26次 中文

阅读说明:本技术 磁罗盘参数标定方法、装置、计算机设备及存储介质 (Magnetic compass parameter calibration method and device, computer equipment and storage medium ) 是由 陈朋印 李定涌 闫永驰 陈柯柯 曾幼涵 马一鸣 王圣淙 于 2021-01-09 设计创作,主要内容包括:本发明公开了一种磁罗盘参数标定方法、装置、计算机设备及存储介质,该方法通过获取磁罗盘的指针坐标;根据所述指针坐标计算待估计的参数向量;将所述待估计的参数向量代入预设的磁罗盘模型方程中,以计算所述磁罗盘参数,其中,所述磁罗盘参数包括所述磁罗盘的零偏误差和所述磁罗盘的比例系数。该磁罗盘参数标定方法、装置、计算机设备及存储介质能够简化磁罗盘参数的计算过程。(The invention discloses a magnetic compass parameter calibration method, a device, computer equipment and a storage medium, wherein the method comprises the steps of obtaining a pointer coordinate of a magnetic compass; calculating a parameter vector to be estimated according to the pointer coordinate; and substituting the parameter vector to be estimated into a preset magnetic compass model equation to calculate the magnetic compass parameters, wherein the magnetic compass parameters comprise a zero offset error of the magnetic compass and a proportionality coefficient of the magnetic compass. The magnetic compass parameter calibration method, the magnetic compass parameter calibration device, the computer equipment and the storage medium can simplify the calculation process of the magnetic compass parameters.)

1. A magnetic compass parameter calibration method is characterized by comprising the following steps:

acquiring a pointer coordinate of the magnetic compass;

calculating a parameter vector to be estimated according to the pointer coordinate;

substituting the parameter vector to be estimated into a preset magnetic compass model equation, and calculating the magnetic compass parameters; wherein the magnetic compass parameters include a zero bias error of the magnetic compass and a scaling factor of the magnetic compass.

2. The method for calibrating parameters of a magnetic compass according to claim 1, characterized in that the parameter vector to be estimated isj represents a time, and j is a positive integer greater than or equal to 1; calculating the parameter vector to be estimated by adopting the following formula:

wherein, KjRepresents the gain matrix at time j, anZjIs a measurement vector at time j, and ZjIs a preset value, HjMeasure the matrix for time j, andPj-1represents the error covariance matrix at time j, and Pj=(I-KjHj)Pj-1And I represents an identity matrix.

3. The magnetic compass parameter calibration method of claim 2, wherein the magnetic compass model equation is:

wherein, bxRepresenting the zero-offset error of the magnetic compass in the direction of the x-axis, byRepresenting the zero-offset error, k, of the magnetic compass in the direction of the y-axisxRepresenting the proportionality coefficient, k, of the magnetic compass in the direction of the x-axisyThe proportionality coefficient of the magnetic compass in the direction of the y axis is represented;

the relationship between the magnetic compass model equation and the parameter vector to be estimated is as follows:

substituting the parameter vector to be estimated into a preset magnetic compass model equation to calculate the magnetic compass parameters, wherein the calculation comprises the following steps:

calculating the zero offset error b of the magnetic compass according to the formulas (1) to (8)x,byAnd the proportionality coefficient k of said magnetic compassx,ky

4. A method for calibrating parameters of a magnetic compass according to claim 1, wherein after said magnetic compass parameters are calculated, said method further comprises:

and correcting the pointer coordinate of the magnetic compass according to the magnetic compass parameters.

5. The method for calibrating parameters of a magnetic compass according to claim 4, wherein the correction of the coordinates of the pointer of the magnetic compass is performed by using the following formula, which comprises:

xc=(xm+bx)·kx (9)

yc=(ym+by)·ky (10)

wherein x iscPointer x-axis coordinate, y, representing corrected magnetic compasscIndicating the pointer y-axis coordinate of the magnetic compass after correction.

6. A magnetic compass parameter calibration device is characterized by comprising:

the acquisition unit is used for acquiring the pointer coordinate of the magnetic compass;

the first calculation unit is used for calculating a parameter vector to be estimated according to the pointer coordinate;

and the second calculation unit is used for substituting the parameter vector to be estimated into a preset magnetic compass model equation and calculating the magnetic compass parameters, wherein the magnetic compass parameters comprise a zero offset error of the magnetic compass and a proportionality coefficient of the magnetic compass.

7. The magnetic compass parameter calibration device of claim 6, further comprising:

and the correction unit is used for correcting the pointer coordinate of the magnetic compass according to the magnetic compass parameters.

8. The magnetic compass parameter calibration device of claim 6, wherein the correction unit adopts the following formula for correction:

xc=(xm+bx)·kx

yc=(ym+by)·ky

wherein x iscPointer x-axis coordinate, y, representing corrected magnetic compasscIndicating the pointer y-axis coordinate of the magnetic compass after correction.

9. Computer apparatus comprising a memory and a processor, wherein the memory stores a magnetic compass parameter calibration program, and the processor is configured to implement the steps of the magnetic compass parameter calibration method according to any one of claims 1 to 5 when executing the magnetic compass parameter calibration program.

10. A computer-readable storage medium, in which a computer program is stored, which, when being executed by a processor, carries out the steps of the method for calibrating parameters of a magnetic compass according to any one of claims 1 to 5.

Technical Field

The invention relates to the field of computers, in particular to a magnetic compass parameter calibration method, a magnetic compass parameter calibration device, computer equipment and a storage medium.

Background

Along with the progress of science and technology, the requirement of unmanned aerial vehicle to carrier attitude measurement accuracy is higher and higher. Magnetic compasses are used in drone integrated navigation systems to provide absolute heading information, and the accuracy of the heading directly determines the accuracy of the system's position. In order to obtain high-precision and high-reliability heading information, the error of the magnetic compass must be effectively calibrated and compensated.

The existing magnetic compass calibration technology mainly comprises two types: one is a calibration method by means of external information, such as multi-position calibration by means of a hexahedron or a rotary table, or calibration by means of a speed sensor, a GPS and the like; the method has high precision, but has extremely high requirement on calibration equipment, and is very easy to introduce external magnetic interference, thereby causing inaccurate result and bringing unnecessary loss to the course precision of the system. The second type is a self-calibration method without the help of external information, based on the optimal ellipse hypothesis, and using a method based on extended Kalman filtering and Unscented Kalman filtering to calibrate the magnetic compass in real time.

Disclosure of Invention

The invention aims to provide a magnetic compass parameter calibration method, a magnetic compass parameter calibration device, computer equipment and a storage medium, so as to simplify the calibration process of magnetic compass parameters.

In order to achieve the purpose, the invention adopts the following technical scheme:

the embodiment of the invention provides a magnetic compass parameter calibration method, which comprises the following steps:

acquiring a pointer coordinate of the magnetic compass;

calculating a parameter vector to be estimated according to the pointer coordinate;

and substituting the parameter vector to be estimated into a preset magnetic compass model equation, and calculating the magnetic compass parameters, wherein the magnetic compass parameters comprise a zero offset error of the magnetic compass and a proportionality coefficient of the magnetic compass.

Preferably, the parameter vector to be estimated isj represents a time, and j is a positive integer greater than or equal to 1; calculating the parameter vector to be estimated by adopting the following formula:

wherein, KjRepresents the gain matrix at time j, anZjIs a measurement vector at time j, and ZjIs a preset value, HjMeasure the matrix for time j, andPj-1represents the error covariance matrix at time j, and Pj=(I-KjHj)Pj-1And I represents an identity matrix.

Preferably, the magnetic compass model equation is:

wherein, bxRepresenting the zero-offset error of the magnetic compass in the direction of the x-axis, byRepresenting the zero-offset error, k, of the magnetic compass in the direction of the y-axisxRepresenting the proportionality coefficient, k, of the magnetic compass in the direction of the x-axisyThe proportionality coefficient of the magnetic compass in the direction of the y axis is represented;

the relationship between the magnetic compass model equation and the parameter vector to be estimated is as follows:

substituting the parameter vector to be estimated into a preset magnetic compass model equation to calculate the magnetic compass parameters, including:

calculating the zero offset error b of the magnetic compass according to the formulas (1) to (8)x,byAnd the proportionality coefficient k of said magnetic compassx,ky

Preferably, after calculating the magnetic compass parameters, the method further comprises:

and correcting the pointer coordinate of the magnetic compass according to the magnetic compass parameters.

Preferably, the pointer coordinates of the magnetic compass are corrected by using the following formula, including:

xc=(xm+bx)·kx (9)

yc=(ym+by)·ky (10)

wherein x iscPointer x-axis coordinate, y, representing corrected magnetic compasscAfter the indication is correctedThe pointer y-axis coordinate of the magnetic compass.

The embodiment of the invention also provides a magnetic compass parameter calibration device, which comprises:

the acquisition unit is used for acquiring the pointer coordinate of the magnetic compass;

the first calculation unit is used for calculating a parameter vector to be estimated according to the pointer coordinate;

and the second calculation unit is used for substituting the parameter vector to be estimated into a preset magnetic compass model equation so as to calculate the magnetic compass parameters, wherein the magnetic compass parameters comprise a zero offset error of the magnetic compass and a proportionality coefficient of the magnetic compass.

Preferably, the magnetic compass parameter calibration device further comprises: and the correction unit is used for correcting the pointer coordinate of the magnetic compass according to the magnetic compass parameters.

Preferably, the correction unit performs correction using the following formula:

xc=(xm+bx)·kx

yc=(ym+by)·ky

wherein x iscPointer x-axis coordinate, y, representing corrected magnetic compasscIndicating the pointer y-axis coordinate of the magnetic compass after correction.

The embodiment of the invention also provides computer equipment which comprises a memory and a processor, wherein the memory stores a magnetic compass parameter calibration program, and the processor is used for realizing the steps of the magnetic compass parameter calibration method when executing the magnetic compass parameter calibration program.

The embodiment of the invention also provides a computer readable storage medium, wherein a computer program is stored in the computer readable storage medium, and the computer program realizes the steps of the magnetic compass parameter calibration method when being executed by a processor.

Compared with the prior art, the invention has the following beneficial effects:

according to the magnetic compass parameter calibration method, the magnetic compass parameter calibration device, the computer equipment and the storage medium, the pointer coordinate of the magnetic compass is obtained, the parameter vector to be estimated is calculated according to the pointer coordinate, and then the parameter vector is input into a magnetic compass model equation which is pre-established according to the characteristics of the magnetic compass so as to calculate the magnetic compass parameter. The method has simpler operation and calculation process, compared with the method for calculating the magnetic compass parameters by adopting Kalman filtering calculation, the calculated magnetic compass parameters are less influenced by initial values, and the calculation efficiency of the magnetic compass parameters can be effectively improved.

Drawings

In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments of the present invention will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to these drawings without inventive labor.

FIG. 1 is a flow chart of a magnetic compass parameter calibration method according to an embodiment of the present invention;

FIG. 2 is a schematic view of the coordinate system of a magnetic compass;

fig. 3 is a schematic block diagram of a magnetic compass parameter calibration device in an embodiment of the present invention.

Detailed Description

The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.

In the description of the present invention, it should be noted that the terms "first", "second", "third", and the like are used only for distinguishing the description, and are not intended to indicate or imply relative importance.

In the description of the present invention, it should also be noted that, unless otherwise explicitly specified or limited, the terms "disposed" and "connected" are to be interpreted broadly, e.g., as meaning either a fixed connection, a removable connection, or an integral connection; can be mechanically or electrically connected; they may be connected directly or indirectly through intervening media, or they may be interconnected between two elements. The specific meanings of the above terms in the present invention can be understood in specific cases by those skilled in the art.

The magnetic compass parameter calibration method provided by the embodiment of the invention can be applied to various navigation systems, such as an unmanned aerial vehicle navigation system. In an embodiment, as shown in fig. 1, a method for calibrating parameters of a magnetic compass is provided, which includes the following steps:

s10: and acquiring the pointer coordinate of the magnetic compass.

The pointer coordinate of the magnetic compass refers to a two-dimensional coordinate of the pointer of the magnetic compass on a coordinate system, and a position pointed by the pointer is the pointer coordinate, and the coordinate system may be exemplarily shown in fig. 2. Specifically, the pointer coordinate of the magnetic compass can be obtained by controlling the pointer of the magnetic compass to rotate a certain angle along the horizontal plane direction.

S20: and calculating a parameter vector to be estimated according to the pointer coordinates.

S30: and substituting the parameter vector to be estimated into a preset magnetic compass model equation to calculate the magnetic compass parameters, wherein the magnetic compass parameters comprise the zero offset error of the magnetic compass and the proportionality coefficient of the magnetic compass.

The setting principle of the magnetic compass model equation is as follows: the pointer coordinates of the magnetic compass are assumed to be: magm=[xm ym]TAnd the pointer coordinate of the corrected magnetic compass is as follows: magc=[xc yc]TThe zero offset error of the magnetic compass is as follows: magb=[bx by]TThe magnetic compass proportionality coefficient is: magk=[kx ky]TAssuming that the values of the horizontal coordinate plane of the magnetic compass after correction are on a circle, then there are:

the relationship between the pointer coordinate of the corrected magnetic compass and the pointer coordinate of the original magnetic compass is as follows:

xc=(xm+bx)·kx

yc=(ym+by)·ky (12)

bringing formula (12) into formula (11) yields:

unfolding and finishing formula (13) to obtain:

suppose that:

suppose the right side of equation (14) is:the right side of the formula (14) can be rewritten as the following formula (15):

from equations (15) and (16), equation (14) can be rewritten as:

from equation (16), the magnetic compass model equation:

the above process is the principle of the magnetic compass model equation, and after the principle of the magnetic compass model equation is clear, the embodiment will explain how to calculate the magnetic compass parameters:

firstly, defining a parameter vector to be estimated as:

defining the measurement matrix as:the measurement vector is Zj,Pj=diag[100 100100 100],Rj=[0.2]Then measuring vector ZjAnd a measurement matrix HjSubstituting a recursive least square estimation formula to calculate a parameter vector to be estimated, wherein the recursive least square estimation formula is as follows:

Pj=(I-KjHj)Pj-1 (20c)

in calculating the direction of the parameter to be estimatedAfter measurement, from the magnetic compass model equation (18) one can obtain:from this g, a, b, d, e can be calculated.

Finally, the parameters of the magnetic compass can be calculated by substituting a, b, d and e into the formula (15): zero bias error b of magnetic compassx,byAnd the proportionality coefficient k of said magnetic compassx,ky

In the embodiment, the pointer coordinate of the magnetic compass is obtained, the parameter vector to be estimated is calculated according to the pointer coordinate, and then the parameter vector is input into the magnetic compass model equation which is pre-established according to the characteristics of the magnetic compass to calculate the magnetic compass parameters. The method has simpler operation and calculation process, compared with the method for calculating the magnetic compass parameters by adopting Kalman filtering calculation, the calculated magnetic compass parameters are less influenced by initial values, and the calculation efficiency of the magnetic compass parameters can be effectively improved.

After the magnetic compass parameters are calculated, the pointer coordinates of the magnetic compass can be compensated and corrected according to the magnetic compass parameters, so that high-precision magnetic compass data are output, and high-precision navigation information is provided for a navigation system.

Specifically, the compensation and correction of the pointer coordinate of the magnetic compass can be performed according to the setting principle of the magnetic compass model equation: the relationship between the pointer coordinate of the corrected magnetic compass and the pointer coordinate of the original magnetic compass is as follows:therefore, when the magnetic compass parameters are calculated: zero bias error b of magnetic compassx,byAnd the proportionality coefficient k of said magnetic compassx,kyThen, these magnetic compass parameters can be substituted into the pointer coordinate correction formula of the magnetic compass, and the pointer coordinate of the corrected magnetic compass can be calculated.

It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.

In an embodiment, a magnetic compass parameter calibration device is provided, which corresponds to the magnetic compass parameter calibration method in the above embodiments one to one. As shown in fig. 3, the magnetic compass parameter calibration apparatus includes:

an acquisition unit 10 for acquiring a pointer coordinate of the magnetic compass;

a first calculation unit 20 for calculating a parameter vector to be estimated from the pointer coordinates;

and the second calculating unit 30 is configured to substitute the parameter vector to be estimated into a preset magnetic compass model equation to calculate the magnetic compass parameters, where the magnetic compass parameters include a zero offset error of the magnetic compass and a proportionality coefficient of the magnetic compass.

In addition, the magnetic compass parameter calibration device further comprises: and the correction unit is used for correcting the pointer coordinate of the magnetic compass according to the magnetic compass parameters. And the correction unit adopts the following formula to correct:

xc=(xm+bx)·kx

yc=(ym+by)·ky

wherein x iscPointer x-axis coordinate, y, representing corrected magnetic compasscIndicating the pointer y-axis coordinate of the magnetic compass after correction.

For the specific definition of the magnetic compass parameter calibration device, reference may be made to the above definition of the method of the magnetic compass parameter calibration device, and details are not described herein again. The modules in the magnetic compass parameter calibration device can be wholly or partially realized by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.

In one embodiment, a computer device is provided, which comprises a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor executes the computer program to implement the following steps of the magnetic compass parameter calibration apparatus method.

In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, which when executed by a processor implements the steps of the magnetic compass parameter calibration apparatus method described above.

It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, databases, or other media used in embodiments provided herein may include non-volatile and/or volatile memory. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-mentioned functions.

The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present invention, and are intended to be included within the scope of the present invention.

10页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:正交误差抑制系统及MEMS陀螺

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!