Kalman filter parameter setting method, device, electronic device and storage medium

By establishing the mathematical relationship between the true angular velocity value of the MEMS gyroscope and the variance of the measured noise in the Kalman filtering algorithm in real time, the problem of large amount of parameter tuning and inability to track dynamic performance is solved, and efficient parameter tuning and dynamic performance tracking is achieved.

CN119245619BActive Publication Date: 2025-03-21MT MICROSYST
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411774136.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-05
Publication Date
2025-03-21
Estimated Expiration
2044-12-05

AI Technical Summary

Technical Problem

During the Kalman filtering parameter setting process, the calculation amount is too large and the dynamic performance of the MEMS gyroscope cannot be effectively tracked.

Method used

By obtaining the variance between the true angular velocity value and the measured angular velocity value when the MEMS gyro is at different angular velocities, the mathematical relationship between the true angular velocity value and the variance is established, and the measured noise variance is adjusted in real time in the Kalman filtering algorithm.

Benefits of technology

It effectively reduces the calculation amount during parameter setting, saves setting time, and can track the dynamic performance of MEMS gyroscope in real time, so that the Kalman filtering algorithm outputs the optimal angular velocity estimate.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119245619B_ABST
    Figure CN119245619B_ABST
Patent Text Reader

Abstract

The present invention provides a Kalman filter parameter setting method, device, electronic device and storage medium. The method comprises: obtaining the variance between the angular velocity measurement value and the true angular velocity value measured by the MEMS gyroscope when the MEMS gyroscope is at different angular velocities, and establishing a first mathematical relationship for characterizing the mapping relationship between the true angular velocity value and the variance; when the angular velocity data collected by the MEMS gyroscope is filtered in real time using the Kalman filter algorithm, the measurement noise variance at the current moment is determined based on the angular velocity estimation value at the previous moment output by the Kalman filter algorithm and the first mathematical relationship, so as to determine the angular velocity estimation value at the current moment based on the measurement noise variance at the current moment. The present invention can reduce the amount of calculation in the Kalman filter parameter setting process and effectively track the dynamic performance of the MEMS gyroscope.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of digital processing technology, and in particular to a Kalman filter parameter setting method, device, electronic equipment and storage medium. Background Art

[0002] Micro-Electro-Mechanical System (MEMS) gyroscopes are widely used in aerospace, automotive navigation, industrial automation and other fields due to their low cost, small size and light weight. The random noise content of MEMS gyroscopes is too large. In related technologies, Kalman filtering algorithms are usually used to filter the angular velocity data measured by MEMS gyroscopes to improve data accuracy.

[0003] When the object under test is in a low speed range, the relevant technology usually adopts a method of traversing the parameter range, using genetic algorithms, neural networks, etc. to perform iterative calculations to obtain a local optimal solution, and determines the local optimal solution as the parameters of the Kalman filter algorithm to achieve parameter tuning of the Kalman filter algorithm, and perform filtering operations based on the Kalman filter algorithm after parameter tuning.

[0004] On the one hand, the above iterative calculation method is too computationally intensive and time-consuming. On the other hand, the local optimal solution obtained through cyclic iterative calculation is a fixed value and cannot track the dynamic performance of the MEMS gyroscope well. Summary of the invention

[0005] The embodiments of the present invention provide a Kalman filter parameter setting method, device, electronic device and storage medium to solve the problems of excessive calculation amount and inability to track the dynamic performance of a MEMS gyroscope during the Kalman filter parameter setting process.

[0006] In a first aspect, an embodiment of the present invention provides a Kalman filter parameter setting method, which is applied to a MEMS gyroscope, wherein the Kalman filter parameters include: measurement noise variance; the method includes:

[0007] Obtaining the variance between the angular velocity measurement value measured by the MEMS gyroscope and the true angular velocity value when the MEMS gyroscope is at different angular velocities, and establishing a first mathematical relationship for characterizing the mapping relationship between the true angular velocity value and the variance;

[0008] When the angular velocity data collected by the MEMS gyroscope is filtered in real time using the Kalman filter algorithm, the measurement noise variance at the current moment is determined based on the angular velocity estimate at the previous moment output by the Kalman filter algorithm and the first mathematical relationship, so as to determine the angular velocity estimate at the current moment based on the measurement noise variance at the current moment.

[0009] In a possible implementation, the real angular velocity of the MEMS gyroscope is greater than the first angular velocity value and less than the second angular velocity value; the difference between the second angular velocity value and the first angular velocity value is less than a set threshold;

