Method and device for performing angle correction on a gyroscope

Through sampling and error compensation algorithms, the angle value lost after gyroscope wake-up is estimated and corrected, which solves the problem of inaccurate angle calculation in the power-saving mode, and improves the accuracy of gate state detection.

CN114577192BActive Publication Date: 2025-06-10ROBERT BOSCH GMBH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202011278323.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-11-16
Publication Date
2025-06-10
Estimated Expiration
2040-11-16

AI Technical Summary

Technical Problem

When the gyroscope sleeps in power-saving mode, the loss of original data after wake-up leads to inaccurate angle calculations, affecting the gate state detection accuracy.

Method used

By sampling the angular velocity values ​​at multiple time points after the gyroscope wakes up, the swing value is calculated, and the angle value lost during the sleep state is estimated using an error compensation algorithm to perform angle correction.

Benefits of technology

The accuracy of gyroscope angle calculation is improved, the accuracy of gate state detection is ensured, and misjudgment is reduced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114577192B_ABST
    Figure CN114577192B_ABST
Patent Text Reader

Abstract

The present invention relates to a method and device for angle correction of a gyroscope. The method includes: a sampling step of detecting that the gyroscope is in a sleep state and, after the gyroscope is awakened from the sleep state, sampling the angular velocity values of the gyroscope at multiple time points and calculating the swing value of the gyroscope based on the angular velocity values; an estimation step of estimating the angle value lost by the gyroscope during the sleep state according to an error compensation algorithm based on the angular velocity values of the gyroscope sampled in the sampling step; and a correction step of correcting the swing value of the gyroscope calculated in the sampling step according to the lost angle value of the gyroscope estimated in the estimation step. According to the present invention, the angle of the gyroscope can be calculated more accurately, thereby enabling more accurate detection of the door state. The present invention is widely applied to various applications of gyroscopes, for example, navigation, mobile phone anti-shake, sensors, augmented reality functions, etc., and is particularly suitable for applications in fields such as smart door locks and smart window locks.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to gyroscope technology, and more particularly to a method and device for angle correction of a gyroscope. Background Art

[0002] In the smart lock market, there is a solution that uses a microelectromechanical system (MEMS) gyroscope to calculate the angle of a door to detect the door state (open or closed). However, if the gyroscope is always on, the power consumption will be very high. In some solutions, there is a power-saving mode for the gyroscope. During the power-saving mode, if the door does not move, the gyroscope will go to sleep. However, there is a key problem in this mode, that is, the angle calculation of the gyroscope will be inaccurate. When the gyroscope wakes up from the sleep state, it will lose some original data. Since the angle is calculated by integrating the original data, the loss of the original data will affect the state detection accuracy. Summary of the Invention

[0003] In view of the above, the present invention proposes an angle correction method and device to improve this problem.

[0004] A method for angle correction of a gyroscope according to an aspect of the present invention is characterized by comprising:

[0005] A sampling step of detecting that the gyroscope is in a sleep state and, after the gyroscope is awakened from the sleep state, sampling the angular velocity values of the gyroscope at a plurality of time points and calculating a swing value of the gyroscope based on the angular velocity values;

[0006] An estimation step of estimating, based on the angular velocity values of the gyroscope sampled in the sampling step, an angle value lost by the gyroscope during the sleep state according to an error compensation algorithm; and

[0007] A correction step of correcting the swing value calculated in the sampling step according to the lost angle value estimated in the estimation step.

[0008] Optionally, in the estimation step, it is determined to adopt a quadratic compensation algorithm when a preset judgment condition is satisfied, otherwise it is determined to adopt a linear compensation algorithm,

[0009] wherein the preset judgment condition is set based on the change rate of the angular velocity value of the gyroscope over time and the initial angular velocity of the gyroscope after being awakened from the sleep state.

[0010] Optionally, when the linear compensation algorithm is adopted, the estimated lost angle value is proportional to a coefficient value K and the average value of the angular velocity values of the gyroscope sampled in the sampling step.

[0011] Optionally, in the case of adopting the secondary compensation algorithm, the lost angle value is estimated by performing a linear regression calculation on the angular velocity value of the gyroscope sampled in the sampling step.

