Temperature drift optimization method for head-mounted equipment

By dynamically completing the zero drift data of the headset IMU, the calibration accuracy and real-time problems caused by the missing temperature offset table data are solved, and higher positioning accuracy and user experience are achieved.

CN119984251APending Publication Date: 2025-05-13SHANGHAI LEXIANG TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510065989.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-15
Publication Date
2025-05-13

AI Technical Summary

Technical Problem

The head-mounted device faces the problem of missing temperature offset table data during the IMU calibration process, which leads to the inability to directly obtain the IMU zero drift data in certain temperature intervals, forming a static state judgment paradox, affecting the accuracy and real-timeness of the calibration.

Method used

By obtaining the preset temperature offset table, identify the temperature value of the missing data, and when detecting the near-temperature value, determine whether the device is in a static state, collect and calculate the average value of multiple sets of IMU data, dynamically complete the missing data, and calculate a more accurate zero-drift calibration value through linear or cubic spline interpolation.

Benefits of technology

It realizes dynamically completing missing IMU zero drift data during the use of the device, ensuring the accuracy and real-time calibration, and improving the positioning accuracy and user experience of the headset.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119984251A_ABST
    Figure CN119984251A_ABST
Patent Text Reader

Abstract

The invention provides a temperature drift optimization method on a head-mounted device, and relates to the technical field of electronic products, and the method comprises the steps: obtaining a preset temperature drift table which comprises a plurality of target temperature values and corresponding IMU null drift data; acquiring a current IMU temperature value, and judging whether a near temperature value of the current IMU temperature value exists in the empty offset list or not; if the near temperature value of the current IMU temperature value exists in the null offset list, judging whether the head-mounted equipment is in a static state or not; and updating the near temperature value and the IMU null drift data corresponding to the near temperature value into the temperature offset list, and removing the near temperature value from the null offset list. The method comprises the following steps: firstly, acquiring a preset temperature offset table, identifying a target temperature value of missing IMU null drift data, and when detecting that the current IMU temperature value is close to the temperature value of missing data and the head-mounted equipment is in a static state, automatically acquiring multiple groups of IMU data and calculating an average value, thereby supplementing and perfecting the temperature offset table.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of electronic products, and in particular to a method for optimizing temperature drift on a head-mounted device. Background Art

[0002] During the IMU calibration process of the head-mounted device, we face a complex technical problem. The built-in temperature offset table of the device has missing data, which makes it impossible to directly obtain the IMU zero drift data in certain temperature ranges. In this case, how to dynamically fill in the missing zero drift data during the actual use of the device while ensuring the accuracy and real-time performance of the calibration? Specifically, when a data gap is detected near the current IMU temperature value, the system needs to determine whether the device is in a stationary state. However, the determination of the stationary state itself depends on accurate IMU data. This creates a paradox: we need accurate IMU data to determine the stationary state, but without the determination of the stationary state, accurate IMU data cannot be obtained. Another challenge is how to complete data collection and update without affecting the normal experience during user use. Even if the device is stationary, it takes a certain amount of time to collect multiple sets of IMU data and calculate the average value, which may cause a short response delay or discontinuous data. In addition, temperature change is usually a gradual process, but our temperature offset table is a discrete data point. How to interpolate in this discrete data to obtain a more accurate zero drift compensation value is also a problem that needs to be considered. Especially in an environment with rapid temperature changes, how to balance the relationship between data update frequency and system resource consumption? Solving these problems is directly related to the positioning accuracy and user experience of head-mounted devices, and requires in-depth thinking and optimization at the algorithm design and system architecture levels. Summary of the invention

[0003] The present invention provides a method for optimizing temperature drift on a head mounted device, which mainly includes:

[0004] Obtain a preset temperature offset table, wherein the temperature offset table includes multiple target temperature values ​​and corresponding IMU zero drift data;

[0005] Traverse the temperature offset table to determine whether the IMU zero drift data corresponding to each target temperature value is empty. If it is empty, save the target temperature value to the empty offset list;

[0006] Obtain the current IMU temperature value, and determine whether the adjacent temperature value of the current IMU temperature value exists in the empty offset list;

[0007] If the adjacent temperature value of the current IMU temperature value exists in the empty offset list, determining whether the head mounted device is in a stationary state;

[0008] If the head mounted device is in a stationary state, multiple sets of IMU data are obtained and their average values ​​are calculated to obtain IMU zero drift data corresponding to the adjacent temperature values;

[0009] Update the adjacent temperature value and its corresponding IMU zero drift data into the temperature offset table, and remove the adjacent temperature value from the empty offset list;

[0010] Acquire corresponding IMU zero drift data from the temperature offset table according to the current IMU temperature value;

[0011] The IMU zero drift data is used to calibrate the current IMU data to obtain calibrated IMU data.

[0012] Further, the obtaining of a preset temperature offset table, wherein the temperature offset table includes a plurality of target temperature values ​​and corresponding IMU zero drift data, includes:

[0013] Acquire a preset temperature offset table from a storage medium, wherein the temperature offset table includes a plurality of target temperature values ​​and corresponding IMU zero drift data;

[0014] According to the target temperature value in the temperature offset table, determining the temperature value in which the IMU zero drift data is not written, and saving the temperature value in which the IMU zero drift data is not written to the temperature list;

[0015] Obtain the actual temperature value currently detected by the IMU, and determine whether the actual temperature value exists in the temperature offset table;

[0016] If the actual temperature value exists in the temperature offset table, obtaining zero drift data corresponding to the actual temperature value in the temperature offset table;

[0017] If the actual temperature value does not exist in the temperature offset table, determining whether an adjacent temperature value of the actual temperature value is in the temperature list;

[0018] If the temperature value adjacent to the actual temperature value is in the temperature list, determining whether the device is currently in a stationary state;

[0019] If the device is in a stationary state, controlling the IMU to collect zero drift data corresponding to the actual temperature value in the stationary state;

[0020] Writing the collected actual temperature value and the corresponding zero drift data into the temperature offset table, and deleting the actual temperature value into which the zero drift data has been written from the temperature list;

[0021] According to the updated temperature offset table, obtaining zero drift data corresponding to the target temperature value closest to the actual temperature value;

[0022] Obtaining the measurement value of the IMU, and calculating the measurement value of the IMU with the obtained zero drift data to obtain the actual data value of the IMU after calibration;

[0023] The calibrated actual data values ​​are used for subsequent algorithm processing.

[0024] Further, traversing the temperature offset table to determine whether the IMU zero drift data corresponding to each target temperature value is empty, and if so, saving the target temperature value to the empty offset list, includes:

[0025] Reading a preset temperature offset table from a storage medium, wherein the temperature offset table includes a plurality of target temperature values ​​and corresponding IMU zero drift data;

[0026] Traverse the temperature offset table to determine whether the IMU zero drift data corresponding to each target temperature value is empty, and if so, save the target temperature value to the empty offset list;

[0027] Obtain the actual temperature value currently detected by the IMU, and determine the target temperature value closest to the actual temperature value according to the preset temperature interval step;

[0028] Determine whether the closest target temperature value exists in the empty offset list. If so, use the original data of the IMU gyroscope to calculate the angular velocity offset, and obtain the angle change by integrating the gyroscope output data. If the angle change is less than a preset threshold, determine that the device is in a stationary state, otherwise the device is in a moving state.

[0029] If the device is in a stationary state, the zero drift data of the IMU sampled multiple times at the current actual temperature value is obtained, and the zero drift calibration value of the IMU at the temperature is obtained by calculating the arithmetic mean of the multiple sampled data, and the obtained zero drift calibration value is written into the corresponding target temperature value in the temperature offset table, and the target temperature value is deleted from the empty offset list;

[0030] If the device is in motion, or the closest target temperature value is not in the empty offset list, the IMU zero drift data corresponding to the target temperature value closest to the actual temperature value is obtained from the temperature offset table, and the IMU measurement value is calibrated using the zero drift data. The calibration process is to subtract the zero drift value at the corresponding temperature from the angular velocity value output by the IMU to obtain the calibrated angular velocity data;

[0031] The calibrated IMU angular velocity data is output to the attitude calculation module for attitude calculation to obtain the attitude information of the device.

[0032] Further, the obtaining of the current IMU temperature value and determining whether an adjacent temperature value of the current IMU temperature value exists in the empty offset list include:

[0033] Get the current temperature value of the IMU temperature sensor and save it as the current IMU temperature value;

