A sensor data temperature autonomous compensation method based on autonomous learning
By employing a self-learning method and utilizing ambient temperature data to autonomously compensate for the sensor, the problem of complex sensor temperature calibration is solved, effective compensation is achieved in non-laboratory environments, and equipment requirements are simplified.
Patent Information
- Application Number
- CN202211455140.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-21
- Publication Date
- 2026-11-24
- Estimated Expiration
- 2042-11-21
AI Technical Summary
Existing sensor temperature calibration is complex and requires sophisticated calibration equipment, making it impossible to effectively compensate sensor data in non-laboratory environments.
By employing an autonomous learning method, ambient temperature data is collected and stored in an autonomous learning queue. The temperature difference range and median are calculated, the weighting coefficients of the sensor measurements are determined, and the true value of the sensor data is predicted, thereby achieving autonomous temperature compensation.
The sensor data can still achieve good compensation results without the need for laboratory calibration, simplifying the temperature calibration process and reducing equipment requirements.
Smart Images

Figure CN116718798B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of sensor data processing technology, specifically relating to a sensor data temperature autonomous compensation method and system based on autonomous learning. Background Technology
[0002] Several existing technologies have been reported regarding temperature compensation for sensor data, particularly MEMS accelerometer data. For example, CN103256941 A (2013.08.21) establishes a temperature compensation model for zero-bias angular velocity and uses this model to compensate for the zero-bias angular velocity of a gyroscope, effectively reducing the zero drift of the gyroscope and stabilizing it; the zero drift stability is improved, thus achieving the temperature compensation effect for the gyroscope. CN 110726852 A (2020.01.24) provides a temperature compensation method for MEMS accelerometers, employing a fifth-order polynomial fitting method and selecting temperature and temperature gradient as polynomial factors, which has a good compensation effect on the error caused by temperature changes in MEMS accelerometers. CN 112578148 A (2021.03.30) uses a quadratic fitting method to achieve a high-precision temperature compensation method for MEMS accelerometers, which effectively compensates for the deviation caused by temperature changes in MEMS accelerometers. However, the above-mentioned method involves complex sensor temperature calibration, requires highly sophisticated calibration equipment, and the compensation effect is unsatisfactory without laboratory calibration of the sensor data. Summary of the Invention
[0003] To address the aforementioned technical problems, the first aspect of this invention provides a method for autonomous temperature compensation of sensor data based on autonomous learning, comprising the following steps:
[0004] S1: Collect sensor data and ambient temperature data, and store the ambient temperature data T in an autonomous learning queue T[n] of n ambient temperatures;
[0005] S2: Calculate the range of ambient temperature difference Trang and the median temperature Tmid;
[0006] S3: After each sensor data acquisition to obtain the sensor measurement value A, the weighting coefficient K of the current sensor measurement value is determined in the self-learning queue T[n] that has been self-learned by the current ambient temperature value T.
[0007] S4: Predict the true value of the sensor data for this test.
[0008] A second aspect of the present invention provides a sensor data temperature autonomous compensation system based on autonomous learning, the system comprising at least one processor; and a memory storing instructions that, when executed by the at least one processor, implement the steps of the method described above.
[0009] The beneficial effects of this invention are as follows: This invention solves the problems of complex sensor temperature calibration and extremely high requirements for calibration equipment, enabling sensor data to achieve excellent compensation results even without laboratory calibration. Regardless of whether the sensor has undergone laboratory calibration, the content of this patent can still be used for autonomous learning compensation to achieve better compensation results. Attached Figure Description
[0010] Figure 1 Schematic diagram of the temperature self-compensation system;
[0011] Figure 2 Schematic diagram of a sensor data temperature autonomous compensation system based on autonomous learning;
[0012] Figure 3 Flowchart of an autonomous learning-based sensor data temperature self-compensation algorithm;
[0013] Figure 4 Flowchart for determining sensor measurement deviation;
[0014] Figure 5 Hardware schematic diagram of the temperature autonomous compensation system. Detailed Implementation
[0015] The following embodiments further illustrate the content of the present invention, but should not be construed as limiting the present invention. Any modifications or substitutions made to the methods, steps, or conditions of the present invention without departing from the spirit and essence of the invention are within the scope of the present invention.
[0016] like Figure 1 The image shows a sensor data temperature autonomous compensation system 1 based on autonomous learning, according to some embodiments of the present invention. This system can collect sensor data and ambient temperature data from sensors, process the data to generate true sensor data values, and then perform temperature compensation for the sensor data. This sensor data includes, but is not limited to, MEMS accelerometer data. See also... Figure 1 As shown, the hardware of the temperature autonomous compensation system 1 includes a processor 7, a memory 8, and an I / O interface.
[0017] Temperature calibration of sensors in existing technologies is extremely complex and requires highly sophisticated calibration equipment. For example, several patents in the background technology are only applicable to laboratory environments; they cannot be implemented outside of these environments. (See also...) Figure 2 The self-learning-based temperature self-compensation system 1 for sensor data shown in some embodiments of the present invention can achieve good compensation results even without laboratory calibration of sensor data. (Continue to refer to...) Figure 2The autonomous learning-based sensor data temperature autonomous compensation system includes a circular queue 2 (hereinafter also referred to as the autonomous learning queue T[n] of ambient temperature), a sensor measurement deviation judgment module 3, a weighting coefficient module 4, an ambient temperature data processing module 5, and a prediction algorithm module 6. The specific input and output signal / data configurations of these modules can be understood in conjunction with the subsequent method embodiments, but the figures shown should not be regarded as a limitation on the scope of protection of this invention.
[0018] See Figure 3 As shown, some embodiments of the autonomous temperature compensation method for sensor data based on autonomous learning of the present invention include the following steps:
[0019] S1: Collect sensor data and ambient temperature data, and store the ambient temperature data T in an autonomous learning queue T[n] of n ambient temperatures;
[0020] S2: Calculate the range of ambient temperature difference Trang and the median temperature Tmid;
[0021] S3: After each sensor data acquisition to obtain the sensor measurement value A, the weighting coefficient K of the current sensor measurement value is determined by the current ambient temperature value T in the self-learning queue T[n] that has been self-learned.
[0022] S4: Predict the true value of the sensor data for this test.
[0023] In further embodiments of the sensor data temperature autonomous compensation method based on autonomous learning, the ambient temperature difference range Trang in step S2 is calculated by equation ③, and the median temperature Tmid in step S2 is calculated by equation ④:
[0024] Trang = |Tmax - Tmin| ③
[0025] Tmid=(|Tmax+Tmin|) / 2 ④
[0026] Where Tmax is the maximum temperature value of the temperature learning queue, and Tmin is the minimum temperature value of the temperature learning queue.
[0027] In further embodiments of the autonomous temperature compensation method for sensor data based on autonomous learning, the weighting coefficient of the current sensor measurement value in step S3 is calculated by equation ②:
[0028] K = 0.5 - (|T - Tmid|) / Trang ②
[0029] Where T is the current ambient temperature, Tmid is the median temperature of the temperature learning queue, and Trang is the range of ambient temperature variation of the temperature learning queue.
[0030] In further embodiments of the autonomous temperature compensation method for sensor data based on autonomous learning, the prediction of the true value of the current sensor data in step S4 is calculated by equation ①:
[0031] Kalman_A = Ap*(1-K) + A*K ①
[0032] Where A is the sensor measurement value, Ap is the true value of the sensor data predicted in the previous prediction, Kalman_A is the true value of the sensor data predicted in the current prediction, and K is the weighting coefficient of the sensor measurement value.
[0033] In further embodiments of the autonomous temperature compensation method for sensor data based on autonomous learning, in step S4, the prediction algorithm in step S4 is iterated continuously by equation ⑤.
[0034] Ap = Kalman_A ⑤
[0035] Where Ap is the true value of the sensor data predicted in the previous prediction, and Kalman_A is the true value of the sensor data predicted in the current prediction.
[0036] In further embodiments of the autonomous temperature compensation method based on autonomous learning for sensor data, the method for setting the autonomous learning queue T[n] of ambient temperature in step S1 is as follows:
[0037] Create an autonomous learning queue T[n] that can accommodate the ambient temperature of n samples;
[0038] Each collected ambient temperature data is stored in the autonomous learning queue T[n] of ambient temperature; optionally, sensor data does not need to be stored simultaneously, only the ambient data needs to be continuously updated.
[0039] When the number of samples exceeds n, the first sample needs to be discarded, and the (n+1)th sample is stored in the autonomous learning queue T[n] of the ambient temperature.
[0040] In further embodiments of the autonomous learning-based sensor data temperature compensation method, n is adjusted according to changes in ambient temperature, sensor sampling frequency, and application scenario; preferably, n ≥ 3. Thus, N in this invention represents the learning depth. A larger n results in a slower learning speed, better learning performance, and ultimately better data compensation. Conversely, a smaller n (n > 2) results in a faster learning speed but a worse learning performance, leading to poorer data compensation. An unexpected finding of this invention is that the most important factors in selecting N are changes in ambient temperature and the frequency of sensor data reading. Since the autonomous learning queue is updated simultaneously when sensor data is read, if the sensor reading frequency is high while the ambient temperature remains relatively unchanged, the data in the learning queue will be almost identical, resulting in poor learning performance. In such cases, increasing n is necessary to improve the learning effect. Conversely, if the sensor reading frequency is low, the ambient temperature will change significantly, thus a relatively small n can achieve good learning performance.
[0041] In further embodiments of the sensor data temperature autonomous compensation method based on autonomous learning, the autonomous learning queue T[n] of the ambient temperature simultaneously contains the maximum and minimum ambient temperature data of the real ambient temperature.
[0042] In some further embodiments of the autonomous temperature compensation method for sensor data based on autonomous learning, the following steps are also included during step S1:
[0043] S11: Calculate the maximum temperature value Tmax and the minimum temperature value Tmin of the temperature learning queue in the autonomous learning queue T[n] of the ambient temperature;
[0044] S12: Calculate the difference between the sensor measurement value A corresponding to the maximum temperature value Tmax and the minimum temperature value Tmin in the temperature learning queue. This difference is the range of sensor measurement variation Aδ.
[0045] S13: Determine whether the sensor measurement deviation |Ap-A| is caused by temperature or by the measured quantity. If the sensor measurement deviation |Ap-A| is caused by the measured quantity, clear the autonomous learning queue T[n] of the ambient temperature and restart step S1. If the sensor measurement deviation |Ap-A| is caused by temperature, continue with step S1.
[0046] In a further embodiment: if |Ap-A|>|Aδ|, then the sensor measurement deviation |Ap-A| is caused by the measured quantity; if |Ap-A|<|Aδ|, then the sensor measurement deviation |Ap-A| is caused by temperature change.
[0047] The technical solution of the present invention will be further described below.
[0048] The following symbols represent the following meanings:
[0049] A: The sensor's measured value;
[0050] Ap: The true value of the sensor data predicted in the last time;
[0051] Kalman_A: The true value of the sensor data predicted in this study;
[0052] K: Weighting coefficient for sensor measurements;
[0053] T: Current ambient temperature;
[0054] T[n]: The learning depth queue for ambient temperature;
[0055] Tmax: The maximum temperature value in the temperature learning queue;
[0056] Tmin: Minimum temperature value in the temperature learning queue;
[0057] Tmid: The median temperature in the temperature learning queue;
[0058] Trang: The range of the temperature learning queue;
[0059] Aδ: The range of measurement values that the sensor can measure.
[0060] Some embodiments of the present invention are based on a self-learning sensor data temperature self-compensation method, which can be summarized as a self-compensation algorithm and self-learning.
[0061] Autonomous compensation algorithm:
[0062] This autonomous compensation algorithm is based on a predictive data fusion algorithm, which predicts the true value of sensor data by fusing multiple types of data (temperature data and sensor data).
[0063] The prediction algorithm in some embodiments of the present invention includes two core steps: a weighting algorithm and dynamic changes in the weight coefficients. These steps are described in detail below, but should not be regarded as a limitation on the scope of protection of the present invention.
[0064] Based on the prediction algorithm, the sensor's true value is required. Therefore, there is a deviation between the sensor's measured value and the true value, and this deviation is precisely caused by temperature. Theoretically, if the ambient temperature does not change, the sensor's measured value should remain constant, and this value is the true value of this invention. However, the ambient temperature changes, so the resulting deviation between the sensor's measured value and the true value also changes. This deviation does not change abruptly, but fluctuates within a certain range, and this fluctuation pattern precisely matches the temperature change pattern. Therefore, the relationship between the true value and the measured value derived from the embodiments of this invention is as follows:
[0065] Kalman_A = Ap*(1-K) + A*K ①
[0066] This invention discovers that the weight of measured values is affected by temperature. When the ambient temperature is exactly the midpoint of the learning queue, the weight is the highest, and the measured value is closest to the true value. Conversely, when the ambient temperature is exactly the maximum or minimum value of the learning queue, the weight is the lowest, and the measured value deviates the furthest from the true value. Therefore, the relationship between temperature and the weighting coefficient is as follows:
[0067] K = 0.5 - (|T - Tmid|) / Trang ②
[0068] Tmid and Trang can be obtained from the temperature learning queue, and their relationship is as follows:
[0069] Trang = |Tmax - Tmin| ③
[0070] Tmid=(|Tmax+Tmin|) / 2 ④
[0071] Ap is the previous prediction value, and Kalman_A is the current prediction value. Therefore, Equation ⑤ enables the continuous iteration of the algorithm.
[0072] Ap = Kalman_A ⑤
[0073] Self-directed learning:
[0074] Based on the autonomous compensation algorithm, the following embodiments of the present invention illustrate the setup of the temperature learning queue and how to perform autonomous learning.
[0075] First, a self-learning queue T[n] needs to be created to hold n samples. Each collected ambient temperature is stored in the self-learning queue T[n]. When the number of samples exceeds n, the first sample is discarded, and the (n+1)th sample is added to the self-learning queue T[n], thus achieving self-learning of temperature. Typically, the self-learning queue should be able to simultaneously hold the maximum and minimum values of the real environment. Therefore, n needs to be adjusted according to changes in ambient temperature and the sensor's sampling frequency to achieve the best compensation effect.
[0076] After obtaining the difference Aδ between the sensor measurements corresponding to the maximum and minimum temperature values in the learning queue, we can determine whether the sensor measurement deviation is caused by temperature or by the measured value by using |Ap-A|>|Aδ|.
[0077] If |Ap-A| > |Aδ|, then the deviation is considered to be caused by the measured quantity, and the autonomous learning queue should be cleared to restart autonomous learning. Conversely, if the deviation is not due to temperature changes, then it is caused by temperature variations, and autonomous learning can continue. The difference between "restart" and "continue" is that the former clears the previously learned results, assuming that the environment is new and the previous learning results are no longer applicable, thus restarting. The latter continues to learn by adding to the previous learning results.
[0078] The embodiments and functional operations of the subject matter described in this specification can be implemented in the following ways: digital electronic circuits, tangibly implemented computer software or firmware, computer hardware, including the structures disclosed in this specification and their equivalents, or combinations thereof. Embodiments of the subject matter described in this specification can be implemented as one or more computer programs, that is, one or more modules of computer program instructions encoded on one or more tangible non-transitory program carriers, for execution by a data processing device or to control the operation of the data processing device.
[0079] Alternatively or additionally, program instructions may be encoded on artificially generated propagation signals, such as machine-generated electrical, optical, or electromagnetic signals, which are then generated as coded information to be transmitted to an appropriate receiver device executed by data processing equipment. The computer storage medium may be a machine-readable storage device, a machine-readable storage substrate, a random or serial access memory device, or one or more combinations of the above.
[0080] The term "data processing device" encompasses all kinds of devices, apparatuses, and machines used for processing data, including, for example, programmable processors, computers, or multiprocessor systems or multicomputer systems. Devices may include special-purpose logic circuitry, such as FPGAs (Field-Programmable Gate Arrays) or ASICs (Application-Specific Integrated Circuits). In addition to hardware, devices may also include code that creates the execution environment for associated computer programs, such as processor firmware, protocol stacks, database management systems, operating systems, or combinations thereof.
Claims
1. A method for autonomous temperature compensation based on sensor data using autonomous learning, characterized in that, The following steps are executed cyclically, with the sampling period as the unit: S1: In each sampling period, collect the current sensor measurement value A and the current ambient temperature value T, and store the current ambient temperature value T in the ambient temperature autonomous learning queue T[n] with a depth of n, where n is determined according to the ambient temperature change, the sensor sampling frequency and the application scenario, and n≥3; when the number of samples in the autonomous learning queue T[n] exceeds n, discard the earliest stored ambient temperature sample, so that the autonomous learning queue T[n] retains the n most recently collected ambient temperature samples; The following steps are also performed during step S1: S11: Determine the maximum temperature value Tmax and the minimum temperature value Tmin in the autonomous learning queue T[n], and determine the sensor measurement values corresponding to Tmax and Tmin respectively; S12: Calculate the difference between the sensor measurements corresponding to Tmax and Tmin respectively, and use this difference as the range of sensor measurement variation Aδ; S13: Compare the deviation |Ap-A| between the current sensor measurement value A and the previously predicted true sensor data value Ap with the range of sensor measurement value change |Aδ|; when |Ap-A|>|Aδ|, determine that the deviation is caused by the change of the measured value, clear the autonomous learning queue T[n] and re-execute S1; when |Ap-A|<|Aδ|, determine that the deviation is caused by the change of the ambient temperature, retain the autonomous learning queue T[n] and continue to execute S2 to S4 based on the previous learning results; S2: Based on the updated self-learning queue T[n] in this sampling period, calculate the environmental temperature difference range Trang and the median temperature Tmid: Trang = |Tmax - Tmin| ③ Tmid=(|Tmax+Tmin|) / 2 ④ Where Tmax is the maximum temperature value in the autonomous learning queue T[n], and Tmin is the minimum temperature value in the autonomous learning queue T[n]. S3: After each acquisition of the current sensor measurement value A, the weighting coefficient K of the current sensor measurement value is recalculated based on the current ambient temperature value T, the median temperature Tmid calculated in this sampling period, and the ambient temperature difference range Trang. K = 0.5 - (|T - Tmid|) / Trang ② S4: Based on the recalculated weighting coefficient K of this sampling period, the current sensor measurement value A and the previously predicted true sensor data value Ap are weighted and fused to obtain the current predicted true sensor data value Kalman_A: And in the next sampling period, let: Ap=Kalman_A ⑤.
2. The method for autonomous temperature compensation based on sensor data according to claim 1, characterized in that, The sensor data is MEMS accelerometer data.
3. A sensor data temperature autonomous compensation system based on autonomous learning, characterized in that, The system includes at least one processor and a memory storing instructions that, when executed by the at least one processor, perform the steps of the method according to claim 1 or 2.
Citation Information
Patent Citations
Practical method of high order temperature compensation for MEMS (Micro Electro Mechanical Systems) gyroscope
CN103256941A
Temperature compensation method for MEMS accelerometer
CN110726852A
High-precision temperature compensation method for MEMS accelerometer
CN112578148A
Method and device for temperature compensation of MEMS sensor
CN109238310A
Ambient temperature learning algorithm for automotive vehicles
US6088661A