[0010] The Kalman filter parameters also include: system state transition variance;

[0011] The method further comprises:

[0012] The uniform distribution variance of the first angular velocity value and the second angular velocity value is calculated, and the uniform distribution variance is determined as the system state transfer variance.

[0013] In a possible implementation, the Kalman filter parameters further include: an input matrix, a control input, and system process noise;

[0014] The method further comprises:

[0015] The product of the input matrix and the control input is set to (0 ± Δ 1 ) corresponds to a uniform distribution for any value in the range;

[0016] The system process noise is set to (0±Δ 1 ) any value within the range of Δ 1 Indicates the first setting error.

[0017] In a possible implementation, the real angular velocity of the MEMS gyroscope is greater than the first angular velocity value and less than the second angular velocity value; the difference between the second angular velocity value and the first angular velocity value is less than a set threshold;

[0018] The Kalman filter parameters also include: a state transfer matrix;

[0019] The method further comprises:

[0020] The state transfer matrix is ​​set to (1±Δ 2 ) corresponds to the uniform distribution of any value in the range; Δ 2 Indicates the second setting error.

[0021] In a possible implementation, determining the measurement noise variance at the current moment based on the angular velocity estimate at the previous moment output by the Kalman filter algorithm and the first mathematical relationship includes:

[0022] Using the angular velocity estimation value at the last moment output by the Kalman filter algorithm as the true angular velocity value, and determining the variance corresponding to the true angular velocity value based on the true angular velocity value and the first mathematical relationship;

[0023] The variance is determined as the measurement noise variance at the current moment.

[0024] In a possible implementation manner, the calculating the uniform distribution variance of the first angular velocity value and the second angular velocity value includes:

[0025] according to Calculating uniform distribution variances of the first angular velocity value and the second angular velocity value;

[0026] in, represents the uniform distribution variance, represents the second angular velocity value, represents the first angular velocity value.

[0027] In a possible implementation, obtaining the variance between the angular velocity measurement value measured by the MEMS gyroscope and the true angular velocity value when the MEMS gyroscope is at different angular velocities, and establishing a first mathematical relationship for characterizing the mapping relationship between the true angular velocity value and the variance, includes:

[0028] When the MEMS gyroscope is set on a high-precision turntable, the high-precision turntable is controlled to run at different angular velocities, and the real angular velocity value of the high-precision turntable and the angular velocity measurement value measured by the MEMS gyroscope are correspondingly obtained;

[0029] The variance between each true angular velocity value and the corresponding angular velocity measurement value is calculated respectively, and each true angular velocity value and the corresponding variance are fitted to obtain a first mathematical relationship for characterizing the mapping relationship between the true angular velocity value and the variance.

[0030] In a second aspect, an embodiment of the present invention provides a Kalman filter parameter setting device, which is applied to a MEMS gyroscope, wherein the Kalman filter parameters include: measurement noise variance; the device includes:

[0031] An acquisition module, used for acquiring the variance between the angular velocity measurement value measured by the MEMS gyroscope and the true angular velocity value when the MEMS gyroscope is at different angular velocities, and establishing a first mathematical relationship for characterizing the mapping relationship between the true angular velocity value and the variance;

[0032] The tuning module is used to determine the measurement noise variance at the current moment based on the angular velocity estimate at the previous moment output by the Kalman filtering algorithm and the first mathematical relationship when the angular velocity data collected by the MEMS gyroscope is filtered in real time using the Kalman filtering algorithm, so as to determine the angular velocity estimate at the current moment based on the measurement noise variance at the current moment.

[0033] In a third aspect, an embodiment of the present invention provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the processor implements the steps of the method described in the first aspect or any possible implementation manner of the first aspect.

[0034] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method described in the first aspect or any possible implementation method of the first aspect are implemented.

[0035] The embodiment of the present invention provides a Kalman filter parameter setting method, device, electronic device and storage medium. By obtaining the variance between the true angular velocity value and the angular velocity measurement value when the MEMS gyroscope is at different angular velocities, the mathematical relationship between the true angular velocity value and the variance can be determined. Here, the variance between the true angular velocity value and the angular velocity measurement value can reflect the measurement noise of the MEMS gyroscope when measuring the angular velocity. On this basis, when filtering using the Kalman filter algorithm, based on the angular velocity estimate value at the previous moment and the above mathematical relationship, the measurement noise variance at the current moment can be determined in real time. When determining the parameter of the measurement noise variance, the embodiment of the present invention does not need to perform repeated iterative operations, which can effectively reduce the amount of calculation and save parameter setting time. In addition, the embodiment of the present invention can adjust the measurement noise variance in real time according to the angular velocity estimate value, thereby effectively tracking the dynamic performance of the MEMS gyroscope, so that the Kalman filter algorithm always outputs the optimal angular velocity estimate value. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0037] Figure 1 is a flow chart of an implementation method of a Kalman filter parameter setting method provided by an embodiment of the present invention;

