Temperature drift compensation method and device of gyroscope and electronic equipment
By obtaining the temperature and angular velocity data in the time window in the gyroscope, calculating and determining the zero deviation of the angular velocity for compensation, the problem that gyroscopes in the prior art are difficult to accurately compensate in the motion state, and the accuracy of angular velocity calculation is improved.
Patent Information
- Application Number
- CN202311238207.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-22
- Publication Date
- 2025-03-25
AI Technical Summary
The existing gyroscope temperature drift compensation method is mainly suitable for static states, and it is difficult to accurately determine the zero bias value and compensate in a moving state, resulting in a decrease in the accuracy of angular velocity calculation.
By obtaining the temperature values and angular velocity values in the current time point and the corresponding time window, calculate the maximum temperature difference and angular velocity standard deviation. If a certain threshold condition is met, the average angular velocity average value is determined as the zero deviation value of the angular velocity corresponding to the current temperature, and zero deviation compensation is performed.
The determination and zero deviation compensation of the angular velocity zero deviation value under relatively stable periods are achieved, and the temperature drift curve is dynamically generated, which improves the accuracy of the gyroscope's output angular velocity.
Smart Images

Figure CN119687909A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of temperature drift compensation, and in particular to a temperature drift compensation method, device and electronic equipment for a gyroscope. Background Art
[0002] At present, terminal devices, such as mobile phones, are equipped with a variety of sensors, such as inertial sensors, light sensors, gyroscopes, etc. Among them, the gyroscope is a sensor that calculates angular velocity. It measures the Coriolis force generated by the mass block during the rotation process, and then calculates the angular velocity. Among them, the mass block is easily affected by temperature and produces thermal expansion and contraction, which in turn affects the calculation of angular velocity.
[0003] At present, for each gyroscope, due to differences in production, there is a temperature drift curve, which represents the zero bias value of the gyroscope at different temperatures when stationary. However, the current gyroscope temperature drift compensation method is mainly static compensation, that is, the average value of the gyroscope output over a period of time when the gyroscope is in a static state is used as the zero bias value for compensation. It is difficult to apply to the scene where the gyroscope is in motion, and it is difficult to determine the zero bias value and compensate for the zero bias value when in motion, which reduces the accuracy of the angular velocity output by the gyroscope. Summary of the invention
[0004] The present invention provides a gyroscope temperature drift compensation method, device and electronic equipment.
[0005] According to a first aspect of an embodiment of the present disclosure, a method for compensating a temperature drift of a gyroscope is provided, the method comprising: obtaining temperature values at a current time point, at each time point in a current time window with the current time point as an end point, and an angular velocity value of the gyroscope, and a maximum temperature difference between each temperature value; when the maximum temperature difference is less than or equal to a first temperature difference threshold, determining an angular velocity mean value and an angular velocity standard deviation in the current time window according to each angular velocity value; when the angular velocity standard deviation is less than or equal to the standard deviation threshold, determining an average value of the angular velocity mean values at the current time point according to the angular velocity mean value in the current time window and the angular velocity mean values in each historical time window; when the total number of time windows in the historical time window and the current time window is greater than or equal to a number threshold, using the average value of the angular velocity mean values as an angular velocity zero bias value corresponding to the temperature value at the current time point; and performing zero bias compensation processing on the angular velocity value of the gyroscope at the temperature value according to the angular velocity zero bias value.
[0006] In one embodiment of the present disclosure, the obtaining of the current time point, the temperature values at each time point in the current time window with the current time point as the end point, the angular velocity values of the gyroscope, and the maximum temperature difference between the temperature values includes: obtaining the angular velocity values of the gyroscope at each time point in a preset time period; for each time point, using the temperature value most recently collected by the temperature sensor before the time point as the temperature value at the time point; obtaining the starting time point of the preset time period, and multiple candidate time points in the preset time period that are at least a preset time interval away from the starting time point; the length of the preset time interval is greater than or equal to the length of the current time window; using each of the multiple candidate time points as the current time point in turn, and obtaining the temperature values and the angular velocity values of the gyroscope at each time point in the current time window with the current time point as the end point; and determining the maximum temperature difference between the temperature values according to the temperature values at each time point in the current time window.
[0007] In one embodiment of the present disclosure, the average value of the angular velocity means at the current time point is determined based on the average angular velocity in the current time window and the average angular velocity in each historical time window, including: performing mean processing on the average angular velocity in the current time window and the average angular velocity in each historical time window to obtain a mean processing result; and using the mean processing result as the average value of the angular velocity means at the current time point.
[0008] In one embodiment of the present disclosure, the method also includes: when the total number of time windows is greater than or equal to the number threshold, determining the maximum angular velocity standard deviation at the current time point based on the angular velocity standard deviation in the current time window and the angular velocity standard deviation in each historical time window; updating the weight corresponding to the temperature interval to which the temperature value at the current time point belongs based on the maximum angular velocity standard deviation, and obtaining the updated weight corresponding to the temperature interval; and performing curve fitting processing in combination with the updated weights corresponding to each temperature interval, and obtaining the updated temperature drift curve of the gyroscope and the effective temperature range of the updated temperature drift curve.
[0009] In one embodiment of the present disclosure, the weight corresponding to the temperature interval to which the temperature value at the current time point belongs is updated based on the maximum angular velocity standard deviation to obtain the updated weight corresponding to the temperature interval, including: determining a first weight corresponding to the standard deviation range to which the maximum angular velocity standard deviation belongs; obtaining an existing weight corresponding to the temperature interval; and when the existing weight is less than the first weight, using the first weight as the updated weight corresponding to the temperature interval.
[0010] In one embodiment of the present disclosure, the update weights corresponding to each temperature interval are combined to perform curve fitting processing to obtain the updated temperature drift curve of the gyroscope and the effective temperature range of the updated temperature drift curve, including: obtaining the maximum temperature value and the minimum temperature value among the target temperature values corresponding to the angular velocity zero bias values in each temperature interval, and the temperature difference between the maximum temperature value and the minimum temperature value; determining the function type corresponding to the updated temperature drift curve according to the temperature difference; performing curve fitting processing according to the function type, the update weights corresponding to each temperature interval, and the angular velocity zero bias values corresponding to each target temperature value in each temperature interval to obtain the updated temperature drift curve; determining the effective temperature range of the updated temperature drift curve according to the maximum temperature value, the minimum temperature value, and the temperature difference.
[0011] In one embodiment of the present disclosure, determining the function type corresponding to the updated temperature drift curve based on the temperature difference includes: when the temperature difference is less than or equal to a second temperature difference threshold, determining that the function type corresponding to the updated temperature drift curve is a constant function; when the temperature difference is greater than the second temperature difference threshold and less than or equal to a third temperature difference threshold, determining that the function type corresponding to the updated temperature drift curve is a linear function; when the temperature difference is greater than the third temperature difference threshold, determining that the function type corresponding to the updated temperature drift curve is a quadratic function.
[0012] In one embodiment of the present disclosure, the effective temperature range of the updated temperature drift curve is determined based on the maximum temperature value, the minimum temperature value, and the temperature difference, including: when the temperature difference is less than or equal to a third temperature difference threshold, the effective temperature range is determined to be a temperature range determined by the maximum temperature value and the minimum temperature value; when the temperature difference is greater than the third temperature difference threshold, the effective temperature range is determined to be a temperature range determined by the first temperature value and the second temperature value; the first temperature value is the sum of the maximum temperature value and a preset deviation value; the second temperature value is the difference between the minimum temperature value and the preset deviation value.
[0013] In one embodiment of the present disclosure, the method also includes: when the angular velocity standard deviation is greater than the standard deviation threshold, deleting the temperature values and the angular velocity values of the gyroscope at each time point before the current time point; deleting the angular velocity mean and the angular velocity standard deviation in the current time window, and deleting the angular velocity mean and the angular velocity standard deviation in the historical time window.
[0014] In one embodiment of the present disclosure, the method also includes: when the maximum temperature difference is greater than the first temperature difference threshold, determining whether the temperature value at the current time point is within the effective temperature range of the temperature drift curve of the gyroscope; when the temperature value at the current time point is within the effective temperature range of the temperature drift curve of the gyroscope, obtaining the angular velocity zero bias value corresponding to the temperature value on the temperature drift curve.
[0015] According to a second aspect of an embodiment of the present disclosure, a gyroscope temperature drift compensation device is also provided, the device comprising: a first acquisition module, used to acquire temperature values at a current time point, at each time point in a current time window with the current time point as an end point, and an angular velocity value of the gyroscope, and a maximum temperature difference between each temperature value; a first determination module, used to determine an angular velocity mean value and an angular velocity standard deviation in the current time window according to each angular velocity value when the maximum temperature difference is less than or equal to a first temperature difference threshold; a second determination module, used to determine an average value of the angular velocity mean value at the current time point according to the angular velocity mean value in the current time window and the angular velocity mean value in each historical time window when the angular velocity standard deviation is less than or equal to the standard deviation threshold; a third determination module, used to use the average value of the angular velocity mean value as an angular velocity zero bias value corresponding to the temperature value at the current time point when the total number of time windows in the historical time window and the current time window is greater than or equal to a number threshold; and a compensation processing module, used to perform zero bias compensation processing on the angular velocity value of the gyroscope at the temperature value according to the angular velocity zero bias value.
[0016] According to a third aspect of an embodiment of the present disclosure, there is also provided an electronic device, comprising: a processor; and a memory for storing instructions executable by the processor; wherein the processor is configured to: implement the steps of the temperature drift compensation method of the gyroscope as described above.
[0017] According to a fourth aspect of an embodiment of the present disclosure, a non-temporary computer-readable storage medium is also provided. When instructions in the storage medium are executed by a processor, the processor is enabled to execute the temperature drift compensation method of the gyroscope as described above.
[0018] The technical solution provided by the embodiments of the present disclosure brings at least the following beneficial effects:
[0019] By obtaining the temperature values at the current time point, the temperature values at each time point in the current time window with the current time point as the end point, the angular velocity values of the gyroscope, and the maximum temperature difference between the temperature values; when the maximum temperature difference is less than or equal to the first temperature difference threshold, the angular velocity mean and the angular velocity standard deviation in the current time window are determined according to the angular velocity values; when the angular velocity standard deviation is less than or equal to the standard deviation threshold, the average value of the angular velocity mean at the current time point is determined according to the angular velocity mean in the current time window and the angular velocity mean in each historical time window; when the total number of time windows of the historical time window and the current time window is greater than or equal to the number threshold, the average value of the angular velocity mean is used as the angular velocity zero bias value corresponding to the temperature value at the current time point; according to the angular velocity zero bias value, the angular velocity value of the gyroscope on the temperature value is subjected to zero bias compensation processing, so that the angular velocity zero bias value determination and zero bias compensation processing in a relatively stable period can be realized, and the dynamic generation of the temperature drift curve is realized, so as to ensure the accuracy of the angular velocity output by the gyroscope.
[0020] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] The drawings herein are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the description are used to explain the principles of the present disclosure, and do not constitute improper limitations on the present disclosure.
[0022] Figure 1 This is a flow chart of a temperature drift compensation method for a gyroscope according to an embodiment of the present disclosure;
[0023] Figure 2 This is a flow chart of a temperature drift compensation method for a gyroscope according to an embodiment of the present disclosure;
[0024] Figure 3 It is a schematic diagram of the framework of the temperature drift compensation method of the gyroscope;
[0025] Figure 4 It is a structural schematic diagram of a temperature drift compensation device of a gyroscope according to an embodiment of the present disclosure;
[0026] Figure 5 The figure is a structural block diagram of an electronic device according to an exemplary embodiment of the present disclosure. DETAILED DESCRIPTION
[0027] In order to enable ordinary persons in the art to better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings.
[0028] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0029] At present, terminal devices, such as mobile phones, are equipped with a variety of sensors, such as inertial sensors, light sensors, gyroscopes, etc. Among them, the gyroscope is a sensor that calculates angular velocity. It measures the Coriolis force generated by the mass block during the rotation process, and then calculates the angular velocity. Among them, the mass block is easily affected by temperature and produces thermal expansion and contraction, which in turn affects the calculation of angular velocity.
[0030] At present, for each gyroscope, due to differences in production, there is a temperature drift curve, which represents the zero bias value of the gyroscope at different temperatures when stationary. However, the current gyroscope temperature drift compensation method is mainly static compensation, that is, the average value of the gyroscope output over a period of time when the gyroscope is in a static state is used as the zero bias value for compensation. It is difficult to apply to the scene where the gyroscope is in motion, and it is difficult to determine the zero bias value and compensate for the zero bias value when in motion, which reduces the accuracy of the angular velocity output by the gyroscope.
[0031] Figure 1 The flowchart of the temperature drift compensation method of the gyroscope according to one embodiment of the present disclosure is as follows. It should be noted that the temperature drift compensation method of the gyroscope according to the present embodiment can be applied to the temperature drift compensation device of the gyroscope, and the device can be configured in an electronic device so that the electronic device can perform the temperature drift compensation function of the gyroscope.
[0032] The electronic device may be any device with computing capabilities, such as a personal computer (PC), a mobile terminal, a server, etc. The mobile terminal may be, for example, a vehicle-mounted device, a mobile phone, a tablet computer, a personal digital assistant, a wearable device, or other hardware device with various operating systems, touch screens, and / or display screens. The following embodiments are described by taking the execution subject as an electronic device as an example.
[0033] like Figure 1 As shown, the method comprises the following steps:
[0034] Step 101, obtaining the temperature values at the current time point, the temperature values at each time point in the current time window with the current time point as the end point, the angular velocity values of the gyroscope, and the maximum temperature difference between each temperature value.
[0035] In the disclosed embodiment, the process of the electronic device executing step 101 may, for example, be to obtain the angular velocity value of the gyroscope at each time point within a preset time period; for each time point, use the temperature value most recently collected by the temperature sensor before the time point as the temperature value at the time point; obtain the starting time point of the preset time period, and multiple candidate time points within the preset time period that are at least a preset time interval away from the starting time point; the length of the preset time interval is greater than or equal to the length of the current time window; use each of the multiple candidate time points as the current time point in turn, and obtain the temperature values and the angular velocity value of the gyroscope at each time point in the current time window with the current time point as the end point; and determine the maximum temperature difference between the temperature values based on the temperature values at each time point in the current time window.
[0036] The gyroscope can collect angular velocity values at a fixed first frequency; the temperature sensor can collect temperature values around the gyroscope at a fixed second frequency. The first frequency and the second frequency can be the same or different. The first frequency can be, for example, 25 Hz. The second frequency can be, for example, 5 Hz, 1 Hz, etc., which can be set according to actual needs.
[0037] The electronic device may use each of the multiple candidate time points as the current time point in turn. As an alternative to this solution, in order to reduce the number of time windows and the amount of calculation, the time point every N candidate time points in the multiple candidate time points may be used as the current time point. The value of N may be any natural number.
[0038] For example, taking N as 1, the number of candidate time points is 8, then the first candidate time point, the third candidate time point, the fifth candidate time point and the seventh candidate time point can be taken in sequence as the current time point.
[0039] The process of the electronic device determining the maximum temperature difference may be, for example, that the electronic device determines the temperature difference between every two temperature values among the temperature values; and then uses the maximum value among the multiple temperature differences as the maximum temperature difference.
[0040] Step 102: when the maximum temperature difference is less than or equal to the first temperature difference threshold, determine the angular velocity mean and the angular velocity standard deviation in the current time window according to each angular velocity value.
[0041] In the embodiment of the present disclosure, when the maximum temperature difference is less than or equal to the first temperature difference threshold, it indicates that the temperature has not changed significantly, and the gyroscope temperature drift has not changed significantly. At this time, the angular velocity zero bias value can be determined based on the angular velocity value of the gyroscope within a period of time.
[0042] In the embodiment of the present disclosure, when the maximum temperature difference is greater than the first temperature difference threshold, it indicates that the temperature has changed significantly, and the gyroscope temperature drift may have changed significantly. At this time, it is difficult to accurately calculate the angular velocity zero bias value. Therefore, the temperature drift curve of the gyroscope can be queried according to the temperature value at the current time point to obtain the angular velocity zero bias value corresponding to the temperature value. Correspondingly, the electronic device can also perform the following process: when the maximum temperature difference is greater than the first temperature difference threshold, determine whether the temperature value at the current time point is within the effective temperature range of the temperature drift curve of the gyroscope; when the temperature value at the current time point is within the effective temperature range of the temperature drift curve of the gyroscope, obtain the angular velocity zero bias value corresponding to the temperature value on the temperature drift curve.
[0043] The temperature drift curve of the gyroscope includes the angular velocity zero bias values corresponding to each temperature value. In the temperature drift curve, the angular velocity zero bias values corresponding to some temperature values may have a higher accuracy, while the angular velocity zero bias values corresponding to some temperature values may have a lower accuracy. The effective temperature range is used to limit the temperature values with higher accuracy of the corresponding angular velocity zero bias values. That is, the angular velocity zero bias values corresponding to each temperature value in the effective temperature range have a higher accuracy and can be used for compensation; the angular velocity zero bias values corresponding to each temperature value outside the effective temperature range have a lower accuracy and can not be used for compensation.
[0044] Step 103: when the angular velocity standard deviation is less than or equal to the standard deviation threshold, determine the average value of the angular velocity means at the current time point according to the angular velocity mean in the current time window and the angular velocity mean in each historical time window.
[0045] In the embodiment of the present disclosure, when the angular velocity standard deviation is greater than the standard deviation threshold, the gyroscope temperature drift may change significantly, and it is difficult to accurately calculate the angular velocity zero bias value. Therefore, the previously acquired data and the calculated data can be deleted, and the data can be acquired again and calculated. Correspondingly, the electronic device can also perform the following process: when the angular velocity standard deviation is greater than the standard deviation threshold, the temperature values and the angular velocity values of the gyroscope at each time point before the current time point are deleted; the angular velocity mean and the angular velocity standard deviation in the current time window are deleted, and the angular velocity mean and the angular velocity standard deviation in the historical time window are deleted.
[0046] In the embodiment of the present disclosure, the process of the electronic device executing step 103 may, for example, be to perform mean processing on the angular velocity mean in the current time window and the angular velocity mean in each historical time window to obtain a mean processing result; and use the mean processing result as the average value of the angular velocity mean at the current time point.
[0047] It should be noted that the angular velocity standard deviation in each historical time window is less than or equal to the standard deviation threshold. If the angular velocity standard deviation in a historical time window is greater than the standard deviation threshold, it will be deleted, so that at the current time point, the angular velocity mean and angular velocity standard deviation in the historical time window and the previous historical time windows cannot be obtained.
[0048] Step 104: When the total number of time windows of the historical time window and the current time window is greater than or equal to the number threshold, the average value of the angular velocity means is used as the angular velocity zero bias value corresponding to the temperature value at the current time point.
[0049] In the embodiment of the present disclosure, the electronic device may also perform the following process: when the total number of time windows of the historical time window and the current time window is less than the quantity threshold, it indicates that the period of time in which the gyroscope is in a relatively stable state is short, and it is necessary to further determine whether it is in a relatively stable state for a period of time thereafter. Therefore, when the total number of time windows of the historical time window and the current time window is less than the quantity threshold, the electronic device may repeatedly perform the above steps 101 to 103 until the total number of time windows of the historical time window and the current time window is greater than or equal to the quantity threshold.
[0050] The quantity threshold can be determined according to the requirements of the electronic device for the length of the relatively stable period of the gyroscope and the length of the time interval between the starting time points of adjacent time windows. When the length of the relatively stable period is fixed, the longer the time interval is, the smaller the quantity threshold is; the shorter the time interval is, the larger the quantity threshold is.
[0051] Step 105, performing zero bias compensation processing on the angular velocity value of the gyroscope at the temperature value according to the angular velocity zero bias value.
[0052] In the disclosed embodiment, the process of the electronic device executing step 105 may be, for example, adding the angular velocity zero bias value to the angular velocity value of the gyroscope on the temperature value according to the angular velocity zero bias value corresponding to the temperature value to obtain the angular velocity value after compensation. The accuracy of the angular velocity value after compensation is high. The angular velocity value after compensation can be used, for example, for crosshair calibration in games to avoid crosshair drift.
[0053] In the disclosed embodiment, there are two ways to obtain the angular velocity zero bias value, one is determined in step 104, and the other is obtained by querying the temperature drift curve when the maximum temperature difference is greater than the first temperature difference threshold. The accuracy of the angular velocity zero bias value determined by the first method is relatively high, and its confidence can be set to 2; the accuracy of the angular velocity zero bias value determined by the second method is relatively low, and its confidence can be set to 1. After obtaining the angular velocity value after compensation, the angular velocity value after compensation and the confidence of the angular velocity zero bias value used during compensation can be displayed simultaneously, so that users can understand the accuracy of the angular velocity value after compensation.
[0054] In the temperature drift compensation method of the gyroscope of the embodiment of the present disclosure, the temperature values at the current time point, the temperature values at each time point in the current time window with the current time point as the end point, the angular velocity values of the gyroscope, and the maximum temperature difference between the temperature values are obtained; when the maximum temperature difference is less than or equal to the first temperature difference threshold, the angular velocity mean and the angular velocity standard deviation in the current time window are determined according to the angular velocity values; when the angular velocity standard deviation is less than or equal to the standard deviation threshold, the average value of the angular velocity mean at the current time point is determined according to the angular velocity mean in the current time window and the angular velocity mean in each historical time window; when the total number of time windows of the historical time window and the current time window is greater than or equal to the number threshold, the average value of the angular velocity mean is used as the angular velocity zero bias value corresponding to the temperature value at the current time point; according to the angular velocity zero bias value, the angular velocity value of the gyroscope at the temperature value is subjected to zero bias compensation processing, so that the angular velocity zero bias value determination and zero bias compensation processing in a relatively stable period can be realized, and the dynamic generation of the temperature drift curve is realized, so as to ensure the accuracy of the angular velocity output by the gyroscope.
[0055] Figure 2 The flowchart of the temperature drift compensation method of the gyroscope according to another embodiment of the present disclosure is as follows. It should be noted that the temperature drift compensation method of the gyroscope according to the present embodiment can be applied to the temperature drift compensation device of the gyroscope, and the device can be configured in an electronic device so that the electronic device can perform the temperature drift compensation function of the gyroscope.
[0056] The electronic device may be any device with computing capabilities, such as a personal computer (PC), a mobile terminal, a server, etc. The mobile terminal may be, for example, a vehicle-mounted device, a mobile phone, a tablet computer, a personal digital assistant, a wearable device, or other hardware device with various operating systems, touch screens, and / or display screens. The following embodiments are described by taking the execution subject as an electronic device as an example.
[0057] like Figure 2 As shown, the method comprises the following steps:
[0058] Step 201, obtaining the temperature values at the current time point, the temperature values at each time point in the current time window with the current time point as the end point, the angular velocity values of the gyroscope, and the maximum temperature difference between each temperature value.
[0059] Step 202: when the maximum temperature difference is less than or equal to the first temperature difference threshold, determine the angular velocity mean and the angular velocity standard deviation in the current time window according to each angular velocity value.
[0060] Step 203: when the angular velocity standard deviation is less than or equal to the standard deviation threshold, determine the average value of the angular velocity means at the current time point according to the angular velocity mean in the current time window and the angular velocity mean in each historical time window.
[0061] Step 204, when the total number of time windows is greater than or equal to the number threshold, determine the maximum angular velocity standard deviation at the current time point according to the angular velocity standard deviation in the current time window and the angular velocity standard deviation in each historical time window.
[0062] In the disclosed embodiment, it should be noted that the angular velocity standard deviation in each historical time window is less than or equal to the standard deviation threshold. If the angular velocity standard deviation in a certain historical time window is greater than the standard deviation threshold, it will be deleted, so that at the current time point, the angular velocity mean and angular velocity standard deviation in the historical time window and the previous historical time windows cannot be obtained.
[0063] Among them, when the angular velocity standard deviation in the current time window is less than or equal to the standard deviation threshold, and the angular velocity standard deviations in each historical time window are less than or equal to the standard deviation threshold, the maximum angular velocity standard deviation at the current time point is also less than or equal to the standard deviation threshold.
[0064] Step 205 , updating the weight corresponding to the temperature interval to which the temperature value at the current time point belongs according to the maximum angular velocity standard deviation, to obtain an updated weight corresponding to the temperature interval.
[0065] In the embodiment of the present disclosure, the process of the electronic device executing step 205 may, for example, be to determine a first weight corresponding to the standard deviation range to which the maximum angular velocity standard deviation belongs; obtain an existing weight corresponding to the temperature interval; and when the existing weight is less than the first weight, use the first weight as an updated weight corresponding to the temperature interval.
[0066] The temperature range can be set in advance. That is, the operating temperature range of the gyroscope can be determined in advance; the operating temperature range is divided to obtain multiple temperature ranges. The maximum temperature difference of the multiple temperature ranges can be the same. The maximum temperature difference here can refer to the difference between the maximum temperature value and the minimum temperature value in the temperature range.
[0067] In the case where the existing weight is greater than or equal to the first weight, there is no need to update the existing weight. The weight corresponding to the temperature interval represents the accuracy and importance of the angular velocity zero bias value corresponding to each temperature value in the temperature interval during the curve fitting process, so that the temperature drift curve fitted during the curve fitting can contain the angular velocity zero bias value corresponding to each temperature value in the temperature interval with a higher weight as much as possible.
[0068] Step 206 , performing curve fitting processing in combination with the update weights corresponding to each temperature interval, to obtain an updated temperature drift curve of the gyroscope and an effective temperature range of the updated temperature drift curve.
[0069] In the embodiment of the present disclosure, the process of the electronic device executing step 206 may, for example, be to obtain the maximum temperature value and the minimum temperature value among the target temperature values corresponding to the angular velocity zero bias value in each temperature interval, as well as the temperature difference between the maximum temperature value and the minimum temperature value; determine the function type corresponding to the updated temperature drift curve according to the temperature difference; perform curve fitting processing according to the function type, the update weight corresponding to each temperature interval, and the angular velocity zero bias value corresponding to each target temperature value in each temperature interval to obtain the updated temperature drift curve; determine the effective temperature range of the updated temperature drift curve according to the maximum temperature value, the minimum temperature value, and the temperature difference.
[0070] In the embodiment of the present disclosure, the process of the electronic device determining the function type corresponding to the updated temperature drift curve may be, for example, when the temperature difference is less than or equal to the second temperature difference threshold, determining that the function type corresponding to the updated temperature drift curve is a constant function; when the temperature difference is greater than the second temperature difference threshold and less than or equal to the third temperature difference threshold, determining that the function type corresponding to the updated temperature drift curve is a linear function; when the temperature difference is greater than the third temperature difference threshold, determining that the function type corresponding to the updated temperature drift curve is a quadratic function.
[0071] The third temperature difference threshold is greater than the second temperature difference threshold. The second temperature difference threshold may be, for example, 3 degrees Celsius, and the third temperature difference threshold may be, for example, 15 degrees Celsius.
[0072] Among them, the temperature drift curve of the constant function type can be a horizontal straight line in the XYZ coordinate system. The temperature drift curve of the linear function type can be an inclined straight line in the XYZ coordinate system. The temperature drift curve of the quadratic function type can be a parabola in the XYZ coordinate system. Among them, when the function type of the temperature drift curve is a constant function, the updated temperature drift curve obtained by fitting is a horizontal straight line. When the function type of the temperature drift curve is a linear function, the updated temperature drift curve obtained by fitting is an inclined straight line. When the function type of the temperature drift curve is a quadratic function, the updated temperature drift curve obtained by fitting is a parabola.
[0073] In the embodiment of the present disclosure, the process of the electronic device determining the effective temperature range of the updated temperature drift curve can be, for example, when the temperature difference is less than or equal to the third temperature difference threshold, determining the effective temperature range as the temperature range determined by the maximum temperature value and the minimum temperature value; when the temperature difference is greater than the third temperature difference threshold, determining the effective temperature range as the temperature range determined by the first temperature value and the second temperature value; the first temperature value is the sum of the maximum temperature value and the preset deviation value; the second temperature value is the difference between the minimum temperature value and the preset deviation value.
[0074] Among them, taking the maximum temperature value of 30 degrees Celsius, the minimum temperature value of 10 degrees Celsius, the preset deviation value of 5 degrees Celsius, and the third temperature difference threshold of 15 degrees Celsius as an example, the effective temperature range can be 5 degrees Celsius to 35 degrees Celsius.
[0075] It should be noted that the detailed description of steps 201 to 203 can be found in Figure 1 Steps 101 to 103 in the illustrated embodiment will not be described in detail herein.
[0076] In the temperature drift compensation method of the gyroscope of the embodiment of the present disclosure, by obtaining the temperature values at the current time point, the temperature values at each time point in the current time window with the current time point as the end point, the angular velocity values of the gyroscope, and the maximum temperature difference between the temperature values; when the maximum temperature difference is less than or equal to the first temperature difference threshold, the angular velocity mean and the angular velocity standard deviation in the current time window are determined according to the angular velocity values; when the angular velocity standard deviation is less than or equal to the standard deviation threshold, the angular velocity mean at the current time point is determined according to the angular velocity mean in the current time window and the angular velocity mean in each historical time window; when the total number of time windows is greater than or equal to the first temperature difference threshold, the angular velocity mean value is determined according to the angular velocity mean in the current time window and the angular velocity mean in each historical time window; In the case of a quantity threshold, the maximum angular velocity standard deviation at the current time point is determined according to the angular velocity standard deviation in the current time window and the angular velocity standard deviation in each historical time window; the weight corresponding to the temperature interval to which the temperature value at the current time point belongs is updated according to the maximum angular velocity standard deviation to obtain the updated weight corresponding to the temperature interval; combined with the updated weights corresponding to each temperature interval, a curve fitting process is performed to obtain an updated temperature drift curve of the gyroscope and an effective temperature range of the updated temperature drift curve, thereby realizing the determination of the angular velocity zero bias value and the zero bias compensation process in a relatively stable period, and realizing the dynamic generation of the temperature drift curve, thereby ensuring the accuracy of the angular velocity output by the gyroscope.
[0077] The following examples are used to illustrate this. Figure 3 As shown in FIG. 1 , it is a schematic diagram of the framework of the temperature drift compensation method of the gyroscope. Figure 3The following steps are included: 2.1, collecting temperature data (temperature value of the temperature sensor within a preset time period) and gyroscope data (angular velocity value of the gyroscope within a preset time period), and then executing 2.2 or 2.14. 2.2, calculating the sliding mean and standard deviation of the gyroscope data (angular velocity mean and angular velocity standard deviation within the current time window). 2.3, determining whether the standard deviation (angular velocity standard deviation within the current time window) is less than the threshold (standard deviation threshold); if so, executing 2.4; if not, executing 2.13. 2.4, updating the counter (the total number of time windows of the historical time window and the current time window), the maximum standard deviation (the maximum angular velocity standard deviation at the current time point) and the average mean (the average of the angular velocity mean at the current time point). 2.5. Determine whether the counter is greater than the threshold (quantity threshold); if so, execute 2.6 and 2.11. 2.6. Set the new weight at the temperature according to the maximum standard deviation (the updated weight corresponding to the temperature interval to which the temperature value at the current time point belongs); and determine whether the new weight is greater than or equal to the old weight (the existing weight corresponding to the temperature interval); if so, execute 2.7. 2.7. Update the weighted temperature drift curve parameters (perform curve fitting processing to obtain the updated temperature drift curve of the gyroscope), and then execute 2.8. 2.8. Determine whether the current temperature drift in the temperature drift curve is valid; if so, execute 2.9. 2.9. Obtain the temperature drift (angular velocity zero bias value) corresponding to the current temperature in the temperature drift curve, and set the confidence level to 1; then execute 2.10. 2.10. Update the temperature drift and confidence level to compensate the original gyroscope data. 2.11, determine whether the maximum standard deviation is less than the threshold (standard deviation threshold); if so, execute 2.12, if not, execute 2.7. 2.12, use the average mean as the temperature drift (angular velocity zero bias value), and set the confidence level to 2; then execute 2.10. 2.13, reset the calculator, maximum standard deviation and average value to zero. 2.14, determine whether the temperature change is greater than the threshold (first temperature difference threshold); if so, execute 2.8.
[0078] Figure 4 The present invention is a schematic structural diagram of a temperature drift compensation device for a gyroscope according to an embodiment of the present invention.
[0079] like Figure 4 As shown, the temperature drift compensation device of the gyroscope may include: a first acquisition module 401 , a first determination module 402 , a second determination module 403 , a third determination module 404 and a compensation processing module 405 .
[0080] Among them, the first acquisition module 401 is used to obtain the temperature values at the current time point and at each time point in the current time window with the current time point as the end point, the angular velocity values of the gyroscope, and the maximum temperature difference between each temperature value; the first determination module 402 is used to determine the angular velocity mean and the angular velocity standard deviation in the current time window according to each angular velocity value when the maximum temperature difference is less than or equal to the first temperature difference threshold; the second determination module 403 is used to determine the average value of the angular velocity mean at the current time point according to the angular velocity mean in the current time window and the angular velocity mean in each historical time window when the angular velocity standard deviation is less than or equal to the standard deviation threshold; the third determination module 404 is used to use the average value of the angular velocity mean as the angular velocity zero bias value corresponding to the temperature value at the current time point when the total number of time windows in the historical time window and the current time window is greater than or equal to the number threshold; the compensation processing module 405 is used to perform zero bias compensation processing on the angular velocity value of the gyroscope at the temperature value according to the angular velocity zero bias value.
[0081] In one embodiment of the present disclosure, the first acquisition module 401 is specifically used to obtain the angular velocity value of the gyroscope at each time point within a preset time period; for each time point, use the temperature value most recently collected by the temperature sensor before the time point as the temperature value at the time point; obtain the starting time point of the preset time period, and multiple candidate time points within the preset time period that are at least a preset time interval away from the starting time point; the length of the preset time interval is greater than or equal to the length of the current time window; use each of the multiple candidate time points as the current time point in turn, and obtain the temperature values and the angular velocity value of the gyroscope at each time point in the current time window with the current time point as the end point; determine the maximum temperature difference between each temperature value based on the temperature values at each time point in the current time window.
[0082] In one embodiment of the present disclosure, the second determination module 403 is specifically used to perform mean processing on the angular velocity mean in the current time window and the angular velocity mean in each historical time window to obtain a mean processing result; and use the mean processing result as the average value of the angular velocity mean at the current time point.
[0083] In one embodiment of the present disclosure, the device also includes: a fourth determination module, an update processing module and a curve fitting module; the fourth determination module is used to determine the maximum angular velocity standard deviation at the current time point according to the angular velocity standard deviation in the current time window and the angular velocity standard deviation in each historical time window when the total number of time windows is greater than or equal to the number threshold; the update processing module is used to update the weight corresponding to the temperature interval to which the temperature value at the current time point belongs according to the maximum angular velocity standard deviation, and obtain the updated weight corresponding to the temperature interval; the curve fitting module is used to perform curve fitting processing in combination with the updated weights corresponding to each temperature interval, and obtain the updated temperature drift curve of the gyroscope and the effective temperature range of the updated temperature drift curve.
[0084] In one embodiment of the present disclosure, the update processing module is specifically used to determine a first weight corresponding to the standard deviation range to which the maximum angular velocity standard deviation belongs; obtain an existing weight corresponding to the temperature interval; and when the existing weight is less than the first weight, use the first weight as the updated weight corresponding to the temperature interval.
[0085] In one embodiment of the present disclosure, the curve fitting module is specifically used to obtain the maximum temperature value and the minimum temperature value among the target temperature values corresponding to the angular velocity zero bias value in each temperature interval, as well as the temperature difference between the maximum temperature value and the minimum temperature value; determine the function type corresponding to the updated temperature drift curve according to the temperature difference; perform curve fitting processing according to the function type, the update weights corresponding to each temperature interval, and the angular velocity zero bias values corresponding to each target temperature value in each temperature interval to obtain the updated temperature drift curve; determine the effective temperature range of the updated temperature drift curve according to the maximum temperature value, the minimum temperature value, and the temperature difference.
[0086] In one embodiment of the present disclosure, the curve fitting module is specifically used to, when the temperature difference is less than or equal to the second temperature difference threshold, determine that the function type corresponding to the updated temperature drift curve is a constant function; when the temperature difference is greater than the second temperature difference threshold and less than or equal to the third temperature difference threshold, determine that the function type corresponding to the updated temperature drift curve is a linear function; when the temperature difference is greater than the third temperature difference threshold, determine that the function type corresponding to the updated temperature drift curve is a quadratic function.
[0087] In one embodiment of the present disclosure, the curve fitting module is specifically used to, when the temperature difference is less than or equal to a third temperature difference threshold, determine the effective temperature range, which is the temperature range determined by the maximum temperature value and the minimum temperature value; when the temperature difference is greater than the third temperature difference threshold, determine the effective temperature range, which is the temperature range determined by the first temperature value and the second temperature value; the first temperature value is the sum of the maximum temperature value and a preset deviation value; the second temperature value is the difference between the minimum temperature value and the preset deviation value.
[0088] In one embodiment of the present disclosure, the device also includes: a deletion module, which is used to delete the temperature values and the angular velocity values of the gyroscope at each time point before the current time point when the angular velocity standard deviation is greater than the standard deviation threshold; the deletion module is also used to delete the angular velocity mean and the angular velocity standard deviation in the current time window, and delete the angular velocity mean and the angular velocity standard deviation in the historical time window.
[0089] In one embodiment of the present disclosure, the device also includes: a fifth determination module and a second acquisition module; the fifth determination module is used to determine whether the temperature value at the current time point is within the effective temperature range of the temperature drift curve of the gyroscope when the maximum temperature difference is greater than the first temperature difference threshold; the second acquisition module is used to obtain the angular velocity zero bias value corresponding to the temperature value on the temperature drift curve when the temperature value at the current time point is within the effective temperature range of the temperature drift curve of the gyroscope.
[0090] In the temperature drift compensation device of the gyroscope of the embodiment of the present disclosure, by obtaining the temperature values at the current time point, the temperature values at each time point in the current time window with the current time point as the end point, the angular velocity values of the gyroscope, and the maximum temperature difference between the temperature values; when the maximum temperature difference is less than or equal to the first temperature difference threshold, the angular velocity mean value and the angular velocity standard deviation in the current time window are determined according to the angular velocity values; when the angular velocity standard deviation is less than or equal to the standard deviation threshold, the average value of the angular velocity mean value at the current time point is determined according to the angular velocity mean value in the current time window and the angular velocity mean values in each historical time window; when the total number of time windows of the historical time window and the current time window is greater than or equal to the number threshold, the average value of the angular velocity mean value is used as the angular velocity zero bias value corresponding to the temperature value at the current time point; according to the angular velocity zero bias value, the angular velocity value of the gyroscope at the temperature value is subjected to zero bias compensation processing, so that the angular velocity zero bias value determination and zero bias compensation processing in a relatively stable period can be realized, and the dynamic generation of the temperature drift curve is realized, so as to ensure the accuracy of the angular velocity output by the gyroscope.
[0091] According to a third aspect of an embodiment of the present disclosure, there is also provided an electronic device, including: a processor; and a memory for storing instructions executable by the processor, wherein the processor is configured to: implement the temperature drift compensation method of the gyroscope as described above.
[0092] In order to implement the above embodiments, the present disclosure also proposes a storage medium.
[0093] When the instructions in the storage medium are executed by a processor, the processor is enabled to execute the temperature drift compensation method of the gyroscope as described above.
[0094] In order to implement the above embodiments, the present disclosure also provides a computer program product.
[0095] When the computer program product is executed by a processor of an electronic device, the electronic device is enabled to execute the above method.
[0096] Figure 5 The figure is a structural block diagram of an electronic device according to an exemplary embodiment. Figure 5 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0097] like Figure 5 As shown, the electronic device 1000 includes a processor 111, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 112 or a program loaded from a memory 116 to a random access memory (RAM) 113. In the RAM 113, various programs and data required for the operation of the electronic device 1000 are also stored. The processor 111, the ROM 112, and the RAM 113 are connected to each other via a bus 114. An input / output (I / O) interface 115 is also connected to the bus 114.
[0098] The following components are connected to the I / O interface 115: a memory 116 including a hard disk, etc.; and a communication part 117 including a network interface card such as a local area network (LAN) card, a modem, etc., and the communication part 117 performs communication processing via a network such as the Internet; a drive 118 is also connected to the I / O interface 115 as needed.
[0099] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 117. When the computer program is executed by the processor 111, the above-mentioned functions defined in the method of the present disclosure are executed.
[0100] In an exemplary embodiment, a storage medium including instructions is also provided, such as a memory including instructions, and the instructions can be executed by the processor 111 of the electronic device 1000 to complete the above method. Optionally, the storage medium can be a non-transitory computer-readable storage medium, for example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0101] In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, apparatus, or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in combination with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium may be transmitted using any suitable medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
[0102] In addition, the word "exemplary" is used herein to indicate serving as an example, instance, or diagram. Any aspect or design described as "exemplary" in this article is not necessarily understood to be advantageous compared to other aspects or designs. On the contrary, the use of the word exemplary is intended to present concepts in a specific way. As used herein, the term "or" is intended to represent an inclusive "or" rather than an exclusive "or". That is, unless otherwise specified or clear from the context, "X applies A or B" is intended to represent any one of the natural inclusive arrangements. That is, if X applies A; X applies B; or X applies both A and B, "X applies A or B" is satisfied under any of the aforementioned examples. In addition, unless otherwise specified or clearly pointed to a singular form from the context, the articles "one" and "an" as used in this application and the appended claims are generally understood to mean "one or more".
[0103] Likewise, although the present disclosure has been shown and described with respect to one or more implementations, equivalent variations and modifications will occur to those skilled in the art after reading and understanding the specification and drawings. The present disclosure includes all such modifications and variations and is limited only by the scope of the claims. In particular, with respect to the various functions performed by the components (e.g., elements, resources, etc.) described above, unless otherwise noted, the terms used to describe such components are intended to correspond to any component (functionally equivalent) that performs the specific functions of the described components, even if the structure is not equivalent to the disclosed structure. In addition, although the specific features of the present disclosure may have been disclosed with respect to only one of several implementations, such features may be combined with one or more other features of other implementations as may be desired and conducive to any given or specific application. In addition, with respect to "including", "having", "having", "having", or variations thereof used in the specific embodiments or claims, such terms are intended to be inclusive in a manner similar to the term "comprising".
[0104] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.
[0105] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A method for compensating temperature drift of a gyroscope, characterized in that: The method comprises: Obtaining the temperature values at the current time point, the temperature values at each time point in the current time window with the current time point as the end point, the angular velocity values of the gyroscope, and the maximum temperature difference between each temperature value; When the maximum temperature difference is less than or equal to the first temperature difference threshold, determining the angular velocity mean and the angular velocity standard deviation in the current time window according to each angular velocity value; When the angular velocity standard deviation is less than or equal to the standard deviation threshold, determining an average value of the angular velocity means at the current time point according to the angular velocity mean value in the current time window and the angular velocity means in each historical time window; When the total number of time windows of the historical time window and the current time window is greater than or equal to the number threshold, the average value of the angular velocity means is used as the angular velocity zero bias value corresponding to the temperature value at the current time point; According to the angular velocity zero bias value, zero bias compensation processing is performed on the angular velocity value of the gyroscope at the temperature value.
2. The method according to claim 1, characterized in that The obtaining of the temperature values at the current time point, the temperature values at each time point in the current time window with the current time point as the end point, the angular velocity values of the gyroscope, and the maximum temperature difference between the temperature values includes: Obtain the angular velocity value of the gyroscope at each time point within a preset time period; For each time point, the temperature value most recently collected by the temperature sensor before the time point is used as the temperature value at the time point; Obtaining a starting time point of the preset time period and a plurality of candidate time points within the preset time period that are at least a preset time interval away from the starting time point; the length of the preset time interval is greater than or equal to the length of the current time window; Taking each of the multiple candidate time points as the current time point in turn, and obtaining the temperature value and the angular velocity value of the gyroscope at each time point in the current time window with the current time point as the end point; According to the temperature values at each time point in the current time window, a maximum temperature difference between each temperature value is determined.
3. The method according to claim 1, characterized in that: Determining the average value of the angular velocity at the current time point according to the angular velocity average value in the current time window and the angular velocity average values in each historical time window includes: Performing mean processing on the angular velocity mean in the current time window and the angular velocity mean in each historical time window to obtain a mean processing result; The mean processing result is used as the average value of the angular velocity mean at the current time point.
4. The method according to claim 1, characterized in that: The method further comprises: When the total number of time windows is greater than or equal to the number threshold, determining the maximum angular velocity standard deviation at the current time point according to the angular velocity standard deviation in the current time window and the angular velocity standard deviations in each historical time window; According to the maximum angular velocity standard deviation, updating the weight corresponding to the temperature interval to which the temperature value at the current time point belongs, to obtain an updated weight corresponding to the temperature interval; Curve fitting processing is performed in combination with the update weights corresponding to each temperature interval to obtain an updated temperature drift curve of the gyroscope and an effective temperature range of the updated temperature drift curve.
5. The method according to claim 4, characterized in that The updating process of the weight corresponding to the temperature interval to which the temperature value at the current time point belongs according to the maximum angular velocity standard deviation to obtain the updated weight corresponding to the temperature interval includes: Determine a first weight corresponding to a standard deviation range to which the maximum angular velocity standard deviation belongs; Obtaining the existing weight corresponding to the temperature range; When the existing weight is less than the first weight, the first weight is used as the updated weight corresponding to the temperature interval.
6. The method according to claim 4, characterized in that The updating weights corresponding to each temperature interval are combined to perform curve fitting processing to obtain the updated temperature drift curve of the gyroscope and the effective temperature range of the updated temperature drift curve, including: Obtaining a maximum temperature value and a minimum temperature value among each target temperature value corresponding to the angular velocity zero bias value in each temperature interval, and a temperature difference between the maximum temperature value and the minimum temperature value; Determining, according to the temperature difference, a function type corresponding to the updated temperature drift curve; Performing curve fitting processing according to the function type, the update weight corresponding to each temperature interval, and the angular velocity zero bias value corresponding to each target temperature value in each temperature interval to obtain the updated temperature drift curve; The effective temperature range of the updated temperature drift curve is determined according to the maximum temperature value, the minimum temperature value, and the temperature difference.
7. The method according to claim 6, characterized in that The step of determining, according to the temperature difference, a function type corresponding to the updated temperature drift curve comprises: When the temperature difference is less than or equal to a second temperature difference threshold, determining that the function type corresponding to the updated temperature drift curve is a constant function; When the temperature difference is greater than the second temperature difference threshold and less than or equal to the third temperature difference threshold, determining that the function type corresponding to the updated temperature drift curve is a linear function; When the temperature difference is greater than a third temperature difference threshold, it is determined that the function type corresponding to the updated temperature drift curve is a quadratic function.
8. The method according to claim 6, characterized in that Determining the effective temperature range of the updated temperature drift curve according to the maximum temperature value, the minimum temperature value, and the temperature difference includes: In the case where the temperature difference is less than or equal to a third temperature difference threshold, determining the effective temperature range as a temperature range determined by the maximum temperature value and the minimum temperature value; When the temperature difference is greater than the third temperature difference threshold, the effective temperature range is determined to be the temperature range determined by the first temperature value and the second temperature value; the first temperature value is the sum of the maximum temperature value and the preset deviation value; the second temperature value is the difference between the minimum temperature value and the preset deviation value.
9. The method according to claim 1, characterized in that: The method further comprises: When the angular velocity standard deviation is greater than the standard deviation threshold, deleting the temperature values and the angular velocity values of the gyroscope at each time point before the current time point; The angular velocity mean and the angular velocity standard deviation in the current time window are deleted, and the angular velocity mean and the angular velocity standard deviation in the historical time window are deleted.
10. The method according to claim 1 or 4, characterized in that: The method further comprises: In a case where the maximum temperature difference is greater than the first temperature difference threshold, determining whether the temperature value at the current time point is within a valid temperature range of the temperature drift curve of the gyroscope; When the temperature value at the current time point is within the effective temperature range of the temperature drift curve of the gyroscope, an angular velocity zero bias value corresponding to the temperature value on the temperature drift curve is obtained.
11. A gyroscope temperature drift compensation device, characterized in that: The device comprises: A first acquisition module is used to acquire the temperature values at the current time point, the temperature values at each time point in the current time window with the current time point as the end point, the angular velocity values of the gyroscope, and the maximum temperature difference between each temperature value; A first determination module is used to determine the angular velocity mean and the angular velocity standard deviation in the current time window according to each angular velocity value when the maximum temperature difference is less than or equal to a first temperature difference threshold; a second determination module, configured to determine, when the angular velocity standard deviation is less than or equal to a standard deviation threshold, an average value of the angular velocity means at the current time point according to the angular velocity mean value in the current time window and the angular velocity means in each historical time window; A third determination module is used to use the average value of the angular velocity means as the angular velocity zero bias value corresponding to the temperature value at the current time point when the total number of time windows of the historical time window and the current time window is greater than or equal to the number threshold; The compensation processing module is used to perform zero bias compensation processing on the angular velocity value of the gyroscope at the temperature value according to the angular velocity zero bias value.
12. An electronic device, characterized in that: include: processor; a memory for storing instructions executable by the processor; Wherein, the processor is configured to: Implement the steps of the temperature drift compensation method of the gyroscope as described in any one of claims 1 to 10. 13 . A non-transitory computer-readable storage medium, when the instructions in the storage medium are executed by a processor, the processor is enabled to perform the temperature drift compensation method of a gyroscope according to any one of claims 1 to 10.