Gyroscope-based error compensation method and device
By acquiring and processing the supply voltage, output voltage and temperature values of the gyroscope, calculating the compensation difference and performing error compensation, the problem of reduced measurement accuracy of the gyroscope is solved, the measurement accuracy of the gyroscope is improved, and it is suitable for a variety of electronic devices.
Patent Information
- Application Number
- CN202011622197.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-31
- Publication Date
- 2024-09-13
- Estimated Expiration
- 2040-12-31
AI Technical Summary
During the use of existing gyroscopes, the measurement accuracy is reduced due to temperature and other reasons, and errors occur, which affects the use effect of electronic equipment.
By obtaining the power supply voltage, output voltage and temperature value of the gyroscope, smoothing filtering is performed, the compensation difference is calculated, and error compensation is performed on the output voltage to reduce the measurement error, thereby improving the measurement accuracy of the gyroscope.
It effectively reduces the measurement error of the gyroscope and improves the measurement accuracy of the gyroscope. It is suitable for various electronic devices such as balancing cars, smart cars and smart robots.
Smart Images

Figure CN112629563B
Abstract
Description
Technical Field
[0001] The present application relates to the field of sensor technology, and in particular to a gyroscope-based error compensation method and device. Background Art
[0002] At present, more and more electronic devices are appearing in front of people, providing great convenience for people's work and life. Among them, a large number of electronic devices are beginning to be installed with gyroscopes, so that the electronic devices can perform real-time motion monitoring according to their own movements. However, in practice, it is found that the current gyroscopes usually have different deviations during use due to various reasons (such as temperature reasons, etc.), which leads to a decrease in the measurement accuracy of the gyroscope, thereby affecting the use of electronic devices. Summary of the invention
[0003] The purpose of the embodiments of the present application is to provide a gyroscope-based error compensation method and device, which can reduce the error of gyroscope measurement and thus improve the measurement accuracy of the gyroscope.
[0004] A first aspect of an embodiment of the present application provides a gyroscope-based error compensation method, comprising:
[0005] Acquire the supply voltage of the gyroscope, the output voltage of the gyroscope, and the temperature value of the gyroscope;
[0006] Smoothing and filtering the supply voltage to obtain a processing voltage, and smoothing and filtering the temperature value to obtain a processing temperature value;
[0007] calculating a compensation difference value according to the process voltage, the output voltage and the process temperature value;
[0008] The output voltage is error compensated according to the compensation difference to obtain the error compensated output voltage of the gyroscope.
[0009] In the above implementation process, when performing error compensation, the power supply voltage of the gyroscope, the output voltage of the gyroscope and the temperature value of the gyroscope are first obtained; then the power supply voltage and the temperature value are smoothed and filtered respectively to obtain the processing voltage and the processing temperature value; further, the compensation difference is calculated according to the processing voltage, the output voltage and the processing temperature value; finally, the output voltage is error compensated according to the compensation difference to obtain the error compensated output voltage of the gyroscope, which can reduce the error of the gyroscope measurement, thereby improving the measurement accuracy of the gyroscope.
[0010] Further, the calculating the compensation difference according to the processing voltage, the output voltage and the processing temperature value includes:
[0011] calculating an initial difference value based on the process voltage and the output voltage;
[0012] The initial difference is error compensated according to the processing temperature value to obtain a compensated difference.
[0013] In the above implementation process, the initial difference is first calculated according to the processing voltage and the output voltage, and then the initial difference is error compensated according to the processing temperature value to obtain the compensated difference. The calculation method is simple and the amount of calculation is small.
[0014] Further, calculating an initial difference according to the processing voltage and the output voltage includes:
[0015] calculating a target voltage according to the process voltage;
[0016] The difference between the target voltage and the output voltage is calculated to obtain an initial difference.
[0017] In the above implementation process, an initial difference can be calculated based on the processing voltage and the output voltage, so that error compensation of the subsequent power supply voltage and the output voltage can be achieved.
[0018] Furthermore, the formula for calculating the compensation difference is:
[0019] y(err)=a0+a1T+a2T 2 +a3T 3 +…+a n T n ;
[0020] Wherein, y(err) is the compensation difference, a0, a1, a2, a3, ..., a n , is the compensation coefficient, T is the processing temperature value, and n is the compensation order.
[0021] In the above implementation process, the compensation difference is calculated by the above formula, and the error compensation calculation of the power supply voltage and the output voltage can be performed in combination with the processing temperature value.
[0022] Furthermore, the method further comprises:
[0023] According to the preset temperature cycle temperature of the temperature box, the temperature box device corresponding to the gyroscope is controlled to adjust the temperature back and forth;
[0024] The obtaining of the supply voltage of the gyroscope, the output voltage of the gyroscope and the temperature value of the gyroscope includes:
[0025] Obtaining a power supply voltage of the gyroscope and an output voltage of the gyroscope;
[0026] Obtain a temperature value detected by a temperature sensor on the incubator device.
[0027] In the above implementation process, the temperature is adjusted back and forth in a cycle, which is beneficial to the subsequent error compensation calculation of the power supply voltage and the output voltage in combination with the temperature value.
[0028] A second aspect of an embodiment of the present application provides a gyroscope-based error compensation device, the gyroscope-based error compensation device comprising:
[0029] An acquisition unit, used for acquiring a power supply voltage of the gyroscope, an output voltage of the gyroscope, and a temperature value of the gyroscope;
[0030] A filtering unit, configured to smooth and filter the supply voltage to obtain a processing voltage, and to smooth and filter the temperature value to obtain a processing temperature value;
[0031] a calculation unit, configured to calculate a compensation difference value according to the processing voltage, the output voltage and the processing temperature value;
[0032] A compensation unit is used to perform error compensation on the output voltage according to the compensation difference to obtain the error compensated output voltage of the gyroscope.
[0033] In the above implementation process, when performing error compensation, the acquisition unit first acquires the power supply voltage of the gyroscope, the output voltage of the gyroscope and the temperature value of the gyroscope; then the filtering unit smoothes and filters the power supply voltage and the temperature value respectively to obtain the processing voltage and the processing temperature value; further, the calculation unit calculates the compensation difference according to the processing voltage, the output voltage and the processing temperature value; finally, the compensation unit performs error compensation on the output voltage according to the compensation difference to obtain the error compensated output voltage of the gyroscope, which can reduce the error of the gyroscope measurement, thereby improving the measurement accuracy of the gyroscope.
[0034] Furthermore, the calculation unit comprises:
[0035] A first subunit, configured to calculate an initial difference value according to the processing voltage and the output voltage;
[0036] The second subunit is used to perform error compensation on the initial difference according to the processing temperature value to obtain a compensated difference.
[0037] In the above implementation process, the first subunit first calculates the initial difference according to the processing voltage and the output voltage, and then the second subunit performs error compensation on the initial difference according to the processing temperature value to obtain the compensated difference. The calculation method is simple and the amount of calculation is small.
[0038] Furthermore, the first subunit includes:
[0039] A first calculation module, used for calculating a target voltage according to the processing voltage;
[0040] The second calculation module is used to calculate the difference between the target voltage and the output voltage to obtain an initial difference.
[0041] In the above implementation process, an initial difference can be calculated based on the processing voltage and the output voltage, so that error compensation of the subsequent power supply voltage and the output voltage can be achieved.
[0042] A third aspect of an embodiment of the present application provides an electronic device, including a memory and a processor, wherein the memory is used to store a computer program, and the processor runs the computer program to enable the electronic device to perform the gyroscope-based error compensation method described in any one of the first aspect of the embodiment of the present application.
[0043] A fourth aspect of an embodiment of the present application provides a computer-readable storage medium storing computer program instructions. When the computer program instructions are read and executed by a processor, the gyroscope-based error compensation method described in any one of the first aspects of the embodiment of the present application is executed. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments of the present application will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0045] Figure 1 A schematic diagram of a flow chart of a gyroscope-based error compensation method provided in Embodiment 1 of the present application;
[0046] Figure 2 A schematic flow chart of a gyroscope-based error compensation method provided in Embodiment 2 of the present application;
[0047] Figure 3 A schematic diagram of the structure of a gyroscope-based error compensation device provided in Embodiment 3 of the present application;
[0048] Figure 4 A schematic structural diagram of a gyroscope-based error compensation device provided in Example 4 of the present application. DETAILED DESCRIPTION
[0049] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application.
[0050] It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. At the same time, in the description of this application, the terms "first", "second", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.
[0051] Example 1
[0052] Please see Figure 1 , Figure 1 A schematic flow chart of a gyroscope-based error compensation method is provided for an embodiment of the present application. The gyroscope-based error compensation method includes:
[0053] S101, obtaining a power supply voltage of a gyroscope, an output voltage of the gyroscope, and a temperature value of the gyroscope.
[0054] In the embodiment of the present application, the method is applied to gyroscopes in electronic devices in the fields of balancing vehicles, smart cars, smart sweepers, smart robots, etc., and the embodiment of the present application is not limited to this.
[0055] In the embodiment of the present application, the gyroscope, i.e., the gyroscope sensor or the angular motion detection device, is a device for detecting the angular motion of a high-speed rotating body around one or two axes orthogonal to the rotation axis by sensing the angular moment of the housing relative to the inertial space. Angular motion detection devices made using other principles and having the same function are also called gyroscopes.
[0056] In practical applications, for the gyroscope in the robot, after the robot obtains the surrounding environment information through the gyroscope (such as ultra-waveguide radar, lidar, camera, etc.), how the robot moves and how to rotate a certain angle on a plane to move according to the planned route, the gyroscope plays an important role in it. The angle can be obtained by integrating the angular rate, and then a specific angle can be completed in the horizontal direction. The error compensation method provided by this implementation can reduce the use error of the gyroscope, thereby improving the accuracy of the robot's movement.
[0057] In the embodiment of the present application, the supply voltage of the gyroscope is the power supply voltage of the gyroscope, and the temperature value of the gyroscope can be obtained by a temperature sensor.
[0058] When actually acquiring data, it is necessary to collect the original data of the temperature value of the gyroscope, the output voltage of the gyroscope, and the power supply voltage within the full temperature range (-40 to 85°C).
[0059] In the embodiment of the present application, the output voltage of the gyroscope is Vo:
[0060]
[0061] Where Vdd is the power supply voltage, is the angular rate, k is the scale factor, and ζ is the internal filter parameter of the gyroscope.
[0062] In the embodiment of the present application, when the gyroscope is a MEMS (Micro Electro Mechanical systems) gyroscope, since MEMS is a semiconductor process and is sensitive to temperature, the actual output voltage Vo of the MEMS gyroscope is:
[0063] V o ∈f(V dd ,T,ω);
[0064] Where ω is the output angular rate of the gyroscope, T is the temperature value, and Vdd is the supply voltage.
[0065] After step S101, the following steps may also be included:
[0066] S102, smoothing and filtering the supply voltage to obtain a processing voltage, and smoothing and filtering the temperature value to obtain a processing temperature value.
[0067] In the embodiment of the present application, the supply voltage and temperature value are respectively smoothed and filtered to remove interference data, thereby improving the accuracy of error compensation.
[0068] S103, calculating a compensation difference according to the processing voltage, the output voltage and the processing temperature value.
[0069] In the embodiment of the present application, the static output voltage of the gyroscope is related to the power supply voltage and the temperature value. Therefore, it is necessary to calculate the compensation difference based on the processing voltage, the output voltage and the processing temperature value.
[0070] As an optional implementation, the formula for calculating the compensation difference is:
[0071] y(err)=a0+a1T+a2T 2 +a3T 3 +…+a n T n ;
[0072] Among them, y(err) is the compensation difference, a0, a1, a2, a3, ..., a n , is the compensation coefficient, T is the processing temperature value, and n is the compensation order.
[0073] In the above implementation, the compensation order and the compensation coefficient may be pre-set, which is not limited in the embodiment of the present application.
[0074] S104 , performing error compensation on the output voltage according to the compensation difference to obtain the error compensated output voltage of the gyroscope.
[0075] As an optional implementation, the formula for calculating the error compensation output voltage y(θ) is:
[0076]
[0077] Among them, V(ω) is the output voltage of the gyroscope, and y(err) is the compensation difference.
[0078] In the embodiment of the present application, the execution subject of the method can be a computing device such as a computer or a server, and no limitation is made in this embodiment.
[0079] In the embodiment of the present application, the execution subject of the method can also be a smart device such as a smart phone, a tablet computer, etc., and there is no limitation on this in the present embodiment.
[0080] It can be seen that the implementation of the gyroscope-based error compensation method described in this embodiment can reduce the error of gyroscope measurement, thereby improving the measurement accuracy of the gyroscope.
[0081] Example 2
[0082] Please see Figure 2 , Figure 2 The present invention provides a flowchart of a gyroscope-based error compensation method. Figure 2 As shown, the gyroscope-based error compensation method includes:
[0083] S201, controlling the temperature of the temperature box device corresponding to the gyroscope to adjust the temperature back and forth according to the preset temperature box cycle temperature.
[0084] In the embodiment of the present application, the preset temperature box cycle temperature is pre-set, and specifically can be: cycling back and forth from -40°C to 85°C, which is not limited in the embodiment of the present application.
[0085] S202: Obtain the power supply voltage of the gyroscope and the output voltage of the gyroscope.
[0086] S203: Obtain the temperature value detected by the temperature sensor on the incubator device.
[0087] In the embodiment of the present application, by implementing the above steps S202 to S203, the power supply voltage of the gyroscope, the output voltage of the gyroscope, and the temperature value of the gyroscope can be obtained.
[0088] After step S203, the following steps are also included:
[0089] S204 , smoothing and filtering the supply voltage to obtain a processing voltage, and smoothing and filtering the temperature value to obtain a processing temperature value.
[0090] S205: Calculate an initial difference according to the processing voltage and the output voltage.
[0091] As an optional implementation, calculating the initial difference value according to the process voltage and the output voltage may include the following steps:
[0092] Calculate target voltage based on process voltage;
[0093] The difference between the target voltage and the output voltage is calculated to obtain an initial difference.
[0094] In the above implementation, the formula for calculating the initial difference V(err) may be:
[0095]
[0096] Among them, V(Vdd) is the supply voltage of the gyroscope, and V(ω) is the output voltage of the gyroscope.
[0097] After step S205, the following steps are also included:
[0098] S206 , performing error compensation on the initial difference according to the processing temperature value to obtain a compensated difference.
[0099] As an optional implementation, the formula for calculating the compensation difference is:
[0100] y(err)=a0+a1T+a2T 2 +a3T 3 +…+a n T n ;
[0101] Among them, y(err) is the compensation difference, a0, a1, a2, a3, ..., a n , is the compensation coefficient, and T is the processing temperature value.
[0102] In the above implementation, n is the compensation order, and the compensation order and the compensation coefficient may be preset, which is not limited in the embodiment of the present application.
[0103] In the embodiment of the present application, the above steps S205 to S206 are implemented to calculate the compensation difference according to the processing voltage, the output voltage and the processing temperature value.
[0104] S207 , performing error compensation on the output voltage according to the compensation difference to obtain the error compensated output voltage of the gyroscope.
[0105] As an optional implementation, the formula for compensating the output voltage error is:
[0106]
[0107] Where y(θ) is the error compensated output voltage and y(err) is the compensated difference.
[0108] In the embodiment of the present application, the method is implemented to perform error compensation processing on two related factors of the MEMS gyroscope (i.e., the power supply voltage and the temperature value). In actual use, the power supply voltage is different at different temperatures. At the same time, the static output zero bias of the gyroscope directly affects the factor. Therefore, through the error compensation algorithm, temperature compensation can be performed on the difference between the power supply voltage and the output voltage of the gyroscope, and the power supply voltage value sampling is increased. Finally, the error of the error compensated output voltage after compensation is smaller.
[0109] It can be seen that the implementation of the gyroscope-based error compensation method described in this embodiment can reduce the error of gyroscope measurement, thereby improving the measurement accuracy of the gyroscope.
[0110] Example 3
[0111] Please see Figure 3 , Figure 3 The present invention provides a schematic diagram of a gyroscope-based error compensation device. Figure 3 As shown, the gyroscope-based error compensation device includes:
[0112] The acquisition unit 310 is used to acquire the power supply voltage of the gyroscope, the output voltage of the gyroscope, and the temperature value of the gyroscope.
[0113] The filtering unit 320 is used to perform smoothing filtering on the supply voltage to obtain a processing voltage, and to perform smoothing filtering on the temperature value to obtain a processing temperature value.
[0114] The calculation unit 330 is used to calculate the compensation difference according to the processing voltage, the output voltage and the processing temperature value.
[0115] The compensation unit 340 is used to perform error compensation on the output voltage according to the compensation difference to obtain the error compensated output voltage of the gyroscope.
[0116] In the embodiments of the present application, the explanation of the gyroscope-based error compensation device can refer to the description in Embodiment 1 or Embodiment 2, and no further elaboration will be given in this embodiment.
[0117] It can be seen that the implementation of the gyroscope-based error compensation device described in this embodiment can reduce the error of gyroscope measurement, thereby improving the measurement accuracy of the gyroscope.
[0118] Example 4
[0119] Please also read Figure 4 , Figure 4 is a schematic diagram of a gyroscope-based error compensation device provided in an embodiment of the present application. Figure 4 The gyro-based error compensation arrangement shown is composed of Figure 3 The gyroscope-based error compensation device shown in FIG. Figure 4 As shown, the calculation unit 330 includes:
[0120] The first subunit 331 is configured to calculate an initial difference value according to the processing voltage and the output voltage.
[0121] The second subunit 332 is used to perform error compensation on the initial difference according to the processing temperature value to obtain a compensated difference.
[0122] As an optional implementation, the first subunit 311 includes:
[0123] The first calculation module is used to calculate the target voltage according to the process voltage.
[0124] The second calculation module is used to calculate the difference between the target voltage and the output voltage to obtain an initial difference.
[0125] As an optional implementation, the formula for calculating the compensation difference is:
[0126] y(err)=a0+a1T+a2T 2 +a3T 3 +…+a n T n ;
[0127] Among them, y(err) is the compensation difference, a0, a1, a2, a3, ..., a n , is the compensation coefficient, T is the processing temperature value, and n is the compensation order.
[0128] As an optional implementation, the gyroscope-based error compensation device further includes:
[0129] The temperature adjustment unit 350 is used to control the temperature of the temperature box device corresponding to the gyroscope to adjust the temperature back and forth according to the preset temperature box cycle temperature.
[0130] The acquisition unit 310 includes:
[0131] The first acquisition subunit 311 is used to acquire the power supply voltage of the gyroscope and the output voltage of the gyroscope.
[0132] The second acquisition subunit 312 is used to acquire the temperature value detected by the temperature sensor on the incubator device.
[0133] In the embodiments of the present application, the explanation of the gyroscope-based error compensation device can refer to the description in Embodiment 1 or Embodiment 2, and no further elaboration will be given in this embodiment.
[0134] It can be seen that the implementation of the gyroscope-based error compensation device described in this embodiment can reduce the error of gyroscope measurement, thereby improving the measurement accuracy of the gyroscope.
[0135] An embodiment of the present application provides an electronic device, including a memory and a processor, wherein the memory is used to store a computer program, and the processor runs the computer program to enable the electronic device to execute any gyroscope-based error compensation method in Embodiment 1 or Embodiment 2 of the present application.
[0136] An embodiment of the present application provides a computer-readable storage medium storing computer program instructions. When the computer program instructions are read and executed by a processor, any gyroscope-based error compensation method in Embodiment 1 or Embodiment 2 of the present application is executed.
[0137] In several embodiments provided in the present application, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely schematic. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the devices, methods and computer program products according to multiple embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of a code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.
[0138] In addition, the functional modules in the various embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
[0139] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0140] The above description is only an embodiment of the present application and is not intended to limit the scope of protection of the present application. For those skilled in the art, the present application may have various changes and variations. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the scope of protection of the present application. It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in the subsequent drawings.
[0141] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0142] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
Claims
1. A gyroscope-based error compensation method, characterized in that: include: Acquire the supply voltage of the gyroscope, the output voltage of the gyroscope, and the temperature value of the gyroscope; Smoothing and filtering the supply voltage to obtain a processing voltage, and smoothing and filtering the temperature value to obtain a processing temperature value; calculating a compensation difference value according to the process voltage, the output voltage and the process temperature value; Performing error compensation on the output voltage according to the compensation difference to obtain an error compensated output voltage of the gyroscope; The step of calculating the compensation difference according to the processing voltage, the output voltage and the processing temperature value includes: calculating an initial difference value based on the process voltage and the output voltage; Performing error compensation on the initial difference according to the processing temperature value to obtain a compensated difference; The step of calculating the initial difference value according to the processing voltage and the output voltage comprises: calculating a target voltage according to the process voltage; The difference between the target voltage and the output voltage is calculated to obtain an initial difference.
2. The gyroscope-based error compensation method according to claim 1, characterized in that: The formula for calculating the compensation difference is: y(err)=a0+a1T+a2T 2 +a3T 3 +…+a n T n ; Wherein, y(err) is the compensation difference, a0, a1, a2, a3, ..., a n , is the compensation coefficient, T is the processing temperature value, and n is the compensation order.
3. The gyroscope-based error compensation method according to claim 1, characterized in that: The method further comprises: According to the preset temperature cycle temperature of the temperature box, the temperature box device corresponding to the gyroscope is controlled to adjust the temperature back and forth; The obtaining of the supply voltage of the gyroscope, the output voltage of the gyroscope and the temperature value of the gyroscope includes: Obtaining a power supply voltage of the gyroscope and an output voltage of the gyroscope; Obtain a temperature value detected by a temperature sensor on the incubator device.
4. A gyroscope-based error compensation device, characterized in that: The gyroscope-based error compensation device comprises: An acquisition unit, used for acquiring a power supply voltage of the gyroscope, an output voltage of the gyroscope, and a temperature value of the gyroscope; A filtering unit, configured to smooth and filter the supply voltage to obtain a processing voltage, and to smooth and filter the temperature value to obtain a processing temperature value; a calculation unit, configured to calculate a compensation difference value according to the processing voltage, the output voltage and the processing temperature value; a compensation unit, configured to perform error compensation on the output voltage according to the compensation difference to obtain an error compensated output voltage of the gyroscope; Wherein, the computing unit comprises: A first subunit, configured to calculate an initial difference value according to the processing voltage and the output voltage; A second subunit is used to perform error compensation on the initial difference according to the processing temperature value to obtain a compensated difference; Wherein, the first subunit includes: A first calculation module, used for calculating a target voltage according to the processing voltage; The second calculation module is used to calculate the difference between the target voltage and the output voltage to obtain an initial difference.
5. An electronic device, characterized in that: The electronic device comprises a memory and a processor, the memory is used to store a computer program, and the processor runs the computer program to enable the electronic device to perform the gyroscope-based error compensation method according to any one of claims 1 to 3.
6. A readable storage medium, characterized in that: The readable storage medium stores computer program instructions, and when the computer program instructions are read and executed by a processor, the gyroscope-based error compensation method according to any one of claims 1 to 3 is executed.
