A gyro angle data adaptive calibration method and system

By detecting the static or dynamic state of the gyroscope and using acceleration data for adaptive calibration, the complexity and error accumulation problems of traditional gyroscope calibration methods are solved, and high-precision angle data calibration is achieved.

CN121185336BActive Publication Date: 2026-02-24JIANGSU TEXTILE PROD QUALITY SUPERVISION & INSPECTION INST
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511736703.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-11-25
Publication Date
2026-02-24
Estimated Expiration
2045-11-25

AI Technical Summary

Technical Problem

In the existing technology, traditional gyroscope measurement chips lack automatic calibration function, which leads to zero drift and decreased measurement accuracy. Moreover, the existing calibration methods are complicated to operate, cannot dynamically adjust parameters, and have unsatisfactory calibration accuracy when the gyroscope is in motion, and there is a cumulative error of false angle increments during the integration process.

Method used

By detecting the static or dynamic state of the gyroscope, adaptive calibration is performed using acceleration data. In the static state, calibration is based on the gravity angle, while in the dynamic state, acceleration data is introduced to constrain the integral increment and correct the gyroscope angle, thus avoiding error accumulation.

Benefits of technology

It improves the accuracy of gyroscope angle calibration, and directly integrates acceleration constraint correction integral trajectory under dynamic conditions, reducing error propagation and improving measurement accuracy and stability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121185336B_ABST
    Figure CN121185336B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of data processing, in particular to a gyro angle data adaptive calibration method and system; when calibrating the gyro angle, the motion state of the gyro is first determined, the state of the gyro is detected by an accelerometer, and the gyro is divided into a static state and a dynamic state; then different calibration methods are adopted for different states, and the gyro angle data is calibrated through acceleration data, which can effectively improve the accuracy of calibration; at the same time, when the gyro is in a dynamic state, the gyro and acceleration constraints are directly fused in the angle integral increment calculation stage of the gyro, the integral trajectory of each step is corrected from the source, and the error is avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data processing technology, specifically to an adaptive calibration method and system for gyroscope angle data. Background Technology

[0002] Gyroscopes, as key sensors for measuring and maintaining orientation, are widely used in aerospace, industrial control, consumer electronics, and scientific experiments. With the development of microelectromechanical systems (MEMS) technology, gyroscopes have evolved from early mechanical devices into more miniaturized and integrated electronic components. In physics teaching, engineering measurement, and tribological research, gyroscopes are widely used to accurately measure angles and inclinations, and to study the motion characteristics of objects on inclined planes.

[0003] Existing technologies, such as the MPU6050 and MPU9250, often lack automatic calibration functions and rely on factory calibration parameters. With prolonged use, temperature changes and electronic component aging can lead to zero-point drift, resulting in a gradual decrease in measurement accuracy. Meanwhile, various solutions exist in the market for gyroscope calibration. The most common is the static six-sided calibration method, which requires placing the sensor in six orthogonal directions, collecting data, and then calculating calibration parameters. While widely used, this method is complex, requires specialized tools and platforms, and cannot dynamically adjust parameters during use. Furthermore, existing technologies do not consider the gyroscope's motion state during calibration, leading to inconsistent calibration accuracy under different conditions. Meanwhile, in the process of gyroscope angle data calibration, the angle value of the gyroscope is generally obtained by integrating the angular velocity value. Existing technology generally integrates the angular velocity value and then performs error calibration. When the gyroscope measures the angular velocity, there is an inherent zero-point offset. Even if the gyroscope is stationary, the integration process will produce false angle increments. As time goes by, these tiny errors will continue to accumulate, causing the deviation between the integrated angle and the true attitude to gradually increase. Summary of the Invention

[0004] To address the aforementioned technical problems, this invention provides a method and system for adaptive calibration of gyroscope angle data, which solves the problems existing in the prior art.

[0005] This invention provides an adaptive calibration method for gyroscope angle data, comprising the following steps:

[0006] S1: Determine whether to trigger calibration, and proceed to the next step after the calibration time is reached;

[0007] S2: The gyroscope collects angular velocity data and acceleration data;

[0008] S3: Calibrate the gyroscope angle based on the acceleration data;

[0009] Specifically, S3 is:

[0010] S3.1: Perform data preprocessing on the acceleration data;

[0011] S3.2: Detect the state of the gyroscope and distinguish whether the gyroscope is in a static state or a dynamic state;

[0012] S3.3: When the gyroscope is in a static state, determine the angle calibration parameters of the gyroscope based on the gravity angle of the gyroscope, and calibrate the angle of the gyroscope.

[0013] S3.4: When the gyroscope is in a dynamic state, when calculating the angle increment of the gyroscope by integration, constraint information provided by acceleration data is introduced to calibrate the angle of the gyroscope.

[0014] Preferably, S3.2 specifically includes:

[0015] Calculate the composite acceleration amplitude and acceleration variance of the acceleration data at the current sampling point;

[0016] Wherein, the composite acceleration amplitude A total The calculation formula is:

[0017] ;

[0018] In the formula, AccX, AccY, and AccZ are the linear acceleration measurements on the X / Y / Z axes collected by the accelerometer built into the gyroscope;

[0019] The acceleration variance σ A Calculated based on a sliding window consisting of the current sampling point and the previous 5 sampling points;

[0020] The motion state of the gyroscope is determined based on the synthesized acceleration amplitude and the acceleration variance.

[0021] Preferably, when the magnitude of the synthesized acceleration A total exist Within the range, and the acceleration variance σ A If the weight is less than 0.1g, the gyroscope is determined to be in a static state; otherwise, the gyroscope is in a dynamic state.

[0022] Preferably, in step S3.3, when the gyroscope is in a static state, the gravitational angle of the gyroscope is calculated using acceleration data, specifically as follows:

[0023] The pitch angle θ of the gravity angle acc The calculation formula is:

[0024] ;

[0025] In the formula, AccX, AccY, and AccZ are the linear acceleration measurements on the X / Y / Z axes collected by the accelerometer built into the gyroscope.

[0026] Preferably, in step S3.3, the specific steps for determining the angle calibration parameters of the gyroscope based on the gravity angle of the gyroscope are as follows:

[0027] Sa1: Calculates the static pitch angle deviation of the gyroscope;

[0028] The formula for calculating the static pitch angle deviation is as follows:

[0029] ;

[0030] In the formula, Δθ calib θ represents the static pitch angle deviation of the gyroscope. acc The pitch angle is the angle of gravity, θ gyro The pitch angle value is obtained by integrating the angular velocity data;

[0031] Sa2: Calibrate the gyroscope angle data based on the static pitch angle deviation;

[0032] The calibration formula is as follows:

[0033] ;

[0034] In the formula, θ final The pitch angle data after gyroscope calibration, θ gyro_new The angle value of the new pitch angle obtained by integrating the gyroscope.

[0035] Preferably, in step S3.4, the step of calibrating the gyroscope's angle by incorporating constraint information provided by acceleration data when calculating the integral angle increment specifically involves:

[0036] Sb1: Calculate the original angle increment of the gyroscope;

[0037] The calculation formula is:

[0038] ;

[0039] In the formula, ω is the original increment of the angle from the k-th sample of the gyroscope. k The formula for calculating the angular velocity of the kth sample is obtained from the angular velocity data (AngX, AngY, AngZ) of the gyroscope.

[0040] Sb2: Calculate the theoretical angle increment of the gyroscope;

[0041] The calculation formula is:

[0042] ;

[0043] In the formula, This represents the theoretical angle increment of the k-th sample of the gyroscope. This is the gravitational angle value calculated from the k-th sample using acceleration data; The angle value of the gyroscope at the (k-1)th sampling time;

[0044] During the gyroscope angle integration calculation, the angle θ of the gyroscope at the k-th sampling time is... k It is obtained by adding the angle θk-1 from the previous moment to the current angular velocity ω. k The product of the product and the sampling interval Δt is obtained; the calculation formula is:

[0045] ;

[0046] In the formula, the current angular velocity ω k The angular velocity data (AngX, AngY, AngZ) from the gyroscope are used for calculation, where Δt is the sampling interval.

[0047] Sb3: Determine the integral increment of the gyroscope based on the original angle increment and the theoretical angle increment of the gyroscope;

[0048] The calculation formula is:

[0049] ;