[0034] Determine whether the current IMU temperature value is within a preset temperature range, if not, alarm and exit the program;

[0035] Calculate the adjacent temperature values ​​of the current IMU temperature value according to the preset temperature interval step;

[0036] Determine whether the adjacent temperature value exists in a pre-established empty offset list;

[0037] If the adjacent temperature value exists in the empty offset list, the original acceleration and angular velocity data of the IMU are obtained, the offset of the original data is calculated, the offset is used as the zero drift data corresponding to the current IMU temperature value, and is saved in a pre-established temperature offset table, and the adjacent temperature value is deleted from the empty offset list;

[0038] If the adjacent temperature value does not exist in the empty offset list, obtaining zero drift data corresponding to the temperature value closest to the current IMU temperature value from the temperature offset table;

[0039] Using the zero drift data to calibrate the original acceleration and angular velocity data of the IMU to obtain calibrated IMU data;

[0040] Performing attitude calculation on the calibrated IMU data to obtain attitude data of the IMU;

[0041] The position and speed of the posture data are calculated to achieve motion tracking function.

[0042] Further, if the adjacent temperature value of the current IMU temperature value exists in the empty offset list, determining whether the head mounted device is in a stationary state includes:

[0043] Obtain a current IMU temperature value, compare the current IMU temperature value with a preset temperature interval step, and obtain a temperature value close to the current IMU temperature value;

[0044] Use binary search to retrieve the adjacent temperature value of the current IMU temperature value in the pre-established empty offset list, and if it exists, execute the following steps, otherwise wait for a preset time and then re-acquire the current IMU temperature value;

[0045] Obtaining raw data through the IMU gyroscope, calculating the angle change within a period of time, and if the angle change is less than a preset threshold, determining that the head mounted device is in a stationary state, and executing the following steps;

[0046] Otherwise, reacquire the raw data of the IMU gyroscope after waiting for a preset time;

[0047] Acquire a mutex lock to protect the pre-established temperature offset table;

[0048] Collect multiple sets of IMU zero bias data and calculate the arithmetic mean to obtain the zero bias calibration value of the IMU at the current temperature;

[0049] Writing the current IMU temperature value and the corresponding zero bias calibration value into the temperature offset table, and releasing the mutex lock;

[0050] Acquire the mutex lock, delete the adjacent temperature values ​​of the current IMU temperature value from the empty offset list, and release the mutex lock;

[0051] If the current IMU temperature value is within a preset range, the IMU zero bias calibration value is obtained from the temperature offset table by a linear interpolation algorithm according to the current IMU temperature value;

[0052] If the current IMU temperature value exceeds the preset range, the closest temperature offset value is used as the current zero bias calibration value;

[0053] The obtained zero bias calibration value is applied to IMU data calibration, and the IMU data accuracy is improved by subtracting the zero bias value.

[0054] Furthermore, if the head mounted device is in a stationary state, multiple sets of IMU data are obtained and their average values ​​are calculated to obtain IMU zero drift data corresponding to the adjacent temperature values, including:

[0055] Get the IMU temperature value of the head mounted device, and search for the nearest target temperature value in the pre-established temperature offset table based on the temperature value;

[0056] Determine whether the adjacent target temperature value has corresponding IMU zero drift data in the temperature offset table. If not, add the adjacent target temperature value to the temperature list to be measured;

[0057] If the list of temperatures to be measured is not empty, the static state of the head mounted device is obtained;

[0058] By analyzing the angular velocity change of the IMU gyroscope per unit time, the acceleration change of the accelerometer per unit time, and the magnetic field strength change of the magnetometer per unit time, it is determined whether these parameters are all less than the preset static threshold value, so as to determine whether the device is in a static state;

[0059] If the headset is in a stationary state, collect at least 10 sets of IMU data at a certain frequency, perform median filtering on each data dimension, remove outliers that exceed a certain range of the median, and then calculate the average value of each data dimension to obtain the zero drift data of the IMU at the current temperature;

[0060] Add the newly acquired IMU zero drift data and its corresponding actual temperature value to the temperature offset table, and remove the temperature value from the temperature list to be measured;

[0061] According to the updated temperature offset table, the cubic spline interpolation method is used, with the IMU temperature value as the independent variable and the zero drift data as the dependent variable, to calculate the zero drift calibration data corresponding to the current IMU temperature value;

[0062] Get the real-time measurement data of the IMU and subtract the zero drift calibration data obtained in the previous step to get the calibrated IMU data;

[0063] Pass the calibrated IMU data to the algorithm modules that need to be used, such as the head posture tracking algorithm based on the extended Kalman filter and the hand tracking algorithm based on ICP, to improve their calculation accuracy;

[0064] If the list of temperatures to be measured is empty, the change of the IMU temperature value will continue to be detected. Once the temperature value change exceeds the preset temperature change threshold, the first step will be repeated to dynamically optimize the zero drift calibration data of the IMU.

[0065] Further, updating the adjacent temperature value and its corresponding IMU zero drift data to the temperature offset table, and removing the adjacent temperature value from the empty offset list, includes:

[0066] Determine the temperature range of the temperature offset table according to the IMU temperature range supported by the device, and set the temperature interval step of the temperature offset table to a predetermined value;

[0067] By reading a preset temperature offset table in a storage medium, a plurality of temperature values ​​contained in the temperature offset table and their corresponding IMU zero drift data are obtained;

[0068] Retrieving the temperature offset table, finding the temperature value where the IMU zero drift data is empty, and generating an empty offset list;

[0069] Use the IMU sensor to detect the current temperature of the device in real time and obtain the IMU temperature value;

[0070] Determine whether the adjacent temperature value of the IMU temperature value exists in the empty offset list, if so, determine whether the device is in a stationary state, otherwise, re-detect the current temperature of the device;

[0071] When the device is in a stationary state, the IMU data at the adjacent temperature value is collected, and the average value of the IMU data over a period of time is calculated as the IMU zero drift sampling value at the adjacent temperature value;

[0072] Update the adjacent temperature value and its corresponding IMU zero drift sampling value into the temperature offset table, and remove the adjacent temperature value from the empty offset list;

[0073] According to the updated temperature offset table, a linear interpolation algorithm is used to calculate the zero drift calibration value corresponding to the current IMU temperature value;

[0074] Subtracting the original data collected by the IMU sensor from the zero drift calibration value to obtain calibrated IMU data;

[0075] The calibrated IMU data is input into the inertial navigation algorithm and fused with the GNSS position information to calculate the real-time position, speed and attitude of the device.

[0076] Further, obtaining corresponding IMU zero drift data from the temperature offset table according to the current IMU temperature value includes:

[0077] Obtain the current temperature value detected by the IMU, and search for the target temperature value closest to the current temperature value in a pre-established temperature offset table;

[0078] If the target temperature value is found, the actual temperature value and IMU zero drift data corresponding to the target temperature value are obtained;

[0079] Determine whether the difference between the current temperature value and the actual temperature value is less than a preset temperature threshold;

[0080] If the difference is less than the preset temperature threshold, the IMU measurement value is calibrated using the IMU zero drift data to obtain a calibrated IMU data value;

[0081] If the difference is greater than or equal to the preset temperature threshold, determine the upper and lower adjacent temperature values ​​closest to the current temperature value, obtain the IMU zero drift data at the current temperature value by linear interpolation calculation according to the IMU zero drift data corresponding to the upper and lower adjacent temperature values, and calibrate the IMU measurement value using the IMU zero drift data obtained by linear interpolation calculation to obtain a calibrated IMU data value;

[0082] Pass the calibrated IMU data value to the subsequent algorithm for processing;

[0083] Determining whether the temperature offset table needs to be updated;

[0084] If updating is required, the current temperature value and the corresponding IMU zero drift data are written into the temperature offset table.

[0085] Further, the using the IMU zero drift data to calibrate the current IMU data to obtain calibrated IMU data includes:

[0086] Obtaining a current temperature value detected by an inertial measurement unit (IMU), and searching a pre-established temperature offset table for IMU zero drift data corresponding to a target temperature closest to the current temperature value;

[0087] If the target temperature closest to the current temperature value is not found in the temperature offset table, the current temperature value is added to an empty offset list;

[0088] Acquire gyroscope data, accelerometer data, and magnetometer data of the IMU, and determine whether the device is in a stationary state according to the acquired data;