[0038] Figure 2 is a structural schematic diagram of a Kalman filter parameter setting device provided in an embodiment of the present invention;

[0039] Figure 3 is a schematic diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0040] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present invention. However, it should be clear to those skilled in the art that the present invention may be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present invention.

[0041] MEMS gyroscopes are widely used in aerospace, automotive navigation, industrial automation and other fields to measure the angular velocity of the object being measured. However, considering that the random noise content in the angular velocity measurement value obtained by the MEMS gyroscope is too large, the Kalman filter algorithm is usually used in related technologies to filter the angular velocity measurement value obtained by the MEMS gyroscope to obtain the angular velocity estimation value output by the Kalman filter algorithm, which is used to characterize the angular velocity of the object being measured to improve the angular velocity measurement accuracy.

[0042] Before using the Kalman filter algorithm for filtering, it is necessary to pre-set the parameters of the Kalman filter algorithm to determine the parameter values ​​in the Kalman filter algorithm. When setting the parameters, most of them adopt the method of traversing the parameter interval, using genetic algorithms, neural networks, etc. to perform cyclic iterative calculations to obtain the local optimal solution, and determine the local optimal solution as the parameter of the Kalman filter algorithm. On the one hand, the iterative calculation method has too much calculation and takes a lot of time. On the other hand, the local optimal solution calculated by cyclic iterative calculation is a fixed value and cannot track the dynamic performance of the MEMS gyroscope well.

[0043] In order to reduce the amount of calculation in the parameter setting process and better track the dynamic performance of the MEMS gyroscope, in the implementation of the present application, when the parameter of the measurement noise variance in the Kalman filter algorithm is set, the mathematical relationship between the true angular velocity value and the variance can be determined based on the variance between the true angular velocity value and the angular velocity measurement value when the MEMS gyroscope is at different angular velocities. On this basis, when the Kalman filter algorithm is used for real-time filtering, the measurement noise variance at the current moment can be determined in real time based on the angular velocity estimate value at the previous moment output by the Kalman filter algorithm and the above mathematical relationship. When determining the parameter of the measurement noise variance, the embodiment of the present invention does not need to perform repeated iterative operations, which can effectively reduce the amount of calculation and save parameter setting time. In addition, the embodiment of the present invention can adjust the measurement noise variance in real time according to the angular velocity estimate value, thereby effectively tracking the dynamic performance of the MEMS gyroscope, so that the Kalman filter algorithm always outputs the optimal angular velocity estimate value.

[0044] In order to make the purpose, technical solutions and advantages of the present invention more clear, specific embodiments will be described below in conjunction with the accompanying drawings.

[0045] Figure 1 The implementation flow chart of the Kalman filter parameter setting method provided by the embodiment of the present invention is detailed as follows:

[0046] Step 101, obtaining the variance between the angular velocity measurement value measured by the MEMS gyroscope and the real angular velocity value when the MEMS gyroscope is at different angular velocities, and establishing a first mathematical relationship for characterizing the mapping relationship between the real angular velocity value and the variance.

[0047] In some embodiments, when establishing the first mathematical relationship, the MEMS gyroscope can be set on a high-precision turntable. When the MEMS gyroscope is set on the high-precision turntable, the high-precision turntable can be controlled to run at different angular velocities, and the real angular velocity value of the high-precision turntable and the angular velocity measurement value measured by the MEMS gyroscope are obtained accordingly; then, the variance between each real angular velocity value and the corresponding angular velocity measurement value is calculated respectively, and each real angular velocity value and the corresponding variance are fitted to obtain the first mathematical relationship. The first mathematical relationship is used to characterize the mapping relationship between the real angular velocity value and the variance.

[0048] Here, the least square method can be used to fit each true angular velocity value and the corresponding variance to obtain the first mathematical relationship.

[0049] The variance between the true angular velocity value and the measured angular velocity value can reflect the measurement noise of the MEMS gyroscope when measuring the angular velocity. In other words, the first mathematical relationship can be used to reflect the mapping relationship between different true angular velocity values ​​and measurement noise.