[0012] Optionally, in the secondary compensation algorithm, the relationship between the angular velocity value ω and time t is expressed as a linear equation ω = kt + b, where the parameter k is the rate of change of the angular velocity value ω with time, and the parameter b is the initial angular velocity of the gyroscope after it is awakened.

[0013] Optionally, the preset judgment condition includes any one of the following or a combination thereof:

[0014] Assume whether the parameter k in the secondary compensation algorithm conforms to the threshold corresponding to the current scenario;

[0015] Assume whether the parameter b in the secondary compensation algorithm is greater than the first set threshold; and

[0016] Assume whether the ratio of the parameter k to the parameter b in the secondary compensation algorithm is less than the second set threshold.

[0017] An apparatus for angle correction of the swing value of a gyroscope according to an aspect of the present invention, characterized by comprising:

[0018] A sampling module, configured to detect that the gyroscope is in a sleep state and, after the gyroscope is awakened from the sleep state, sample the angular velocity values of the gyroscope at multiple time points and calculate the swing value of the gyroscope based on the angular velocity values;

[0019] An estimation module, configured to estimate the lost angle value of the gyroscope during the sleep state according to an error compensation algorithm based on the angular velocity value of the gyroscope sampled in the sampling module; and

[0020] A correction module, configured to correct the swing value calculated by the adoption module according to the lost angle value estimated by the estimation module.

[0021] Optionally, in the estimation module, if the preset judgment condition is satisfied, it is determined that the secondary compensation algorithm is adopted, otherwise it is determined that the linear compensation algorithm is adopted,

[0022] wherein the preset judgment condition is set based on the rate of change of the angular velocity value of the gyroscope with time and the initial angular velocity of the gyroscope after it is awakened from the sleep state.

[0023] Optionally, in the estimation module, in the case of adopting the linear compensation algorithm, the estimated lost angular velocity is proportional to the coefficient value K and the average value of the angular velocity values of the gyroscope sampled in the sampling step.

[0024] Optionally, in the estimation module, when the quadratic compensation algorithm is adopted, the lost angle value is estimated by performing linear regression calculation on the angular velocity value of the gyroscope sampled in the sampling step.

[0025] Optionally, in the estimation module, in the quadratic compensation algorithm, the relationship between the angular velocity value ω and time t is expressed as a linear equation ω = kt + b, where the parameter k is the change rate of the angular velocity value ω with time, and the parameter b is the initial angular velocity after the gyroscope is awakened.

[0026] Optionally, in the estimation module, the preset judgment conditions include any one of the following or a combination thereof:

[0027] Assume whether the parameter k in the quadratic compensation algorithm conforms to the threshold corresponding to the current scenario;

[0028] Assume whether the parameter b in the quadratic compensation algorithm is greater than the first set threshold; and

[0029] Assume whether the ratio of the parameter k to the parameter b in the quadratic compensation algorithm is less than the second set threshold.

[0030] A computer-readable medium according to an aspect of the present invention, on which a computer program is stored, characterized in that when the computer program is executed by a processor, the method for angle correction of the gyroscope described above is implemented.

[0031] A computer device according to an aspect of the present invention, including a storage module, a processor, and a computer program stored on the storage module and executable on the processor, characterized in that when the processor executes the computer program, the method for angle correction of the gyroscope described above is implemented.

[0032] A device for detecting the opening and closing of doors and windows according to an aspect of the present invention, characterized in that the device includes a gyroscope, and the gyroscope further includes: the device for angle correction of the gyroscope described above.

[0033] A method for detecting the opening and closing of doors and windows by a gyroscope according to an aspect of the present invention, characterized in that the method for angle correction of the gyroscope described above is adopted to correct the angle detected by the gyroscope.

[0034] According to the present invention, the angle of the gyroscope can be calculated more accurately, and thus the door state can be detected more accurately. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] From the following detailed description in conjunction with the accompanying drawings, the above and other objects and advantages of the present invention will become more completely clear, wherein the same or similar elements are denoted by the same reference numerals.

[0036] Figure 1It is a flowchart of a gyroscope angle correction method representing one aspect of the present invention.

[0037] Figure 2 It is a flowchart of a compensation algorithm judgment method representing one aspect of the present invention.

[0038] Figure 3 It is a structural block diagram of a device for a gyroscope angle correction method representing one aspect of the present invention. Detailed implementation manners