[0089] If the device is in a stationary state and the current temperature value exists in the empty offset list, the IMU zero drift data at the current temperature is collected, where the IMU zero drift data includes the zero bias of the gyroscope, the zero bias of the accelerometer, and the zero bias of the magnetometer;

[0090] Writing the collected IMU zero drift data and the current temperature value into the temperature offset table, and removing the current temperature value from the empty offset list;

[0091] Acquire the data of the IMU, and preprocess the acquired IMU data, wherein the preprocessing includes removing outliers and smoothing filtering;

[0092] Acquire IMU zero drift data corresponding to the target temperature closest to the current temperature value from the temperature offset table, and calibrate the preprocessed IMU data using the acquired IMU zero drift data to obtain calibrated IMU data;

[0093] The calibrated IMU data is passed to an inertial navigation algorithm, and the inertial navigation algorithm performs motion tracking according to the calibrated IMU data to obtain a motion tracking result.

[0094] The technical solution provided by the embodiment of the present invention may have the following beneficial effects:

[0095] The present invention discloses a method for calibrating IMU data for a head-mounted device. The method solves the IMU zero drift problem by maintaining a temperature offset table, thereby improving the positioning accuracy of the head-mounted device. Specifically, the present invention first obtains a preset temperature offset table and identifies a target temperature value for missing IMU zero drift data. When it is detected that the current IMU temperature value is close to the temperature value of the missing data, and the head-mounted device is in a stationary state, multiple groups of IMU data are automatically collected and the average value is calculated, thereby supplementing and improving the temperature offset table. Finally, the corresponding zero drift data is searched according to the current IMU temperature value, and the IMU data is calibrated in real time. This dynamically updated calibration method can adapt to different usage environments, effectively eliminate the influence of temperature changes on the IMU accuracy, and improve the positioning and attitude estimation performance of the head-mounted device. BRIEF DESCRIPTION OF THE DRAWINGS

[0096] Figure 1 This is a flow chart of a method for optimizing temperature drift on a head mounted device according to the present invention.

[0097] Figure 2 A schematic diagram of a temperature drift optimization method on a head mounted device according to the present invention.

[0098] Figure 3 This is another schematic diagram of a temperature drift optimization method on a head mounted device of the present invention. DETAILED DESCRIPTION

[0099] In order to make the purpose, technical solutions and advantages of the present invention more clear, the present invention is described in detail below with reference to the accompanying drawings and specific embodiments.

[0100] like Figure 1 -3. In this embodiment, a method for optimizing temperature drift on a head mounted device may specifically include:

[0101] Step S101, obtaining a preset temperature offset table, wherein the temperature offset table includes a plurality of target temperature values ​​and corresponding IMU zero drift data.

[0102] Obtain a preset temperature offset table from a storage medium, wherein the temperature offset table includes multiple target temperature values ​​and corresponding IMU zero drift data; determine the temperature value not written into the IMU zero drift data according to the target temperature value in the temperature offset table, and save the temperature value not written into the IMU zero drift data into a temperature list; obtain the actual temperature value currently detected by the IMU, and determine whether the actual temperature value exists in the temperature offset table; if the actual temperature value exists in the temperature offset table, obtain the zero drift data corresponding to the actual temperature value in the temperature offset table; if the actual temperature value does not exist in the temperature offset table, determine whether the adjacent temperature value of the actual temperature value is in the temperature list; if the actual temperature value If the adjacent temperature value of the temperature value is in the temperature list, it is determined whether the device is currently in a stationary state; if the device is in a stationary state, the IMU is controlled to collect zero drift data corresponding to the actual temperature value in the stationary state; the collected actual temperature value and the corresponding zero drift data are written into the temperature offset table, and the actual temperature value with zero drift data written therein is deleted from the temperature list; according to the updated temperature offset table, the zero drift data corresponding to the target temperature value closest to the actual temperature value is obtained; the measurement value of the IMU is obtained, and the measurement value of the IMU is calculated with the obtained zero drift data to obtain the calibrated actual data value of the IMU; the calibrated actual data value is used for subsequent algorithm processing.

[0103] Specifically, the temperature offset table is a preset data structure used to store the zero drift data of the IMU (inertial measurement unit) at different temperatures. This table usually contains multiple target temperature values ​​and their corresponding zero drift data. For example, the table may contain temperature points such as 0℃, 10℃, 20℃, and the zero bias values ​​of the X, Y, and Z axis accelerometers and gyroscopes at each temperature point. In practical applications, it is first necessary to determine the temperature value for which zero drift data has not been written. Assuming that there are data of 0℃, 20℃, and 40℃ in the temperature offset table, temperature points such as 10℃ and 30℃ may be identified as temperature values ​​for which data has not been written and added to the temperature list. This process helps the system identify temperature points that need to be supplemented with data. When the IMU detects the actual temperature value, the system will determine whether the temperature exists in the temperature offset table. If it exists, the corresponding zero drift data is directly obtained; if it does not exist, further processing is required. For example, if the detected temperature is 25℃, and there are only data of 20℃ and 30℃ in the table, the system needs to determine whether the temperature of 25°

[0104] C is in the temperature list. If the temperature value adjacent to the actual temperature value is in the temperature list and the device is currently in a stationary state, the system will control the IMU to collect zero drift data at that temperature. The judgment of the stationary state may be based on whether the output of the accelerometer and gyroscope remains stable within a certain threshold. After the acquisition is completed, the new temperature-zero drift data pair will be written into the temperature offset table and deleted from the temperature list. This dynamic update mechanism enables the temperature offset table to be continuously improved and cover more temperature points. For example, if the system frequently works around 25°C, the zero drift data of 25°C will be added to the table to improve the accuracy of subsequent calibration. After obtaining the IMU measurement value, the system will find the closest target temperature value based on the current temperature and use the corresponding zero drift data for calibration. For example, if the current temperature is 23°C, the system may use the zero drift data of 20°C for calibration. The calibration process usually involves subtracting the zero drift value from the measured value to obtain more accurate actual data. The advantage of this method is that it can adapt to different working environment temperatures and improve the accuracy of the IMU under various conditions. By dynamically updating the temperature offset table, the system can gradually optimize its performance, especially in the temperature range that is frequently encountered. This is of great significance for applications that require high-precision inertial measurement, such as drone navigation and robot positioning. The whole process forms a closed-loop system: starting from the preset data, the temperature offset table is continuously improved through real-time measurement and update, and the data is used to improve the measurement accuracy. This method not only takes into account the need for initial calibration, but also provides a mechanism for improving accuracy in long-term use, reflecting the adaptive and self-optimizing characteristics of the smart sensor system.

[0105] Step S102, traverse the temperature offset table to determine whether the IMU zero drift data corresponding to each target temperature value is empty, and if so, save the target temperature value to the empty offset list.

[0106] Read a preset temperature offset table from a storage medium, wherein the temperature offset table includes multiple target temperature values ​​and corresponding IMU zero drift data; traverse the temperature offset table to determine whether the IMU zero drift data corresponding to each target temperature value is empty, and if so, save the target temperature value to an empty offset list; obtain the actual temperature value currently detected by the IMU, and determine the target temperature value closest to the actual temperature value according to a preset temperature interval step; determine whether the closest target temperature value exists in the empty offset list, and if so, use the original data of the IMU gyroscope to calculate the angular velocity offset, and obtain the angle change by integrating the gyroscope output data. If the angle change is less than a preset threshold, it is determined that the device is in a stationary state, otherwise the device is in a moving state; if the device is in a stationary state, obtain I The zero drift data of the MU is sampled multiple times at the current actual temperature value, and the zero drift calibration value of the IMU at the temperature is obtained by calculating the arithmetic mean of the multiple sampled data, and the obtained zero drift calibration value is written into the corresponding target temperature value in the temperature offset table, and the target temperature value is deleted from the empty offset list; if the device is in motion, or the closest target temperature value is not in the empty offset list, the IMU zero drift data corresponding to the target temperature value closest to the actual temperature value is obtained from the temperature offset table, and the IMU measurement value is calibrated using the zero drift data, and the calibration process is to subtract the zero drift value at the corresponding temperature from the angular velocity value output by the IMU to obtain the calibrated angular velocity data; the calibrated IMU angular velocity data is output to the attitude solution module for attitude solution to obtain the attitude information of the device.