[0050] In the formula, β is the integral increment of the k-th sample of the gyroscope; k These are dynamic weighting coefficients;

[0051] Sb4: The calibrated angle value is obtained based on the integral increment of the gyroscope;

[0052] The calculation formula is:

[0053] ;

[0054] In the above formula, θ k Let be the angle value of the gyroscope at the k-th sampling time.

[0055] Preferably, step S1 specifically involves calling the check_level() function to confirm whether the communication link of the gyroscope has been established, and entering calibration mode after the communication link has been established.

[0056] Preferably, in step S2, the raw angular velocity data and acceleration data are read from the gyroscope register at a frequency of 10Hz, and 6 floating-point values ​​are acquired each time.

[0057] Preferably, the angular velocity data and the acceleration data are acquired synchronously.

[0058] According to another aspect of the present invention, a gyroscope angle data adaptive calibration system is provided, the system employing the above-described gyroscope angle data adaptive calibration method, the system comprising:

[0059] The calibration trigger determination module is used to determine whether to trigger calibration.

[0060] The acquisition module is used to acquire the angular velocity and acceleration data of the gyroscope;

[0061] The calibration module is used to calibrate the gyroscope angle based on the acceleration data.

[0062] The embodiments of the present invention have the following technical effects:

[0063] When calibrating a gyroscope angle, this invention first determines the motion state of the gyroscope by detecting its state using an accelerometer, classifying the gyroscope into static and dynamic states. Then, different calibration methods are employed for each state, and the gyroscope angle data is calibrated using acceleration data, effectively improving calibration accuracy. Furthermore, when the gyroscope is in a dynamic state, the gyroscope and acceleration constraints are directly integrated during the angle integral increment calculation stage, correcting the integral trajectory at each step from the source and avoiding the successive propagation of errors. Attached Figure Description

[0064] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0065] Figure 1 This is a flowchart of an adaptive calibration method for gyroscope angle data provided in an embodiment of the present invention;

[0066] Figure 2 This is a flowchart of the calibration of the gyroscope angle based on the acceleration data provided in an embodiment of the present invention. Detailed Implementation

[0067] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below. Obviously, the described embodiments are only a part of the embodiments of this invention, and not all of them. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.

[0068] Example 1

[0069] Figure 1 A flowchart of an adaptive calibration method for gyroscope angle data is shown in the attached figure. Figure 1 As shown, an adaptive calibration method for gyroscope angle data includes the following steps:

[0070] S1: Determine whether to trigger calibration, and proceed to the next step after the calibration time is reached;

[0071] The check_level() function is called to confirm whether the communication link of the gyroscope has been established, and the calibration mode is entered after the communication link is established.

[0072] For example, when the RSSI signal strength of the Bluetooth device of the gyroscope is detected to be > -80dBm and the connection status is "paired", it can be determined that the communication link of the gyroscope has been established, and then the calibration mode can be entered.

[0073] S2: The gyroscope collects angular velocity data and acceleration data;

[0074] Once in calibration mode, the gyroscope acquires angular velocity and acceleration data. It reads raw angular velocity and acceleration data from the gyroscope register at a frequency of 10Hz, obtaining 6 floating-point values ​​each time. The total time for 20 acquisitions is 2 seconds (20 × 0.1 seconds). During this period, the gyroscope disables other high-priority tasks to ensure timing accuracy.

[0075] The angular velocity data includes the real-time angular velocity data (AngX, AngY, AngZ) of the gyroscope along the three orthogonal axes X, Y, and Z. During the acquisition process, only 20 sets of data are collected. This avoids both insufficient noise suppression and excessive redundant calculations. According to statistical principles, the average of 20 independent samples can reduce the standard deviation of random noise to about 1 / 4.47 of that of a single sample. This achieves an optimal balance between noise suppression and efficiency within the computational resource constraints of the embedded system. The angular velocity data is used for integral calculation to form the gyroscope angle data.

[0076] The acceleration data (AccX, AccY, AccZ) are linear acceleration measurements on the X / Y / Z axes collected by the accelerometer built into the gyroscope. The unit is usually gravitational acceleration g, which reflects the force state of the gyroscope in space.

