Method and system for calibrating a gyroscope
Through data acquisition and processing in the initialization, learning and verification stages, the bias position and noise threshold of the gyroscope are updated, which solves the accuracy problems caused by temperature and vibration in the robot system, and achieves high-precision angle detection.
Patent Information
- Application Number
- CN202211480616.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-24
- Publication Date
- 2025-08-22
- Estimated Expiration
- 2042-11-24
AI Technical Summary
Gyroscopes are susceptible to ambient temperature changes and vibration interference in robot systems, resulting in poor accuracy of angular velocity detection and need to be corrected.
Through the initialization, learning and verification stages, the data suitability is judged and the bias position and noise threshold are updated to achieve online correction.
It effectively solves the noise problems caused by interference such as power supply, temperature and vibration, improves the detection accuracy of the gyroscope, and ensures that the robot is suppressed when it is stationary and does not affect the angular velocity detection during rotation.
Smart Images

Figure CN115900763B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of information technology, and in particular to a technology for correcting a gyroscope. Background Art
[0002] When a robot is operating, its orientation needs to be detected in real time. For example, when the robot is walking and turning, the rotation angle needs to be detected; when the robot is stationary, the detected angle should remain constant. In practical robotic systems, the gyroscope in the inertial measurement unit (IMU) is often used to detect the robot's rotation angle. The gyroscope directly outputs angular velocity, which needs to be integrated to obtain the rotation angle value. When a gyroscope is used alone to measure angular velocity, the measured angular velocity value is susceptible to changes in ambient temperature, which is known as temperature drift. When hardware devices equipped with gyroscopes are integrated into a robotic system, vibrations from other components within the robot, or vibrations during movement, can also reduce the accuracy of the gyroscope's angular velocity detection. Therefore, in practical application scenarios, the gyroscope needs to be calibrated. Summary of the Invention
[0003] One purpose of the present application is to provide a method and system for calibrating a gyroscope, which can be applied to calibrate a gyroscope inside a robot.
[0004] According to one aspect of the present application, a method for calibrating a gyroscope is provided, wherein the method comprises:
[0005] Entering the initialization phase, collecting a set of gyroscope data for the initialization phase;
[0006] Entering the learning phase, collecting a set of gyroscope data for the learning phase to determine whether to enter the verification phase;
[0007] If the verification phase is entered, collecting a set of gyroscope data of the verification phase, and determining whether to use the gyroscope data of the verification phase for calibrating the gyroscope;
[0008] If the gyroscope data in the verification phase is used to calibrate the gyroscope, the bias position and noise threshold of the gyroscope are updated according to the gyroscope data in the verification phase, and the gyroscope is calibrated.
[0009] Furthermore, the gyroscope data includes noise data such as the mean, maximum, minimum, variance, maximum variance, and minimum variance of the gyroscope, as well as a bias position and a noise threshold of the gyroscope obtained based on the noise data.
[0010] Furthermore, a learning phase is entered, a set of gyroscope data from the learning phase is collected, and a determination is made as to whether to enter a verification phase, including:
[0011] Entering the learning phase, collecting a set of gyroscope data for this phase;
[0012] If the variance of the gyroscope data in the learning phase is less than or equal to a specific multiple of the variance of the gyroscope data in the initialization phase, the verification phase is entered; otherwise, a new set of gyroscope data in the learning phase is collected.
[0013] Furthermore, entering a verification phase, collecting a set of gyroscope data in the verification phase, and determining whether to use the gyroscope data in the verification phase for calibrating the gyroscope include:
[0014] Entering the verification phase, collecting a set of gyroscope data for the verification phase;
[0015] If the absolute value of the mean of the gyroscope data used in the last gyroscope calibration is less than the variance of the gyroscope data used in the last gyroscope calibration, the gyroscope data in the verification phase is not used for gyroscope calibration;
[0016] If the variance of the gyroscope data in the verification phase and the variance of the gyroscope data in the learning phase vary by more than a specific test experience value, the gyroscope is considered to be in a rotational motion state, and the gyroscope data in the verification phase is not used to calibrate the gyroscope.
[0017] Furthermore, the method further comprises:
[0018] When the gyroscope is considered to be in a non-rotational motion state, the gyroscope is forced to be calibrated, and the bias position and noise threshold of the gyroscope are updated.
[0019] Furthermore, updating the bias position and noise threshold of the gyroscope according to the gyroscope data in the verification phase includes:
[0020] Using the mean value of the gyroscope data in the verification phase to update the bias position of the gyroscope;
[0021] According to the gyroscope data in the verification phase, the maximum value minus the mean value is used as a first value, the mean value minus the minimum value is used as a second value, and the larger value of the first value and the second value is used to update the noise threshold of the gyroscope.
[0022] Furthermore, the method further comprises:
[0023] After calibrating the gyroscope, select the gyroscope data within the time dT, multiply it by dT and accumulate it;
[0024] When the gyroscope data within the dT time is less than the current noise threshold, the gyroscope data within the dT time is considered to be noise and is forced to 0.
[0025] According to another aspect of the present application, a system for calibrating a gyroscope is further provided, wherein the system comprises:
[0026] An initialization module is used to enter an initialization phase and collect a set of gyroscope data for the initialization phase;
[0027] The learning module is used to enter the learning phase, collect a set of gyroscope data in the learning phase, and determine whether to enter the verification phase;
[0028] a verification module configured to, upon entering a verification phase, collect a set of gyroscope data for the verification phase and determine whether to use the gyroscope data for calibrating the gyroscope;
[0029] An updating module is configured to update the bias position and noise threshold of the gyroscope according to the gyroscope data in the verification phase, and calibrate the gyroscope if the gyroscope data in the verification phase is used to calibrate the gyroscope.
[0030] According to another aspect of the present application, a computing device is also provided, wherein the device includes a memory for storing computer program instructions and a processor for executing the computer program instructions, wherein when the computer program instructions are executed by the processor, the device is triggered to execute the method for correcting the gyroscope.
[0031] According to yet another aspect of the present application, a computer-readable medium is provided, on which computer program instructions are stored. The computer-readable instructions can be executed by a processor to implement the method for calibrating a gyroscope.
[0032] In the solution provided by this application, after the system is started, it first enters the initialization phase and collects a set of gyroscope data from the initialization phase; then enters the learning phase and collects a set of gyroscope data from the learning phase to determine whether to enter the verification phase; if the verification phase is entered, a set of gyroscope data from the verification phase is collected to determine whether to use the gyroscope data from the verification phase for gyroscope calibration; if the gyroscope data from the verification phase is used for gyroscope calibration, the gyroscope's offset position and noise threshold are updated based on the gyroscope data from the verification phase, and the gyroscope is calibrated. This application can update the offset position of gyroscope data online and filter out the noise threshold, effectively solving the problem of poor gyroscope detection accuracy caused by noise caused by interference from power supply, temperature, vibration, and other factors. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] Other features, objects and advantages of the present application will become more apparent from the detailed description of non-limiting embodiments made with reference to the following drawings:
[0034] Figure 1 is a flow chart of a method for calibrating a gyroscope according to an embodiment of the present application;
[0035] Figure 2 is a system state machine diagram for calibrating a gyroscope according to an embodiment of the present application;
[0036] Figure 3 3 is a schematic diagram of a system for correcting a gyroscope according to an embodiment of the present application.
[0037] The same or similar reference numerals in the drawings represent the same or similar components. DETAILED DESCRIPTION
[0038] The present application is described in further detail below with reference to the accompanying drawings.
[0039] In a typical configuration of the present application, the terminal, the device of the service network and the trusted party all include one or more processors (CPUs), input / output interfaces, network interfaces and memories.
[0040] Memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.
[0041] Computer-readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology for information storage. The information can be a device that can store computer-readable instructions, data structures, programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc-read only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device.
[0042] The embodiment of the present application provides a method for calibrating a gyroscope, which can effectively solve the problem of poor gyroscope detection accuracy caused by noise caused by interference such as power supply, temperature, and vibration. The embodiment of the present application can update the bias position of gyroscope data online and filter out the noise threshold. After applying the embodiment of the present application to calibrate the gyroscope inside the robot, when the robot is not rotating (i.e., stationary), it can have better zero drift suppression and does not affect the angular velocity detection of the robot during rotation, thereby accurately detecting the rotation angle of the robot.
[0043] In practical scenarios, the device implementing this method can be a user device, a network device, or a device formed by integrating a user device and a network device via a network. The user device includes, but is not limited to, terminal devices such as smartphones, tablet computers, and personal computers, and the network device includes, but is not limited to, a network host, a single network server, a set of multiple network servers, or a collection of computers based on cloud computing. Here, the cloud is composed of a large number of hosts or network servers based on cloud computing. Cloud computing is a type of distributed computing, consisting of a group of loosely coupled computers forming a virtual computer.
[0044] Figure 1 This is a flow chart of a method for calibrating a gyroscope according to an embodiment of the present application, the method comprising step S101, step S102, step S103 and step S104.
[0045] Step S101 , entering an initialization phase, collecting a set of gyroscope data in the initialization phase.
[0046] For example, after the system is started to calibrate the gyroscope, it first enters the initialization phase (such as Figure 2 In the initial noise study shown in FIG, the system assumes that the gyroscope is in a stationary state and collects a set of gyroscope data in the initialization phase over a period of time to obtain the initial gyroscope noise data and bias position.
[0047] In some embodiments, the gyroscope data includes noise data such as the mean (mean), maximum value (max), minimum value (min), variance (cov), maximum variance (max_cov), and minimum variance (min_cov) of the gyroscope, as well as the bias position and noise threshold of the gyroscope obtained based on the noise data.
[0048] For example, the noise data of the gyroscope obtained in the initialization stage, such as the mean (mean), maximum value (max), minimum value (min), variance (cov), maximum variance (max_cov), and minimum variance (min_cov), can be used for subsequent integration judgment; based on the noise data, the bias position and noise threshold of the gyroscope in the initialization stage can be obtained.
[0049] Step S102: Entering the learning phase, collecting a set of gyroscope data in the learning phase, and determining whether to enter the verification phase.
[0050] For example, during the learning phase (e.g. Figure 2 In the Current noise study shown in FIG, while the system performs normal gyro integration, it collects a set of gyro data in the learning phase over a period of time for subsequent use.
[0051] In some embodiments, step S102 includes: entering a learning phase and collecting a set of gyroscope data for the learning phase; if the variance (cov) in the gyroscope data for the learning phase is less than or equal to a specific multiple of the variance (cov) in the gyroscope data for the initialization phase, entering a verification phase, otherwise recollecting a set of gyroscope data for the learning phase.
[0052] For example, based on the test experience value, the specific multiple can be 40; when the variance (cov) in the gyroscope data of the learning stage is less than or equal to 40 times the variance (cov) in the gyroscope data of the initialization stage, the next stage (i.e., the verification stage) is entered to evaluate whether the gyroscope data collected in the learning stage is suitable for calibrating the gyroscope; otherwise, a new set of gyroscope data of the learning stage is collected. In the step S102, the significance of judging whether to enter the verification stage is that if the variance (cov) in the gyroscope data of the learning stage is significantly greater than the variance when the gyroscope is in a rotating state as determined by the system, the gyroscope data currently obtained in the learning stage is not considered to have value for calibrating the gyroscope. If, based on the judgment in the step S102, the verification stage is not entered, but at the same time the system is convinced that the gyroscope is in a non-rotating state (i.e., a stationary state), then the forced correction of the gyroscope (such as Figure 2 Force static calibration shown).
[0053] Step S103: if entering the verification phase, a set of gyroscope data of the verification phase is collected, and it is determined whether the gyroscope data of the verification phase is used to calibrate the gyroscope.
[0054] For example, if the judgment in step S102 is followed and the verification phase is entered (e.g. Figure 2The following three types of data are used in the verification phase: a newly acquired set of gyroscope data from the verification phase, referred to as data set A for suspected non-rotation; a set of gyroscope data from the previous learning phase, referred to as data set B for suspected non-rotation; and data set C, the gyroscope data used during the last calibration, when the system assumed the gyroscope was non-rotational.
[0055] In some embodiments, step S103 includes: entering a verification phase and collecting a set of gyroscope data for the verification phase; if the absolute value obtained by subtracting the mean of the gyroscope data used in the last gyroscope calibration from the mean of the gyroscope data in the verification phase is greater than the variance of the gyroscope data used in the last gyroscope calibration, the gyroscope data in the verification phase is not used to calibrate the gyroscope; if the variance of the gyroscope data in the verification phase and the variance of the gyroscope data in the learning phase vary by more than a specific test experience value, the gyroscope is deemed to be in a rotational motion state, and the gyroscope data in the verification phase is not used to calibrate the gyroscope.
[0056] For example, continuing with the previous example, during the verification phase, the system will make the following judgments:
[0057] (1) If the absolute value of the mean in data set A minus the mean in data set C is greater than the variance in data set C, then more additional calibrations are required. The significance of this judgment is that if the current bias position data is reliable and the change from the previous bias position data is greater than the data jitter range when the gyroscope was in a non-rotating state, then this calibration is likely to be an incorrect calibration. Because under normal circumstances, the bias position change caused by temperature should not be so significant, so more data needs to be collected.
[0058] (2) If the difference between the variance in data set A and the variance in data set B is greater than a certain value (this value is the test experience value), then the gyroscope is considered to be in a state of rotation. The significance of this judgment is that if the absolute value of the variance in the gyroscope data is not large and the change in the variance is not much over a long enough period of time, then the gyroscope is likely to be in a non-rotating state.
[0059] The above two judgments (1) and (2) will usually be carried out for COUNT_1 (this value is the empirical value); if the condition of (1) is met, then COUNT_2 (this value must be greater than COUNT_1) will be carried out. If after multiple rounds of verification, all are passed, then it is considered that the mean value contained in the suspected non-rotation state data set A is the available bias position data, and it can enter the next stage (such as Figure 2 New bias calibration ready).
[0060] In some embodiments, the method for calibrating a gyroscope further includes: when the gyroscope is considered to be in a non-rotational motion state, forcibly calibrating the gyroscope and updating the bias position and noise threshold of the gyroscope.
[0061] For example, it can be found from the previous online correction steps (such as steps S101 to S103): if the gyroscope moves when the system starts, then the gyroscope data collected in the initialization phase may be too large or too small; if the gyroscope inside the robot has additional vibrations caused by the fan, radar operation, etc., then it is difficult to judge through online data noise, resulting in the inability to perform new corrections. In response to the above situation, this embodiment introduces a forced non-rotational correction mechanism; this mechanism triggers a forced update of the gyroscope's bias position and noise threshold when the system believes that the gyroscope is in a non-rotational motion state (i.e., a stationary state), and can still force the gyroscope to be corrected. In this embodiment, when the system is convinced that the gyroscope is in a non-rotational motion state (i.e., a stationary state), and during the verification phase (such as Figure 2 If the Bias proposal stage shown in the figure fails for a certain period of time, the gyroscope will be forced to be corrected (such as Figure 2 Force static calibration as shown).
[0062] In a robot system, components other than the inertial measurement unit (IMU) can be used to determine whether the robot is stationary. For example, if the control system does not issue a movement or rotation command, and the odometer returns no change in mileage or wheel travel distance, the robot system is considered stationary. At this point, a command can be issued to notify the inertial measurement unit (IMU) to perform a forced correction. Forced correction is determined during the noise model learning phase. If forced correction is determined to be necessary, the verification phase is skipped and the currently learned noise data is used directly as the update data.
[0063] Step S104 : if the gyroscope data in the verification phase is used to calibrate the gyroscope, the bias position and noise threshold of the gyroscope are updated according to the gyroscope data in the verification phase, and the gyroscope is calibrated.
[0064] For example, if the determination in step S103 shows that a data interval suitable for generating bias position data is obtained, i.e., the gyroscope data in the verification phase, then the process proceeds to step S104 (e.g., Figure 2 Newbias calibration ready as shown).
[0065] In some embodiments, step S104 includes: using the mean value of the gyroscope data in the verification phase to update the bias position of the gyroscope; based on the gyroscope data in the verification phase, subtracting the mean value from the maximum value as the first value, and subtracting the minimum value from the mean value as the second value, and then using the larger value of the first value and the second value to update the noise threshold of the gyroscope.
[0066] For example, continuing with the previous example, record the mean data in data set A as the new bias position data. Simultaneously, calculate and update the gyroscope noise threshold using the following formula: take the maximum value (maximum value in A - mean value in A, mean value in A - minimum value in A). Furthermore, update the mean, variance, and other data in data set C to the corresponding values in data set A. This completes a new round of bias position and noise threshold data updates.
[0067] In some embodiments, the method for calibrating the gyroscope further includes: after calibrating the gyroscope, selecting gyroscope data within a time period of dT, multiplying the data by dT, and accumulating the data; when the gyroscope data within the time period of dT is less than a current noise threshold, the gyroscope data within the time period of dT is considered to be noise and is forced to be 0.
[0068] For example, in the application scenario of a robot, the rotation angle of the robot, i.e., the integral of the gyroscope data, is the main output target. Through the previous online correction steps (such as steps S101 to S104), real-time gyroscope correction has been performed, and the angular velocity filtering threshold (i.e., the noise threshold) has been determined. In this embodiment, the rotation angle integration process (such as Figure 2 Gyro accumulation shown).
[0069] Figure 3 3 is a schematic diagram of a system for calibrating a gyroscope according to an embodiment of the present application, the system including an initialization module 301 , a learning module 302 , a verification module 303 and an update module 304 .
[0070] Initialization module 301 enters the initialization phase and collects a set of gyroscope data in the initialization phase.
[0071] For example, after the system is started to calibrate the gyroscope, it first enters the initialization phase (such as Figure 2In the initial noise study shown in FIG, the system assumes that the gyroscope is in a stationary state and collects a set of gyroscope data in the initialization phase over a period of time to obtain the initial gyroscope noise data and bias position.
[0072] In some embodiments, the gyroscope data includes noise data such as the mean (mean), maximum value (max), minimum value (min), variance (cov), maximum variance (max_cov), and minimum variance (min_cov) of the gyroscope, as well as the bias position and noise threshold of the gyroscope obtained based on the noise data.
[0073] For example, the noise data of the gyroscope obtained in the initialization stage, such as the mean (mean), maximum value (max), minimum value (min), variance (cov), maximum variance (max_cov), and minimum variance (min_cov), can be used for subsequent integration judgment; based on the noise data, the bias position and noise threshold of the gyroscope in the initialization stage can be obtained.
[0074] The learning module 302 enters a learning phase, collects a set of gyroscope data in the learning phase, and determines whether to enter a verification phase.
[0075] For example, during the learning phase (e.g. Figure 2 In the Current noise study shown in FIG, while the system performs normal gyro integration, it collects a set of gyro data in the learning phase over a period of time for subsequent use.
[0076] In some embodiments, the learning module 302 is used to: enter a learning phase and collect a set of gyroscope data for the learning phase; if the variance (cov) in the gyroscope data for the learning phase is less than or equal to a specific multiple of the variance (cov) in the gyroscope data for the initialization phase, then enter a verification phase, otherwise re-collect a set of gyroscope data for the learning phase.
[0077] For example, based on the test experience value, the specific multiple can be 40; when the variance (cov) in the gyroscope data of the learning stage is less than or equal to 40 times the variance (cov) in the gyroscope data of the initialization stage, the next stage (i.e., the verification stage) is entered to evaluate whether the gyroscope data collected in the learning stage is suitable for calibrating the gyroscope; otherwise, a new set of gyroscope data for the learning stage is collected. In the learning module 302, the significance of judging whether to enter the verification stage is that if the variance (cov) in the gyroscope data of the learning stage is significantly greater than the variance when the gyroscope is in a rotating state as determined by the system, the gyroscope data currently obtained in the learning stage is not considered to have value for calibrating the gyroscope. If, based on the judgment in the learning module 302, the verification stage is not entered, but at the same time the system is convinced that the gyroscope is in a non-rotating state (i.e., a stationary state), the forced correction of the gyroscope (such as Figure 2 Force static calibration shown).
[0078] The verification module 303 collects a set of gyroscope data of the verification phase if entering the verification phase, and determines whether to use the gyroscope data of the verification phase for calibrating the gyroscope.
[0079] For example, if the learning module 302 determines that the verification phase has begun (e.g. Figure 2 The following three types of data are used in the verification phase: a newly acquired set of gyroscope data from the verification phase, referred to as data set A for suspected non-rotation; a set of gyroscope data from the previous learning phase, referred to as data set B for suspected non-rotation; and data set C, the gyroscope data used during the last calibration, when the system assumed the gyroscope was non-rotational.
[0080] In some embodiments, the verification module 303 is used to: enter a verification phase and collect a set of gyroscope data for the verification phase; if the absolute value obtained by subtracting the mean of the gyroscope data used in the last gyroscope calibration from the mean of the gyroscope data in the verification phase is greater than the variance of the gyroscope data used in the last gyroscope calibration, the gyroscope data in the verification phase will not be used to calibrate the gyroscope; if the variance of the gyroscope data in the verification phase and the variance of the gyroscope data in the learning phase vary by more than a specific test experience value, the gyroscope is considered to be in a rotational motion state, and the gyroscope data in the verification phase will not be used to calibrate the gyroscope.
[0081] For example, continuing with the previous example, during the verification phase, the system will make the following judgments:
[0082] (1) If the absolute value of the mean in data set A minus the mean in data set C is greater than the variance in data set C, then more additional calibrations are required. The significance of this judgment is that if the current bias position data is reliable and the change from the previous bias position data is greater than the data jitter range when the gyroscope was in a non-rotating state, then this calibration is likely to be an incorrect calibration. Because under normal circumstances, the bias position change caused by temperature should not be so significant, so more data needs to be collected.
[0083] (2) If the difference between the variance in data set A and the variance in data set B is greater than a certain value (this value is the test experience value), then the gyroscope is considered to be in a state of rotation. The significance of this judgment is that if the absolute value of the variance in the gyroscope data is not large and the change in the variance is not much over a long enough period of time, then the gyroscope is likely to be in a non-rotating state.
[0084] The above two judgments (1) and (2) will usually be carried out for COUNT_1 (this value is the empirical value); if the condition of (1) is met, then COUNT_2 (this value must be greater than COUNT_1) will be carried out. If after multiple rounds of verification, all are passed, then it is considered that the mean value contained in the suspected non-rotation state data set A is the available bias position data, and it can enter the next stage (such as Figure 2 New bias calibration ready).
[0085] In some embodiments, the system for calibrating the gyroscope is further configured to: when the gyroscope is considered to be in a non-rotational motion state, forcibly calibrate the gyroscope and update the bias position and noise threshold of the gyroscope.
[0086] For example, it can be found from the previous online correction steps: if the gyroscope moves when the system starts, then the gyroscope data collected in the initialization phase may be too large or too small; if the gyroscope inside the robot has additional vibrations caused by the fan, radar operation, etc., then it is difficult to judge through online data noise, resulting in the inability to perform new corrections. In response to the above situation, this embodiment introduces a forced non-rotational correction mechanism; this mechanism triggers a forced update of the gyroscope's bias position and noise threshold when the system believes that the gyroscope is in a non-rotational motion state (i.e., a stationary state), and can still force the gyroscope to be corrected. In this embodiment, when the system is convinced that the gyroscope is in a non-rotational motion state (i.e., a stationary state), and during the verification phase (such as Figure 2 If the Bias proposal stage shown in the figure fails for a certain period of time, the gyroscope will be forced to be corrected (such as Figure 2 Force static calibration as shown).
[0087] In a robot system, components other than the inertial measurement unit (IMU) can be used to determine whether the robot is stationary. For example, if the control system does not issue a movement or rotation command, and the odometer returns no change in mileage or wheel travel distance, the robot system is considered stationary. At this point, a command can be issued to notify the inertial measurement unit (IMU) to perform a forced correction. Forced correction is determined during the noise model learning phase. If forced correction is determined to be necessary, the verification phase is skipped and the currently learned noise data is used directly as the update data.
[0088] The updating module 304 updates the bias position and noise threshold of the gyroscope according to the gyroscope data in the verification phase, and calibrates the gyroscope, if the gyroscope data in the verification phase is used for calibrating the gyroscope.
[0089] For example, if the judgment in the verification module 303 obtains a data interval suitable for generating bias position data, that is, the gyroscope data of the verification phase, then the update module 304 phase (such as Figure 2 New bias calibration ready).
[0090] In some embodiments, the update module 304 is used to: use the mean value of the gyroscope data in the verification phase to update the bias position of the gyroscope; based on the gyroscope data in the verification phase, subtract the mean value from the maximum value as the first value, and subtract the minimum value from the mean value as the second value, and then use the larger value of the first value and the second value to update the noise threshold of the gyroscope.
[0091] For example, continuing with the previous example, record the mean data in data set A as the new bias position data. Simultaneously, calculate and update the gyroscope noise threshold using the following formula: take the maximum value (maximum value in A - mean value in A, mean value in A - minimum value in A). Furthermore, update the mean, variance, and other data in data set C to the corresponding values in data set A. This completes a new round of bias position and noise threshold data updates.
[0092] In some embodiments, the system for calibrating the gyroscope is further used to: after calibrating the gyroscope, select the gyroscope data within a time period of dT, multiply it by dT, and accumulate it; when the gyroscope data within the time period of dT is less than the current noise threshold, the gyroscope data within the time period of dT is considered to be noise and is forced to be 0.
[0093] For example, in the application scenario of a robot, the rotation angle of the robot, that is, the integral of the gyroscope data, is the main output target. Through the previous online correction step, real-time gyroscope correction has been performed, and the angular velocity filtering threshold (that is, the noise threshold) has been determined. In this embodiment, the rotation angle integration process (such as Figure 2 Gyroaccumulation shown).
[0094] In summary, the embodiments of the present application can update the bias position of gyroscope data online and filter out the noise threshold, which can effectively solve the problem of poor gyroscope detection accuracy caused by noise caused by interference from power supply, temperature, vibration, etc. After applying the embodiments of the present application to calibrate the gyroscope inside the robot, when the robot is not rotating (i.e., stationary), it can achieve better zero drift suppression without affecting the angular velocity detection of the robot during rotation, thereby accurately detecting the robot's rotation angle.
[0095] In addition, a part of the present application may be applied as a computer program product, such as computer program instructions, which, when executed by a computer, can call or provide the method and / or technical solution according to the present application through the operation of the computer. The program instructions for calling the method of the present application may be stored in a fixed or removable recording medium, and / or transmitted through a data stream in a broadcast or other signal-carrying medium, and / or stored in a working memory of a computer device that runs according to the program instructions. Here, some embodiments of the present application provide a computing device, which includes a memory for storing computer program instructions and a processor for executing computer program instructions, wherein, when the computer program instructions are executed by the processor, the device is triggered to execute the methods and / or technical solutions of the aforementioned multiple embodiments of the present application.
[0096] In addition, some embodiments of the present application further provide a computer-readable medium on which computer program instructions are stored. The computer-readable instructions can be executed by a processor to implement the methods and / or technical solutions of the aforementioned multiple embodiments of the present application.
[0097] It should be noted that the present application can be implemented in a combination of software and / or software and hardware, for example, can be implemented using an application specific integrated circuit (ASIC), a general purpose computer or any other similar hardware device. In certain embodiments, the software program of the present application can be executed by a processor to implement the steps or functions described above. Similarly, the software program of the present application (including relevant data structures) can be stored in a computer-readable recording medium, for example, a RAM memory, a magnetic or optical drive or a floppy disk and similar devices. In addition, some steps or functions of the present application can be implemented using hardware, for example, as a circuit that cooperates with a processor to perform each step or function.
[0098] It is obvious to those skilled in the art that the present application is not limited to the details of the above-mentioned exemplary embodiments, and that the present application can be implemented in other specific forms without departing from the spirit or basic characteristics of the present application. Therefore, from any point of view, the embodiments should be regarded as exemplary and non-restrictive, and the scope of the present application is defined by the appended claims rather than the above description, and it is intended that all changes that fall within the meaning and scope of the equivalent elements of the claims are included in the present application. Any figure mark in the claims should not be regarded as limiting the claims involved. In addition, it is obvious that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices stated in the device claim can also be implemented by one unit or device through software or hardware. Words such as first and second are used to indicate names and do not indicate any particular order.
Claims
1. A method for calibrating a gyroscope, wherein: The method comprises: Entering the initialization phase, collecting a set of gyroscope data for the initialization phase; Entering the learning phase, collecting a set of gyroscope data for the learning phase to determine whether to enter the verification phase; If the verification phase is entered, a set of gyroscope data of the verification phase is collected. (1) If the absolute value obtained by subtracting the mean value of the gyroscope data used in the last gyroscope calibration from the mean value of the gyroscope data in the verification phase is greater than the variance of the gyroscope data used in the last gyroscope calibration, the gyroscope data in the verification phase will not be used to calibrate the gyroscope; (2) If the variance of the gyroscope data in the verification phase and the variance of the gyroscope data in the learning phase change by more than a specific test experience value, it is considered that the gyroscope is in a rotational motion state, and the gyroscope data in the verification phase will not be used to calibrate the gyroscope; the above two judgments (1) and (2) are performed for COUNT_1 rounds. If the condition of (1) is met, COUNT_2 rounds will be performed. If the verification phase is passed after multiple rounds, the gyroscope data in the verification phase will be used to calibrate the gyroscope; If the gyroscope data in the verification phase is used to calibrate the gyroscope, the bias position and noise threshold of the gyroscope are updated according to the gyroscope data in the verification phase, and the gyroscope is calibrated.
2. The method according to claim 1, wherein The gyroscope data includes the mean, maximum, minimum, variance, maximum variance, and minimum variance of the gyroscope, wherein the mean, maximum, minimum, variance, maximum variance, and minimum variance are all noise data, as well as the bias position and noise threshold of the gyroscope obtained based on the noise data.
3. The method according to claim 1, wherein Entering the learning phase, a set of gyroscope data is collected during the learning phase to determine whether to enter the verification phase, including: Entering the learning phase, collecting a set of gyroscope data for this phase; If the variance of the gyroscope data in the learning phase is less than or equal to a specific multiple of the variance of the gyroscope data in the initialization phase, the verification phase is entered; otherwise, a new set of gyroscope data in the learning phase is collected.
4. The method according to claim 1, wherein The method further comprises: When the gyroscope is considered to be in a non-rotational motion state, the gyroscope is forced to be calibrated, and the bias position and noise threshold of the gyroscope are updated.
5. The method according to claim 2, wherein: Updating the bias position and noise threshold of the gyroscope according to the gyroscope data in the verification phase, including: Using the mean value of the gyroscope data in the verification phase to update the bias position of the gyroscope; According to the gyroscope data in the verification phase, the maximum value minus the mean value is used as a first value, the mean value minus the minimum value is used as a second value, and the larger value of the first value and the second value is used to update the noise threshold of the gyroscope.
6. The method according to claim 1, wherein The method further comprises: After calibrating the gyroscope, select the gyroscope data within the time dT, multiply it by dT and accumulate it; When the gyroscope data within the dT time is less than the current noise threshold, the gyroscope data within the dT time is considered to be noise and is forced to 0.
7. A system for calibrating a gyroscope, wherein: The system comprises: An initialization module is used to enter an initialization phase and collect a set of gyroscope data for the initialization phase; The learning module is used to enter the learning phase, collect a set of gyroscope data in the learning phase, and determine whether to enter the verification phase; The verification module is used to collect a set of gyroscope data of the verification phase when entering the verification phase, (1) if the absolute value obtained by subtracting the mean value of the gyroscope data used in the last gyroscope calibration from the mean value of the gyroscope data in the verification phase is greater than the variance of the gyroscope data used in the last gyroscope calibration, the gyroscope data of the verification phase will not be used to calibrate the gyroscope; (2) if the variance of the gyroscope data in the verification phase and the variance of the gyroscope data in the learning phase are greater than a specific test experience value, it is considered that the gyroscope is in a rotational motion state, and the gyroscope data of the verification phase will not be used to calibrate the gyroscope; the above two judgments (1) and (2) are performed for COUNT_1 rounds. If the condition of (1) is met, COUNT_2 rounds will be performed. If the verification phase is passed after multiple rounds, the gyroscope data of the verification phase will be used to calibrate the gyroscope; An updating module is configured to update the bias position and noise threshold of the gyroscope according to the gyroscope data in the verification phase, and calibrate the gyroscope if the gyroscope data in the verification phase is used to calibrate the gyroscope.
8. A computing device, wherein: The device comprises a memory for storing computer program instructions and a processor for executing the computer program instructions, wherein when the computer program instructions are executed by the processor, the device is triggered to execute the method according to any one of claims 1 to 6.
9. A computer-readable medium having computer program instructions stored thereon, wherein the computer-readable instructions can be executed by a processor to implement the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Temperature drift compensation method and device of gyroscope
CN106500728A
Gyroscope data processing method, mobile terminal and computer readable storage medium
CN108021242A