[0039] For the sake of simplicity and illustrative purposes, the principles of the present invention are mainly described herein with reference to its exemplary embodiments. However, those skilled in the art will readily recognize that the same principles can be equivalently applied to all types of gyroscope angle correction methods and devices and can be implemented therein, and any such variations do not depart from the true spirit and scope of this patent.

[0040] Before specifically describing the method and device for gyroscope angle correction of the present invention, it is necessary to briefly explain the research of the inventor of the present invention on the basic theory of the gyroscope and the principle of gyroscope error generation.

[0041] In the basic theory of solutions related to gyroscopes, the yaw value of the gyroscope is calculated by integrating the original angular velocity data ω according to formula (1):

[0042]

[0043] where yaw is the yaw value of the gyroscope. When the yaw value of the gyroscope is greater than a certain threshold, the door state is open; otherwise, the door state is closed. ODR is the output data frequency of the gyroscope, and ω 0 to ω T are the corresponding angular velocities of the gyroscope from time 0 to time T respectively. It can be seen from formula (1) that the yaw value of the gyroscope is the integral of the angular velocity ω over the corresponding time period.

[0044] To save the power consumption of the gyroscope, that is, a power-saving or low-power mode is introduced for the gyroscope. During this mode, the gyroscope will go to sleep. When the door is not moving, this sleep mode will be activated; conversely, when the door starts to move, the sleep mode will be deactivated.

[0045] However, it takes some time for the gyroscope to wake up from the sleep mode to the normal mode, and during this time, the gyroscope has no data. Specifically, the time series of gyroscope data can be expressed as ω = {ω 0 , …, ω t0 , …, ω T}, where t 0 is the time point when the gyroscope is awakened, then {ω 0 , …, ωt0} will be invisible and regarded as zero in the calculation. Since the swing value used to judge the door state is based on the integration of the gyroscope angular velocity, the absence of angular velocity for a period of time will affect the accuracy of the integration. When the error is large enough, the door state detection will be incorrect. To improve the accuracy of the swing value, the error of this part can be calculated.

[0046] As described above, the swing value with error can be calculated according to formula (2):

[0047]

[0048] where, is the swing value with error. It can be seen from formula (2) that this swing value only takes into account the angular velocity starting from the wake-up time point t 0 Therefore, the angular velocity values from time 0 to t 0 are lost, and this lost part is the error. The error can be calculated by formula (3):

[0049]

[0050] where, it can be seen that the error ∈ is the integration of the angular velocity values from time 0 to t 0 That is, the angular value lost during this time period. When the error ∈ is small, the impact on the swing value is not significant. However, if the error ∈ is very large or accumulates after multiple iterations, the overall error will be very large, which will lead to an incorrect judgment of the final door state. Therefore, a method that can calculate the lost angular value before the gyroscope is awakened is needed to compensate for the error.

[0051] Figure 1 is a flowchart of the gyroscope angle correction method according to an aspect of the present invention. This method estimates the angular velocity data value before the gyroscope is awakened based on the angular velocity data value after the gyroscope is awakened.

[0052] As Figure 1 shown, the algorithm starts at step S100, where S100 can be, for example, clearing the memory to prepare for running the program.

[0053] In step S101, after the gyroscope is awakened from the sleep mode, it continuously samples the angular velocity values of the gyroscope at time points according to a preset sampling frequency.

[0054] In step S102, based on the sampled angular velocity values at time points, the lost angular value before the gyroscope is awakened, that is, the error ∈, is calculated. The specific calculation method of the lost angular value before being awakened will be described in detail below.

[0055] In step S103, the calculated missing angle value, i.e., the error ∈, is added to the wobble value with error to obtain the corrected wobble value

[0056] The algorithm ends at step S104

[0057] To calculate the error ∈, two compensation algorithms are provided in the present invention to calculate the error to cope with different scenarios

[0058] According to an embodiment of the present invention, a linear compensation algorithm is proposed to calculate the error. In this embodiment, multiple angular velocities after the gyroscope is awakened are used to estimate the average angular velocity before the gyroscope is awakened. The linear compensation algorithm will be specifically described below