[0077] The AngX / AngY / AngZ data and AccX / AccY / AccZ data in each data set must be obtained in strict synchronization to avoid data distortion due to misalignment of reading timing.

[0078] S3: Calibrate the gyroscope angle based on the acceleration data;

[0079] Among them, such as Figure 2 As shown, S3 specifically includes:

[0080] S3.1: Perform data preprocessing on the acceleration data;

[0081] The accelerometer built into a gyroscope typically outputs triaxial acceleration in units of gravitational acceleration g. Therefore, the raw acceleration data includes the superposition of acceleration caused by the motion of the device being measured and gravitational acceleration. Thus, data preprocessing is required to remove the acceleration caused by the motion of the device and retain the gravitational component of the acceleration data.

[0082] In this embodiment, a moving average filtering method is used to filter out high-frequency acceleration noise in the acceleration data, thereby removing acceleration caused by the vibration of the device under test and retaining the gravity component of the acceleration data.

[0083] S3.2: Detect the state of the gyroscope and distinguish whether the gyroscope is in a static state or a dynamic state;

[0084] In this step, the state of the gyroscope is detected using an accelerometer, classifying the gyroscope into static and dynamic states. In the scheme of calibrating angle data based on acceleration data, the output of the accelerometer is essentially the superposition of the gravitational acceleration and linear acceleration experienced by the gyroscope. Only when the gyroscope is stationary or in low-speed motion (i.e., static) can the influence of linear acceleration be ignored. At this time, the accelerometer output mainly reflects the direction of gravity and can be used to calculate the accurate attitude angle. If the gyroscope is in a dynamic motion state such as rapid movement or rotation, linear acceleration will significantly interfere with the gravitational component, resulting in a large deviation between the angle output by the accelerometer and the actual attitude. Therefore, accurately determining the motion state of the gyroscope is a prerequisite for ensuring that the acceleration data can be effectively used for angle calibration.

[0085] Specifically, S3.2 is as follows:

[0086] Calculate the composite acceleration amplitude and acceleration variance of the acceleration data at the current sampling point;

[0087] Wherein, the composite acceleration amplitude A total The calculation formula is:

[0088] ;

[0089] In the formula, AccX, AccY, and AccZ are the linear acceleration measurements on the X / Y / Z axes collected by the accelerometer built into the gyroscope.

[0090] The acceleration variance σ A The calculation is based on a sliding window consisting of the current sampling point and the previous 5 sampling points.

[0091] The motion state of the gyroscope is determined based on the synthesized acceleration amplitude and the acceleration variance.

[0092] Wherein, when the magnitude of the synthesized acceleration A total exist Within the range, and the acceleration variance σ A If the weight is less than 0.1g, the gyroscope is determined to be in a static state; otherwise, the gyroscope is in a dynamic state.

[0093] In this step, by jointly judging two types of parameters, namely the combined acceleration amplitude and acceleration variance, various interference scenarios of gyroscope motion are covered, avoiding the risk of misjudgment based on a single parameter.

[0094] S3.3: When the gyroscope is in a static state, determine the angle calibration parameters of the gyroscope based on the gravity angle of the gyroscope, and calibrate the angle of the gyroscope.

[0095] When the gyroscope is in a static state, the acceleration data output by the accelerometer mainly reflects the direction of gravity. Therefore, the gravity angle of the gyroscope can be calculated from the acceleration data; wherein, the gravity angle is the tilt angle of the gyroscope relative to the vertical line of gravity.

[0096] Specifically, the gravitational angle of the gyroscope is calculated using acceleration data as follows:

[0097] The pitch angle θ of the gravity angle acc The calculation formula is:

[0098] ;

[0099] In the formula, AccX, AccY, and AccZ are the linear acceleration measurements on the X / Y / Z axes collected by the accelerometer built into the gyroscope.

[0100] In a static scenario, the angle obtained by integrating the angular velocity data from the gyroscope should theoretically be completely consistent with the gravitational angle. If there is a difference, the difference represents the static deviation of the gyroscope. The calibration logic for the gyroscope in a static state is to directly correct the integrated angle of the gyroscope using the gravitational angle. The specific steps are as follows:

[0101] Sa1: Calculates the static pitch angle deviation of the gyroscope;