[0050] Step 102, when using the Kalman filter algorithm to perform real-time filtering on the angular velocity data collected by the MEMS gyroscope, based on the angular velocity estimate at the previous moment output by the Kalman filter algorithm and the first mathematical relationship, determine the measurement noise variance at the current moment, so as to determine the angular velocity estimate at the current moment based on the measurement noise variance at the current moment.

[0051] When the Kalman filter algorithm performs real-time filtering on the angular velocity data collected by the MEMS gyroscope, it mainly includes a prediction phase and an update correction phase. The prediction phase can be expressed by the following formulas (1) and (2):

[0052] (1)

[0053] (2)

[0054] in, express The predicted angular velocity at time, represents the state transfer matrix, express The estimated angular velocity at time, represents the input matrix, express The control input at the moment, express The angular velocity prediction error covariance matrix at time , express The angular velocity estimation error covariance matrix at time , represents the transposition factor, represents the system state transition variance.

[0055] In the prediction stage, the Kalman filter algorithm can predict the angular velocity at the current moment based on the angular velocity estimation value at the previous moment to obtain the angular velocity prediction value at the current moment.

[0056] The update correction phase can be expressed by the following formulas (3), (4) and (5):

[0057] (3)

[0058] (4)

[0059] (5)

[0060] in, express The Kalman gain at time t, represents the observation matrix, represents the measurement noise variance, express The estimated angular velocity at time, express The angular velocity measurement value at the time, express The angular velocity estimation error state covariance at time , Represents the identity matrix.

[0061] The Kalman filter algorithm can update and correct the angular velocity prediction value at the current moment in the update and correction phase to obtain the angular velocity estimation value at the current moment, and output the angular velocity estimation value as the true angular velocity value after filtering.

[0062] When using the Kalman filter algorithm to perform real-time filtering on the MEMS gyroscope, it is necessary to adjust parameters such as the state transfer matrix, input matrix, system state transfer variance, and measurement noise variance to determine the value of each parameter.

[0063] Among them, when the embodiment of the present invention adjusts the parameter of measurement noise variance, the angular velocity estimate value at the previous moment output by the Kalman filter algorithm can be used as the true angular velocity value, and the variance corresponding to the true angular velocity value is determined based on the true angular velocity value and the first mathematical relationship; then, the variance is determined as the measurement noise variance at the current moment, so as to determine the measurement noise variance at different moments in real time, thereby realizing the adjustment of the parameter of measurement noise variance.

[0064] Here, the first mathematical relationship can reflect the mapping relationship between different true angular velocity values ​​and corresponding measurement noises. In the embodiment of the present invention, the angular velocity estimation value at the previous moment output by the Kalman filter algorithm is brought into the first mathematical relationship as the true angular velocity value, and the variance under the angular velocity value can be determined, and the variance is determined as the measurement noise variance at the current moment to reflect the measurement noise under the angular velocity.

[0065] By establishing a first mathematical relationship, the embodiment of the present invention can dynamically calibrate the parameter of the measurement noise variance according to the angular velocity estimation value at each moment in real time, thereby updating the calibrated measurement noise variance in real time. Among them, the variance at different angular velocities in the first mathematical relationship can characterize the dynamic performance of the MEMS gyroscope at different angular velocities, and the dynamic performance of the MEMS gyroscope can be effectively tracked by determining the measurement noise variance through the first mathematical relationship.

[0066] Compared with the prior art, the embodiment of the present invention can determine the mathematical relationship between the true angular velocity value and the variance by obtaining the variance between the true angular velocity value and the angular velocity measurement value when the MEMS gyroscope is at different angular velocities. Here, the variance between the true angular velocity value and the angular velocity measurement value can reflect the measurement noise of the MEMS gyroscope when measuring the angular velocity. On this basis, when filtering using the Kalman filter algorithm, the measurement noise variance at the current moment can be determined in real time based on the angular velocity estimate value at the previous moment and the above mathematical relationship. When determining the parameter of the measurement noise variance, the embodiment of the present invention does not need to perform repeated iterative operations, which can effectively reduce the amount of calculation and save parameter setting time. In addition, the embodiment of the present invention can adjust the measurement noise variance in real time according to the angular velocity estimate value, thereby effectively tracking the dynamic performance of the MEMS gyroscope, so that the Kalman filter algorithm always outputs the optimal angular velocity estimate value.