[0059] In this embodiment, a value is set for calculating the average angular velocity at time points after the gyroscope is awakened can be a positive integer greater than zero. In this embodiment, as an example, is set to 15, that is, the average angular velocity is calculated according to the angular velocities at 15 time points after the gyroscope is awakened. As described above, the average angular velocity can be calculated by formula (4):

[0060]

[0061] It can be seen that the average angular velocity is the average of the angular velocities of the gyroscope at 0 time points after being awakened at time point t . Then the error ∈ can be estimated according to formula (5):

[0062]

[0063] where K is a constant determined through experiments. A method such as the least squares error metric can be used to determine which K value is the best. In our experiment, as an example, a K value range of 0.1 - 0.2 can achieve a relatively ideal effect. According to different scenarios, appropriate adjustments can be made through experiments to obtain a suitable K value, and the K value is not limited in the present invention

[0064] Furthermore, when the door is open or closed, since the wobble values of the gyroscope are quite different in the two cases, the K value can be different according to the corresponding situation of the door. Preferably, K can be divided into two constants, namely constant K 打开 and K 关闭for estimating errors in different scenarios. For example, as an illustration, if the angular error caused by opening the door in the actual situation has a small impact, K 打开 can be set to a small value, such as 0.01 - 0.05, and K 关闭 can be between 0.1 - 0.2.

[0065] According to another embodiment of the present invention, a secondary compensation algorithm is also proposed to calculate the error. Compared with the linear compensation algorithm that determines the error with a constant average angular velocity, this secondary compensation algorithm estimates the error in a linearly varying manner. Therefore, when sufficient useful information is provided, this algorithm is more accurate and can be applied to more scenarios.

[0066] As described above, at the time point t 0 before the gyroscope is awakened, {ω 0 , …, ω t0} is invisible. Theoretically, the angular velocity starts from a value very close to 0 and then gradually increases to the visible value ω t0+1 . Therefore, it can be assumed that the growth is linearly continuous, and thus the linear growth in the visible data sequence is used to estimate the data values in the invisible data sequence. The secondary compensation algorithm estimates the invisible data by performing linear regression on the first data in the visible data sequence. can be a positive integer greater than zero.

[0067] To estimate the relationship between time t and ω, assume a linear equation ω = kt + b, where k and b are relevant constants determined through experiments, and they can be calculated through operations such as Moore - Penrose Inverse or mathematical software / libraries such as Matlab, R, or Python.

[0068] Therefore, for the angular velocity sequence of the gyroscope after being awakened the growth of ω from time t0 + 1 to time point t can be expressed as k(t - (t0 + 1)) + b. At the same time, when time point t is equal to t0 + 1, that is, when the gyroscope after being awakened is first observed, ω t0+1 should be b.

[0069] As described above, since it is assumed that the initial angular rate ω 0 is zero, the angular velocity data before the gyroscope is awakened is from zero to b, and thus the time consumed during this period is b / k. According to the previous assumption, the angular velocity acceleration process is constant. Therefore, the average angular velocity of the device during this process is (b - 0) / 2, and the time of this process is b / k. Therefore, the missing value of the angular velocity value of the gyroscope from time 0 to t 0 before being awakened, that is, the error ∈ can be calculated by the following formula (6):

[0070]

[0071] In the secondary compensation algorithm, when the door is open, k should be a positive value; when the door is closed, k should be a negative value.

[0072] By supplementing the error ∈ into the angular velocity data before the gyroscope is awakened, the wobbling value of the gyroscope can be corrected, so as to more accurately judge the movement of the door in the context of being awakened from the sleep mode.

[0073] According to two embodiments of the present invention, two compensation algorithms are provided to calculate the error. The linear compensation method calculates the error with an invariant average angular velocity value. The method is relatively simple and requires less data, but the accuracy of the calculated error is not as good as that of the secondary compensation method. The secondary compensation method calculates the error with a linearly changing angular velocity. The method is relatively complex and requires more data, but the calculated error is closer to the actual error. Therefore, different compensation algorithms need to be used for different scenarios. How to select the compensation algorithm will be specifically described below.

[0074] As described above, the secondary compensation algorithm is more accurate, while the linear compensation algorithm can cover more scenarios. Therefore, in the present invention, it is first judged whether the current scenario is suitable for the secondary compensation algorithm; if it is suitable, the secondary compensation algorithm is applied, otherwise the linear compensation algorithm is applied.