[0102] The formula for calculating the static pitch angle deviation is as follows:

[0103] ;

[0104] In the formula, Δθ calib θ represents the static pitch angle deviation of the gyroscope. acc The pitch angle is the angle of gravity, θ gyro The pitch angle value is obtained by integrating the angular velocity data.

[0105] Sa2: Calibrate the gyroscope angle data based on the static pitch angle deviation;

[0106] The calibration formula is as follows:

[0107] ;

[0108] In the formula, θ final The pitch angle data after gyroscope calibration, θ gyro_new The angle value of the new pitch angle obtained by integrating the gyroscope.

[0109] It is worth emphasizing that the calculation process for the roll angle value of the gyroscope is the same as the process described above.

[0110] The gravity angle is the absolute attitude reference derived from the law of the uniqueness of the direction of gravity when the gyroscope is static. Its accuracy is limited only by the measurement noise of the accelerometer. However, the error sources of the gyroscope integral angle are complex. In a static scenario, the theoretical value of the gyroscope integral angle should be consistent with the gravity angle. Therefore, by directly comparing and correcting the difference between the two, the root cause of static deviation is theoretically eliminated.

[0111] S3.4: When the gyroscope is in a dynamic state, when calculating the angle increment of the gyroscope by integration, constraint information provided by acceleration data is introduced to calibrate the angle of the gyroscope;

[0112] When a gyroscope measures angular velocity, there is an inherent zero-point offset. Even if the gyroscope is stationary, the integration process will produce false angle increments. As time goes by, these tiny errors will accumulate, causing the deviation between the integrated angle and the true attitude to gradually increase.

[0113] The innovation of this step lies in not directly calibrating the final gyroscope integral angle θ. k Instead, when calculating the integral angle increment, constraint information provided by acceleration data is introduced to calibrate the angle of the gyroscope in order to reduce the accumulation of errors.

[0114] The specific steps for calibrating the gyroscope's angle by incorporating constraint information provided by acceleration data when calculating the integral angle increment are as follows:

[0115] Sb1: Calculate the original angle increment of the gyroscope;

[0116] The calculation formula is:

[0117] ;

[0118] In the formula, ω is the original increment of the angle from the k-th sample of the gyroscope. k The formula for calculating the angular velocity of the kth sample is obtained from the angular velocity data (AngX, AngY, AngZ) of the gyroscope.

[0119] Sb2: Calculate the theoretical angle increment of the gyroscope;

[0120] The calculation formula is:

[0121] ;

[0122] In the formula, This represents the theoretical angle increment of the k-th sample of the gyroscope. This is the gravitational angle value calculated from the k-th sample using acceleration data; Let be the angle value of the gyroscope at the (k-1)th sampling time.

[0123] During the gyroscope angle integration calculation, the angle θ of the gyroscope at the k-th sampling time is... k It is based on the angle θ at the previous moment. k-1 Add the current angular velocity ω k The product of the product and the sampling interval Δt is obtained; the calculation formula is:

[0124] ;

[0125] In the formula, the current angular velocity ω k The angular velocity data (AngX, AngY, AngZ) from the gyroscope are used for calculation, where Δt is the sampling interval.

[0126] Sb3: Determine the integral increment of the gyroscope based on the original angle increment and the theoretical angle increment of the gyroscope;

[0127] The calculation formula is:

[0128] ;

[0129] In the formula, β is the integral increment of the k-th sample of the gyroscope; k These are dynamic weighting coefficients;

[0130] In the above formula, This term is used to preserve the dynamic response capability of the gyroscope, specifically the integral trajectory of the active gyroscope's integration process. This term is used to introduce constraint corrections for the accelerometer;

[0131] Furthermore, the dynamic parameter β k It is determined based on the different motion states of the gyroscope.

[0132] Sb4: The calibrated angle value is obtained based on the integral increment of the gyroscope;

[0133] The calculation formula is:

[0134] ;

[0135] In the above formula, θ k Let be the angle value of the gyroscope at the k-th sampling time.

[0136] It is worth emphasizing that the calculation process for the roll angle value of the gyroscope is the same as the process described above.