[0107] Specifically, the temperature offset table is a key component of the inertial measurement unit (IMU) calibration system, which stores the zero drift data of the IMU at different temperatures. This table usually contains multiple temperature points and their corresponding zero drift values, such as 0℃, 10℃, 20℃, etc. When the system is initialized, this preset temperature offset table is read from the storage medium. The temperature offset table is traversed to identify which temperature points lack zero drift data. Assuming that there are data for 0℃, 20℃ and 40℃ in the table, but the data for 10℃ and 30℃ are empty, the system will add the temperatures corresponding to these empty values ​​to the empty offset list. This process helps the system identify the temperature points that need to be supplemented with data. When the IMU detects the actual temperature value, the system determines the closest target temperature value based on the preset temperature interval step. For example, if the temperature interval step is 10℃ and the actual temperature is 23℃, the system will identify 20℃ as the closest target temperature value. If this closest temperature value is in the empty offset list, the system needs to determine whether the device is stationary. This is achieved by analyzing the gyroscope data. The system calculates the angular velocity offset and obtains the angle change by integration. If the angle change is less than a preset threshold (e.g., 0.1 degrees / second), the device is considered stationary. In the stationary state, the system samples the IMU data multiple times to obtain an accurate zero drift value. For example, 100 samples may be collected in 5 seconds, and the average value is calculated as the zero drift calibration value at that temperature. This new calibration value is written to the temperature offset table and the corresponding temperature point is deleted from the empty offset list. If the device is in motion or the target temperature value is not in the empty offset list, the system uses the zero drift data of the closest temperature point in the temperature offset table for calibration. The calibration process is to subtract the zero drift value at the corresponding temperature from the angular velocity value output by the IMU to obtain more accurate angular velocity data. Finally, the calibrated IMU angular velocity data is transmitted to the attitude solution module. Attitude solution is the process of converting angular velocity data into device attitude information, usually expressed in quaternions or Euler angles. This process is critical for applications that require precise positioning and navigation, such as drone control or virtual reality devices. The advantage of this dynamic calibration method is that it can adapt to different working environment temperatures and improve the accuracy of the IMU under various conditions. By continuously updating the temperature offset table, the system can gradually optimize its performance, especially in the temperature range that is often encountered. This is of great significance for applications that require high-precision inertial measurement, such as robot positioning and self-driving cars. The whole process forms a closed-loop system: starting from the preset data, the temperature offset table is continuously improved through real-time measurement and update, and the data is used to improve the measurement accuracy. This method not only takes into account the need for initial calibration, but also provides a mechanism for improving accuracy in long-term use, reflecting the adaptive and self-optimizing characteristics of the smart sensor system.

[0108] Step S103, obtaining the current IMU temperature value, and determining whether the adjacent temperature value of the current IMU temperature value exists in the empty offset list.

[0109] The current temperature value of the IMU temperature sensor is obtained, and the temperature value is saved as the current IMU temperature value; whether the current IMU temperature value is within a preset temperature range is determined, and if not, an alarm is issued and the program is exited; the adjacent temperature value of the current IMU temperature value is calculated according to the preset temperature interval step; whether the adjacent temperature value exists in a pre-established empty offset list is determined; if the adjacent temperature value exists in the empty offset list, the original acceleration and angular velocity data of the IMU are obtained, the offset of the original data is calculated, and the offset is used as the zero drift data corresponding to the current IMU temperature value, and saved in a pre-established temperature offset table, and the adjacent temperature value is deleted from the empty offset list; if the adjacent temperature value does not exist in the empty offset list, the zero drift data corresponding to the temperature value closest to the current IMU temperature value is obtained from the temperature offset table; the original acceleration and angular velocity data of the IMU are calibrated using the zero drift data to obtain the calibrated IMU data; the calibrated IMU data is subjected to attitude solution to obtain the attitude data of the IMU; the attitude data is subjected to position and velocity solution to realize the motion tracking function.

[0110] Specifically, temperature compensation of the inertial measurement unit (IMU) is the key to improving navigation accuracy. First, the current temperature value of the IMU temperature sensor is obtained, which is usually achieved through a built-in temperature sensor. For example, a temperature of 23.5°C is measured when an IMU is working. Then, it is determined whether the temperature is within a preset range, such as -40°C to 85°C, to ensure that the IMU operates within its designed operating temperature range. If the temperature is out of range, the system will alarm and stop working to prevent inaccurate data from affecting the navigation results. According to the preset temperature interval step, such as 5°C, the adjacent temperature value is calculated. In the above example, the adjacent temperature value of 23.5°C is 25°C. This method simplifies the temperature compensation process and reduces storage and calculation requirements. The purpose of determining whether the adjacent temperature value is in the empty offset list is to determine whether zero bias calibration is required. If it is in the list, it means that the zero bias data of the temperature point has not been obtained. At this point, the system will obtain the original acceleration and angular velocity data of the IMU and calculate the offset. For example, in a stationary state, the accelerometer should ideally only measure gravity acceleration, and the gyroscope should measure zero angular velocity. The actual measured deviation is the zero bias. The calculated zero bias data is saved in the temperature offset table, and the temperature value is deleted from the empty offset list. This process gradually improves the temperature offset table and improves the measurement accuracy at different temperatures. If the adjacent temperature value is not in the empty offset list, the zero bias data corresponding to the closest temperature value is obtained from the temperature offset table. For example, if the data at 25°C is not available, the data at 20°C or 30°C may be used. The IMU raw data is calibrated using the acquired zero bias data. This usually involves a simple subtraction operation, such as the calibrated angular velocity equals the raw angular velocity minus the zero bias value. This step significantly improves the accuracy of the IMU data, especially in an environment with large temperature changes. The calibrated IMU data is passed to the Kalman filter module for attitude solution. The Kalman filter is a recursive estimation algorithm that can effectively fuse data from different sensors, such as gyroscopes, accelerometers, and magnetometers, to obtain more accurate attitude estimates. This process usually outputs attitude information represented by quaternions or Euler angles. Finally, the attitude data is passed to the inertial navigation module for position and velocity solution. This step calculates the current position and velocity of the device by integrating the angular velocity and acceleration data, combined with the initial position and velocity information. This method can achieve high-precision motion tracking in a short period of time, but due to the accumulation of errors during the integration process, other sensors (such as GPS) are required for long-term use. The whole process forms a closed-loop system that continuously optimizes the performance of the IMU at different temperatures. This dynamic calibration and compensation method is of great significance for applications that require high-precision inertial measurement, such as drones, robots, and virtual reality devices. It can adapt to different working environments and improve the reliability and accuracy of the system under various conditions.

[0111] Step S104: If the adjacent temperature value of the current IMU temperature value exists in the empty offset list, it is determined whether the head mounted device is in a stationary state.

[0112] Obtain the current IMU temperature value, compare the current IMU temperature value with the preset temperature interval step, and obtain the adjacent temperature value of the current IMU temperature value; use the binary search method to retrieve the adjacent temperature value of the current IMU temperature value in the pre-established empty offset list, if it exists, execute the following steps, otherwise wait for a preset time and then re-obtain the current IMU temperature value; obtain raw data through the IMU gyroscope, calculate the angle change within a period of time, if the angle change is less than a preset threshold, determine that the head-mounted device is in a stationary state, and execute the following steps; otherwise wait for a preset time and then re-obtain the raw data of the IMU gyroscope; obtain a mutex lock to protect the pre-established temperature offset table; collect multiple sets of IMU zero bias data According to the present invention, the zero bias calibration value of the IMU at the current temperature is obtained by calculating the arithmetic mean; the current IMU temperature value and the corresponding zero bias calibration value are written into the temperature offset table, and the mutex lock is released; the mutex lock is acquired, the adjacent temperature values ​​of the current IMU temperature value are deleted from the empty offset list, and the mutex lock is released; if the current IMU temperature value is within a preset range, the IMU zero bias calibration value is obtained from the temperature offset table by a linear interpolation algorithm according to the current IMU temperature value; if the current IMU temperature value exceeds the preset range, the closest temperature offset value is used as the current zero bias calibration value; the obtained zero bias calibration value is applied to the IMU data calibration, and the IMU data accuracy is improved by subtracting the zero bias value.