[0075] Figure 2 It is a flowchart showing a method for judging a compensation algorithm according to an aspect of the present invention.

[0076] As Figure 2 described, the method starts from step S200.

[0077] In step S201, it is determined whether the current scenario is suitable for applying the secondary compensation algorithm according to a preset judgment condition. If it is suitable, proceed to step S202 to apply the secondary compensation algorithm. If it is not suitable for applying the secondary compensation algorithm, proceed to step S203 to apply the linear compensation algorithm.

[0078] The basic judgment condition for applying the secondary compensation algorithm is that the first several observed data after the gyroscope is awakened are reliable and can represent the trend in the invisible data before the gyroscope is awakened. Therefore, it can be judged whether the secondary compensation algorithm is applicable to the current scenario according to the parameters k, b / k, and b value of the secondary compensation algorithm.

[0079] The preset judgment conditions for applying the secondary compensation algorithm will be specifically described below. There can be multiple judgment conditions for applying the secondary compensation algorithm. Multiple judgment conditions can be used alone or in combination. The following lists three preset judgment conditions:

[0080] (1) In the secondary compensation algorithm, the relationship between the angular velocity ω and time t can be expressed as a linear equation ω = kt + b. When the door is opened, k should be positive; when the door is closed, k should be negative. Therefore, after the gyroscope is awakened, the first observed angular velocity data can be recorded, and the values of the linear equation parameters k and b can be calculated according to the method described above. To determine whether the current scenario is suitable for applying the secondary compensation algorithm, it can be judged first according to whether the value of the rate of change k of the angular velocity with respect to time is reasonable. When the door is opened, a positive threshold can be set for k, and k should be greater than this positive threshold; when the door is closed, a negative threshold can be set for k, and k should be less than this negative threshold. If k falls within this positive and negative threshold range, it is considered that the rate of change k is unreasonable, and the current scenario is not suitable for the secondary compensation algorithm, and the linear compensation algorithm should be applied.

[0081] (2) As described above, the angular velocity data before the gyroscope is awakened is from zero to b, and the time consumed for b / k is b / k. Therefore, the value of b / k represents the time of the lost valid data. If the value of b / k is too large, it means that too much valid data has been lost, and the regression method may not be reliable. Therefore, a first threshold can be set for the b / k value of the linear equation. If the b / k value of the current linear equation is greater than this first threshold, it is considered that the time of the lost valid data is too long, and the secondary compensation algorithm is not suitable, and the linear compensation algorithm should be used; otherwise, if the b / k value of the current linear equation is less than this first threshold, the time of the lost valid data is within a reasonable range, and the secondary compensation algorithm is suitable.

[0082] (3) The constant b in the linear equation represents the angular velocity value at the time point after the gyroscope is awakened. A second threshold should be set for the absolute value of the constant b. When the absolute value of the constant b is greater than this second threshold, that is, when the angular velocity movement is large enough, the yaw / offset value needs to be corrected.

[0083] Figure 3 is a structural block diagram showing a device for an angular correction method based on a gyroscope according to an aspect of the present invention.

[0084] As Figure 3 shown, a device for angular correction of the swing value of a gyroscope according to an aspect of the present invention includes:

[0085] A sampling module 100 for sampling the angular velocity values of the gyroscope at multiple time points after the gyroscope is awakened and calculating the swing value of the gyroscope;

[0086] An estimation module 200 for estimating the lost angular values before the gyroscope is awakened based on the angular velocity values sampled in the sampling module according to an error compensation algorithm; and

[0087] A calibration module 300 is configured to supplement the estimated lost angular value into the swing value to obtain a calibrated swing value.

[0088] Among them, in the estimation module 200, when a preset judgment condition is met, it is determined to adopt a quadratic compensation algorithm, otherwise it is determined to adopt a linear compensation algorithm.

[0089] Among them, in the estimation module 200, when the linear compensation algorithm is adopted, the estimated lost angular value is proportional to the average value of multiple angular velocity values of the gyroscope recorded after the gyroscope is awakened by a coefficient value K. For the specific algorithm, please refer to the description in the above method steps.