[0067] In some embodiments, when the object under test is in a low speed change interval, that is, the true angular velocity of the MEMS gyroscope is in a low speed change interval. The embodiment of the present invention is used to limit the object under test to be in a low speed change interval by limiting the true angular velocity of the MEMS gyroscope to be greater than the first angular velocity value and less than the second angular velocity value; the difference between the second angular velocity value and the first angular velocity value is less than a set threshold value. Here, the values ​​of the first angular velocity value, the second angular velocity value and the set threshold value can be determined according to actual conditions, and the embodiment of the present invention does not specifically limit this. Exemplarily, the set threshold value in the embodiment of the present invention can be any value between 0 and 25° / s.

[0068] When the object under test is in a low speed change range, that is, the difference between the angular velocity of the object under test at two adjacent moments is small. Accordingly, the difference in angular velocity sensed by the MEMS gyroscope at two adjacent moments is small. On this basis, the embodiment of the present invention can assume that the difference in angular velocity sensed by the MEMS gyroscope at two adjacent moments obeys a uniform distribution within a certain range.

[0069] Among them, when the true angular velocity of the MEMS gyroscope is greater than the first angular velocity value a , and is less than the second angular velocity value b When , it can be assumed that the angular velocity difference between two adjacent moments is in the interval ( a , b On this basis, when the embodiment of the present invention performs parameter tuning on the system state transfer variance parameter in the Kalman filter algorithm, the uniform distribution variance of the first angular velocity value and the second angular velocity value can be calculated, and the uniform distribution variance can be determined as the system state transfer variance.

[0070] Here, the system state transfer variance is used to represent the error between the state transfer matrix and the actual process. This parameter reflects the uncertainty caused by factors such as imperfect models or external interference in the state transfer process. When the angular velocity difference sensed by the MEMS gyroscope conforms to the uniform distribution, the uniform distribution variance can be used to characterize the uncertainty caused by various factors in the state transfer process, thereby achieving the adjustment of the system state transfer variance parameter.

[0071] In some embodiments, according to Calculate the uniform distribution variance of the first angular velocity value and the second angular velocity value;

[0072] in, represents the uniform distribution variance, represents the second angular velocity value, Indicates the first angular velocity value.

[0073] When using the Kalman filter algorithm for filtering, considering the system process noise, the above formula (1) can be expressed as ;

[0074] in, express The system process noise at time. Obeying the Gaussian distribution, it corresponds to The noise of each component in can usually be expressed as , that is, the system process noise meets 0~ Q Normal distribution between .

[0075] Here, when performing Kalman filtering, the system input , used to represent the system vibration. But considering The specific size of is often difficult to determine. Related technologies usually use the difference of the Kalman filter results at two adjacent moments as the filter input item for the next moment, but this treatment will lead to subsequent system process noise. The processing becomes complicated and needs to be determined by empirical parameter adjustment method, which makes the parameter adjustment process too cumbersome.

[0076] On the basis of limiting the object to be measured to a low speed change range, the embodiment of the present invention can normalize various disturbances of the system, which can be expressed as: .in, Represents the uncertainty error caused by the change in angular velocity.

[0077] In the embodiment of the present invention, it can be determined It conforms to the normal distribution between 0 and Q, that is, , which is equivalent to ignoring This system input item.

[0078] According to the above, the embodiment of the present invention determines the system state transition variance as the uniform distribution variance of the first angular velocity value and the second angular velocity value, and can directly use the uniform distribution variance to characterize the uncertainty caused by various factors in the angular velocity change process, including the uncertainty error caused by the velocity change. Based on the system state transition variance Q This parameter represents uncertainty.

[0079] On this basis, when the input matrix, control input and system process noise are parameterized in the embodiment of the present invention, the product of the input matrix and the control input can be set to (0±Δ 1 ) range, and set the system process noise to (0±Δ 1 ) any value within the range of Δ 1 Indicates the first setting error.

[0080] Here, the first setting error can be determined according to actual conditions, and the embodiment of the present invention does not specifically limit this. 1 =0, that is, the product of the input noise and the control input is set to 0, and the system process noise is set to 0.

[0081] In some embodiments, when the measured object is in a low speed change range, the real angular velocity of the MEMS gyroscope is greater than the first angular velocity value and less than the second angular velocity value; the difference between the second angular velocity value and the first angular velocity value is less than the set threshold. At this time, the angular velocity change sensed by the MEMS gyroscope at two adjacent moments is very small. On this basis, the state transfer matrix can be set to (1±Δ 2 ) corresponds to the uniform distribution of any value in the range; Δ 2 Here, the second setting error can be determined according to actual conditions, and the embodiment of the present invention does not specifically limit this. For example, Δ 2 =0, that is, the state transfer matrix is ​​set to 1 corresponding to the uniform distribution.

[0082] Based on the above parameter setting method provided by the embodiment of the present invention, the formulas in the Kalman filter algorithm can be expressed as:

[0083] Prediction stage:

[0084] ;

[0085] ;

[0086] Update correction phase:

[0087] ;

[0088] ;

[0089] ;

[0090] ;

[0091] in, An expression representing the first mathematical relationship.

[0092] The embodiment of the present invention takes into account that the sampling frequency may have some influence on the parameter setting accuracy. To improve the parameter setting accuracy as much as possible, the embodiment of the present invention may increase the sampling frequency as much as possible when filtering using the Kalman filter algorithm. For example, the sampling frequency may be 1000 Hz.

[0093] The embodiment of the present invention realizes true and reliable Kalman filter parameter setting through disturbance normalization, uniform distribution assumption and dynamic calibration. The obtained filter parameters can be directly applied in the low speed range without considering the system model, the long iterative calculation cycle and the poor dynamic performance.

[0094] It should be understood that the order of execution of the steps in the above embodiment does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention.

[0095] The following is an embodiment of the device of the present invention. For details not described in detail therein, reference may be made to the corresponding method embodiment described above.

[0096] Figure 2 The structure diagram of the Kalman filter parameter setting device provided by the embodiment of the present invention is shown. For the convenience of explanation, only the part related to the embodiment of the present invention is shown, which is described in detail as follows:

[0097] The Kalman filter parameter setting device is applied to the MEMS gyroscope, and the Kalman filter parameters include: measurement noise variance. Figure 2 As shown, the Kalman filter parameter setting device 2 includes: an acquisition module 21 and a setting module 22.

[0098] An acquisition module 21 is used to acquire the variance between the angular velocity measurement value measured by the MEMS gyroscope and the actual angular velocity value when the MEMS gyroscope is at different angular velocities, and establish a first mathematical relationship for characterizing the mapping relationship between the actual angular velocity value and the variance;

[0099] The adjustment module 22 is used to determine the measurement noise variance at the current moment based on the angular velocity estimate at the previous moment output by the Kalman filter algorithm and the first mathematical relationship when the angular velocity data collected by the MEMS gyroscope is filtered in real time using the Kalman filter algorithm, so as to determine the angular velocity estimate at the current moment based on the measurement noise variance at the current moment.

[0100] In a possible implementation, the real angular velocity of the MEMS gyroscope is greater than the first angular velocity value and less than the second angular velocity value; the difference between the second angular velocity value and the first angular velocity value is less than a set threshold;

[0101] Kalman filter parameters also include: system state transition variance;

[0102] The setting module 22 is also used for:

[0103] The uniform distribution variance of the first angular velocity value and the second angular velocity value is calculated, and the uniform distribution variance is determined as the system state transfer variance.

[0104] In a possible implementation, the Kalman filter parameters also include: an input matrix, a control input, and system process noise;

[0105] The setting module 22 is also used for:

[0106] The product of the input matrix and the control input is set to (0 ± Δ 1 ) corresponds to a uniform distribution for any value in the range;

[0107] Set the system process noise to (0±Δ 1 ) any value within the range of Δ 1 Indicates the first setting error.

[0108] In a possible implementation, the real angular velocity of the MEMS gyroscope is greater than the first angular velocity value and less than the second angular velocity value; the difference between the second angular velocity value and the first angular velocity value is less than a set threshold;

[0109] Kalman filter parameters also include: state transfer matrix;

[0110] The setting module 22 is also used for:

[0111] Set the state transfer matrix to (1±Δ 2 ) corresponds to the uniform distribution of any value in the range; Δ 2 Indicates the second setting error.

[0112] In a possible implementation, the setting module 22 is specifically configured to:

[0113] The angular velocity estimation value at the last moment output by the Kalman filter algorithm is used as the true angular velocity value, and the variance corresponding to the true angular velocity value is determined based on the true angular velocity value and the first mathematical relationship;

[0114] The variance is determined as the measurement noise variance at the current time instant.

[0115] In a possible implementation, the setting module 22 is specifically configured to:

[0116] according to Calculate the uniform distribution variance of the first angular velocity value and the second angular velocity value;

[0117] in, represents the uniform distribution variance, represents the second angular velocity value, Indicates the first angular velocity value.

[0118] In a possible implementation, the acquisition module 21 is specifically configured to:

[0119] When the MEMS gyroscope is set on a high-precision turntable, the high-precision turntable is controlled to run at different angular velocities, and the real angular velocity value of the high-precision turntable and the angular velocity measurement value measured by the MEMS gyroscope are correspondingly obtained;

[0120] The variances between the actual angular velocity values ​​and the corresponding angular velocity measurement values ​​are calculated respectively, and the actual angular velocity values ​​and the corresponding variances are fitted to obtain a first mathematical relationship for characterizing the mapping relationship between the actual angular velocity values ​​and the variances.

[0121] The present device embodiment can be used to execute the above method embodiment. Its technical principle and technical effect are the same as those of the above method embodiment, and will not be described in detail here.

[0122] Figure 3 Schematic diagram of an electronic device provided by an embodiment of the present invention. Figure 3 As shown, the electronic device 3 of this embodiment includes: a processor 30, a memory 31, and a computer program 32 stored in the memory 31 and executable on the processor 30. When the processor 30 executes the computer program 32, the steps in the above-mentioned various Kalman filter parameter tuning method embodiments are implemented, such as Figure 1 Alternatively, when the processor 30 executes the computer program 32, the functions of each module / unit in the above-mentioned device embodiments are realized, for example Figure 2 The functions of modules 21 to 22 are shown.

[0123] Exemplarily, the computer program 32 may be divided into one or more modules / units, which are stored in the memory 31 and executed by the processor 30 to implement the present invention. The one or more modules / units may be a series of computer program instruction segments capable of implementing specific functions, which are used to describe the execution process of the computer program 32 in the electronic device 3. For example, the computer program 32 may be divided into Figure 2 Modules 21 to 22 are shown.

[0124] The electronic device 3 may be a computing device such as a desktop computer, a notebook, a PDA, or a cloud server. The electronic device 3 may include, but is not limited to, a processor 30 and a memory 31. Those skilled in the art will appreciate that Figure 3 It is only an example of the electronic device 3 and does not constitute a limitation of the electronic device 3. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the electronic device may also include input and output devices, network access devices, buses, etc.

[0125] The processor 30 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.

[0126] The memory 31 may be an internal storage unit of the electronic device 3, such as a hard disk or memory of the electronic device 3. The memory 31 may also be an external storage device of the electronic device 3, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the electronic device 3. Further, the memory 31 may also include both an internal storage unit and an external storage device of the electronic device 3. The memory 31 is used to store the computer program and other programs and data required by the electronic device. The memory 31 may also be used to temporarily store data that has been output or is to be output.

[0127] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.

[0128] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0129] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0130] In the embodiments provided by the present invention, it should be understood that the disclosed devices / electronic devices and methods can be implemented in other ways. For example, the device / electronic device embodiments described above are only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0131] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0132] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0133] If the integrated module / unit is implemented in the form of 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 present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by the processor, the steps of the above-mentioned various Kalman filter parameter tuning method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device that can carry the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium. The embodiments described above are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such 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 invention, and should all be included in the protection scope of the present invention.