[0113] Specifically, temperature compensation of the inertial measurement unit (IMU) is a key link to improve navigation accuracy. First, the current temperature value of the IMU is obtained, which is usually achieved through the built-in temperature sensor. For example, the temperature measured by an IMU during operation is 23.5°C. Then, this temperature value is compared with the preset temperature interval step (such as 5°C) to obtain the adjacent temperature value of 25°C. This method simplifies the temperature compensation process and reduces storage and calculation requirements. The binary search method is used to retrieve the adjacent temperature value in the pre-established empty offset list to quickly determine whether zero bias calibration is required. If 25°C exists in the list, it means that the zero bias data of the temperature point has not been obtained and calibration is required. If it does not exist, the system will wait for a period of time (such as 10 seconds) before re-acquiring the temperature value. This is to adapt to possible temperature changes. The raw data is obtained through the IMU gyroscope, and the angle change within a period of time (such as 1 second) is calculated. Assuming that the preset threshold is 0.1 degrees, if the angle change is less than this value, it is judged that the device is in a stationary state. This step ensures that calibration is performed in a stationary state and improves the reliability of the data. If the stationary condition is not met, the system will wait for a period of time (such as 5 seconds) before retesting. Obtain a mutex lock to protect the temperature offset table to prevent data inconsistency caused by simultaneous access by multiple threads. Then collect multiple sets of IMU zero bias data (such as 100 sets) and calculate the arithmetic mean to obtain the zero bias calibration value of the IMU at the current temperature. For example, at 25°C, the zero bias value of the accelerometer X-axis may be 0.02m / s 2 , Y axis is -0.015m / s 2 , Z axis: 0.03m / s 2. Write the temperature value (25℃) and the corresponding zero bias calibration value into the temperature offset table, and release the mutex lock. This process improves the temperature offset table and lays the foundation for accurate measurement at different temperatures. Subsequently, the mutex lock is acquired again, the adjacent temperature value of 25℃ is deleted from the empty offset list, and the lock is released. This ensures the consistency and integrity of the data. In actual use, if the current IMU temperature value (such as 23.5℃) is within the preset range (such as -40℃ to 85℃), the system will obtain the IMU zero bias calibration value from the temperature offset table through a linear interpolation algorithm. For example, data at 20℃ and 25℃ may be used for interpolation calculation. If the temperature exceeds the preset range, the system will use the most recent temperature offset value as the current zero bias calibration value to ensure that the system can continue to work, while reminding the user that the ambient temperature is abnormal. Finally, the obtained zero bias calibration value is applied to the IMU data calibration. For example, if the original angular velocity data is 0.05rad / s and the zero bias calibration value is 0.01rad / s, the calibrated angular velocity is 0.04rad / s. This process significantly improves the accuracy of IMU data, especially in environments with large temperature changes, which is of great significance for applications that require high-precision inertial measurements, such as drones, robots and virtual reality devices.

[0114] Step S105, if the head mounted device is in a stationary state, multiple sets of IMU data are acquired and their average values ​​are calculated to obtain IMU zero drift data corresponding to the adjacent temperature values.

[0115] The IMU temperature value of the head-mounted device is obtained, and the adjacent target temperature value is searched in the pre-established temperature offset table according to the temperature value. It is determined whether the corresponding IMU zero drift data of the adjacent target temperature value already exists in the temperature offset table. If not, the adjacent target temperature value is added to the list of temperatures to be measured. If the list of temperatures to be measured is not empty, the static state of the head-mounted device is obtained. By analyzing the angular velocity change of the IMU gyroscope per unit time, the acceleration change of the accelerometer per unit time, and the magnetic field intensity change of the geomagnetometer per unit time, it is determined whether these parameters are all less than the preset static threshold value, so as to determine whether the device is in a static state. If the head-mounted device is in a static state, at least 10 groups of IMU data are collected at a certain frequency, and each data dimension is median filtered to remove abnormal values ​​beyond a certain range of the median, and then the average value of each data dimension is calculated to obtain the zero drift data of the IMU at the current temperature. The newly obtained IMU zero drift data and its corresponding actual temperature value are added to the temperature offset table, and the temperature value is removed from the list of temperatures to be measured. According to the updated temperature offset table, the cubic spline interpolation method is used, with the IMU temperature value as the independent variable and the zero drift data as the dependent variable, to calculate the zero drift calibration data corresponding to the current IMU temperature value. Obtain the real-time measurement data of the IMU, and subtract the zero drift calibration data obtained in the previous step to obtain the calibrated IMU data. Pass the calibrated IMU data to the algorithm module that needs to be used, such as the head posture tracking algorithm based on the extended Kalman filter, the hand tracking algorithm based on ICP, etc., to improve its calculation accuracy. If the temperature list to be measured is empty, continue to detect the change of the IMU temperature value. Once the temperature value change exceeds the preset temperature change threshold, repeat the first step to dynamically optimize the zero drift calibration data of the IMU.

[0116] Specifically, the IMU temperature compensation of the head-mounted device is the key to improving the accuracy of the virtual reality experience. First, obtain the IMU temperature value, such as 23.5°C. According to the preset temperature interval (such as 5°C), determine the target temperature of 25°C. Check in the temperature offset table whether there is corresponding zero drift data for 25°C. If not, add 25°C to the list of temperatures to be measured. When the list of temperatures to be measured is not empty, it is necessary to determine the static state of the device. This is achieved by analyzing the changes in the data of each IMU sensor: for example, the angular velocity change of the gyroscope is less than 0.1° / s, and the acceleration change of the accelerometer is less than 0.05m / s 2, if the change in the magnetic field strength of the geomagnetic meter is less than 0.1μT, the device is considered to be stationary. This multi-dimensional judgment can effectively avoid misjudgment, such as the situation in which the elevator appears to be stationary but is actually moving. When the device is stationary, 15 sets of IMU data are collected at a frequency of 100Hz. A median filter is applied to each dimension to remove outliers that deviate from the median by ±20% to improve data reliability. The average value is then calculated to obtain the zero drift data. For example, at 25°C, the zero drift of the gyroscope X-axis is 0.02° / s, and the zero drift of the accelerometer Y-axis is 0.015m / s 2 . These data are added to the temperature offset table together with the actual temperature (25°C) and removed from the list to be tested. Using the updated temperature offset table, the zero drift calibration data of the current temperature is calculated using the cubic spline interpolation method. This method can better reflect the nonlinear relationship between temperature and zero drift than linear interpolation, and improves the calibration accuracy. For example, at 23.5°C, the gyroscope X-axis zero drift calibration value of 0.018° / s may be obtained. The real-time IMU data is subtracted from the zero drift calibration data to obtain the calibrated IMU data. These data are passed to various algorithm modules, such as the head posture tracking algorithm of the extended Kalman filter. Through accurate zero drift compensation, the accuracy of head movement prediction can be significantly improved, the "drift" phenomenon can be reduced, and the user's immersion in the virtual environment can be enhanced. When the list of temperatures to be tested is empty, the system continuously monitors the IMU temperature changes. If the temperature change exceeds the preset threshold (such as 1°C), the temperature compensation process is re-executed. This dynamic optimization mechanism can adapt to slow changes in ambient temperature, such as temperature changes when using the device from indoors to outdoors, to ensure calibration accuracy during long-term use. The whole process forms a closed-loop system, which continuously optimizes the IMU zero drift calibration data and provides a high-precision motion tracking foundation for virtual reality applications. This is especially important for applications that require precise spatial positioning, such as virtual surgery training or precision industrial operation simulation. Through accurate IMU data calibration, the simulation degree and operation accuracy of these applications can be significantly improved, thereby improving training effects or operation safety.

[0117] Step S106, updating the adjacent temperature value and its corresponding IMU zero drift data into the temperature offset table, and removing the adjacent temperature value from the empty offset list.

[0118] According to the IMU temperature range supported by the device, determine the temperature range of the temperature offset table, and set the temperature interval step of the temperature offset table to a predetermined value; obtain multiple temperature values ​​contained in the temperature offset table and their corresponding IMU zero drift data by reading the preset temperature offset table in the storage medium; search the temperature offset table to find the temperature value where the IMU zero drift data is empty, and generate an empty offset list; use the IMU sensor to detect the current temperature of the device in real time to obtain the IMU temperature value; determine whether the adjacent temperature value of the IMU temperature value exists in the empty offset list, if so, determine whether the device is in a stationary state, otherwise, re-detect the current temperature of the device; when the device is in a stationary state, Collect IMU data at the adjacent temperature value, and calculate the average value of the IMU data within a period of time as the IMU zero drift sampling value at the adjacent temperature value; update the adjacent temperature value and its corresponding IMU zero drift sampling value to the temperature offset table, and remove the adjacent temperature value from the empty offset list; according to the updated temperature offset table, use a linear interpolation algorithm to calculate the zero drift calibration value corresponding to the current IMU temperature value; subtract the original data collected by the IMU sensor from the zero drift calibration value to obtain the calibrated IMU data; input the calibrated IMU data into the inertial navigation algorithm, fuse it with the GNSS position information, and calculate the real-time position, speed and attitude of the device.

