Kalman filtering parameter setting method, device, equipment, medium and product
By calculating the autocorrelation coefficient in real time and dynamically updating the Kalman filter parameters, the problem of decreased filtering accuracy under long-term operation of the MEMS gyroscope is solved, and a high-precision filtering effect is achieved.
Patent Information
- Application Number
- CN202511261519.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-05
- Publication Date
- 2025-10-17
- Estimated Expiration
- 2045-09-05
AI Technical Summary
The existing Kalman filter parameter tuning method will cause the filtering accuracy to decrease due to temperature drift under long-term operation of MEMS gyroscope, and cannot meet the requirements of high-precision applications.
By calculating the autocorrelation coefficient of the MEMS gyroscope angular velocity measurement value in real time and dynamically updating the state transfer matrix and system state transfer variance, the filtering parameters can be accurately matched with the gyroscope signal characteristics to offset the influence of temperature drift.
The filtering accuracy of MEMS gyroscopes under long-term operating conditions has been significantly improved, adapting to environmental changes and meeting high-precision application requirements.
Smart Images

Figure CN120800334A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of digital processing, and in particular to a Kalman filtering parameter setting method, device, equipment, medium and product. BACKGROUND
[0002] Micro-Electro-Mechanical System (MEMS) gyroscopes have been widely and importantly applied in many fields such as aerospace, automobile navigation, and industrial automation, due to their low cost, small size, and light weight.
[0003] MEMS gyroscopes generally have the inherent characteristic of high random noise content during operation, which directly affects the accuracy of the output angular velocity data. To effectively suppress noise and improve data quality, Kalman filtering algorithms have become a common technical means for processing MEMS gyroscope measurement data. In the prior art, for example, patent document CN119245619A discloses a "Kalman filtering parameter setting method, device, electronic equipment and storage medium", which mainly targets application scenarios where the measured object is in a low speed range, and proposes a scheme for quickly setting Kalman filtering parameters, aiming to track and adapt to the dynamic performance changes of MEMS gyroscopes in real time.
[0004] However, the above parameter setting method has certain limitations: it directly sets the state transition matrix to a uniform distribution corresponding to a fixed numerical value. In the short-term operation condition of MEMS gyroscopes, this parameter setting method can meet the basic requirements; but when MEMS gyroscopes are in long-term operation conditions, as the operation time prolongs, the working temperature will continue to rise, and the measurement signals measured by the MEMS gyroscope will inevitably be affected by temperature changes and produce drift. At this time, if the above fixed state transition matrix is continued to be used, it will be difficult to achieve the ideal filtering effect, resulting in a significant decrease in filtering accuracy, which cannot meet the requirements of MEMS gyroscope data accuracy in actual applications. SUMMARY
[0005] The embodiments of the present application provide a Kalman filtering parameter setting method, device, equipment, medium and product to solve the problem of low filtering accuracy of existing parameter setting methods in long-term operation conditions.
[0006] In a first aspect, the embodiments of the present application provide a Kalman filtering parameter setting method applied to a MEMS gyroscope, wherein the Kalman filtering parameters include a state transition matrix. The method comprises: obtaining the angular velocity measurement values measured by the MEMS gyroscope at each time in the last period; The autocorrelation coefficients between the angular velocity measurements are calculated, and the autocorrelation coefficients are determined as a state transition matrix corresponding to the MEMS gyroscope in a current period.
[0007] In a possible implementation, the autocorrelation coefficients between the angular velocity measurements are calculated, including: The product of the angular velocity measurements at each two adjacent time points is calculated, and the product is accumulated to obtain a signal change trend item; The signal change trend item is normalized based on the angular velocity measurements at each time point to obtain the autocorrelation coefficients.
[0008] In a possible implementation, the signal change trend item is normalized based on the angular velocity measurements at each time point to obtain the autocorrelation coefficients, including: According to The autocorrelation coefficients are determined; wherein, denotes the autocorrelation coefficients, denotes the signal change trend item, denotes the number of time points contained in each period, denotes the angular velocity measurement of the MEMS gyroscope at the time point, denotes the angular velocity measurement of the MEMS gyroscope at the time point.
[0009] In a possible implementation, the Kalman filtering parameters further include a system state transition variance. After the angular velocity measurements measured by the MEMS gyroscope at each time point in a previous period are obtained, the method further includes: The angular velocity measurements are low-pass filtered to obtain angular velocity filtered values corresponding to the MEMS gyroscope at each time point in the previous period; Initial upper and lower limit values of a speed corresponding to the MEMS gyroscope are obtained, and the initial upper and lower limit values of the speed are updated based on the angular velocity filtered values to obtain updated upper and lower limit values of the speed; Based on the updated upper and lower limit values of the speed, a system state transition variance corresponding to the MEMS gyroscope in a current period is determined.
[0010] In a possible implementation, the initial upper and lower limit values of the speed are updated based on the angular velocity filtered values to obtain updated upper and lower limit values of the speed, including: The difference between each angular velocity measurement and a corresponding angular velocity filtered value is calculated to obtain a difference data sequence; calculate a root mean square of the difference value data sequence, and determine the root mean square as a speed variation; determine a difference between the initial speed lower limit value and the speed variation as an updated speed lower limit value; determine a sum of the initial speed upper limit value and the speed variation as an updated speed upper limit value.
[0011] In a possible implementation, the determining, based on the updated speed upper and lower limit values, of the system state transition variance corresponding to the current period of the MEMS gyroscope comprises: calculating a uniform distribution variance of the updated speed lower limit value and the updated speed upper limit value, and determining the uniform distribution variance as the system state transition variance.
[0012] In a second aspect, an embodiment of the present application provides a Kalman filtering parameter setting device, applied to a MEMS gyroscope, and Kalman filtering parameters comprise: a state transition matrix; The device comprises: an acquisition module, configured to acquire angular velocity measurement values measured by the MEMS gyroscope at each time in a previous period; a setting module, configured to calculate autocorrelation coefficients between the angular velocity measurement values, and determine the autocorrelation coefficients as a state transition matrix corresponding to a current period of the MEMS gyroscope.
[0013] In a third aspect, an embodiment of the present application provides an electronic device, comprising a memory and a processor, the memory stores a computer program, and the processor implements the method in the first aspect or any possible implementation manner of the first aspect when executing the computer program.
[0014] In a fourth aspect, an embodiment of the present application provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the method in the first aspect or any possible implementation manner of the first aspect.
[0015] In a fifth aspect, an embodiment of the present application provides a computer program product, comprising a computer program, and the computer program is executed by a processor to implement the method in the first aspect or any possible implementation manner of the first aspect.
[0016] The embodiment of the present application considers that the angular velocity measurement value of the MEMS gyroscope in a low speed change operation scene has significant time correlation, and the autocorrelation coefficient can accurately depict the correlation between the signals. From the physical meaning, the state transition matrix in the Kalman filter is used to represent the correlation of the system state at adjacent time points, and the two have inherent consistency in function. Therefore, the autocorrelation coefficient is determined as the state transition matrix, so that the filter parameters are accurately matched with the characteristics of the gyroscope signal.
[0017] When the MEMS gyroscope is in a long-term operation condition, the temperature drift will cause the time correlation of the signal to change dynamically. For this, the embodiment of the present application realizes dynamic updating of the state transition matrix by periodically calculating the autocorrelation coefficient of the corresponding period in real time, so that it can adapt to the evolution law of the system state in real time, effectively offset the influence of temperature drift, and ultimately realize the purpose of improving the filtering precision. BRIEF DESCRIPTION OF DRAWINGS
[0018] Figure 1 is the implementation flowchart of the Kalman filter parameter setting method provided by an embodiment of the present application; Figure 2 is the implementation flowchart of the Kalman filter parameter setting method provided by another embodiment of the present application; Figure 3 is a structural schematic diagram of a Kalman filter parameter setting device provided by an embodiment of the present application; Figure 4 is a schematic diagram of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION
[0019] The embodiments of the present application will be described in detail below with reference to the drawings.
[0020] The applicant has found that in the application scene of the measured object in the low speed change interval, when the MEMS gyroscope is in a long-term continuous operation condition, the internal temperature of the device and the ambient temperature will inevitably continue to rise. The change of temperature will significantly affect the core sensing element and the electronic characteristics of the MEMS gyroscope, causing the time-varying drift of the statistical characteristics (such as variance, correlation) of the random noise.
[0021] And the related art directly uses a fixed and unchanged state transition matrix, which cannot effectively represent and track the change of the system dynamic characteristics caused by temperature drift and other factors. The aggravation of the mismatch between the state transition matrix and the actual system model will directly lead to the decline of the estimation accuracy of the Kalman filter algorithm, and the significant degradation of the filtering effect, which is difficult to meet the requirements of high precision, long time application scene on the reliability of the MEMS gyroscope data.
[0022] In order to improve the filtering accuracy under long-term operating conditions, an embodiment of the present invention dynamically updates the state transfer matrix of the current cycle based on the autocorrelation coefficient corresponding to the angular velocity measurement value measured by the MEMS gyroscope in the previous cycle, so that the state transfer matrix can adapt to the evolution law of the system state in real time, effectively offset the impact of temperature drift, and ultimately achieve the purpose of improving filtering accuracy.
[0023] Here, we first briefly introduce the Kalman filter algorithm.
[0024] When the Kalman filter algorithm performs real-time filtering on the angular velocity data collected by the MEMS gyroscope, it mainly includes the prediction stage and the update correction stage. The prediction stage can be expressed by the following formulas (1) and (2): (1) (2) in, express The predicted angular velocity at time t, represents the state transition matrix, express The estimated angular velocity at time t, 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 transpose factor, represents the system state transition variance.
[0025] In the prediction stage, the Kalman filter algorithm can predict the angular velocity at the current moment based on the angular velocity estimate at the previous moment to obtain the angular velocity prediction value at the current moment.
[0026] The update correction phase can be expressed by the following formulas (3), (4) and (5): (3) (4) (5) in, express The Kalman gain at time t, represents the observation matrix, represents the measurement noise variance, express The estimated angular velocity at time t, express The angular velocity measurement value at the moment, express The angular velocity estimation error state covariance at time , Represents the identity matrix.
[0027] 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 estimate value at the current moment, and output the angular velocity estimate value as the true angular velocity value after filtering.
[0028] When using the Kalman filter algorithm to perform real-time filtering on a MEMS gyroscope, it is necessary to tune parameters such as the state transfer matrix, input matrix, system state transfer variance, and measurement noise variance to determine the values of each parameter.
[0029] The embodiments of the present invention are mainly aimed at application scenarios where the object under test is in a low speed range and the MEMS gyroscope is in a long-term operating condition. Taking into account the influence of temperature drift on the MEMS gyroscope under long-term operating conditions, the existing state transfer matrix tuning method has the problem of low filtering accuracy, and thus a new Kalman filter parameter tuning method is proposed to solve the above problem.
[0030] See also Figure 1 , which shows a flow chart of the implementation of the Kalman filter parameter tuning method provided by an embodiment of the present invention, and is described in detail as follows: Step 101: Obtain the angular velocity measurement values of the MEMS gyroscope measured at each time in the previous cycle.
[0031] The embodiment of the present invention can divide the operation period of the MEMS gyroscope into multiple cycles, and obtain the angular velocity measurement values measured by the MEMS gyroscope at each moment of the previous cycle in real time during the operation of the MEMS gyroscope, so as to update the state transfer matrix of the MEMS gyroscope in the current cycle.
[0032] Here, the cycle length can be determined based on the actual temperature rise, and the temperature of the MEMS gyroscope remains constant or within the allowable error range during each cycle. For example, the cycle length can be 1 hour.
[0033] Step 102 : Calculate the autocorrelation coefficients between the angular velocity measurement values, and determine the autocorrelation coefficients as the state transfer matrix corresponding to the MEMS gyroscope in the current cycle.
[0034] The applicant has found through research that the angular velocity values measured in a low-speed variable operation scenario have a strong time correlation and satisfy the first-order autoregressive model: .in, express White noise at all times.
[0035] autocorrelation coefficient Just can accurately describe the relevance between the signals. The state transition matrix in Kalman filter is used to represent the relevance rule of the system state at adjacent time. The autocorrelation coefficient and the state transition matrix have internal consistency in function.
[0036] Therefore, the embodiment of the application directly determines the autocorrelation coefficient corresponding to the last period as the state transition matrix of the current period, so that the filter parameters are accurately matched with the characteristics of the gyro signal, and dynamic updating of the state transition matrix is realized.
[0037] In some embodiments, for each angular velocity measurement value measured by the MEMS gyro in the last period, the product of the angular velocity measurement values at every two adjacent time points can be calculated, and the product is accumulated to obtain a signal change trend item; then, based on the angular velocity measurement value at each time point, the signal change trend item is normalized to obtain the autocorrelation coefficient.
[0038] The calculation formula of the autocorrelation coefficient can be expressed as: .
[0039] Wherein, the autocorrelation coefficient, the signal change trend item, the number of time points contained in each period, the angular velocity measurement value measured by the MEMS gyro at the time point, the angular velocity measurement value measured by the MEMS gyro at the time point. the angular velocity measurement value measured by the MEMS gyro at the time point.
[0040] Here, the signal change trend item represents the sum of the products of the signal values at adjacent time points, and reflects the cooperative change trend of the two. represents the sum of the squares of the signal values at the previous time point, and is used to normalize the signal change trend item, so that the value range of the autocorrelation coefficient can be limited to [-1, 1], so as to eliminate the influence of signal amplitude difference on the relevance measurement.
[0041] autocorrelation coefficient directly reflects the time continuity of the gyro angular velocity signal in the low variable speed interval. The autocorrelation coefficient is closer to 1, the stronger the linear correlation of the signals at adjacent time points, and the better the stability of the gyro output; the autocorrelation coefficient deviates from 1, the greater the influence of noise or drift on the signal, and the weaker the relevance.
[0042] In Kalman filter, the state transition matrix The physical meaning of the autocorrelation coefficient is to describe how the system state at the previous moment evolves to the current moment state. For the MEMS gyroscope running at low variable speed, the time correlation of the angular velocity measurement value is the core feature of state evolution.
[0043] The autocorrelation coefficient calculated by the formula in the embodiment of the application is essentially a statistical fitting of the evolution rule. When the MEMS gyroscope runs for a long time and is affected by temperature drift, the autocorrelation coefficient will dynamically adjust with the change of signal correlation. At this time, the autocorrelation coefficient is taken as the state transition matrix , so that the state transition matrix can match the real state evolution rule of the system in real time, avoiding the decline of filtering accuracy caused by the fixed state transition matrix.
[0044] In the embodiment of the application, in the initial running period (for example, the first cycle) of the MEMS gyroscope, the initial value of the state transition matrix is set to a uniform distribution corresponding to any numerical value in the range of (1±Δ); Δ represents the setting error. Here, the setting error can be determined according to the actual situation, and the embodiment of the application does not make specific limitation on this. Exemplarily, Δ=0, that is, the state transition matrix is set to a uniform distribution corresponding to 1.
[0045] Here, determining the autocorrelation coefficient as the state transition matrix means that the uniform distribution corresponding to the autocorrelation coefficient is determined as the state transition matrix.
[0046] Compared with the prior art, the embodiment of the application optimizes the characteristics of the MEMS gyroscope in the long-term running condition of the low variable speed running scene: the measured angular velocity measurement value has significant time correlation, and the autocorrelation coefficient can accurately describe the correlation between the signals.
[0047] From the physical meaning, the state transition matrix in the Kalman filter is used to characterize the correlation rule of the system state at adjacent moments, and the two have inherent consistency in function. Therefore, the embodiment of the application directly determines the autocorrelation coefficient as the state transition matrix, so that the filtering parameters and the gyroscope signal characteristics form accurate matching.
[0048] When the gyroscope runs for a long time, temperature drift will cause dynamic changes in the time correlation of the signal. For this, the embodiment of the application realizes dynamic updating of the state transition matrix by periodically calculating the autocorrelation coefficient of the corresponding period in real time, so that it can adapt to the evolution rule of the system state in real time, effectively offsetting the influence of temperature drift.
[0049] The embodiment of the application utilizes the dynamic characterization ability of the autocorrelation coefficient on the signal time correlation, so that the Kalman filtering algorithm is more suitable for the actual operation characteristics of the MEMS gyroscope, and in particular in a long-term operation scenario, the filtering accuracy can be significantly improved, and the problem that the fixed state transition matrix in the prior art is difficult to adapt to environmental changes is solved.
[0050] On the basis of the above setting of the state transition matrix, another embodiment of the application further provides a new Kalman filtering parameter setting method for implementing parameter setting on the system state transition variance.
[0051] Referring to Figure 2 , an implementation flowchart of the Kalman filtering parameter setting method provided by another embodiment of the application is shown, and the details are as follows: In step 201, the angular velocity measurement value of the MEMS gyroscope at each time in the last period is obtained.
[0052] The implementation of step 201 is described in detail in the above Figure 1 The implementation of the corresponding embodiment is not repeated here.
[0053] In step 202, the angular velocity measurement value is low-pass filtered to obtain the angular velocity filtered value of the MEMS gyroscope at each time in the last period.
[0054] Here, the role of low-pass filtering is to retain the relatively stable low-frequency components in the signal (i.e., the useful signal of the MEMS gyroscope measurement, reflecting the real speed trend). Exemplarily, the bandwidth of the low-pass filter can be 10 Hz.
[0055] In step 203, the initial speed upper and lower limit values of the MEMS gyroscope are obtained, and the initial speed upper and lower limit values are updated based on the angular velocity filtered value to obtain the updated speed upper and lower limit values.
[0056] When the measured object is in the low speed variation interval, i.e., the real angular velocity of the MEMS gyroscope is in the low speed variation interval. The embodiment of the application can limit the real angular velocity of the MEMS gyroscope to be greater than a first angular velocity value and less than a second angular velocity value, and the difference between the second angular velocity value and the first angular velocity value is less than a set threshold, to limit the measured object to be in the low speed variation interval. Here, the values of the first angular velocity value, the second angular velocity value and the set threshold can be determined according to the actual situation, and the embodiment of the application does not make specific limitations thereon. Exemplarily, the set threshold in the embodiment of the application can be any value in 0~25° / s.
[0057] Here, the initial speed lower limit value is the first angular velocity, and the initial speed upper limit value is the second angular velocity. The initial speed range of the MEMS gyroscope can be represented as ( , ). Wherein, represents the initial lower limit value of the speed, represents the initial upper limit value of the speed.
[0058] In some embodiments, when the initial lower limit value and the initial upper limit value of the speed are updated, the difference between each angular velocity measurement value and the corresponding angular velocity filtering value is calculated respectively to obtain a difference data sequence; then, the root mean square corresponding to the difference data sequence is calculated, and the root mean square is determined as the speed change amount; subsequently, the difference between the initial lower limit value of the speed and the speed change amount is determined as the updated lower limit value of the speed, and the sum of the initial upper limit value of the speed and the speed change amount is determined as the updated upper limit value of the speed.
[0059] Here, the difference between the angular velocity measurement value at each time and the corresponding angular velocity filtering value is calculated respectively to obtain the difference corresponding to multiple times, forming a difference data sequence.
[0060] The difference between the angular velocity measurement value and the corresponding angular velocity filtering value is essentially the high-frequency fluctuation component remaining after filtering out the low-frequency useful signal. This part of fluctuation is mainly composed of random noise (including interference introduced by temperature drift, mechanical vibration, etc.), that is, white noise in the first-order autoregressive model .
[0061] By calculating the root mean square corresponding to the difference data sequence (here, the root mean square is represented by s ), the amplitude of the white noise can be effectively quantified.
[0062] During the operation of the MEMS gyroscope, the white noise (amplitude ) can cause the actual fluctuation range of the speed change to expand. The existence of noise can make the lower limit value of the speed smaller than the initial lower limit value of the speed (as low as ), and can also make the upper limit value of the speed larger than the initial upper limit value of the speed (as high as ); Therefore, the speed range is updated to (v , ), wherein v represents the updated lower limit value of the speed, represents the updated upper limit value of the speed.
[0063] Step 204, based on the updated lower limit value and the upper limit value of the speed, the system state transition variance corresponding to the current period of the MEMS gyroscope is determined.
[0064] In the application scenario of the low variable speed range, the difference of the angular velocity of the measured object between two adjacent time instants is small. Correspondingly, the difference of the angular velocity sensed by the MEMS gyroscope between two adjacent time instants is small. On this basis, the embodiment of the application can assume that the difference of the angular velocity sensed by the MEMS gyroscope between two adjacent time instants is subject to a uniform distribution within a certain range.
[0065] When the real angular velocity range of the MEMS gyroscope is (ω min, ω max), , the difference of the angular velocity between two adjacent time instants can be assumed to be subject to a uniform distribution within the range (ω min, ω max). , .
[0066] On this basis, when the system state transition variance in the Kalman filtering algorithm is parameter tuned, the embodiment of the application can calculate the uniform distribution variance of the updated lower speed limit value and the updated upper speed limit value, and determine the uniform distribution variance as the system state transition variance.
[0067] Here, the system state transition variance is used to represent the error between the state transition matrix and the actual process, and this parameter reflects the uncertainty caused by factors such as imperfect model or external disturbance in the state transition process. When the difference of the angular velocity sensed by the MEMS gyroscope conforms to the uniform distribution, the uniform distribution variance can be used to represent the uncertainty caused by various factors in the state transition process, so as to realize the tuning of the system state transition variance parameter.
[0068] In some embodiments, the uniform distribution variance of the updated lower speed limit value and the updated upper speed limit value can be calculated according to .
[0069] wherein, represents the uniform distribution variance.
[0070] The embodiment of the application can update the upper and lower speed limits of the MEMS gyroscope by using the amplitude of the white noise s , so that the assumption of uniform distribution is closer to the actual physical scenario, and the system state transition variance can cover the additional fluctuations introduced by noise, thereby improving the adaptability of the Kalman filtering algorithm to actual disturbances and realizing the improvement of filtering precision.
[0071] It should be understood that the size of the serial number of each step in the above embodiment does not mean the order of execution, and the execution order of each process should be determined according to its function and inherent logic, and should not constitute any limitation on the implementation process of the embodiment of the application.
[0072] The following is a device embodiment of the application, and for details not described in detail, reference can be made to the corresponding method embodiments described above.
[0073] Figure 3 A structure diagram of the Kalman filter parameter setting device provided by the embodiment of the application is shown, only parts related to the embodiment of the application are shown for the convenience of description, and the details are as follows: As shown in Figure 3 The Kalman filter parameter setting device 3 comprises an acquisition module 31 and a setting module 32.
[0074] The acquisition module 31 is configured to acquire angular velocity measurement values measured by the MEMS gyroscope at each time in the last period. The setting module 32 is configured to calculate an autocorrelation coefficient between the angular velocity measurement values, and determine the autocorrelation coefficient as a state transition matrix corresponding to the MEMS gyroscope in the current period.
[0075] In a possible implementation, the setting module 32 is specifically configured to: calculate a product of the angular velocity measurement values at each two adjacent times, and accumulate the product to obtain a signal change trend item; normalize the signal change trend item based on the angular velocity measurement values at each time to obtain the autocorrelation coefficient.
[0076] In a possible implementation, the setting module 32 is specifically configured to: determine the autocorrelation coefficient according to wherein, the autocorrelation coefficient is represented by the signal change trend item is represented by the number of times contained in each period is represented by the angular velocity measurement value measured by the MEMS gyroscope at the time is represented by the angular velocity measurement value measured by the MEMS gyroscope at the time is represented by
[0077] In a possible implementation, the Kalman filter parameter further comprises a system state transition variance. The setting module 32 is further configured to: perform low-pass filtering on the angular velocity measurement values to obtain angular velocity filtered values corresponding to each time in the last period of the MEMS gyroscope; acquire initial upper and lower limit values of a speed corresponding to the MEMS gyroscope, and update the initial upper and lower limit values of the speed based on the angular velocity filtered values to obtain updated upper and lower limit values of the speed; determine a system state transition variance corresponding to the MEMS gyroscope in the current period based on the updated upper and lower limit values of the speed.
[0078] In a possible implementation, the setting module 32 is specifically configured to: respectively calculate a difference between each angular velocity measurement value and a corresponding angular velocity filtered value to obtain a difference data sequence; calculate a root mean square corresponding to the difference data sequence, and determine the root mean square as a speed change amount; determine a difference between the initial speed lower limit value and the speed change amount as an updated speed lower limit value; determine a sum of the initial speed upper limit value and the speed change amount as an updated speed upper limit value.
[0079] In a possible implementation, the setting module 32 is specifically configured to: calculate a uniform distribution variance of the updated speed lower limit value and the updated speed upper limit value, and determine the uniform distribution variance as the system state transition variance.
[0080] The apparatus embodiment can be used to implement the method embodiments described above, and has the same technical principles and implementation effects as the method embodiments described above, which will not be repeated here.
[0081] Figure 4 is a schematic diagram of an electronic device provided by an embodiment of the present application. As shown in the figure, the electronic device 4 of this embodiment includes a processor 40 and a memory 41. The memory 41 stores a computer program 42. The processor 40 implements the steps in each of the method embodiments described above when executing the computer program 42. Alternatively, the processor 40 implements the functions of each module / unit in each of the apparatus embodiments described above when executing the computer program 42. Figure 4
[0082] For example, the computer program 42 can be divided into one or more modules / units, which are stored in the memory 41 and executed by the processor 40 to complete the present application. The one or more modules / units can be a series of computer program instruction segments capable of completing a specific function, which are used to describe the execution process of the computer program 42 in the electronic device 4.
[0083] The electronic device 4 can include, but is not limited to, the processor 40 and the memory 41. Those skilled in the art can understand that, Figure 4 The electronic device 4 is only an example and does not constitute a limitation on the electronic device 4, and can include more or fewer components than shown, or combine certain components, or different components, for example, the electronic device 4 can also include an input / output device, a network access device, a bus, etc.
[0084] The processor 40 can be a central processing unit (CPU), and can also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic, discrete hardware components, etc. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor.
[0085] The memory 41 can be an internal storage unit of the electronic device 4, such as a hard disk or a memory of the electronic device 4. The memory 41 can also be an external storage device of the electronic device 4, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. Further, the memory 41 can include both the internal storage unit and the external storage device of the electronic device 4. The memory 41 is used to store the computer program 42 and other programs and data required by the electronic device 4. The memory 41 can also be used to temporarily store data that has been output or will be output.
[0086] For the convenience and brevity of description, only the above-mentioned division of the functional modules / units is exemplified, and in actual application, the above-mentioned functions can be completed by different functional modules / units according to needs. The above-mentioned modules / units can be realized in the form of hardware, software or a combination of hardware and software.
[0087] The embodiments of the present application also provide a computer readable storage medium, which stores a computer program. When the computer program is executed by a processor, the method in the above-mentioned method embodiments is implemented.
[0088] The embodiments of the present application also provide a computer program product, which includes a computer program. When the computer program is executed by a processor, the method in the above-mentioned method embodiments is implemented.
[0089] The computer program includes computer program code, which can be in the form of source code, object code, executable files or some intermediate forms, etc. The computer readable medium can include any entity or device capable of carrying computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal and software distribution medium, etc.
[0090] In the above embodiments, the description of each embodiment has its own focus, and the parts not described or recorded in a certain embodiment can be referred to the relevant description of other embodiments. If there is no special description and logical conflict, the terms and / or descriptions of different embodiments are consistent and can be mutually referred to, and the technical features in different embodiments can be combined to form new embodiments according to their inherent logical relationship.
[0091] The above-described embodiments are only used to illustrate the technical solutions of the present application, rather than limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that the technical solutions recorded in the foregoing embodiments can still be modified, or some technical features can be replaced by equivalents; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should be included in the protection scope of the present application.
Claims
1. A Kalman filter parameter tuning method, characterized in that: Applied to MEMS gyroscopes, Kalman filter parameters include: state transition matrix; The method comprises: Obtain the angular velocity measurement value of the MEMS gyroscope at each moment in the previous cycle; The autocorrelation coefficients between the angular velocity measurement values are calculated, and the autocorrelation coefficients are determined as the state transfer matrix corresponding to the MEMS gyroscope in the current cycle.
2. The Kalman filter parameter tuning method according to claim 1, characterized in that: The step of calculating the autocorrelation coefficient between the angular velocity measurement values includes: Calculating the product of the angular velocity measurement values at every two adjacent moments and accumulating the product to obtain a signal change trend term; Based on the angular velocity measurement value at each moment, the signal change trend item is normalized to obtain the autocorrelation coefficient.
3. The Kalman filter parameter tuning method according to claim 2, characterized in that: The normalization process of the signal change trend item based on the angular velocity measurement value at each moment to obtain the autocorrelation coefficient includes: according to determining the autocorrelation coefficient; in, represents the autocorrelation coefficient, represents the signal change trend item, Indicates the number of moments contained in each cycle, express The angular velocity measurement value measured by the MEMS gyroscope at the moment, express The angular velocity measurement value measured by the MEMS gyroscope at the moment.
4. The Kalman filter parameter tuning method according to any one of claims 1 to 3, characterized in that: The Kalman filter parameters also include: system state transition variance; After obtaining the angular velocity measurement values of the MEMS gyroscope at each moment in the previous cycle, the method further includes: Low-pass filtering is performed on the angular velocity measurement value to obtain the angular velocity filter value corresponding to each moment of the MEMS gyroscope in the previous cycle; Obtaining initial speed upper and lower limits corresponding to the MEMS gyroscope, and updating the initial speed upper and lower limits based on the angular velocity filter value to obtain updated speed upper and lower limits; Based on the updated upper and lower speed limits, a system state transition variance corresponding to the MEMS gyroscope in the current cycle is determined.
5. The Kalman filter parameter tuning method according to claim 4, characterized in that: The updating of the initial velocity upper and lower limits based on the angular velocity filter value to obtain updated velocity upper and lower limits includes: Calculate the difference between each angular velocity measurement value and the corresponding angular velocity filter value to obtain a difference data sequence; Calculating a root mean square corresponding to the difference data sequence, and determining the root mean square as a velocity variation; Determine the difference between the initial speed lower limit and the speed change as the updated speed lower limit; The sum of the initial speed upper limit value and the speed change is determined as the updated speed upper limit value.
6. The Kalman filter parameter tuning method according to claim 4, characterized in that: Determining the system state transition variance corresponding to the current cycle of the MEMS gyroscope based on the updated upper and lower speed limits includes: A uniform distribution variance of the updated lower speed limit value and the updated upper speed limit value is calculated, and the uniform distribution variance is determined as the system state transition variance.
7. A Kalman filter parameter setting device, characterized in that: Applied to MEMS gyroscopes, Kalman filter parameters include: state transition matrix; The device comprises: An acquisition module is used to obtain the angular velocity measurement value measured by the MEMS gyroscope at each moment in the previous cycle; The tuning module is used to calculate the autocorrelation coefficient between the angular velocity measurement values and determine the autocorrelation coefficient as the state transfer matrix corresponding to the MEMS gyroscope in the current cycle.
8. An electronic device, characterized in that: The method comprises a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the method according to any one of claims 1 to 6 is implemented.
9. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.
10. A computer program product, characterized in that The invention comprises a computer program, which implements the method according to any one of claims 1 to 6 when the computer program is executed by a processor.
Citation Information
Patent Citations
Inertia and mileometer combination high-precision attitude measurement method
CN105318876A
Kalman filtering compensation method and system based on dynamic time delay
CN109814387A
Indoor positioning method based on improved square root unscented Kalman filtering
CN109916410A
MEMS gyroscope filtering method based on self-adaptive Kalman filtering algorithm
CN112632454A
Kalman filtering parameter setting method and device, electronic equipment and storage medium
CN119245619A