Claims

1. A Kalman filter parameter tuning method, characterized in that: Applied to MEMS gyroscopes, Kalman filter parameters include: measurement noise variance; The method comprises: Obtaining the variance between the angular velocity measurement value measured by the MEMS gyroscope and the true angular velocity value when the MEMS gyroscope is at different angular velocities, and establishing a first mathematical relationship for characterizing the mapping relationship between the true angular velocity value and the variance; When the angular velocity data collected by the MEMS gyroscope is filtered in real time by using the Kalman filter algorithm, the measurement noise variance at the current moment is determined based on the angular velocity estimate at the previous moment output by the Kalman filter algorithm and the first mathematical relationship, so as to determine the angular velocity estimate at the current moment based on the measurement noise variance at the current moment; The true angular velocity of the MEMS gyroscope is greater than the first angular velocity value and less than the second angular velocity value; the difference between the second angular velocity value and the first angular velocity value is less than a set threshold; The Kalman filter parameters also include: system state transition variance; The method further comprises: Calculating a uniform distribution variance of the first angular velocity value and the second angular velocity value, and determining the uniform distribution variance as the system state transfer variance; The Kalman filter algorithm includes a prediction phase and an update correction phase when performing real-time filtering on the angular velocity data collected by the MEMS gyroscope. The prediction phase is expressed by formula (1) and formula (2): (1) (2) in, express The predicted angular velocity at time, represents the state transfer matrix, express The estimated angular velocity at time, represents the input matrix, express The control input at the moment, express The angular velocity prediction error covariance matrix at time , express The angular velocity estimation error covariance matrix at time , represents the transposition factor, represents the system state transition variance.