[0090] Among them, in the estimation module 200, when the quadratic compensation algorithm is adopted, the lost angular value is estimated by performing a linear regression calculation on multiple angular velocity values of the gyroscope recorded after the gyroscope is awakened.

[0091] In the estimation module 200, in the quadratic compensation algorithm, the relationship between the angular velocity ω and the time t is expressed as a linear equation ω = kt + b, where the parameter k is the change rate of the angular velocity ω with respect to time, and the parameter b is the initial angular velocity of the gyroscope after it is awakened. For the specific algorithm, please refer to the description in the above method steps.

[0092] In the estimation module 200, the preset judgment condition includes any one of the following or a combination thereof:

[0093] Assume whether the parameter k in the quadratic compensation algorithm conforms to the threshold corresponding to the current scenario;

[0094] Assume whether the parameter b in the quadratic compensation algorithm is greater than the first set threshold; and

[0095] Assume whether the ratio of the parameter k to the parameter b in the quadratic compensation algorithm is less than the second set threshold.

[0096] As described above, according to the present invention, the angle of the gyroscope can be calculated more precisely, and thus the door state of the gyroscope can be detected more accurately.

[0097] The method and device for angle calibration of the gyroscope according to the present invention can be widely applied to various applications of the gyroscope, such as navigation, mobile phone anti-shake, sensors, augmented reality functions, etc. Among them, it is particularly suitable for applications in fields such as smart door locks and smart window locks.

[0098] For example, the present invention also provides a device for detecting the opening and closing of doors and windows. The device includes a gyroscope, and the gyroscope further includes: the device for angle correction of the gyroscope described above. The present invention also provides a method for detecting the opening and closing of doors and windows using a gyroscope. In this method, the method for angle correction of the gyroscope described above is used to correct the angle detected by the gyroscope.

[0099] For another example, the present invention also provides a mobile phone anti-shake device, characterized in that the mobile phone anti-shake device includes a gyroscope, and the gyroscope further includes: the device for angle correction of the gyroscope described above. The present invention also provides a method for realizing mobile phone anti-shake using a gyroscope. In this method, the method for angle correction of the gyroscope described above is used to correct the angle detected by the gyroscope.

[0100] The present invention also provides a computer-readable medium, on which a computer program is stored. When the computer program is executed by a processor, the method for angle correction of the gyroscope described above is realized.

[0101] The present invention also provides a computer device, including a storage module, a processor, and a computer program stored on the storage module and executable on the processor. The computer device is characterized in that when the processor executes the computer program, the method for angle correction of the gyroscope described above is realized.

[0102] Although only some embodiments of the present invention have been described, those of ordinary skill in the art should understand that the present invention can be implemented in many other forms without departing from its gist and scope. Therefore, the examples and embodiments shown are regarded as illustrative rather than restrictive, and the present invention may cover various modifications and substitutions without departing from the spirit and scope of the present invention as defined by the appended claims.

Claims

1. A method for angle correction of a gyroscope, characterized in that, comprising: a sampling step of detecting that the gyroscope is in a sleep state and, after the gyroscope is awakened from the sleep state, sampling the angular velocity values of the gyroscope at multiple time points and calculating the swing value of the gyroscope based on the angular velocity values; an estimation step of estimating the angle value lost by the gyroscope during the sleep state according to an error compensation algorithm based on the angular velocity values of the gyroscope sampled in the sampling step; and a correction step of correcting the swing value of the gyroscope calculated in the sampling step according to the lost angle value of the gyroscope estimated in the estimation step.

2. The method for angle correction of a gyroscope according to claim 1, characterized in that, in the estimation step, it is determined to adopt a quadratic compensation algorithm when a preset judgment condition is satisfied, otherwise it is determined to adopt a linear compensation algorithm, wherein, the preset judgment condition is set based on the change rate of the angular velocity value of the gyroscope with time and the initial angular velocity after the gyroscope is awakened from the sleep state.

3. The method for angle correction of a gyroscope according to claim 2, characterized in that, in the case of adopting a linear compensation algorithm, the estimated lost angle value is proportional to the coefficient value K and the average value of the angular velocity values of the gyroscope sampled in the sampling step.