[0119] Specifically, IMU temperature compensation is a key technology to improve the accuracy of inertial navigation systems. First, determine the range of the temperature offset table according to the IMU temperature range supported by the device, such as -20°C to 60°C, and set the temperature interval step, for example, 5°C. This provides sufficiently dense calibration points throughout the operating temperature range without causing excessive storage and computing burdens. Read the preset temperature offset table from the storage medium to obtain multiple temperature values ​​and their corresponding IMU zero drift data. For example, at 25°C, the gyroscope X-axis zero drift is 0.02° / s, and the accelerometer Y-axis zero drift is 0.015m / s 2 . Retrieve the temperature offset table, find the temperature values ​​where the zero drift data is empty, and generate an empty offset list. These empty values ​​may be caused by incomplete initial calibration or environmental changes and need to be filled in actual use. The IMU sensor detects the current temperature of the device in real time to obtain the IMU temperature value. Assuming the current temperature is 23.5°C, the system will determine whether its adjacent temperature value of 25°C is in the empty offset list. If so, a stationary state judgment is required; otherwise, continue to monitor temperature changes. The stationary state judgment is usually based on multiple sensor data, such as a gyroscope angular velocity change of less than 0.1° / s and an accelerometer acceleration change of less than 0.05m / s 2Etc. This multi-dimensional judgment can effectively avoid misjudgment, such as the situation in which the elevator seems to be stationary but is actually moving. When the device is stationary, the system collects IMU data at the adjacent temperature value and calculates the average value over a period of time as the zero drift sampling value. For example, in a stationary state at 25°C, IMU data with a frequency of 100Hz may be collected for 15 seconds to obtain 1500 sets of data. These data are median filtered to remove abnormal values ​​that deviate from the median by ±20% to improve data reliability. Then the average value is calculated to obtain the zero drift data, such as the gyroscope X-axis zero drift of 0.018° / s. The newly obtained adjacent temperature value and its corresponding IMU zero drift sampling value are updated to the temperature offset table, and the temperature value is removed from the empty offset list. This process continuously improves the temperature offset table to more accurately reflect the zero drift characteristics of the device at different temperatures. According to the updated temperature offset table, the linear interpolation algorithm is used to calculate the zero drift calibration value corresponding to the current IMU temperature value. Although linear interpolation is simple, it can usually provide a sufficiently accurate approximation within a small range. The raw data collected by the IMU sensor is subtracted from the zero drift calibration value to obtain the calibrated IMU data. This step effectively eliminates the system error caused by temperature changes and improves the accuracy of the data. Finally, the calibrated IMU data is input into the inertial navigation algorithm and fused with the GNSS position information to calculate the real-time position, speed and attitude of the device. This fusion of IMU and GNSS not only improves the positioning accuracy, but also enhances the robustness of the system when the GNSS signal is weak or interrupted. Through this dynamic temperature compensation mechanism, the system can adapt to different usage environments, such as temperature changes from indoors to outdoors, ensuring calibration accuracy during long-term use. This is especially important for applications that require high-precision positioning, such as drone navigation, augmented reality, etc., which can significantly improve user experience and system performance.

[0120] Step S107, acquiring corresponding IMU zero drift data from the temperature offset table according to the current IMU temperature value.

[0121] Obtain the current temperature value detected by the IMU, and search for the target temperature value closest to the current temperature value in a pre-established temperature offset table; if the target temperature value is found, obtain the actual temperature value and IMU zero drift data corresponding to the target temperature value; determine whether the difference between the current temperature value and the actual temperature value is less than a preset temperature threshold; if the difference is less than the preset temperature threshold, use the IMU zero drift data to calibrate the IMU measurement value to obtain a calibrated IMU data value; if the difference is greater than or equal to the preset temperature threshold, determine the upper and lower adjacent temperature values ​​closest to the current temperature value, and obtain the IMU zero drift data at the current temperature value through linear interpolation calculation based on the IMU zero drift data corresponding to the upper and lower adjacent temperature values, and use the IMU zero drift data obtained by linear interpolation calculation to calibrate the IMU measurement value to obtain a calibrated IMU data value; pass the calibrated IMU data value to a subsequent algorithm for processing; determine whether the temperature offset table needs to be updated; if it needs to be updated, write the current temperature value and the corresponding IMU zero drift data into the temperature offset table.

[0122] Specifically, IMU temperature compensation is a key technology to improve the accuracy of inertial navigation systems. First, the system obtains the current temperature value detected by the IMU, such as 23.7°C. Look for the closest target temperature value in the pre-established temperature offset table, assuming it is 25°C. This temperature offset table usually covers the entire operating temperature range of the device, such as -20°C to 60°C, with an interval of 5°C. After obtaining the target temperature value, the system reads its corresponding actual temperature value and IMU zero drift data. The actual temperature value may differ slightly from the target temperature value, such as 24.8°C, due to the actual measurement results during the calibration process. IMU zero drift data includes the deviations of the gyroscope and accelerometer on each axis, such as the gyroscope X-axis zero drift of 0.02° / s and the accelerometer Y-axis zero drift of 0.015m / s 2. Next, the system determines whether the difference between the current temperature value and the actual temperature value is less than a preset temperature threshold, such as 0.5°C. This threshold is set based on the temperature sensitivity of the IMU and the required accuracy requirements. If the difference is less than the threshold, the IMU zero drift data at that temperature point is used directly for calibration. This method can provide fast and sufficiently accurate calibration when the temperature changes are not large. If the difference is greater than or equal to the threshold, the system will determine the upper and lower adjacent temperature values ​​closest to the current temperature value, such as 20°C and 25°C. Then the IMU zero drift data at the current temperature value is calculated by linear interpolation. Linear interpolation assumes that there is a linear relationship between temperature and zero drift within a small range, which is a reasonable approximation in most cases. For example, if the gyroscope X-axis zero drift is 0.018° / s at 20°C and 0.022° / s at 25°C, then the interpolation result at 23.7°C is approximately 0.0214° / s. The calibration process is to subtract the calculated zero drift data from the IMU measurement. This dynamic calibration method can adapt to temperature changes and improve navigation accuracy. The calibrated IMU data will be passed to subsequent algorithms, such as the Kalman filter, for attitude solution and position estimation. The system will also determine whether the temperature offset table needs to be updated. The update strategy may be based on the time interval, the temperature change amplitude, or the calibration accuracy assessment. If the decision is made to update, the current temperature value and the corresponding IMU zero drift data will be written to the temperature offset table. This dynamic update mechanism enables the system to adapt to long-term changes in IMU characteristics, such as aging effects. The advantages of this temperature compensation method are its flexibility and accuracy. It can handle nonlinear temperature effects and adapt to different usage environments, such as temperature changes from indoors to outdoors. For applications that require high-precision positioning, such as drone navigation or augmented reality, this method can significantly improve system performance and user experience. By continuously optimizing the temperature offset table, the system can also gradually improve its long-term stability and reliability.

[0123] Step S108, using the IMU zero drift data to calibrate the current IMU data to obtain calibrated IMU data.

[0124] The current temperature value detected by the inertial measurement unit IMU is obtained, and the IMU zero drift data corresponding to the target temperature closest to the current temperature value is searched in the pre-established temperature offset table; if the target temperature closest to the current temperature value is not found in the temperature offset table, the current temperature value is added to the empty offset list; the gyroscope data, accelerometer data and magnetometer data of the IMU are obtained, and whether the device is in a stationary state is determined according to the obtained data; if the device is in a stationary state and the current temperature value exists in the empty offset list, the IMU zero drift data at the current temperature is collected, and the IMU zero drift data includes the zero bias of the gyroscope, the zero bias of the accelerometer and the zero bias of the magnetometer. Zero bias; write the collected IMU zero drift data and the current temperature value into the temperature offset table, and remove the current temperature value from the empty offset list; obtain the IMU data, and preprocess the obtained IMU data, wherein the preprocessing includes removing abnormal values ​​and smoothing filtering; obtain the IMU zero drift data corresponding to the target temperature closest to the current temperature value from the temperature offset table, and use the obtained IMU zero drift data to calibrate the preprocessed IMU data to obtain calibrated IMU data; pass the calibrated IMU data to the inertial navigation algorithm, and the inertial navigation algorithm performs motion tracking according to the calibrated IMU data to obtain a motion tracking result.