2. The Kalman filter parameter setting method according to claim 1, characterized in that: When using the Kalman filter algorithm for filtering, considering the system process noise, formula (1) is expressed as ;in, express System process noise at the moment; The Kalman filter parameters also include: input matrix, control input and system process noise; The method further comprises: Setting the product of the input matrix and the control input to a uniform distribution corresponding to any value in the range of (0±Δ1); The system process noise is set to any value within the range of (0±Δ1); Δ1 represents a first setting error.

3. The Kalman filter parameter setting method according to claim 1 or 2, characterized in that: The true angular velocity of the MEMS gyroscope is greater than the first angular velocity value and less than the second angular velocity value; The difference between the second angular velocity value and the first angular velocity value is less than a set threshold; The Kalman filter parameters also include: a state transfer matrix; The method further comprises: The state transfer matrix is ​​set to a uniform distribution corresponding to any value in the range of (1±Δ2); Δ2 represents a second setting error.

4. The Kalman filter parameter setting method according to claim 1 or 2, characterized in that: The determining the measurement noise variance at the current moment based on the angular velocity estimation value at the previous moment output by the Kalman filter algorithm and the first mathematical relationship comprises: Using the angular velocity estimation value at the last moment output by the Kalman filter algorithm as the true angular velocity value, and determining the variance corresponding to the true angular velocity value based on the true angular velocity value and the first mathematical relationship; The variance is determined as the measurement noise variance at the current moment.