[0137] Traditional post-integration correction strategies only add constraints to the final angle result, at which point the error has been amplified by multiple integrations. In contrast, the gyroscope angle calculation method provided in this embodiment directly integrates gyroscope and acceleration constraints in the incremental calculation stage, correcting the integration trajectory at each step from the source and avoiding the successive propagation of errors.

[0138] Example 2

[0139] The present invention also provides a gyroscope angle data adaptive calibration system, wherein the system adopts a gyroscope angle data adaptive calibration method of Embodiment 1, and the system includes:

[0140] The calibration trigger determination module is used to determine whether to trigger calibration.

[0141] The acquisition module is used to acquire the angular velocity and acceleration data of the gyroscope;

[0142] The calibration module is used to calibrate the gyroscope angle based on the acceleration data.

[0143] Example 3

[0144] The present invention also provides an electronic device, including one or more processors and a memory.

[0145] A processor can be a central processing unit (CPU) or other form of processing unit with data processing and / or instruction execution capabilities, and can control other components in an electronic device to perform desired functions.

[0146] The memory may include one or more computer program products, which may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may include, for example, random access memory (RAM) and / or cache memory. The non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage medium, and a processor may execute the program instructions to implement a gyroscope angle data adaptive calibration method and / or other desired functions as described above in any embodiment of this application. Various contents such as initial extrinsic parameters and thresholds may also be stored in the computer-readable storage medium.

[0147] In one example, the electronic device may also include input and output devices, which are interconnected via a bus system and / or other forms of connection (not shown). The input device may include, for example, a keyboard, a mouse, etc. The output device may output various information to the outside, including warning messages, braking force, etc. The output device may include, for example, a display, a speaker, a printer, and a communication network and its connected remote output devices, etc.

[0148] Of course, for simplicity, components such as buses and input / output interfaces have been omitted. In addition, depending on the specific application, the electronic device may include any other appropriate components.

[0149] In addition to the methods and devices described above, embodiments of this application may also be computer program products, which include computer program instructions that, when executed by a processor, cause the processor to implement the function of a gyroscope angle data adaptive calibration method provided in any embodiment of this application.

[0150] The computer program product can be written in any combination of one or more programming languages ​​to perform the operations of the embodiments of this application. The programming languages ​​include object-oriented programming languages ​​such as Java and C++, as well as conventional procedural programming languages ​​such as C or similar languages. The program code can be executed entirely on the user's computing device, partially on the user's computing device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server.

[0151] Furthermore, embodiments of this application may also be computer-readable storage media storing computer program instructions thereon, which, when executed by a processor, cause the processor to implement a gyroscope angle data adaptive calibration method provided in any embodiment of this application.

[0152] The computer-readable storage medium may be any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection having one or more wires, a portable disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof.

[0153] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the technical solutions of the embodiments of the present invention.

Claims

1. A method for adaptive calibration of gyroscope angle data, characterized in that, Includes the following steps: S1: Determine whether to trigger calibration, and proceed to the next step after the calibration time is reached; S2: The gyroscope acquires angular velocity data and acceleration data; in S2, the acceleration data of the raw angular velocity data is read from the gyroscope register at a frequency of 10Hz, and 6 floating-point values ​​are acquired each time. S3: Calibrate the gyroscope angle based on the acceleration data; Specifically, S3 is: S3.1: Perform data preprocessing on the acceleration data; S3.2: Detect the state of the gyroscope and distinguish whether the gyroscope is in a static state or a dynamic state; S3.3: When the gyroscope is in a static state, determine the angle calibration parameters of the gyroscope based on the gravity angle of the gyroscope, and calibrate the angle of the gyroscope. S3.4: When the gyroscope is in a dynamic state, when calculating the angle increment of the gyroscope through integration, constraint information provided by acceleration data is introduced to calibrate the angle of the gyroscope; the specific steps in S3.4 of calibrating the angle of the gyroscope by introducing constraint information provided by acceleration data when calculating the integral angle increment are as follows: Sb1: Calculate the original angle increment of the gyroscope; The calculation formula is: ; In the formula, ω is the original increment of the angle from the k-th sample of the gyroscope. k The formula for calculating the angular velocity of the kth sample is obtained from the angular velocity data (AngX, AngY, AngZ) of the gyroscope. Sb2: Calculate the theoretical angle increment of the gyroscope; The calculation formula is: ; In the formula, This represents the theoretical angle increment of the gyroscope's k-th sample. This is the gravitational angle value calculated from the k-th sample using acceleration data; The angle value of the gyroscope at the (k-1)th sampling time; During the gyroscope angle integration calculation, the angle θ of the gyroscope at the k-th sampling time is... k It is based on the angle θ at the previous moment k-1 Add the current angular velocity ω k The product of the product and the sampling interval Δt is obtained; The calculation formula is: ; In the formula, the current angular velocity ω k The angular velocity data (AngX, AngY, AngZ) from the gyroscope are used for calculation, where Δt is the sampling interval. Sb3: Determine the integral increment of the gyroscope based on the original angle increment and the theoretical angle increment of the gyroscope; The calculation formula is: ; In the formula, β is the integral increment of the k-th sample of the gyroscope; k These are dynamic weighting coefficients; Sb4: The calibrated angle value is obtained based on the integral increment of the gyroscope; The calculation formula is: ; In the formula, θ k Let be the angle value of the gyroscope at the k-th sampling time.