4. The method for angle correction of a gyroscope according to claim 2, characterized in that, in the case of adopting a quadratic compensation algorithm, the lost angle value is estimated by performing a linear regression calculation on the angular velocity values of the gyroscope sampled in the sampling step.

5. The method for angle correction of a gyroscope according to claim 4, characterized in that, in the quadratic compensation algorithm, the relationship between the angular velocity value ω and time t is expressed as a linear equation ω = kt + b, where the parameter k is the change rate of the angular velocity value ω with time, and the parameter b is the initial angular velocity after the gyroscope is awakened.

6. The method for angle correction of a gyroscope according to claim 5, characterized in that, the preset judgment condition includes any one of the following or a combination thereof: assuming whether the parameter k in the quadratic compensation algorithm conforms to the threshold corresponding to the current scenario; assuming whether the parameter b in the quadratic compensation algorithm is greater than the first set threshold; and assuming whether the ratio of the parameter k to the parameter b in the quadratic compensation algorithm is less than the second set threshold.

7. A device for angle correction of a gyroscope, characterized in that, comprising: a sampling module for detecting that the gyroscope is in a sleep state and, after the gyroscope is awakened from the sleep state, sampling the angular velocity values of the gyroscope at multiple time points and calculating the swing value of the gyroscope based on the angular velocity values; an estimation module for estimating the angle value lost by the gyroscope during the sleep state according to an error compensation algorithm based on the angular velocity values of the gyroscope sampled by the sampling module; and A calibration module, configured to calibrate the swing value calculated by the sampling module according to the lost angle value estimated by the estimation module.

8. The apparatus for angle calibration of a gyroscope according to claim 7, wherein, in the estimation module, when a preset judgment condition is satisfied, it is determined to adopt a quadratic compensation algorithm, otherwise it is determined to adopt a linear compensation algorithm, wherein the preset judgment condition is set based on the change rate of the angular velocity value of the gyroscope over time and the initial angular velocity of the gyroscope after being awakened from the sleep state.

9. The apparatus for angle calibration of a gyroscope according to claim 8, wherein, in the estimation module, when the linear compensation algorithm is adopted, the estimated lost angular velocity is proportional to the coefficient value K and the average value of the angular velocity values of the gyroscope sampled in the sampling module.

10. The apparatus for angle calibration of a gyroscope according to claim 8, wherein, in the estimation module, when the quadratic compensation algorithm is adopted, the lost angle value is estimated by performing a linear regression calculation on the angular velocity values of the gyroscope sampled in the sampling module.

11. The apparatus for angle calibration of a gyroscope according to claim 10, wherein, in the estimation module, in the quadratic compensation algorithm, the relationship between the angular velocity value ω and time t is expressed as a linear equation ω = kt + b, where the parameter k is the change rate of the angular velocity value ω over time, and the parameter b is the initial angular velocity of the gyroscope after being awakened.

12. The apparatus for angle calibration of a gyroscope according to claim 11, wherein, in the estimation module, the preset judgment condition includes any one of the following or a combination thereof: assuming whether the parameter k in the quadratic compensation algorithm conforms to the threshold corresponding to the current scenario; assuming whether the parameter b in the quadratic compensation algorithm is greater than the first set threshold; and assuming whether the ratio of the parameter k to the parameter b in the quadratic compensation algorithm is less than the second set threshold.

13. A computer-readable medium, on which a computer program is stored, wherein, when the computer program is executed by a processor, it implements the method for angle calibration of a gyroscope according to any one of claims 1 to 6.

14. A computer device, including a storage module, a processor, and a computer program stored on the storage module and executable on the processor, wherein, when the processor executes the computer program, it implements the method for angle calibration of a gyroscope according to any one of claims 1 to 6.

15. A device for detecting the opening and closing of doors and windows, wherein, the device includes a gyroscope, and the gyroscope further includes: the apparatus for angle calibration of a gyroscope according to any one of claims 7 to 12.

16. A method for detecting the opening and closing of doors and windows using a gyroscope, wherein, in this method, the method for angle calibration of a gyroscope according to any one of claims 1 to 6 is adopted to calibrate the angle detected by the gyroscope.

Citation Information

Patent Citations

  • Calibration method and device for gyroscope

    CN108600542A

  • Refrigerator door opening shooting angle calibration method and device

    CN109872369A