[0125] Specifically, inertial measurement unit (IMU) temperature compensation is a key technology to improve navigation accuracy. First, the system obtains the current temperature value detected by the IMU, such as 23.7°C. Find the closest target temperature value in the pre-established temperature offset table, assuming it is 25°C. This temperature offset table usually covers the entire operating temperature range of the device, such as -20°C to 60°C, with an interval of 5°C. If no suitable target temperature is found, the system adds the current temperature value to the empty offset list for subsequent data collection. Next, the system obtains the gyroscope, accelerometer, and magnetometer data of the IMU to determine whether the device is stationary. The stationary state judgment can be based on multiple indicators, such as the gyroscope angular velocity is lower than the threshold (such as 0.1° / s), the accelerometer measurement value is close to the gravity acceleration (about 9.8m / s 2 ) and the fluctuation is less than the threshold (such as 0.05m / s 2 ), stable geomagnetic readings, etc. This multi-sensor fusion judgment can improve the reliability of static state recognition. When the device is in a static state and the current temperature value exists in the empty offset list, the system will collect IMU zero drift data. This includes the zero bias of the gyroscope (such as X-axis 0.02° / s, Y-axis -0.015° / s, Z-axis 0.01°

[0126] / s), zero bias of accelerometer (such as X-axis 0.01m / s 2, Y axis - 0.008m / s 2 , Z axis 0.005m / s 2 ) and the zero bias of the geomagnetic sensor (such as 2μT for the X axis, -1μT for the Y axis, and 3μT for the Z axis). The acquisition process usually takes a certain amount of time (such as 30 seconds) to obtain stable and reliable data. The collected IMU zero drift data and the current temperature value are written into the temperature offset table, and the temperature value is removed from the empty offset list. This dynamic update mechanism enables the system to adapt to long-term changes in IMU characteristics, such as drift caused by aging effects or environmental factors. In actual use, the system performs preprocessing after acquiring the IMU data. Preprocessing includes removing outliers and smoothing filtering. Outlier removal can use median filtering or thresholding, such as removing data that exceeds ±3 times the standard deviation of the mean. Smoothing filtering can use moving average or low-pass filter to reduce the impact of high-frequency noise. After preprocessing, the system obtains the IMU zero drift data corresponding to the target temperature closest to the current temperature value from the temperature offset table. If the current temperature is 23.7℃, the system may use 25℃ zero drift data, or perform linear interpolation between 20℃ and 25℃. Use these zero drift data to calibrate the IMU data to obtain more accurate measurements. Finally, the calibrated IMU data is passed to the inertial navigation algorithm. The algorithm may use methods such as extended Kalman filters or complementary filters to fuse gyroscope, accelerometer and magnetometer data to achieve high-precision attitude estimation and position tracking. This temperature compensation and data fusion method can significantly improve the performance of the navigation system in different temperature environments, which is crucial for applications that require precise positioning such as drone navigation, augmented reality or robot positioning.

[0127] The above describes the specific embodiments of the present invention. It should be understood that the present invention is not limited to the above specific embodiments, and those skilled in the art can make various changes or modifications within the scope of the claims, which does not affect the essence of the present invention. In the absence of conflict, the embodiments of the present application and the features in the embodiments can be combined with each other arbitrarily.

Claims

1. A method for optimizing temperature drift on a head mounted device, characterized in that: The method comprises: Obtain a preset temperature offset table, wherein the temperature offset table includes multiple target temperature values ​​and corresponding IMU zero drift data; Traverse the temperature offset table to determine whether the IMU zero drift data corresponding to each target temperature value is empty. If it is empty, save the target temperature value to the empty offset list; Obtain the current IMU temperature value, and determine whether the adjacent temperature value of the current IMU temperature value exists in the empty offset list; If the adjacent temperature value of the current IMU temperature value exists in the empty offset list, determining whether the head mounted device is in a stationary state; If the head mounted device is in a stationary state, multiple sets of IMU data are obtained and their average values ​​are calculated to obtain IMU zero drift data corresponding to the adjacent temperature values; Update the adjacent temperature value and its corresponding IMU zero drift data into the temperature offset table, and remove the adjacent temperature value from the empty offset list; Acquire corresponding IMU zero drift data from the temperature offset table according to the current IMU temperature value; The IMU zero drift data is used to calibrate the current IMU data to obtain calibrated IMU data.

2. The method according to claim 1, characterized in that: The obtaining of a preset temperature offset table, wherein the temperature offset table includes a plurality of target temperature values ​​and corresponding IMU zero drift data, includes: Acquire a preset temperature offset table from a storage medium, wherein the temperature offset table includes a plurality of target temperature values ​​and corresponding IMU zero drift data; According to the target temperature value in the temperature offset table, determining the temperature value in which the IMU zero drift data is not written, and saving the temperature value in which the IMU zero drift data is not written to the temperature list; Obtain the actual temperature value currently detected by the IMU, and determine whether the actual temperature value exists in the temperature offset table; If the actual temperature value exists in the temperature offset table, obtaining zero drift data corresponding to the actual temperature value in the temperature offset table; If the actual temperature value does not exist in the temperature offset table, determining whether an adjacent temperature value of the actual temperature value is in the temperature list; If the temperature value adjacent to the actual temperature value is in the temperature list, determining whether the device is currently in a stationary state; If the device is in a stationary state, controlling the IMU to collect zero drift data corresponding to the actual temperature value in the stationary state; Writing the collected actual temperature value and the corresponding zero drift data into the temperature offset table, and deleting the actual temperature value into which the zero drift data has been written from the temperature list; According to the updated temperature offset table, obtaining zero drift data corresponding to the target temperature value closest to the actual temperature value; The measured value of the IMU is obtained, and the measured value of the IMU is calculated with the obtained zero drift data to obtain the actual data value of the IMU after calibration.

3. The method according to claim 1, characterized in that The traversing the temperature offset table to determine whether the IMU zero drift data corresponding to each target temperature value is empty, and if so, saving the target temperature value to the empty offset list, includes: Reading a preset temperature offset table from a storage medium, wherein the temperature offset table includes a plurality of target temperature values ​​and corresponding IMU zero drift data; Traverse the temperature offset table to determine whether the IMU zero drift data corresponding to each target temperature value is empty, and if so, save the target temperature value to the empty offset list; Obtain the actual temperature value currently detected by the IMU, and determine the target temperature value closest to the actual temperature value according to the preset temperature interval step; Determine whether the closest target temperature value exists in the empty offset list. If so, use the original data of the IMU gyroscope to calculate the angular velocity offset, and obtain the angle change by integrating the gyroscope output data. If the angle change is less than a preset threshold, determine that the device is in a stationary state, otherwise the device is in a moving state. If the device is in a stationary state, the zero drift data of the IMU sampled multiple times at the current actual temperature value is obtained, and the zero drift calibration value of the IMU at the temperature is obtained by calculating the arithmetic mean of the multiple sampled data, and the obtained zero drift calibration value is written into the corresponding target temperature value in the temperature offset table, and the target temperature value is deleted from the empty offset list; If the device is in motion, or the closest target temperature value is not in the empty offset list, the IMU zero drift data corresponding to the target temperature value closest to the actual temperature value is obtained from the temperature offset table, and the IMU measurement value is calibrated using the zero drift data. The calibration process is to subtract the zero drift value at the corresponding temperature from the angular velocity value output by the IMU to obtain the calibrated angular velocity data; The calibrated IMU angular velocity data is used for attitude calculation to obtain the attitude information of the device.