2. The adaptive calibration method for gyroscope angle data according to claim 1, characterized in that: Specifically, S3.2 is as follows: Calculate the composite acceleration amplitude and acceleration variance of the acceleration data at the current sampling point; Wherein, the composite acceleration amplitude A total The calculation formula is: ; In the formula, AccX, AccY, and AccZ are the linear acceleration measurements on the X / Y / Z axes collected by the accelerometer built into the gyroscope; The acceleration variance σ A Calculated based on a sliding window consisting of the current sampling point and the previous 5 sampling points; The motion state of the gyroscope is determined based on the synthesized acceleration amplitude and the acceleration variance.

3. The adaptive calibration method for gyroscope angle data according to claim 2, characterized in that: When the combined acceleration amplitude A total exist Within the range, and the acceleration variance σ A If the weight is less than 0.1g, the gyroscope is determined to be in a static state; otherwise, the gyroscope is in a dynamic state.

4. The adaptive calibration method for gyroscope angle data according to claim 1, characterized in that: In step S3.3, when the gyroscope is in a static state, the gravitational angle of the gyroscope is calculated using acceleration data, specifically as follows: The pitch angle θ of the gravity angle acc The calculation formula is: ; In the formula, AccX, AccY, and AccZ are the linear acceleration measurements on the X / Y / Z axes collected by the accelerometer built into the gyroscope.

5. The adaptive calibration method for gyroscope angle data according to claim 1, characterized in that: In step S3.3, the specific steps for determining the angle calibration parameters of the gyroscope based on the gravity angle of the gyroscope are as follows: Sa1: Calculates the static pitch angle deviation of the gyroscope; The formula for calculating the static pitch angle deviation is as follows: ; In the formula, Δθ calib θ represents the static pitch angle deviation of the gyroscope. acc The pitch angle is the angle of gravity, θ gyro The pitch angle value is obtained by integrating the angular velocity data; Sa2: Calibrate the gyroscope angle data based on the static pitch angle deviation; The calibration formula is as follows: ; In the formula, θ final The pitch angle data after gyroscope calibration, θ gyro_new The angle value of the new pitch angle obtained by integrating the gyroscope.

6. The adaptive calibration method for gyroscope angle data according to claim 1, characterized in that: Specifically, S1 involves calling the check_level() function to confirm whether the communication link of the gyroscope has been established, and entering calibration mode after the communication link has been established.

7. The adaptive calibration method for gyroscope angle data according to claim 1, characterized in that: The angular velocity data and the acceleration data are acquired synchronously.

8. A gyroscope angle data adaptive calibration system, characterized in that, The system employs an adaptive calibration method for gyroscope angle data as described in any one of claims 1-6, and the system comprises: The calibration trigger determination module is used to determine whether to trigger calibration. The acquisition module is used to acquire the angular velocity and acceleration data of the gyroscope; The calibration module is used to calibrate the gyroscope angle based on the acceleration data.

Citation Information

Patent Citations

  • Adaptive calibration method for motion sensor, and system thereof

    CN108663067A

  • Satellite orbit error refinement method

    CN111025341A