Imu continuous calibration method, device, equipment and storage medium
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- JIHUA LAB
- Filing Date
- 2023-12-06
- Publication Date
- 2026-06-23
Smart Images

Figure CN117589200B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of sensor calibration technology, and in particular to an IMU continuous calibration method, apparatus, device, and storage medium. Background Technology
[0002] MEMS-based sensors have advantages such as small size, light weight, high reliability, low cost, and ease of mass production. In recent years, with the popularization of MEMS technology and the decline in device prices, MEMS devices have broad application prospects. MEMS gyroscopes and accelerometers, as typical MEMS inertial sensors, are usually used together to form IMU (Inertial Measurement Unit), which has been widely used in the fields of intelligent control of drones and robots and consumer electronics products.
[0003] However, IMU measurement error has always been a thorny issue. IMU measurement error is not only affected by the electromagnetic and mechanical characteristics of the internal components of the IMU, but may also change with the usage environment. If it needs to be adapted to various environments, a lot of error parameter calibration work needs to be carried out using special equipment before leaving the factory. During the calibration process, it is necessary to control various environmental parameters and precisely control the movement state of the IMU. This is a huge drain on the manpower, material resources and financial resources of IMU manufacturers. Moreover, the mechanical platform used to perform calibration is usually very expensive, which also leads to a sharp increase in the production cost of IMU. However, if manufacturers do not accurately calibrate the error parameters of the IMU, the accuracy of the IMU may not meet the application requirements of the actual scenario, reducing the user experience of the purchaser.
[0004] It is evident that existing technologies still need improvement and enhancement. Summary of the Invention
[0005] In order to overcome the shortcomings of the prior art, the present invention aims to provide an IMU continuous calibration method, apparatus, device and storage medium, which can greatly reduce the workload of calibrating the error parameters of the IMU before it leaves the factory, reduce the calibration cost of the IMU, and ensure that the error parameters of the IMU are more in line with the actual use scenario.
[0006] The first aspect of this invention provides an IMU continuous calibration method, comprising: acquiring angular velocity information of the IMU after it has been stationary for a certain period of time; calculating the Allan variance based on the angular velocity information; and confirming the initialization time T based on the Allan variance calculation result. init ; at initialization time T initThe system continuously acquires accelerometer output information from the IMU and calculates a threshold for determining whether the IMU is stationary based on this information. It then identifies the parameters to be calibrated based on preset acceleration and gyroscope parameters and constructs an error model. Using the LM algorithm, it calculates the acceleration error parameters to be calibrated based on the constructed error model and the corresponding gravitational acceleration at the calibration location. Based on these calculated acceleration error parameters, it obtains the calibrated acceleration information after acceleration calibration and calculates the angular velocity error parameters to be calibrated, thus completing the initial calibration of the IMU. Finally, it acquires real-time gyroscope readings and the average value of all values output by the corresponding accelerometer in a stationary state. Based on the acquired gyroscope readings, the average value, and the gravitational acceleration at the calibration location, the LM algorithm is used to continuously calibrate the IMU error parameters during use.
[0007] Optionally, in a first embodiment of the first aspect of the present invention, the step of acquiring the angular velocity information of the IMU after it has been stationary for a certain period of time, calculating the Allan variance based on the angular velocity information, and confirming the initialization time T based on the Allan variance calculation result is described in part. init Specifically, this includes: acquiring stationary information of the IMU in a stationary state, wherein the stationary time of the stationary information is ≥ a preset detection time; and transmitting the angular velocity information at a preset time interval. Divide the data into K intervals and calculate the Allan variance based on the angular velocity information. Adjust time The numerical value, and the Allan variance are calculated repeatedly. When Allan variance σ a 2 When the value meets the preset convergence condition, the corresponding time is obtained. As initialization time T init ; at initialization time T init Within this process, all readings output by the gyroscope are acquired and averaged to obtain the gyroscope's fundamental drift ω. b .
[0008] In a second embodiment of the first aspect of the invention, the initialization time T init Within this timeframe, the system continuously acquires the accelerometer output information of the IMU and calculates a threshold for determining whether the IMU is in a stationary state based on the accelerometer output information. Specifically, this includes: during the initialization time T... init Within this timeframe, the accelerometer output information of the IMU is continuously acquired, and the initialization time T is calculated accordingly. init variance within Based on the calculated variance The threshold used to determine whether the IMU is in a static state is calculated using a preset coefficient α. At a certain time tw Within this timeframe, the accelerometer output information from the IMU is continuously acquired, and the corresponding calculation time t is calculated. w variance within according to and The comparison results confirmed whether the IMU was in a stationary or moving state.
[0009] In a third embodiment of the first aspect of the present invention, the step of confirming the parameters to be calibrated based on preset acceleration-related parameters and preset gyroscope-related parameters specifically includes: the acceleration-related parameters include the acceleration measurement coordinate axis misalignment error parameter T. a Acceleration amplification error K a and acceleration drift b a Their expressions are as follows:
[0010]
[0011]
[0012]
[0013] The gyroscope-related parameters include the gyroscope measurement coordinate axis misalignment error parameter T. g Gyroscope amplification error K g and gyroscope drift b g Their expressions are as follows:
[0014]
[0015]
[0016]
[0017] The parameters to be calibrated include the acceleration error parameter θ to be calibrated. acc and the error parameter θ of the gyroscope to be calibrated gyro Their expressions are as follows:
[0018]
[0019]
[0020] In a fourth embodiment of the first aspect of the present invention, the step of constructing an error model based on the parameters to be calibrated specifically includes: the expression of the error model is:
[0021] a 0 =T a K a (a s +b a +v a)=h(a s ,θ acc )
[0022] ω 0 =T g K g (ω s +b g +v g );
[0023] Among them, v a For acceleration measurement noise, v g To measure the noise of the gyroscope, a s It is the value output by the accelerometer in a stationary state, w s It is a real-time gyroscope reading.
[0024] In a fifth embodiment of the first aspect of the present invention, the step of employing the LM algorithm to calculate the acceleration error parameters to be calibrated based on the constructed error model and the gravitational acceleration corresponding to the calibration location, obtaining the calibration acceleration information after acceleration calibration based on the calculated acceleration error parameters, and calculating the angular velocity error parameters to be calibrated based on the obtained calibration acceleration information to complete the initial calibration of the IMU, specifically includes: defining a first cost function based on the constructed error model as follows:
[0025]
[0026] The first cost function is minimized using the LM algorithm to obtain θ. acc The optimal solution;
[0027] The calibrated acceleration information after acceleration calibration is obtained, the obtained angular velocity information and the calibrated acceleration information are integrated, and then the acceleration μ at the Kth stationary state is calculated. a,K The acquired angular velocity information includes n gyroscope readings between the (K-1)th and Kth stationary states. The acquired calibration acceleration information includes the average value μ of all values output by the accelerometer during the (K-1)th rest state. g,K-1 The μ a,K The expression is as follows:
[0028]
[0029] Where φ is the integral operator;
[0030] Define the second cost function as:
[0031]
[0032] Where, μ g,KThe average value of all values output by the accelerometer during the Kth stationary state is used to calibrate the acceleration information;
[0033] The second cost function is minimized using the LM algorithm to obtain θ. gyro The optimal solution;
[0034] Based on the calculated calibration parameter θ acc and θ gyro Complete the initial calibration of the IMU.
[0035] In a sixth embodiment of the first aspect of the present invention, the step of acquiring the gyroscope readings fed back in real time during use and the average value of all values output by the accelerometer corresponding to the stationary state, and using the LM algorithm to continuously calibrate the IMU error parameters during use based on the acquired gyroscope readings, the acquired average value, and the calibrated gravitational acceleration, specifically includes: during IMU use, acquiring n calibration readings of the gyroscope between the Kth stationary state and the (K-1)th stationary state.
[0036] Based on the calibration readings of the nth gyroscope The integral result and the average value μ of all values output by the K-1th stationary accelerometer included in the calibration acceleration information. g,K-1 Calculate the acceleration μ1 of the Kth stationary state. a,K Specifically:
[0037]
[0038] Define the third cost function as:
[0039]
[0040] Where, μ g,K The average value of all values output by the accelerometer during the Kth stationary state is used to calibrate the acceleration information;
[0041] The LM algorithm is used to minimize the third cost function to obtain θ1. acc The optimal solution, where ε is the preset weight, θ1 acc The error parameter for acceleration during use;
[0042] Using the calculated θ1 acc The μ included in the calibration acceleration information g,K and μ g,K-1 Further correction yields the corrected average value μ1 corresponding to the Kth static state. g,K and the corrected average value μ1 corresponding to the (K-1)th static state. g,K-1 ;
[0043] Based on the angular velocity information, including n gyroscope readings The integral results and the corrected average value μ1 corresponding to the (K-1)th static state. g,K-1 Calculate the estimated acceleration μ2 a,K Specifically:
[0044]
[0045] Define the fourth cost function as:
[0046]
[0047] The LM algorithm is used to minimize the fourth cost function to obtain θ1. gyro The optimal solution, where ε is the preset weight, θ1 gyro The error parameters of the gyroscope during use are θ1. acc and θ1 gyro Enables continuous calibration of IMU error parameters during their use.
[0048] A second aspect of the present invention provides an IMU continuous calibration device, comprising: an acquisition module, configured to acquire angular velocity information of the IMU after it has been stationary for a certain period of time, calculate the Allan variance based on the angular velocity information, and confirm the initialization time T based on the Allan variance calculation result. init The judgment module is used to determine the initialization time T. init The system continuously acquires accelerometer output information from the IMU and calculates a threshold for determining whether the IMU is stationary based on this information. A construction module identifies the parameters to be calibrated based on preset acceleration and gyroscope parameters and constructs an error model accordingly. An initialization calibration module uses the LM algorithm to calculate the acceleration error parameters to be calibrated based on the constructed error model and the corresponding gravitational acceleration at the calibration location. It then obtains the calibrated acceleration information after acceleration calibration based on the calculated parameters and calculates the angular velocity error parameters to be calibrated, completing the initial calibration of the IMU. A continuous calibration module acquires real-time gyroscope readings and the average of all values output by the corresponding accelerometer in a stationary state. Based on the acquired gyroscope readings, the average value, and the gravitational acceleration at the calibration location, it uses the LM algorithm to continuously calibrate the IMU error parameters during use.
[0049] A third aspect of the present invention provides an IMU continuous calibration device, the IMU continuous calibration device comprising: a memory and at least one processor, the memory storing instructions; the at least one processor calling the instructions in the memory to cause the IMU continuous calibration device to perform the various steps of the IMU continuous calibration method described in any of the preceding claims.
[0050] A fourth aspect of the present invention provides a computer-readable storage medium storing instructions that, when executed by a processor, implement the steps of the IMU continuous calibration method described in any of the preceding claims.
[0051] In the technical solution of this invention, the angular velocity information of the IMU after it has been stationary for a certain period of time is obtained, and the Allan variance is calculated. The initialization time T is then determined based on the Allan variance calculation result. init ; at initialization time T init The method continuously acquires the accelerometer output information of the IMU and calculates the threshold used to determine whether the IMU is in a stationary state; confirms the parameters to be calibrated according to preset relevant parameters and constructs an error model; calculates the parameters to be calibrated and completes the initial calibration of the IMU based on the calculated parameters; acquires the real-time feedback gyroscope readings during use and the average value of all values output by the corresponding accelerometer in a stationary state; and uses the LM algorithm to continuously calibrate the IMU error parameters during use based on the acquired gyroscope readings, the acquired average value, and the gravitational acceleration of the calibration site. The method disclosed in this application can continuously calibrate the error parameters of the IMU during use, so that the error parameters of the IMU remain in a relatively accurate state during use, greatly reducing the workload of calibration of error parameters before leaving the factory, saving manpower, material resources, and financial resources, and making the error parameters of the IMU more consistent with the actual use scenario, thus improving the user experience. Attached Figure Description
[0052] Figure 1 This is a first flowchart of the IMU continuous calibration method provided in an embodiment of the present invention;
[0053] Figure 2 This is a second flowchart of the IMU continuous calibration method provided in the embodiments of the present invention;
[0054] Figure 3 This is a third flowchart of the IMU continuous calibration method provided in the embodiments of the present invention;
[0055] Figure 4 This is a fourth flowchart of the IMU continuous calibration method provided in the embodiments of the present invention;
[0056] Figure 5This is a fifth flowchart of the IMU continuous calibration method provided in the embodiments of the present invention;
[0057] Figure 6 This is a schematic diagram of a continuous calibration device for IMU provided in an embodiment of the present invention;
[0058] Figure 7 This is a schematic diagram of the structure of the IMU continuous calibration device provided in an embodiment of the present invention. Detailed Implementation
[0059] This invention provides an IMU continuous calibration method, apparatus, device, and storage medium. The terms "first," "second," "third," "fourth," etc. (if present) in the specification, claims, and accompanying drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments described herein can be implemented in a sequence other than that illustrated or described herein. Furthermore, the terms "comprising" or "having" and any variations thereof are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or device that includes a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or devices.
[0060] For ease of understanding, the specific process of the embodiments of the present invention is described below. Please refer to [link / reference]. Figure 1 One embodiment of the IMU continuous calibration method in this invention includes:
[0061] 101. Obtain the angular velocity information of the IMU after it has been stationary for a certain period of time, calculate the Allan variance based on the angular velocity information, and confirm the initialization time T based on the Allan variance calculation result. init ;
[0062] 102. At initialization time T init Inside, the accelerometer output information of the IMU is continuously acquired, and a threshold for determining whether the IMU is in a stationary state is calculated based on the accelerometer output information.
[0063] In this embodiment, since the continuous calibration methods disclosed in this application are all based on the judgment of the IMU's stationary or moving state, it is necessary to calculate a threshold for judging whether the IMU is in a stationary state to ensure that the acquired data and information are consistent with the state of the IMU.
[0064] 103. Based on the preset acceleration-related parameters and preset gyroscope-related parameters, confirm the parameters to be calibrated, and construct an error model based on the parameters to be calibrated;
[0065] The acceleration-related parameters include the acceleration measurement coordinate axis misalignment error parameter T. a Acceleration amplification error K a and acceleration drift b a Their expressions are as follows:
[0066]
[0067]
[0068]
[0069] The gyroscope-related parameters include the gyroscope measurement coordinate axis misalignment error parameter T. g Gyroscope amplification error K g and gyroscope drift b g Their expressions are as follows:
[0070]
[0071]
[0072]
[0073] The parameters to be calibrated include the acceleration error parameter θ to be calibrated. acc and the error parameter θ of the gyroscope to be calibrated gyro Their expressions are as follows:
[0074]
[0075]
[0076] The expression for the error model is:
[0077] a 0 =T a K a (a s +b a +v a )=h(a s ,θ acc )
[0078] ω 0 =T g K g (ω s +b g +v g );
[0079] Among them, v a For acceleration measurement noise, v g To measure the noise of the gyroscope, a sIt is the value output by the accelerometer in a stationary state, w s It is a real-time gyroscope reading;
[0080] In this embodiment, a in the error model 0 v in a It can be ignored because a s It is the accelerometer reading taken each time the object is stationary, v a It will be averaged out during the calculation of the average, therefore v a It can be ignored.
[0081] 104. Using the LM algorithm, calculate the acceleration error parameters to be calibrated based on the constructed error model and the corresponding gravitational acceleration at the calibration site. Obtain the calibration acceleration information after acceleration calibration based on the calculated acceleration error parameters. Calculate the angular velocity error parameters to be calibrated based on the obtained calibration acceleration information to complete the initial calibration of the IMU.
[0082] In this embodiment, the Levenberg-Marquardt (LM) algorithm is used to calculate the parameters to be calibrated. The LM algorithm is a method for estimating regression parameters using least squares in nonlinear regression. This method combines the steepest descent method and the linearization method (Taylor series). The steepest descent method is suitable for the initial stage of iteration when the parameter estimate is far from the optimal value, while the linearization method, namely the Gauss-Newton method, is suitable for the later stage of iteration when the parameter estimate is close to the optimal value. By combining the two methods, the LM algorithm can find the optimal value relatively quickly.
[0083] 105. Obtain the real-time feedback gyroscope readings during use and the average value of all values output by the corresponding accelerometer in a stationary state. Based on the obtained gyroscope readings, the obtained average value, and the calibrated gravitational acceleration, use the LM algorithm to continuously calibrate the IMU error parameters during use.
[0084] This application discloses an IMU continuous calibration method, which obtains the angular velocity information of the IMU after it has been stationary for a certain period of time, calculates the Allan variance, and determines the initialization time T based on the Allan variance calculation result. init ; at initialization time T initThe method continuously acquires the accelerometer output information of the IMU and calculates the threshold used to determine whether the IMU is in a stationary state; confirms the parameters to be calibrated according to preset relevant parameters and constructs an error model; calculates the parameters to be calibrated and completes the initial calibration of the IMU based on the calculated parameters; acquires the real-time feedback gyroscope readings during use and the average value of all values output by the corresponding accelerometer in a stationary state; and uses the LM algorithm to continuously calibrate the IMU error parameters during use based on the acquired gyroscope readings, the acquired average value, and the gravitational acceleration of the calibration site. The method disclosed in this application can continuously calibrate the error parameters of the IMU during use, so that the error parameters of the IMU remain in a relatively accurate state during use, greatly reducing the workload of calibration of error parameters before leaving the factory, saving manpower, material resources, and financial resources, and making the error parameters of the IMU more consistent with the actual use scenario, thus improving the user experience.
[0085] The IMU continuous calibration method disclosed in this application is applicable to handheld devices, such as mobile phones and smart pens, which meet two conditions: first, they frequently switch between static and dynamic states; second, they are always powered on.
[0086] Please see Figure 2 The second embodiment of the IMU continuous calibration method in this invention includes:
[0087] 201. Obtain the static information of the IMU in a static posture, wherein the static time of the static information is greater than or equal to a preset detection time;
[0088] In this embodiment, the preset detection time can be 200 seconds; during the initialization and calibration stage before leaving the factory, the IMU is placed in different positions with different postures, and the IMU needs to be stationary for at least 2 to 4 seconds in each position, with each position corresponding to a stationary information.
[0089] 202. Transmit the angular velocity information at a preset time. Divide the data into K intervals and calculate the Allan variance based on the angular velocity information. The expression for the Allan variance of the X-axis is:
[0090]
[0091] in, The average acceleration measured in the Kth interval is... This represents the average acceleration measured in the (K-1)th interval;
[0092] In this embodiment, the Allan variances corresponding to the X, Y, and Z axes are calculated based on the angular velocity information.
[0093] 203. Adjusting the time The numerical value, and the Allan variance are calculated repeatedly. When Allan variance When the value meets the preset convergence condition, the corresponding time is obtained. As initialization time T init ;
[0094] In this embodiment, let As time goes by The value gradually increases, and the Allan variance... It will gradually converge when the Allan variance The value over time When the value gradually increases while remaining essentially constant, it indicates that the Allan variance is relatively stable. The value satisfies the preset convergence condition, and the time that satisfies the preset convergence condition is taken. For initialization time T init .
[0095] 204. At initialization time T init Within this process, all readings output by the gyroscope are acquired and averaged to obtain the gyroscope's fundamental drift ω. b This basic drift can be used as the drift parameter b in the constructed error model. g The initial value.
[0096] Please see Figure 3 The third embodiment of the IMU continuous calibration method in this invention includes:
[0097] 301. At initialization time T init Within this timeframe, the accelerometer output information of the IMU is continuously acquired, and the initialization time T is calculated accordingly. init variance within Its expression is:
[0098]
[0099] Where var is the operator for calculating variance. It is the initialization time T init The variance of acceleration on a certain axis over a period of time.
[0100] 302. Based on the calculated variance The threshold used to determine whether the IMU is in a static state is calculated using a preset coefficient α.
[0101] In this embodiment, the value of the coefficient α can be customized, 1≤α≤N, where α is an integer. The value of α can be determined by the following method: α takes different values, and the cost of the system corresponding to the numerical value is calculated using the LM algorithm. Then, the α value corresponding to the minimum cost is selected. Since all α values need to be traversed, the larger N is, the greater the computational load.
[0102] 303. At a certain time t w Within this timeframe, the accelerometer output information from the IMU is continuously acquired, and the corresponding calculation time t is calculated. w variance within Its expression is:
[0103]
[0104] in, It is t w The variance of acceleration on a certain axis within a certain time period; after the initialization phase, taking time t as the midpoint, t... w =2s, continuously acquire accelerometer output information from the IMU, organize the acquired accelerometer information into a format of length t w Calculate the variance within a time window. Then, using a sliding window approach, the window is moved backward along the time axis, and the variance within the window is recalculated; this continues until the window slides to the end of the data; all consecutive windows with variances less than the threshold are merged together to form segments of stationary time; additional conditions can be added to require that the number of consecutive windows is not less than N to avoid misjudging stationary states.
[0105] 304. According to and The comparison results confirmed whether the IMU was in a stationary or moving state;
[0106] In this embodiment, when When the IMU is stationary, it is in motion; conversely, when it is active, it is in motion.
[0107] Please see Figure 4 The fifth embodiment of the IMU continuous calibration method in this invention includes:
[0108] 401. Based on the constructed error model, the first cost function is defined as:
[0109]
[0110] The first cost function is minimized using the LM algorithm to obtain θ. acc The optimal solution, based on the obtained θ acc The optimal solution is used to calibrate the error parameters of the accelerometer in order to obtain the calibrated acceleration information.
[0111] 402. Obtain the calibrated acceleration information after acceleration calibration, integrate the obtained angular velocity information and the calibrated acceleration information, and then calculate the acceleration μ at the Kth stationary state. a,K The acquired angular velocity information includes n gyroscope readings between the (K-1)th and Kth stationary states. The acquired calibration acceleration information includes the average value μ of all values output by the accelerometer during the (K-1)th rest state. g,K-1 The μ a,K The expression is as follows:
[0112]
[0113] In this embodiment, φ is an integral calculation operator. By integrating the acceleration output of the K-1th stationary state and the gyroscope reading between the two stationary states, the acceleration at the Kth stationary state can be obtained.
[0114] 403. Define the second cost function as:
[0115]
[0116] Where, μ g,K The average value of all values output by the accelerometer during the Kth stationary state is used to calibrate the acceleration information;
[0117] The second cost function is minimized using the LM algorithm to obtain θ. gyro The optimal solution; based on the obtained θ gyro The optimal solution is used to calibrate the error parameters of the gyroscope.
[0118] 404. Based on the calculated calibration parameter θ acc and θ gyro Complete the initial calibration of the IMU.
[0119] Please see Figure 5 The sixth embodiment of the IMU continuous calibration method in this invention includes:
[0120] 501. During IMU use, acquire n calibration readings of the gyroscope between the Kth stationary state and the (K-1)th stationary state.
[0121] 502. Based on the calibration readings of the nth gyroscope. The integral result and the average value μ of all values output by the K-1th stationary accelerometer included in the calibration acceleration information. g,K-1 Calculate the acceleration μ1 of the Kth stationary state. a,K ;
[0122] In this embodiment, the formula is used. The angular velocity μ1 that achieves the Kth stationary state a,K The calculation.
[0123] 503. Define the third cost function as:
[0124]
[0125] Where, μ g,K The average value of all values output by the accelerometer during the Kth stationary state is used to calibrate the acceleration information;
[0126] The LM algorithm is used to minimize the third cost function to obtain θ1. acc The optimal solution, where ε is the preset weight, θ1 acc The error parameter for acceleration during use;
[0127] 504. Using the calculated θ1 acc The μ included in the calibration acceleration information g,K and μ g,K-1 Further correction yields the corrected average value μ1 corresponding to the Kth static state. g,K and the corrected average value μ1 corresponding to the (K-1)th static state. g,K-1 ;
[0128] 505. Based on the acceleration information including n gyroscope readings The integral results and the corrected average value μ1 corresponding to the (K-1)th static state. g,K-1 Calculate the estimated acceleration μ2 a,K ;
[0129] In this embodiment, the formula is used. Achieve estimated acceleration μ2 a,K The calculation.
[0130] 506. Define the fourth cost function as:
[0131]
[0132] The LM algorithm is used to minimize the fourth cost function to obtain θ1. gyro The optimal solution, where ε is the preset weight, θ1 gyro The error parameters of the gyroscope during use are θ1. acc and θ1 gyro To achieve continuous calibration of IMU error parameters during their use;
[0133] In this embodiment, the continuous calibration during IMU use includes two steps: first, calibration of the acceleration error parameter, and second, calibration of the angular velocity error. First, assuming the angular velocity error parameter is accurate, the estimated acceleration is calculated based on the average of all accelerometer output values acquired during the (K-1)th stationary state during use and the angular velocity between the two calibrated stationary states. The estimated acceleration is then compared with the average of all accelerometer output values acquired during the Kth stationary state during use to calibrate the acceleration error parameter. Next, assuming the calibrated acceleration error parameter is accurate, the average of all output values acquired in the previous step is calibrated using the calibrated acceleration error parameter. Finally, the angular velocity error is calibrated based on the original angular velocity reading and the angular velocity between the two calibrated stationary states. The average of all output values of the accelerometer is used to calculate the estimated acceleration. The average of all output values of the accelerometer in the Kth static state after calibration is compared with the estimated acceleration to calibrate the gyroscope error parameters. That is, by mutual calibration of acceleration and angular velocity, the IMU error parameters can be continuously optimized during use. During the use of the IMU, the two error parameters are mutually calibrated by combining the gravitational acceleration of the current use environment, the average of the accelerometer output in multiple static states during use, and the real-time angular velocity of the gyroscope. This ensures that the error parameters of the IMU are in a relatively accurate state throughout the entire use period. The method disclosed in this application significantly reduces the workload of calibrating the error parameters of the IMU before it leaves the factory, and also makes the IMU error parameters more consistent with the actual use scenario.
[0134] In this embodiment, the value of the weight ε can be customized, 0 < ε < 1, and the solution results of the third cost function under different ε values are calculated. The value of ε is determined by taking the case corresponding to the minimum result.
[0135] The above describes the IMU continuous calibration method in the embodiments of the present invention. The following describes the IMU continuous calibration device in the embodiments of the present invention. Please refer to [link / reference]. Figure 6 One embodiment of the IMU continuous calibration device in this invention includes:
[0136] The acquisition module 601 is used to acquire the angular velocity information of the IMU after it has been stationary for a certain period of time, calculate the Allan variance based on the angular velocity information, and determine the initialization time T based on the Allan variance calculation result. init ;
[0137] Module 602 is used to determine the initialization time T. init Inside, the accelerometer output information of the IMU is continuously acquired, and a threshold for determining whether the IMU is in a stationary state is calculated based on the accelerometer output information.
[0138] The construction module 603 is used to determine the parameters to be calibrated based on preset acceleration-related parameters and preset gyroscope-related parameters, and to construct an error model based on the parameters to be calibrated.
[0139] The initialization calibration module 604 is used to calculate the acceleration error parameters to be calibrated based on the constructed error model and the corresponding gravitational acceleration of the calibration site using the LM algorithm, obtain the calibration acceleration information after acceleration calibration based on the calculated acceleration error parameters, calculate the angular velocity error parameters to be calibrated based on the obtained calibration acceleration information, and complete the initialization calibration of the IMU.
[0140] The continuous calibration module 605 is used to acquire the real-time feedback gyroscope readings during use and the average value of all values output by the corresponding accelerometer in a stationary state. Based on the acquired gyroscope readings, the acquired average value, and the gravitational acceleration at the calibration site, the LM algorithm is used to continuously calibrate the IMU error parameters during use.
[0141] above Figure 6 The IMU continuous calibration device in the embodiments of the present invention will be described in detail from the perspective of modular functional entities. The IMU continuous calibration device in the embodiments of the present invention will be described in detail from the perspective of hardware processing.
[0142] Figure 7 This is a schematic diagram of the structure of an IMU continuous calibration device 700 provided in an embodiment of the present invention. The IMU continuous calibration device 700 can vary significantly due to different configurations or performance. It may include one or more central processing units (CPUs) 710 (e.g., one or more processors) and a memory 720, and one or more storage media 730 (e.g., one or more mass storage devices) storing application programs 733 or data 732. The memory 720 and storage media 730 can be temporary or persistent storage. The program stored in the storage media 730 may include one or more modules (not shown in the diagram), each module including a series of instruction operations on the IMU continuous calibration device 700. Furthermore, the processor 710 may be configured to communicate with the storage media 730 and execute the series of instruction operations in the storage media 730 on the IMU continuous calibration device 700 to implement the steps of the IMU continuous calibration method provided in the above-described method embodiments.
[0143] The IMU continuous calibration device 700 may also include one or more power supplies 740, one or more wired or wireless network interfaces 750, one or more input / output interfaces 760, and / or one or more operating systems 731, such as Windows Server, Mac OS X, Unix, Linux, FreeBSD, etc. Those skilled in the art will understand that the IMU continuous calibration device structure shown in this application does not constitute a limitation on IMU-based continuous calibration devices, and may include more or fewer components than illustrated, or combine certain components, or have different component arrangements.
[0144] The present invention also provides a computer-readable storage medium, which can be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium, wherein the computer-readable storage medium stores instructions that, when executed on a computer, cause the computer to perform the steps of the IMU continuous calibration method.
[0145] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the system, device, or unit described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0146] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0147] Finally, it should be noted that the above descriptions are merely preferred embodiments of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A method for continuous IMU calibration, characterized in that, include: Obtain the angular velocity information of the IMU after it has been stationary for a certain period of time, calculate the Allan variance based on the angular velocity information, and determine the initialization time based on the Allan variance calculation result. ; At initialization time Inside, the accelerometer output information of the IMU is continuously acquired, and a threshold for determining whether the IMU is in a stationary state is calculated based on the accelerometer output information. The parameters to be calibrated are determined based on the preset acceleration-related parameters and preset gyroscope-related parameters, and an error model is constructed based on the parameters to be calibrated. The LM algorithm is used to calculate the acceleration error parameters to be calibrated based on the constructed error model and the corresponding gravitational acceleration at the calibration site. The calibration acceleration information after acceleration calibration is obtained based on the calculated acceleration error parameters. The angular velocity error parameters to be calibrated are calculated based on the obtained calibration acceleration information to complete the initial calibration of the IMU. The system acquires real-time gyroscope readings and the average of all values output by the corresponding accelerometer in a stationary state during operation. Based on the acquired gyroscope readings, the average value, and the calibrated gravitational acceleration, the LM algorithm is used to continuously calibrate the IMU error parameters during operation. Specifically, during IMU operation, the system acquires n gyroscope calibration readings between the Kth stationary state and the (K-1)th stationary state. Based on the calibration readings of the nth gyroscope. The integral result and the average of all values output by the K-1th stationary accelerometer, included in the calibration acceleration information. Calculate the acceleration of the Kth stationary state. Specifically: ; Define the third cost function as: in, To calibrate the acceleration information, the average value of all values output by the accelerometer during the Kth stationary state is used, where g is the acceleration due to gravity. Preset weights; use the LM algorithm to minimize the third cost function, and obtain The optimal solution. The error parameter for acceleration during use; using the calculated... The calibration acceleration information includes and Further correction yields the corrected average value corresponding to the Kth static state. and the corrected average value corresponding to the (K-1)th static state. Based on the angular velocity information, including n gyroscope readings. The integral results and the corrected average value corresponding to the (K-1)th static state. Calculate and estimate acceleration Specifically: ; Define the fourth cost function as: ; The fourth cost function is minimized using the LM algorithm, resulting in... The optimal solution, where To measure the error parameters of the gyroscope during use, use and Enables continuous calibration of IMU error parameters during their use.
2. The IMU continuous calibration method according to claim 1, characterized in that, The process involves acquiring the angular velocity information of the IMU after it has been stationary for a certain period of time, calculating the Allan variance based on the angular velocity information, and confirming the initialization time based on the Allan variance calculation result. Specifically, it includes: Acquire static information of the IMU in a static posture, wherein the static time of the static information is greater than or equal to a preset detection time; Angular velocity information is transmitted over a preset time. Divide the data into K intervals and calculate the Allan variance based on the angular velocity information. ; Adjust time The numerical value, and the Allan variance are calculated repeatedly. When Allan variance When the value meets the preset convergence condition, the corresponding time is obtained. As initialization time ; At initialization time Within this process, all readings output by the gyroscope are acquired and averaged to obtain the gyroscope's fundamental drift. .
3. The IMU continuous calibration method according to claim 1, characterized in that, The initialization time Internally, the system continuously acquires the accelerometer output information of the IMU and calculates a threshold for determining whether the IMU is in a stationary state based on the accelerometer output information. Specifically, this includes: At initialization time Within this timeframe, the system continuously acquires the accelerometer output information from the IMU and calculates the corresponding initialization time. variance within ; Based on the calculated variance The threshold α used to determine whether the IMU is in a static state is calculated using a preset coefficient α. ; At a certain time Within this timeframe, the accelerometer output information from the IMU is continuously acquired, and the corresponding calculation time is recorded. variance within ; according to and α The comparison results confirmed whether the IMU was in a stationary or moving state.
4. The IMU continuous calibration method according to claim 3, characterized in that, The step of determining the parameters to be calibrated based on preset acceleration-related parameters and preset gyroscope-related parameters specifically includes: The acceleration-related parameters include acceleration measurement coordinate axis misalignment error parameters. Acceleration amplification error and acceleration drift Their expressions are as follows: ; The gyroscope-related parameters include the gyroscope measurement coordinate axis misalignment error parameters. Gyroscope amplification error and gyroscope drift Their expressions are as follows: ; The parameters to be calibrated include the acceleration error parameters to be calibrated. Error parameters of the gyroscope to be calibrated Their expressions are as follows: ; 。 5. The IMU continuous calibration method according to claim 4, characterized in that, The construction of the error model based on the parameters to be calibrated specifically includes: The expression for the error model is: ; in, For acceleration measurement noise, To measure noise for the gyroscope, It is the value output by the accelerometer in a stationary state. It is a real-time gyroscope reading.
6. The IMU continuous calibration method according to claim 5, characterized in that, The method employs the LM algorithm to calculate the acceleration error parameters to be calibrated based on the constructed error model and the corresponding gravitational acceleration at the calibration site. It then obtains the calibration acceleration information after calibration based on the calculated acceleration error parameters, and calculates the angular velocity error parameters to be calibrated based on the obtained calibration acceleration information, thus completing the IMU initialization calibration. Specifically, this includes: Based on the constructed error model, the first cost function is defined as: The first cost function is minimized using the LM algorithm, resulting in... The optimal solution; Obtain the calibrated acceleration information after acceleration calibration, integrate the obtained angular velocity information and the calibrated acceleration information, and then calculate the acceleration at the Kth stationary state. The acquired angular velocity information includes n gyroscope readings between the (K-1)th and Kth stationary states. The calibration acceleration information includes the average value of all values output by the accelerometer during the (K-1)th stationary state. The The expression is as follows: ; in, For integration operators; Define the second cost function as: ; in, The average value of all values output by the accelerometer during the Kth stationary state is used to calibrate the acceleration information; The second cost function is minimized using the LM algorithm, resulting in... The optimal solution; Based on the calculated parameters to be calibrated and Complete the initial calibration of the IMU.
7. An IMU continuous calibration device, characterized in that, include: The acquisition module is used to acquire the angular velocity information of the IMU after it has been stationary for a certain period of time, calculate the Allan variance based on the angular velocity information, and determine the initialization time based on the Allan variance calculation result. ; The judgment module is used during initialization. Inside, the accelerometer output information of the IMU is continuously acquired, and a threshold for determining whether the IMU is in a stationary state is calculated based on the accelerometer output information. The module is used to determine the parameters to be calibrated based on preset acceleration-related parameters and preset gyroscope-related parameters, and to build an error model based on the parameters to be calibrated. The initialization calibration module is used to calculate the acceleration error parameters to be calibrated based on the constructed error model and the corresponding gravitational acceleration at the calibration site using the LM algorithm, obtain the calibration acceleration information after acceleration calibration based on the calculated acceleration error parameters, and calculate the angular velocity error parameters to be calibrated based on the obtained calibration acceleration information, thus completing the initialization calibration of the IMU. The continuous calibration module acquires real-time gyroscope readings and the average of all values output by the corresponding accelerometer in a stationary state during use. Based on the acquired gyroscope readings, the average value, and the gravitational acceleration at the calibration location, the LM algorithm is used to continuously calibrate the IMU error parameters during use. Specifically, during IMU use, the module acquires n gyroscope calibration readings between the Kth stationary state and the (K-1)th stationary state. Based on the calibration readings of the nth gyroscope. The integral result and the average of all values output by the K-1th stationary accelerometer, included in the calibration acceleration information. Calculate the acceleration of the Kth stationary state. Specifically: ; Define the third cost function as: in, To calibrate the acceleration information, the average value of all values output by the accelerometer during the Kth stationary state is used, where g is the acceleration due to gravity. Preset weights; use the LM algorithm to minimize the third cost function, and obtain The optimal solution. The error parameter for acceleration during use; using the calculated... The calibration acceleration information includes and Further correction yields the corrected average value corresponding to the Kth static state. and the corrected average value corresponding to the (K-1)th static state. Based on the angular velocity information, including n gyroscope readings. The integral results and the corrected average value corresponding to the (K-1)th static state. Calculate and estimate acceleration Specifically: ; Define the fourth cost function as: ; The fourth cost function is minimized using the LM algorithm, resulting in... The optimal solution, where To measure the error parameters of the gyroscope during use, use and Enables continuous calibration of IMU error parameters during their use.
8. An IMU continuous calibration device, characterized in that, The IMU continuous calibration device includes: a memory and at least one processor, wherein the memory stores instructions; At least one of the processors invokes the instructions in the memory to cause the IMU continuous calibration device to perform the steps of the IMU continuous calibration method as described in any one of claims 1-6.
9. A computer-readable storage medium storing instructions thereon, characterized in that, When the instructions are executed by the processor, they implement the steps of the IMU continuous calibration method as described in any one of claims 1-6.