Zero bias calibration method, electronic device, calibration device and storage medium
Patent Information
- Application Number
- CN202410693801.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-31
- Publication Date
- 2024-12-03
- Estimated Expiration
- 2044-05-31
Smart Images

Figure CN118518100B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of terminal technology, and in particular to a zero bias calibration method, electronic equipment, calibration equipment and storage medium. Background Art
[0002] Due to external interference factors such as hand shaking, the IMU (Inertial Measurement Unit) in the terminal device is usually in a non-ideal vibration environment. In this case, the zero bias error will have a significant impact on the attitude solution of the terminal device, thereby causing instability and error accumulation in attitude estimation. Summary of the invention
[0003] In a first aspect, an embodiment of the present application provides a zero bias calibration method, comprising:
[0004] Acquire inertial sensor data when the inertial sensor is in a stationary state on at least two adjacent azimuth planes, wherein a first angle is formed between the adjacent azimuth planes;
[0005] determining a static data segment based on the inertial sensor data;
[0006] In response to the number of the static data segments being equal to the number of the azimuth planes, the zero bias of the inertial sensor is calibrated.
[0007] In some embodiments, the static data segment is obtained by:
[0008] Performing sliding window processing on the inertial sensor data based on a preset sliding window and step size to obtain a plurality of candidate data segments;
[0009] determining a plurality of candidate static data segments from the plurality of candidate data segments;
[0010] A static data segment is generated based on the plurality of candidate static data segments.
[0011] In some embodiments, it also includes:
[0012] Determine whether there are overlapping data frames between the current candidate static data segment and the next candidate static data segment;
[0013] The current candidate static data segment is merged with the next candidate static data segment, the start frame of the current candidate static data segment is used as the start frame of the merged candidate static data segment, and the end frame of the next candidate static data segment is used as the end frame of the merged candidate static data segment.
[0014] In some embodiments, it also includes:
[0015] Determine that there is no overlapping data frame between the current candidate static data segment and the next candidate static data segment, and that the angle of the posture quaternion between the start frame of the current candidate static data segment and the end frame of the next candidate static data segment is less than a preset threshold;
[0016] The current candidate static data segment is merged with the next candidate static data segment, the start frame of the current candidate static data segment is used as the start frame of the merged candidate static data segment, and the end frame of the next candidate static data segment is used as the end frame of the merged candidate static data segment.
[0017] In some embodiments, it also includes:
[0018] Determine that there are no overlapping data frames between the current candidate static data segment and the next candidate static data segment, and that the angle of the posture quaternion between the start frame of the current candidate static data segment and the end frame of the next candidate static data segment is greater than or equal to a preset threshold, and determine that the current candidate static data segment is a static data segment.
[0019] In some embodiments, the size of the preset sliding window is equal to N times the frame length of a data frame, and the step size is M times the frame length of a data frame, wherein M and N are both positive integers, and N is greater than M.
[0020] In some embodiments, it also includes:
[0021] Determining an autocorrelation value for each candidate data segment based on an autocorrelation operation;
[0022] In response to the autocorrelation value being smaller than a preset threshold, the candidate data segment is determined to be a candidate static data segment.
[0023] In some embodiments, it also includes:
[0024] extracting a plurality of static data frames from the static data segment;
[0025] Evenly dividing the multiple static data frames to obtain multiple data intervals, averaging the static data frames in the data intervals to obtain an average static data frame corresponding to each of the data intervals;
[0026] determining a nonlinear zero bias error function associated with the average static data frame;
[0027] An optimal solution of the nonlinear zero bias error function is calculated as the zero bias of the inertial sensor.
[0028] In some embodiments, the plurality of static data frames are extracted from a middle area of the static data segment. In some embodiments, the method further comprises:
[0029] Correcting the intermediate data frame of the static data segment based on the zero bias of the inertial sensor;
[0030] In response to the attitude angle of the corrected intermediate data frame adjacent to the azimuth plane being close to the first angle, determining that the zero bias calibration of the inertial sensor is successful;
[0031] In response to the attitude angle of the corrected intermediate data frame adjacent to the azimuth plane being away from the first angle, it is determined that the zero bias calibration of the inertial sensor has failed. In some embodiments, the number of the azimuth planes, the number of the static data segments, and the number of the intermediate data frames are all equal to six. In some embodiments, the inertial sensor data includes three-axis acceleration data and three-axis gyroscope data, and the zero bias of the inertial sensor includes three-axis acceleration zero bias and three-axis gyroscope zero bias.
[0032] In a second aspect, an embodiment of the present application provides an electronic device, comprising an inertial sensor calibrated by any of the methods described above.
[0033] In a third aspect, an embodiment of the present application provides a calibration device, including a processor, wherein the processor is used to execute any of the methods described above.
[0034] In a fourth aspect, an embodiment of the present application provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements any of the methods described above.
[0035] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program, which implements any of the methods described above when executed by a processor. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] In order to more clearly illustrate the technical solutions in the present application or the prior art, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0037] Figure 1 A schematic diagram of a flow chart of a zero bias calibration method provided in one embodiment of the present application;
[0038] Figure 2 One of the scenario schematic diagrams of the zero bias calibration method provided by an embodiment of the present application;
[0039] Figure 3 A second schematic diagram of a zero bias calibration method provided by an embodiment of the present application;
[0040] Figure 4 A third schematic diagram of a scenario of a zero bias calibration method provided by an embodiment of the present application;
[0041] Figure 5 A fourth schematic diagram of a scenario of a zero bias calibration method provided by an embodiment of the present application;
[0042] Figure 6 A fifth schematic diagram of a zero bias calibration method provided in accordance with an embodiment of the present application;
[0043] Figure 7 A simplified block diagram of an example electronic system of a smart ring provided for one embodiment of the present application;
[0044] Figure 8 A schematic diagram of the structure of an electronic device provided for one embodiment of the present application. DETAILED DESCRIPTION
[0045] In order to make the purpose, technical solutions and advantages of this application clearer, the technical solutions in this application will be clearly and completely described below in conjunction with the drawings in this application. Obviously, the described embodiments are part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0046] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the terms used in this way are interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first" and "second" are generally of the same type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally represents that the objects associated with each other are in an "or" relationship.
[0047] There is a close connection between the internal parameters of the IMU (Inertial Measurement Unit) in the terminal device and the attitude solution. The internal parameters of the IMU include various calibration parameters, such as zero bias (non-zero value output by the IMU sensor in a static state, that is, there will still be a small output without external force or acceleration), axis orthogonality (the vertical relationship between the axes inside the IMU sensor, such as caused by installation errors), etc. These parameters directly affect the output accuracy and stability of the IMU sensor.
[0048] In attitude calculation, the IMU sensor measures acceleration, angular velocity and other data to infer the attitude information of the terminal device, and the accuracy of the IMU internal parameters determines the accuracy and stability of the attitude calculation. Therefore, correct calibration of the IMU internal parameters is crucial for accurate attitude calculation.
[0049] Due to hand shaking, the IMU (Inertial Measurement Unit) built into the terminal device is often in a non-ideal shaking environment. Among the internal parameters of the IMU, axis orthogonality, scale factor, and environmental jitter have little effect on attitude calculation and can be ignored. However, zero bias is the factor that has the most significant impact on attitude calculation among the internal parameters of the IMU.
[0050] To this end, this application provides a zero bias calibration method, which can accurately calibrate the zero bias of the IMU sensor in the terminal device to eliminate the error generated by the IMU sensor in a static state, thereby improving the accuracy and stability of attitude solution. The calibrated IMU sensor data will be more reliable and can more accurately reflect the true attitude of the device.
[0051] In some embodiments, the terminal (terminal device) includes various handheld devices with wireless communication functions, vehicle-mounted devices, wearable devices (such as AR glasses, VR glasses, MR glasses or smart rings, etc.), computing devices or other processing devices connected to a wireless modem, such as mobile phones, tablets, desktop notebooks, and smart devices that can run applications, including the central console of smart cars, etc. Specifically, it can refer to user equipment (UE), access terminal, user unit, user station, mobile station, mobile station, remote station, remote terminal, mobile device, user terminal, terminal, wireless communication equipment, user agent or user device. The terminal device may also be a satellite phone, a cellular phone, a smart phone, a wireless data card, a wireless modem, a machine type communication device, a cordless phone, a session initiation protocol (SIP) phone, a wireless local loop (WLL) station, a personal digital assistant (PDA), a handheld device with wireless communication function, a computing device or other processing device connected to a wireless modem, a vehicle-mounted device or a wearable device, a virtual reality (VR) terminal device, an augmented reality (AR) terminal device, a wireless terminal in industrial control, a wireless terminal in self-driving, a wireless terminal in remote medical, a wireless terminal in smart grid, a wireless terminal in transportation safety, a wireless terminal in smart city, a wireless terminal in smart home, a terminal device in 5G network or future communication network, etc. The terminal may be powered by a battery, and may also be attached to and powered by the power system of a vehicle or ship.
[0052] Next, this article will exemplarily illustrate the zero bias calibration process of the smart ring inertial sensor, which does not limit the implementation of the present application.
[0053] Figure 1 This is one of the flow charts of the zero bias calibration method provided in the embodiment of the present application. Figure 1 As shown, a zero bias calibration method is provided, comprising the following steps: step 110, step 120, and step 130. The steps of the method flow are only a possible implementation of the present application.
[0054] Step 110: Acquire inertial sensor data when the inertial sensor is in a stationary state on at least two adjacent azimuth planes, wherein a first angle is formed between the adjacent azimuth planes;
[0055] The azimuth plane refers to a plane representing the azimuth divided based on the line of sight of the observing device or object. When the device or object is turned over or the observer moves from one side to the other, the corresponding azimuth plane will be adjusted accordingly.
[0056] for example Figure 2 As shown in the figure, a hexahedron finger ring carrier is labeled, including the following six faces: ABCD, EFHG, ADEH, BCFG, ABEF, CDHG. When the first state of the hexahedron is used as the reference, the ABCD face is the bottom face. When the hexahedron is flipped rightward once from the first state, the orientation face of ABCD changes to the left face accordingly.
[0057] In this embodiment, first select a vehicle with a clearly defined azimuth plane, and ensure that it has at least two adjacent azimuth planes to choose from. Then place the device with a built-in inertial sensor on an azimuth plane, and ensure that it is in a stationary state. Start the inertial sensor data collection function, and continue recording for a period of time to obtain static data. After continuous recording for a period of time, flip the vehicle with a built-in inertial sensor to change its azimuth plane, and ensure that the inertial sensor is in a stationary state again. Repeat the above steps to collect inertial sensor data on all required azimuth planes, and ensure that each switch is recorded for enough time to obtain accurate static inertial sensor data.
[0058] For example, reference Figure 2 As shown, select a vehicle with a hexahedral structure. First, place the smart ring with a built-in inertial sensor (for example, detachably embed it so that the smart ring remains stable during the vehicle flipping) on one of the faces ABCD of the hexahedral device or other suitable faces, and ensure that it is in a stationary state. Start the sensor data recording function to collect data, and continue recording for 1S to obtain sufficient static data. Then flip the vehicle to the right once, so that the ABCD face changes from the bottom face to the left face. Ensure that the vehicle is in a stationary state again, and continue recording for 1S. Then flip the vehicle again, so that the ABCD face changes from the left face to the rear side face, and ensure that the vehicle is in a stationary state and continue recording for 1S. Repeat the above steps to change the ABCD face into different azimuth faces in turn. In this way, the collection of inertial sensor data on different azimuth faces can be completed.
[0059] Step 120: determining a static data segment based on the inertial sensor data;
[0060] The static data segment refers to a continuous data frame in which the inertial sensor data fluctuation is very small and conforms to the characteristics of a static state. Therefore, it can be considered that the inertial sensor is in a relatively static state at this time, and the excitation input of the inertial sensor is 0. The output data can be understood as the error data of the inertial sensor itself, such as zero bias.
[0061] In one example, the fluctuation of the inertial sensor data can be obtained by visualization or statistical analysis, and an appropriate threshold is set according to the obtained fluctuation to determine whether the static state requirement is met. By traversing the collected inertial sensor data, a continuous time period in which the data fluctuation is less than the threshold is divided into a static data segment.
[0062] For example, a sliding window or other segmentation methods can be used to segment the start and end points of a data segment. Each segmented data segment is verified. The verification includes checking whether the fluctuation in the data segment meets the requirements of the static state. When the requirements of the static state are met, the data segment is determined to be a static data segment.
[0063] Step 130: In response to the number of the static data segments being equal to the number of the azimuth planes, calibrate the zero bias of the inertial sensor.
[0064] During the calibration process of the inertial sensor, it is necessary to ensure that the number of static data segments determined is equal to the number of azimuth planes from which the inertial sensor has collected data, that is, each azimuth plane from which data has been collected corresponds to a static data segment for calibrating the zero bias error of the inertial sensor.
[0065] for example Figure 2 As shown, after the inertial sensors are placed on the face ABCD of the hexahedron device in sequence to collect data, the face ABCD is flipped to another orientation and data collection continues. This step is repeated until data is collected in all six orientations, and the number of static data segments determined should be 6.
[0066] It can be understood that since the body coordinate system of the inertial sensor usually adopts an orthogonal coordinate system, that is, it has three orthogonal X, Y and Z axes, and each axis has two positive and negative directions, flipping the hexahedron can ensure that the inertial sensor can collect data in each axis.
[0067] In this embodiment, if the number of static data segments is equal to the number of azimuth planes, the inertial sensor zero bias is calibrated, otherwise the calibration process is exited. It can be understood that, for example, if the number of static data segments is greater than the number of azimuth planes, a possible scenario is that the data collected by the inertial sensor in one or more azimuth planes has undergone a sudden change, such as the effect of external force. At this time, using the collected inertial sensor data to calibrate the zero bias will obviously cause errors.
[0068] In an embodiment of the present application, by acquiring inertial sensor data in a stationary state on at least two adjacent azimuth planes and determining static data segments based on these data, the zero bias value of the inertial sensor can be accurately obtained. By calibrating the zero bias, the error generated by the inertial sensor in a stationary state can be eliminated, thereby improving the accuracy and stability of attitude solution. In addition, the zero bias is calibrated when the number of static data segments is equal to the number of azimuth planes, further ensuring the accuracy of the calibration.
[0069] It should be noted that each implementation method of the present application can be freely combined, the order can be changed, or it can be executed separately, and does not need to rely on or depend on a fixed execution order.
[0070] In some embodiments, the static data segment is obtained by:
[0071] Performing sliding window processing on the inertial sensor data based on a preset sliding window and step size to obtain a plurality of candidate data segments;
[0072] determining a plurality of candidate static data segments from the plurality of candidate data segments;
[0073] A static data segment is generated based on the plurality of candidate static data segments.
[0074] The preset sliding window is a window of fixed time and / or frame length set in advance when processing inertial sensor data.
[0075] Generally, the preset sliding window is related to the length of time the inertial sensor is placed on each azimuth plane to collect data. For example, when the inertial sensor collects data, if the inertial sensor data in a static state is continuously collected for 1 second on each azimuth plane, the preset sliding window can be set to 100ms or other appropriate time to better monitor the data changes of the inertial sensor on each azimuth plane.
[0076] In this embodiment, a preset sliding window is slid on the inertial sensor data with a fixed sliding window step size. Each time the window is slid, a candidate data segment of fixed length is obtained for further analysis and processing. After each sliding, it is determined whether the inertial sensor data in the current candidate data segment is static data. If it is static data, the candidate data segment is determined to be a candidate static data segment, and the frame number and posture information of the starting frame and the ending frame of the candidate data segment are recorded. Finally, a static data segment is generated by combining the recorded candidate static data segments.
[0077] In one example, in order to fully utilize the data in each data frame and ensure that each sliding window contains sufficient information for analysis and processing, the size of the preset sliding window is equal to N times the frame length of a data frame, and the sliding window step size of the preset sliding window is M times the frame length of a data frame, where M and N are both positive integers, and N is greater than M.
[0078] For example, an inertial sensor generates data frames at a sampling rate of 400Hz, and each data frame contains 2.5ms of data. Then the sliding window size can be set to 40 times the data frame length, that is, 100ms, and the sliding window step size can be set to 4 times the data frame length, that is, 10ms. With the above settings, every 100ms of continuous data frames can be used as a window, and then slide in the data with a step size of 10ms. This ensures that there is overlap between each window, and at the same time each window contains enough data for analyzing static features.
[0079] That is, the sensor data is divided into a plurality of candidate data segments according to a length of 100 ms and a step size of 10 ms, each candidate data segment includes 100 ms of sensor data, and the interval between two adjacent candidate data segments is 10 ms.
[0080] In an embodiment of the present application, sliding window processing is performed on the inertial sensor data based on a preset sliding window to further determine candidate static data segments, and static data segments are generated by combination, which can improve the accuracy of the candidate static data segments and enhance the continuity of the static data segments.
[0081] In some embodiments, it also includes:
[0082] Determine whether there are overlapping data frames between the current candidate static data segment and the next candidate static data segment;
[0083] The current candidate static data segment is merged with the next candidate static data segment, the start frame of the current candidate static data segment is used as the start frame of the merged candidate static data segment, and the end frame of the next candidate static data segment is used as the end frame of the merged candidate static data segment.
[0084] For example, reference Figure 3 shown. Figure 3The data collected by the inertial sensor in a static state in an azimuth plane (such as the bottom surface) for 1 second is shown, including the starting frame a, the ending frame b, and the current candidate static data segment A and the next candidate static data segment B composed of multiple data frames. For example, each data frame contains 2.5ms of data, the preset sliding window size is 100ms, and the sliding window step is 20ms. It is judged whether the current candidate static data segment A (the frame number of the starting frame is 97 and the frame number of the ending frame is 137) and the next candidate static data segment B (the frame number of the starting frame is 105 and the frame number of the ending frame is 145) can be merged. It is detected whether the frame number of the starting frame of the next candidate static data segment B is less than or equal to the frame number of the ending frame of the current candidate static data segment A. Since 105<137, it means that there are overlapping data frames between the two candidate static data segments. The merge operation can be performed, and the start frame after the merge is the start frame 97 of the candidate static data segment A, the end frame after the merge is the end frame 145 of the candidate static data segment B, and the candidate static data segment C after the merge is referenced Figure 4 shown.
[0085] Next, the merged candidate static data segment C is used as the current candidate static data segment and continues to be merged with the next candidate static data segment (for example, candidate static data segment D from frame number 113-153, not shown in the figure) until there are no overlapping data frames between the merged candidate static data segment C and any unmerged candidate static data segment.
[0086] It can be understood that the current candidate static data segment A is only an exemplary illustration of merging candidate static data segments in the present application. In actual application, the sliding window operation can be performed starting from the starting frame a, that is, the current candidate static data segment A can include all data frames from the starting frame a (that is, frame number 1) to frame number 137, and determine whether to merge with the next candidate static data segment B obtained by the sliding window.
[0087] In the embodiment of the present application, when there are overlapping data frames between two adjacent candidate static data segments, the two candidate static data segments are merged. This ensures that the merged candidate static data segments are temporally coherent, avoids gaps or breaks between the candidate static data segments, and thus improves the continuity and integrity of the candidate static data segments.
[0088] In some embodiments, it also includes:
[0089] Determine that there is no overlapping data frame between the current candidate static data segment and the next candidate static data segment, and that the angle of the posture quaternion between the start frame of the current candidate static data segment and the end frame of the next candidate static data segment is less than a preset threshold;
[0090] The current candidate static data segment is merged with the next candidate static data segment, the start frame of the current candidate static data segment is used as the start frame of the merged candidate static data segment, and the end frame of the next candidate static data segment is used as the end frame of the merged candidate static data segment.
[0091] In one example, reference Figure 5 shown. Figure 5 , data collected by the inertial sensor in a stationary state in one azimuth plane (eg, bottom plane), for example, for 1 second, are shown, including a starting frame a, an ending frame b, and a current candidate static data segment E and a next candidate static data segment F consisting of multiple data frames.
[0092] Each data frame contains 2.5ms of inertial sensor data, the preset sliding window size is 100ms, and the sliding window step is 20ms. The frame number of the end frame of the current candidate static data segment E is 81, and the frame number of the start frame of the next candidate static data segment F is 89, and there is no overlapping data frame between them.
[0093] It can be understood that there are multiple candidate data segments between the current candidate static data segment E and the next candidate static data segment F, such as candidate data segment R1 (frame number 49-89), candidate data segment R2 (frame number 57-97), candidate data segment R3 (frame number 65-105), candidate data segment R4 (frame number 73-113) and candidate data segment R5 (frame number 81-121). At this time, the above candidate data segments R1-R5 are all non-static data segments, such as dynamic data segments. Then, the current candidate static data segment E and the above candidate data segments R1-R5 are not merged (for example, the above candidate data segments R1-R5 are discarded), and the current candidate static data segment E continues to be merged with the next candidate static data segment F for judgment.
[0094] In this case, determine the angle between the attitude quaternion of the end frame of the current candidate static data segment E and the start frame of the next candidate static data segment F, that is, determine the angle between the attitude quaternion of the data frame with frame number 81 and the data frame with frame number 89. If the angle is less than the preset threshold, for example, the preset threshold is 10° and the angle is 9°, it means that the attitude between the current candidate static data segment E and the next candidate static data segment F is relatively stable and does not change significantly, and meets the frame merging condition. Then merge the two candidate static data segments, and the frame number of the start frame of the merged candidate static data segment H is 41, and the end frame is 129. The reference of the merged candidate static data segment H is Figure 6 shown.
[0095] It can be understood that the current candidate static data segment E is only an exemplary illustration of merging candidate static data segments in the present application. In actual application, the sliding window operation can be performed starting from the starting frame a, that is, the current candidate static data segment E can include all data frames from the starting frame a (that is, frame number 1) to frame number 81, and determine whether to merge with the next candidate static data segment F obtained by the sliding window.
[0096] It should be noted that in the process of merging candidate static data segments described in the embodiments of the present application, non-static candidate data segments such as data segments R1-R5 described above may not be considered. For example, the candidate data segments from the starting frame a (frame number 1) to the frame number 41 obtained by the first sliding window are judged as non-static candidate data segments, and the candidate data segments of frame numbers 9-49 obtained by the second sliding window are judged as static candidate data segments, then the non-static candidate data segments composed of frame numbers 1-41 can be discarded or ignored, and the merging judgment starts from the candidate static data segment of frame numbers 9-49.
[0097] In some embodiments, it also includes:
[0098] Determine that there are no overlapping data frames between the current candidate static data segment and the next candidate static data segment, and that the angle of the posture quaternion between the start frame of the current candidate static data segment and the end frame of the next candidate static data segment is greater than or equal to a preset threshold, and determine that the current candidate static data segment is a static data segment.
[0099] Continue to see Figure 5 In the exemplary description, each data frame contains 2.5ms of inertial sensor data, the preset sliding window size is 100ms, and the sliding window step is 20ms. The frame number of the end frame of the current candidate static data segment E is 81, and the frame number of the start frame of the next candidate static data segment F is 89, and there is no overlapping data frame between them.
[0100] In this case, the angle between the attitude quaternion of the end frame of the current candidate static data segment E and the start frame of the next candidate static data segment F is determined, that is, the angle between the attitude quaternion of the data frame with frame number 81 and the data frame with frame number 89 is determined. If the angle is greater than a preset threshold, for example, the preset threshold is 10° and the angle is 12°, it means that the attitude between the current candidate static data segment E and the next candidate static data segment F has changed significantly, and the frame merging condition is not met.
[0101] In an embodiment of the present application, when there is no overlapping data frame between two adjacent candidate static data segments, frame merging judgment is performed by considering the angle between the quaternion of the end frame of the previous candidate static data segment and the quaternion of the start frame of the next candidate static data segment, thereby ensuring a smooth transition in posture of the merged data.
[0102] In some embodiments, determining a plurality of candidate static data segments from the plurality of candidate data segments comprises:
[0103] Determining an autocorrelation value for each candidate data segment based on an autocorrelation operation;
[0104] In response to the autocorrelation value being smaller than a preset threshold, the candidate data segment is determined to be a candidate static data segment.
[0105] It can be understood that for each candidate data segment, each data frame represents data of a time period, and all the data frames therein are regarded as an overall sequence, and autocorrelation is calculated on the overall sequence. The autocorrelation function can be used to calculate the autocorrelation of the entire candidate data segment.
[0106] For example, the following formula can be used to calculate the autocorrelation of the candidate data segment x(t):
[0107] ;
[0108] Understandably, represents the starting frame of the candidate data segment x(t), Represents the termination frame of the candidate data segment x(t). The same time variable can be set for each candidate data segment. , by calculating the autocorrelation function The value of can determine the autocorrelation of the candidate data segment x(t). The larger the value of , the smaller the autocorrelation of the candidate data segment x(t), that is, the candidate data segment x(t) is the output generated by additional input stimulation; The smaller the value of , the greater the autocorrelation of the candidate data segment x(t), that is, the candidate data segment x(t) is the output generated by the inertial sensor itself, such as zero bias.
[0109] The calculated autocorrelation function can also be used to analyze the time variables of each candidate data segment. The autocorrelation situation below.
[0110] In this embodiment, the autocorrelation can be defined as an indicator to determine whether the candidate data segment is static data or dynamic data. When the autocorrelation of a candidate data segment is less than a preset threshold, the characterization data changes little and meets the characteristics of static data, and the candidate data segment can be determined to be a candidate static data segment. On the contrary, the characterization data contains more change and motion information.
[0111] In the embodiment of the present application, the candidate static data segments are effectively distinguished through autocorrelation to ensure the accuracy of subsequent data processing results.
[0112] In some embodiments, it also includes:
[0113] extracting a plurality of static data frames from the static data segment;
[0114] Evenly dividing the multiple static data frames to obtain multiple data intervals, averaging the static data frames in the data intervals to obtain an average static data frame corresponding to each of the data intervals;
[0115] determining a nonlinear zero bias error function associated with the average static data frame;
[0116] An optimal solution of the nonlinear zero bias error function is calculated as the zero bias of the inertial sensor.
[0117] In this embodiment, multiple static data frames can be extracted from each static data segment by time interval or continuous extraction. All the extracted static data frames are taken as a data sequence. For example, referring to the above description of this article, each static data segment includes 400 frames of data, then 100 frames of data can be extracted from the 400 frames of data, and then the 100 frames of data are divided into 4 parts to obtain four data intervals, each of which contains 25 frames of data. For each equally divided data interval, each data frame (for example, including acceleration data and gyroscope data) is averaged respectively, that is, the average three-axis acceleration data and the average three-axis gyroscope data of the data interval are obtained, and the average three-axis acceleration data and the average three-axis gyroscope data are composed of the average static data frame corresponding to the data interval. In other words, 4 average static data frames are calculated from each static data segment to reduce the subsequent calculation amount while maintaining the calculation accuracy. It can be understood that the number of data frames included in the above static data segment, the number of extracted static data frames, and the equally divided data intervals are all exemplary descriptions and do not represent limitations on this application.
[0118] Next, define a nonlinear bias error function. It can be understood that the nonlinear bias error function includes an acceleration nonlinear bias error function and a gyroscope nonlinear bias error function, which respectively describe the nonlinear relationship between acceleration and bias variables and the nonlinear relationship between gyroscope and bias variables.
[0119] Taking the establishment of the acceleration nonlinear zero bias error function as an example, assuming that the zero bias error of the three-axis accelerometer is:
[0120] ;
[0121] The acceleration value output by a certain average static data frame is:
[0122] ;
[0123] Assume that the corresponding true acceleration vector is:
[0124] ;
[0125] Knowable , as well as .
[0126] Since the static data segment is measured by the accelerometer in a static state, its true acceleration is the projection of gravity acceleration on the three axes, that is, .
[0127] The above , and Substituting the expression into the above formula, we can know:
[0128] ;
[0129] That is, the acceleration nonlinear zero bias error function is defined as:
[0130] ;
[0131] Next, the Gauss-Newton method in the least squares method or other suitable methods can be used to solve the above-mentioned acceleration nonlinear zero bias error function, and the acceleration zero bias that minimizes the sum of squares of the error r in multiple average static data frames (for example, two static data segments, then there are 8 average static data frames) is obtained as the optimal solution, and it is used as the zero bias of the accelerometer.
[0132] Similarly, a gyroscope nonlinear zero bias error function can be established, which includes the zero bias error of the gyroscope, the gyroscope value output by the average static data frame, and the corresponding real gyroscope vector. The Gauss-Newton method in the least squares method or other suitable methods can also be used to solve the above-mentioned gyroscope nonlinear zero bias error function, and the gyroscope zero bias that minimizes the square sum of the error r in multiple average static data frames (for example, two static data segments, then there are 8 average static data frames) is obtained as the optimal solution, and it is used as the zero bias of the gyroscope. This application will not be repeated here.
[0133] In some embodiments, the plurality of static data frames are extracted from a middle region of the static data segment.
[0134] For example, the middle data frame of the static data segment can be determined first, and then a certain number of adjacent data frames can be selected with the middle data frame as the center to extract multiple data frames. The number of the middle data frames can be 1 or 2. For example, when the total number of data frames in the static data segment is an even number (such as 400 as mentioned above in this article), the middle data frames are 2, and when the total number of data frames in the static data segment is an odd number, the middle data frame is 1.
[0135] A static data segment mentioned above in this article includes 400 data frames with frame numbers 1-400. Data frame X1 with frame number 200 and data frame X2 with frame number 201 can be selected as intermediate frames, and then with data frame X1 as the first starting point, 48 adjacent data frames are selected forward, and with data frame X2 as the second starting point, 48 adjacent data frames are selected backward, thus obtaining 100 static data frames located in the middle area of the static data segment.
[0136] In the embodiment of the present application, multiple data frames are extracted from the static data segment with the intermediate data frame as the center, so as to ensure that the extracted multiple data frames contain the context information around the intermediate data frame, making the extracted data frames more accurate and complete.
[0137] In some embodiments, it also includes:
[0138] Correcting the intermediate data frame of the static data segment based on the zero bias of the inertial sensor;
[0139] In response to the attitude angle of the corrected intermediate data frame adjacent to the azimuth plane being close to the first angle, determining that the zero bias calibration of the inertial sensor is successful;
[0140] In response to the attitude angle of the corrected intermediate data frame adjacent to the azimuth plane being away from the first angle, it is determined that the zero bias calibration of the inertial sensor fails.
[0141] In this embodiment, the zero bias of the inertial sensor is first used to correct the intermediate data frame of the static data segment. Then, the attitude quaternion is calculated using the corrected intermediate data frame. Then, the attitude angle between the two corrected intermediate data frames is determined using the attitude quaternion of the corrected intermediate data frames of two adjacent azimuth planes. Finally, by comparing the size of the attitude angle with the first angle of the two adjacent azimuth planes, it can be determined whether the zero bias calibration of the inertial sensor is successful. If the two are very close, it means that the zero bias calibration is successful; otherwise, there may be an error or the calibration has failed.
[0142] For example, the inertial sensor collects data on the six azimuth planes of the hexahedron in turn, and after obtaining the six static data segments corresponding to the six adjacent azimuth planes. First, the zero bias is subtracted from the collected inertial sensor data, and then the attitude of each intermediate data frame is recalculated. Then, according to the six corrected intermediate data frames corresponding to the recalculated six static data segments, the attitude angle between the intermediate data frames of adjacent static data segments is calculated in flip order, and compared with the actual rotation angle (90°). If the error between the calculated attitude angle and the actual rotation angle is within the set threshold, it is determined that the calibration is successful; otherwise, it is determined that the calibration fails.
[0143] In an embodiment of the present application, by comparing the attitude angle between the corrected intermediate data frames of adjacent static data segments and the first angle between two adjacent azimuth planes, the accuracy of the sensor zero bias correction can be effectively verified, thereby ensuring the reliability of the sensor data after zero bias correction.
[0144] In some embodiments, the number of the azimuth planes, the number of the static data segments, and the number of the intermediate data frames are all equal to six.
[0145] In one example, if Figure 2 As shown, the smart ring with built-in inertial sensors can be fixed on one of the faces ABCD of the hexahedron device to collect data. After collecting data on one face ABCD, flip the face ABCD to another orientation and continue collecting data. Repeat this step until data is collected in all six orientations. When the ring with built-in inertial sensors is placed on the six orientation faces of the hexahedron device in turn to collect data, the number of static data segments determined should be 6.
[0146] After determining that the number of static data segments is 6, determine the six intermediate data frames corresponding to these six static data segments collected. Based on the above description of this article, calculate the zero bias of the inertial sensor, and perform correction processing on these six intermediate data frames to eliminate the influence of the zero bias. Calculate the attitude quaternion of the six corrected intermediate data frames, and calculate the attitude angle between the two intermediate data frames based on the attitude quaternion of the corrected intermediate data frames of the two adjacent azimuth planes. Finally, compare it with the actual rotation angle (90°). If the error between the calculated attitude angle and the actual rotation angle is within the set threshold, it is determined that the calibration is successful; otherwise, it is determined that the calibration fails.
[0147] In the embodiment of the present application, the zero bias of the inertial sensor can be effectively calibrated through the above method, and the accuracy and reliability of the calibration result can be ensured.
[0148] In some embodiments, the inertial sensor data includes three-axis acceleration data and three-axis gyroscope data, and the zero bias of the inertial sensor includes three-axis acceleration zero bias and three-axis gyroscope zero bias.
[0149] In this embodiment, the inertial sensor data includes but is not limited to three-axis acceleration data and three-axis gyroscope data.
[0150] The three-axis acceleration bias represents the difference between the acceleration value measured by the sensor in a stationary state and the true zero acceleration, while the three-axis gyroscope bias represents the difference between the angular velocity value measured by the sensor in a stationary state and the true zero angular velocity.
[0151] In the embodiment of the present application, the accuracy and reliability of the sensor data can be improved by calibrating and compensating these zero biases, thereby more accurately reflecting the true posture of the object.
[0152] Figure 7 700 is a simplified block diagram of an example electronic system 700 for implementing the smart ring in the examples disclosed herein. In this example, the electronic system 700 may include a processor 701 and a memory 702. The processor 701 may be configured to execute instructions for performing operations at many components, and may be, for example, a general-purpose processor or microprocessor suitable for implementation in a portable electronic device. The processor 701 may be communicatively coupled to multiple components within the electronic system 700. To achieve this communicative coupling, the processor 701 may communicate with other illustrated components across a bus 704. The bus 704 may be any subsystem suitable for transmitting data within the electronic system 700. The bus 704 may include multiple computer buses and additional circuit systems for transmitting data.
[0153] The memory 702 may be coupled to the processor 701. In some embodiments, the memory 702 may provide both short-term and long-term storage and may be divided into several units. The memory 702 may be volatile, such as static random access memory (SRAM) and / or dynamic random access memory (DRAM), and / or non-volatile, such as read-only memory (ROM), flash memory, etc. The memory 702 may provide storage for computer-readable instructions, data structures, program modules, and other data for the electronic system 700. In some embodiments, the memory 702 may be distributed among different hardware modules. A set of instructions and / or codes may be stored on the memory 702. The instructions may take the form of executable code that may be executed by the electronic system 700, and / or may take the form of source code and / or installable code, which (for example, using any of a variety of generally available compilers, installers, compression / decompression utilities, etc.) may take the form of executable code after being compiled and / or installed on the electronic system 700.
[0154] The wireless communication subsystem 703 may include, for example, an infrared communication device, a wireless communication device and / or a chipset (such as a device, an IEEE 802.11 device, a Wi-Fi device, a WiMax device, a cellular communication facility, etc.) and / or a similar communication interface. The electronic system 700 may include one or more antennas 708 for wireless communication as part of the wireless communication subsystem 703 or as a separate component coupled to any part of the system. Depending on the desired functionality, the wireless communication subsystem 703 may include a separate transceiver to communicate with a base transceiver station and other wireless devices and access points, which may include communicating with different data networks and / or network types (wireless wide area network (WWAN), wireless local area network (WLAN) or wireless personal area network (WPAN)). The WWAN may be, for example, a WiMax (IEEE 802.16) network. The WLAN may be, for example, an IEEE802.11x network. The WPAN may be, for example, a Bluetooth network, an IEEE 802.15x network, or some other type of network. The technology described herein may also be used for any combination of WWAN, WLAN and / or WPAN. The wireless communication subsystem 703 may allow data to be exchanged with a network, other computer systems, and / or any other device described herein. The wireless communication subsystem 703 may include components for sending or receiving data (such as determination instructions and / or rejection instructions generated by the smart ring) using an antenna 708 and a wireless link. The wireless communication subsystem 703, the processor 701, and the memory 702 may together include at least a portion of one or more of the components for performing some of the functions disclosed herein.
[0155] Embodiments of the electronic system 700 also include one or more sensors 705. The sensor 705 may include, for example, an accelerometer, a pressure sensor, a temperature sensor, a proximity sensor, a magnetometer, a gyroscope, an inertial sensor (e.g., a module combining an accelerometer and a gyroscope), an ambient light sensor, or any other similar module operable to provide sensory output and / or receive sensory input, such as a depth sensor or a position sensor. For example, in some implementations, the sensor 705 may include one or more inertial measurement units (IMUs) and / or one or more position sensors. The IMU may generate, for example, a touch action indicating that a finger wearing the smart ring has occurred based on a measurement signal received from one or more of the position sensors. The position sensor may generate one or more measurement signals in response to the movement of the smart ring. Examples of position sensors may include, but are not limited to, one or more accelerometers, one or more gyroscopes, one or more magnetometers, another appropriate type of sensor for detecting movement, a sensor for error correction of an IMU, or any combination thereof. The position sensor may be located outside the IMU, inside the IMU, or any combination thereof. At least some sensors may use structured light patterns for sensing. It can be understood that the sensor 705 can be calibrated with a zero bias using any embodiment of the zero bias calibration method described herein, such as zero bias calibration of an accelerometer or a gyroscope.
[0156] In some embodiments, the electronic system 700 may include other hardware modules 706. Each of the other hardware modules 706 may be a physical module within the electronic system 700. Although each of the other hardware modules 706 may be permanently configured as a structure, some of the other hardware modules 706 may be temporarily configured to perform a specific function or be temporarily activated. Examples of other hardware modules 706 may include, for example, an audio output and / or input module (e.g., a microphone or a speaker), a near field communication (NFC) module, a rechargeable battery, a battery management system, a wired / wireless battery charging system, and the like. In some embodiments, one or more functions of the other hardware modules 706 may be implemented in software.
[0157] The electronic system 700 may include a user input / output module 707. The user input / output module 707 may allow a user to send an action request to the electronic system 700. The action request may be a request to perform a specific action. For example, the action request may be a specific action to start a specific program in the electronic system 700, such as starting or shutting down the electronic system 700. The user input / output module 707 may include one or more input devices. Example input devices may include: a touch screen, a touch pad, (multiple) microphones, (multiple) buttons, (multiple) dials, (multiple) switches, or any other appropriate device for receiving an action request and passing the received action request to the electronic system 700. In some embodiments, the user input / output module 707 may provide tactile feedback to the user according to instructions received from the electronic system 700. For example, tactile feedback may be provided when an action request is received or has been executed.
[0158] In alternative configurations, different and / or additional components may be included in the electronic system 700. Similarly, the functionality of one or more of the components may be distributed among the components in a manner different from that described above. For example, in some embodiments, the electronic system 700 may be modified to include other system environments.
[0159] Figure 8 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 8 As shown, the electronic device may include: a processor 810, a communication interface 820, a memory 830 and a communication bus 840, wherein the processor 810, the communication interface 820 and the memory 830 communicate with each other through the communication bus 840. The processor 810 may call the logic instructions in the memory 830 to execute the zero bias calibration method, which includes:
[0160] Acquire inertial sensor data when the inertial sensor is in a stationary state on at least two adjacent azimuth planes, wherein a first angle is formed between the adjacent azimuth planes;
[0161] determining a static data segment based on the inertial sensor data;
[0162] In response to the number of the static data segments being equal to the number of the azimuth planes, the zero bias of the inertial sensor is calibrated.
[0163] In addition, the logic instructions in the above-mentioned memory 830 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.
[0164] In addition, the electronic device mentioned above also includes an inertial sensor calibrated by the zero bias calibration method provided by the above method embodiments.
[0165] On the other hand, the present application further provides a calibration device, including a processor, wherein the processor is used to execute the zero bias calibration method provided by the above method embodiments, the method comprising:
[0166] Acquire inertial sensor data when the inertial sensor is in a stationary state on at least two adjacent azimuth planes, wherein a first angle is formed between the adjacent azimuth planes;
[0167] determining a static data segment based on the inertial sensor data;
[0168] In response to the number of the static data segments being equal to the number of the azimuth planes, the zero bias of the inertial sensor is calibrated.
[0169] On the other hand, the present application further provides a computer program product, the computer program product comprising a computer program, the computer program may be stored on a non-transitory computer-readable storage medium, and when the computer program is executed by a processor, the computer can execute the zero bias calibration method provided by the above-mentioned method embodiments, the method comprising:
[0170] Acquire inertial sensor data when the inertial sensor is in a stationary state on at least two adjacent azimuth planes, wherein a first angle is formed between the adjacent azimuth planes;
[0171] determining a static data segment based on the inertial sensor data;
[0172] In response to the number of the static data segments being equal to the number of the azimuth planes, the zero bias of the inertial sensor is calibrated.
[0173] On the other hand, the present application further provides a non-transitory computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the zero bias calibration method provided by the above method embodiments is implemented, and the method includes:
[0174] Acquire inertial sensor data when the inertial sensor is in a stationary state on at least two adjacent azimuth planes, wherein a first angle is formed between the adjacent azimuth planes;
[0175] determining a static data segment based on the inertial sensor data;
[0176] In response to the number of the static data segments being equal to the number of the azimuth planes, the zero bias of the inertial sensor is calibrated.
[0177] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0178] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0179] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A zero bias calibration method, characterized in that: include: Acquire inertial sensor data when the inertial sensor is in a stationary state on at least two adjacent azimuth planes of the vehicle, wherein a first angle is formed between the adjacent azimuth planes, and the azimuth planes are planes representing azimuth divided based on a line of sight of observing the vehicle; determining a static data segment based on the inertial sensor data; In response to the number of the static data segments being equal to the number of the azimuth planes, the zero bias of the inertial sensor is calibrated.
2. The zero bias calibration method according to claim 1, characterized in that: The static data segment is obtained in the following manner: Performing sliding window processing on the inertial sensor data based on a preset sliding window and step size to obtain a plurality of candidate data segments; determining a plurality of candidate static data segments from the plurality of candidate data segments; A static data segment is generated based on the plurality of candidate static data segments.
3. The zero bias calibration method according to claim 2, characterized in that: Also includes: Determine whether there are overlapping data frames between the current candidate static data segment and the next candidate static data segment; The current candidate static data segment is merged with the next candidate static data segment, the start frame of the current candidate static data segment is used as the start frame of the merged candidate static data segment, and the end frame of the next candidate static data segment is used as the end frame of the merged candidate static data segment.
4. The zero bias calibration method according to claim 2, characterized in that: Also includes: Determine that there is no overlapping data frame between the current candidate static data segment and the next candidate static data segment, and that the angle of the posture quaternion between the start frame of the current candidate static data segment and the end frame of the next candidate static data segment is less than a preset threshold; The current candidate static data segment is merged with the next candidate static data segment, the start frame of the current candidate static data segment is used as the start frame of the merged candidate static data segment, and the end frame of the next candidate static data segment is used as the end frame of the merged candidate static data segment.
5. The zero bias calibration method according to claim 2, characterized in that: Also includes: Determine that there are no overlapping data frames between the current candidate static data segment and the next candidate static data segment, and that the angle of the posture quaternion between the start frame of the current candidate static data segment and the end frame of the next candidate static data segment is greater than or equal to a preset threshold, and determine that the current candidate static data segment is a static data segment.
6. The zero bias calibration method according to claim 2, characterized in that: The size of the preset sliding window is equal to N times the frame length of a data frame, and the step size is M times the frame length of a data frame, wherein M and N are both positive integers, and N is greater than M.
7. The zero bias calibration method according to claim 2, characterized in that: Also includes: Determining an autocorrelation value for each candidate data segment based on an autocorrelation operation; In response to the autocorrelation value being smaller than a preset threshold, the candidate data segment is determined to be a candidate static data segment.
8. The zero bias calibration method according to claim 1, characterized in that: Also includes: extracting a plurality of static data frames from the static data segment; Evenly dividing the multiple static data frames to obtain multiple data intervals, averaging the static data frames in the data intervals to obtain an average static data frame corresponding to each of the data intervals; determining a nonlinear zero bias error function associated with the average static data frame; An optimal solution of the nonlinear zero bias error function is calculated as the zero bias of the inertial sensor.
9. The zero bias calibration method according to claim 8, characterized in that: The multiple static data frames are extracted from a middle area of the static data segment.
10. The zero bias calibration method according to claim 1, characterized in that: Also includes: Correcting the intermediate data frame of the static data segment based on the zero bias of the inertial sensor; In response to the attitude angle of the corrected intermediate data frame adjacent to the azimuth plane being close to the first angle, determining that the zero bias calibration of the inertial sensor is successful; In response to the attitude angle of the corrected intermediate data frame adjacent to the azimuth plane being away from the first angle, it is determined that the zero bias calibration of the inertial sensor fails.
11. The zero bias calibration method according to claim 10, characterized in that: The number of the azimuth planes, the number of the static data segments, and the number of the intermediate data frames are all equal to six.
12. The zero bias calibration method according to any one of claims 1 to 11, characterized in that: The inertial sensor data includes three-axis acceleration data and three-axis gyroscope data, and the zero bias of the inertial sensor includes three-axis acceleration zero bias and three-axis gyroscope zero bias.
13. An electronic device, characterized in that: The invention comprises an inertial sensor calibrated based on the method according to any one of claims 1 to 12.
14. A calibration device, characterized in that: comprising a processor for executing the method as claimed in any one of claims 1 to 12.
15. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 12 is implemented.