4. The method according to claim 1, characterized in that: The obtaining of the current IMU temperature value and determining whether an adjacent temperature value of the current IMU temperature value exists in the empty offset list includes: Get the current temperature value of the IMU temperature sensor and save it as the current IMU temperature value; Determine whether the current IMU temperature value is within a preset temperature range, if not, alarm and exit the program; Calculate the adjacent temperature values ​​of the current IMU temperature value according to the preset temperature interval step; Determine whether the adjacent temperature value exists in a pre-established empty offset list; If the adjacent temperature value exists in the empty offset list, the original acceleration and angular velocity data of the IMU are obtained, the offset of the original data is calculated, the offset is used as the zero drift data corresponding to the current IMU temperature value, and is saved in a pre-established temperature offset table, and the adjacent temperature value is deleted from the empty offset list; If the adjacent temperature value does not exist in the empty offset list, obtaining zero drift data corresponding to the temperature value closest to the current IMU temperature value from the temperature offset table; Using the zero drift data to calibrate the original acceleration and angular velocity data of the IMU to obtain calibrated IMU data; Performing attitude calculation on the calibrated IMU data to obtain attitude data of the IMU; The position and speed of the posture data are calculated to achieve motion tracking function.

5. The method according to claim 1, characterized in that If the adjacent temperature value of the current IMU temperature value exists in the empty offset list, determining whether the head mounted device is in a stationary state includes: Obtain a current IMU temperature value, compare the current IMU temperature value with a preset temperature interval step, and obtain a temperature value close to the current IMU temperature value; Use binary search to retrieve the adjacent temperature value of the current IMU temperature value in the pre-established empty offset list, and if it exists, execute the following steps, otherwise wait for a preset time and then re-acquire the current IMU temperature value; Obtaining raw data through the IMU gyroscope, calculating the angle change within a period of time, and if the angle change is less than a preset threshold, determining that the head mounted device is in a stationary state, and executing the following steps; Otherwise, reacquire the raw data of the IMU gyroscope after waiting for a preset time; Acquire a mutex lock to protect the pre-established temperature offset table; Collect multiple sets of IMU zero bias data and calculate the arithmetic mean to obtain the zero bias calibration value of the IMU at the current temperature; Writing the current IMU temperature value and the corresponding zero bias calibration value into the temperature offset table, and releasing the mutex lock; Acquire the mutex lock, delete the adjacent temperature values ​​of the current IMU temperature value from the empty offset list, and release the mutex lock; If the current IMU temperature value is within a preset range, the IMU zero bias calibration value is obtained from the temperature offset table by a linear interpolation algorithm according to the current IMU temperature value; If the current IMU temperature value exceeds the preset range, the closest temperature offset value is used as the current zero bias calibration value; The obtained zero bias calibration value is applied to IMU data calibration, and the IMU data accuracy is improved by subtracting the zero bias value.

6. The method according to claim 1, characterized in that If the head mounted device is in a stationary state, multiple sets of IMU data are obtained and their average values ​​are calculated to obtain IMU zero drift data corresponding to the adjacent temperature values, including: Get the IMU temperature value of the head mounted device, and search for the nearest target temperature value in the pre-established temperature offset table based on the temperature value; Determine whether the adjacent target temperature value has corresponding IMU zero drift data in the temperature offset table. If not, add the adjacent target temperature value to the temperature list to be measured; If the list of temperatures to be measured is not empty, the static state of the head mounted device is obtained; By analyzing the angular velocity change of the IMU gyroscope per unit time, the acceleration change of the accelerometer per unit time, and the magnetic field strength change of the magnetometer per unit time, it is determined whether these parameters are all less than the preset static threshold value, so as to determine whether the device is in a static state; If the headset is in a stationary state, collect at least 10 sets of IMU data at a certain frequency, perform median filtering on each data dimension, remove outliers that exceed a certain range of the median, and then calculate the average value of each data dimension to obtain the zero drift data of the IMU at the current temperature; Add the newly acquired IMU zero drift data and its corresponding actual temperature value to the temperature offset table, and remove the temperature value from the temperature list to be measured; According to the updated temperature offset table, the cubic spline interpolation method is used, with the IMU temperature value as the independent variable and the zero drift data as the dependent variable, to calculate the zero drift calibration data corresponding to the current IMU temperature value; Get the real-time measurement data of the IMU and subtract the zero drift calibration data obtained in the previous step to get the calibrated IMU data; Pass the calibrated IMU data to the algorithm modules that need to be used, such as the head posture tracking algorithm based on the extended Kalman filter and the hand tracking algorithm based on ICP, to improve their calculation accuracy; If the list of temperatures to be measured is empty, the change of the IMU temperature value will continue to be detected. Once the temperature value change exceeds the preset temperature change threshold, the first step will be repeated to dynamically optimize the zero drift calibration data of the IMU.

7. The method according to claim 1, characterized in that The updating of the adjacent temperature value and its corresponding IMU zero drift data into the temperature offset table, and removing the adjacent temperature value from the empty offset list, comprises: Determine the temperature range of the temperature offset table according to the IMU temperature range supported by the device, and set the temperature interval step of the temperature offset table to a predetermined value; By reading a preset temperature offset table in a storage medium, a plurality of temperature values ​​contained in the temperature offset table and their corresponding IMU zero drift data are obtained; Retrieving the temperature offset table, finding the temperature value where the IMU zero drift data is empty, and generating an empty offset list; Use the IMU sensor to detect the current temperature of the device in real time and obtain the IMU temperature value; Determine whether the adjacent temperature value of the IMU temperature value exists in the empty offset list, and if so, determine whether the device is in a stationary state, otherwise, re-detect the current temperature of the device; When the device is in a stationary state, the IMU data at the adjacent temperature value is collected, and the average value of the IMU data over a period of time is calculated as the IMU zero drift sampling value at the adjacent temperature value; Update the adjacent temperature value and its corresponding IMU zero drift sampling value into the temperature offset table, and remove the adjacent temperature value from the empty offset list; According to the updated temperature offset table, a linear interpolation algorithm is used to calculate the zero drift calibration value corresponding to the current IMU temperature value; Subtracting the original data collected by the IMU sensor from the zero drift calibration value to obtain calibrated IMU data; The calibrated IMU data is input into the inertial navigation algorithm and fused with the GNSS position information to calculate the real-time position, speed and attitude of the device.

8. The method according to claim 1, characterized in that The obtaining corresponding IMU zero drift data from the temperature offset table according to the current IMU temperature value includes: Obtain the current temperature value detected by the IMU, and search for the target temperature value closest to the current temperature value in a pre-established temperature offset table; If the target temperature value is found, the actual temperature value and IMU zero drift data corresponding to the target temperature value are obtained; Determine whether the difference between the current temperature value and the actual temperature value is less than a preset temperature threshold; If the difference is less than the preset temperature threshold, the IMU measurement value is calibrated using the IMU zero drift data to obtain a calibrated IMU data value; If the difference is greater than or equal to the preset temperature threshold, determine the upper and lower adjacent temperature values ​​closest to the current temperature value, obtain the IMU zero drift data at the current temperature value by linear interpolation calculation according to the IMU zero drift data corresponding to the upper and lower adjacent temperature values, and calibrate the IMU measurement value using the IMU zero drift data obtained by linear interpolation calculation to obtain a calibrated IMU data value; Pass the calibrated IMU data value to the subsequent algorithm for processing; Determining whether the temperature offset table needs to be updated; If updating is required, the current temperature value and the corresponding IMU zero drift data are written into the temperature offset table.

9. The method according to claim 1, characterized in that: The method of using the IMU zero drift data to calibrate the current IMU data to obtain calibrated IMU data includes: Obtaining a current temperature value detected by an inertial measurement unit (IMU), and searching a pre-established temperature offset table for IMU zero drift data corresponding to a target temperature closest to the current temperature value; If the target temperature closest to the current temperature value is not found in the temperature offset table, the current temperature value is added to an empty offset list; Acquire gyroscope data, accelerometer data, and magnetometer data of the IMU, and determine whether the device is in a stationary state according to the acquired data; If the device is in a stationary state and the current temperature value exists in the empty offset list, the IMU zero drift data at the current temperature is collected, where the IMU zero drift data includes the zero bias of the gyroscope, the zero bias of the accelerometer, and the zero bias of the magnetometer; Writing the collected IMU zero drift data and the current temperature value into the temperature offset table, and removing the current temperature value from the empty offset list; Acquire the data of the IMU, and preprocess the acquired IMU data, wherein the preprocessing includes removing outliers and smoothing filtering; Acquire IMU zero drift data corresponding to the target temperature closest to the current temperature value from the temperature offset table, and calibrate the preprocessed IMU data using the acquired IMU zero drift data to obtain calibrated IMU data; The calibrated IMU data is passed to an inertial navigation algorithm, and the inertial navigation algorithm performs motion tracking according to the calibrated IMU data to obtain a motion tracking result.