5. The Kalman filter parameter setting method according to claim 1 or 2, characterized in that: The calculating the uniform distribution variance of the first angular velocity value and the second angular velocity value comprises: according to Calculating uniform distribution variances of the first angular velocity value and the second angular velocity value; in, represents the uniform distribution variance, represents the second angular velocity value, represents the first angular velocity value.

6. The Kalman filter parameter setting method according to claim 1 or 2, characterized in that: The method of obtaining the variance between the angular velocity measurement value measured by the MEMS gyroscope and the actual angular velocity value when the MEMS gyroscope is at different angular velocities, and establishing a first mathematical relationship for characterizing the mapping relationship between the actual angular velocity value and the variance, comprises: When the MEMS gyroscope is set on a high-precision turntable, the high-precision turntable is controlled to run at different angular velocities, and the real angular velocity value of the high-precision turntable and the angular velocity measurement value measured by the MEMS gyroscope are correspondingly obtained; The variance between each true angular velocity value and the corresponding angular velocity measurement value is calculated respectively, and each true angular velocity value and the corresponding variance are fitted to obtain a first mathematical relationship for characterizing the mapping relationship between the true angular velocity value and the variance.

7. A Kalman filter parameter setting device, characterized in that: Applied to MEMS gyroscopes, Kalman filter parameters include: measurement noise variance; The device comprises: An acquisition module, used for acquiring the variance between the angular velocity measurement value measured by the MEMS gyroscope and the true angular velocity value when the MEMS gyroscope is at different angular velocities, and establishing a first mathematical relationship for characterizing the mapping relationship between the true angular velocity value and the variance; A tuning module, configured to determine the measurement noise variance at a current moment based on the angular velocity estimate at a previous moment output by the Kalman filtering algorithm and the first mathematical relationship when performing real-time filtering on the angular velocity data collected by the MEMS gyroscope using the Kalman filtering algorithm, so as to determine the angular velocity estimate at the current moment based on the measurement noise variance at the current moment; The true angular velocity of the MEMS gyroscope is greater than the first angular velocity value and less than the second angular velocity value; the difference between the second angular velocity value and the first angular velocity value is less than a set threshold; The Kalman filter parameters also include: system state transition variance; The device also includes: Calculating a uniform distribution variance of the first angular velocity value and the second angular velocity value, and determining the uniform distribution variance as the system state transfer variance; The Kalman filter algorithm includes a prediction phase and an update correction phase when performing real-time filtering on the angular velocity data collected by the MEMS gyroscope. The prediction phase is expressed by formula (1) and formula (2): (1) (2) in, express The predicted angular velocity at time, represents the state transfer matrix, express The estimated angular velocity at time, represents the input matrix, express The control input at the moment, express The angular velocity prediction error covariance matrix at time , express The angular velocity estimation error covariance matrix at time , represents the transposition factor, represents the system state transition variance.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the Kalman filter parameter tuning method as described in any one of claims 1 to 6 are implemented.

9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the Kalman filter parameter tuning method as described in any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Low-cost sensor combined positioning system and method for automatic driving

    CN110926483A

  • MEMS device zero offset correction method and device and storage medium

    CN111721288A