Outlier elimination method based on improved Kalman filter
By using the windowing estimation method in Kalman filter to calculate the mathematical expectation of innovation covariance, and dynamically adjusting the measurement values to eliminate outliers, the error problem of data processing caused by outliers in multi-target tracking is solved, and adaptive state estimation is achieved. and stable filtering.
Patent Information
- Application Number
- CN202110005005.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-01-04
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2041-01-04
AI Technical Summary
In the field of multi-target tracking, outliers caused by clutter and noise in the observation background will cause errors in data processing, and the existing technology requires artificially setting constant factors to eliminate outliers, which lacks adaptability.
Calculate the mathematical expectation of the innovation covariance through the window estimation method, compare it with the trace of the current predicted innovation covariance, dynamically adjust the measurement value to eliminate outliers, and achieve adaptive state estimation.
There is no need to manually set constant factors, and adaptive outlier elimination is achieved, which improves the accuracy of data processing and the stability of Kalman filtering, and reduces space complexity.
Smart Images

Figure CN112859004B
Abstract
Description
Technical Field
[0001] The invention relates to an outlier elimination method, in particular to an outlier elimination method based on improved Kalman filtering. Background Art
[0002] In the field of multi-target tracking, due to the presence of a large amount of clutter and noise in the observation background, as well as the observation errors of the sensor itself, the measurements obtained may contain "outliers" that do not conform to the actual situation. If such "outlier" targets are not removed, they will cause large errors in subsequent data processing, and even lead to subsequent data association errors, filter divergence, etc.
[0003] Therefore, when processing the measurement data, it is first necessary to eliminate some impossible "wild value" targets based on engineering requirements and the sensor's own parameters.
[0004] Zhu Zhuanmin and other scholars proposed a method to dynamically eliminate outliers. They used the new information covariance to set the confidence interval, and then multiplied the prediction error covariance matrix by a constant factor to determine whether its value is within the confidence interval, thereby achieving the purpose of eliminating outliers. However, the constant factor still needs to be set in advance. Summary of the invention
[0005] The purpose of the present invention is to provide an outlier elimination method based on an improved Kalman filter.
[0006] The technical solution to achieve the purpose of the present invention is: a method for eliminating outliers based on improved Kalman filtering, comprising:
[0007] Step 1: Obtain the new information value v from time k-N+1 to time k by the window estimation method, and use it to calculate the mathematical expectation of the new information covariance;
[0008] Step 2: By comparing the current predicted innovation covariance with the trace of the innovation covariance mathematical expectation matrix, the adjustment factor λ is obtained;
[0009] Step 3: Dynamically correct the actual measurement according to the adjustment factor to obtain the adjusted measurement, and use it for state estimation.
[0010] Furthermore, step 1 is specifically as follows:
[0011] (1) Measurement prediction
[0012] Z(k|k-1)=H(k)*X(k|k-1)
[0013] H(k) is the observation matrix, X(k|k-1) is the state prediction value at time k, and Z(k|k-1) is the measurement prediction value;
[0014] (2) Measuring prediction covariance
[0015] S(k)=H(k)*P(k|k-1)*H(k)+R(k)
[0016] P(k|k-1) is the predicted value of state covariance, and R(k) is the noise variance at time k;
[0017] (3) Kalman gain
[0018] K=P(k|k-1)*H(k)'*S(k) -1
[0019] S(k) is the new information covariance at time k, and K is the Kalman gain;
[0020] (4) State update equation
[0021] X(k|k)=X(k|k-1)+K*(Z(k)-Z(k|k-1))
[0022] X(k|k) is the state filter value at time k;
[0023] Assume that an outlier occurs at time k
[0024] Z f =Z+Δv
[0025] Δv is the error value of the wild value compared to the actual measurement, so the new information will also have an offset of Δv; eventually the state estimate X(k|k-1) has an error of K*Δv, which will be passed to the next round of iterative filtering;
[0026] Using the window estimation method, we can obtain the mathematical expectation of the new information covariance at the current moment:
[0027]
[0028] v j is the new information at time j, v j =Z j (k)-Z j (k|k-1), v j ' is the transpose of the new information, It is the square mean of the new information from k-N+1 to the current k moment, which is the mathematical expectation of the new information covariance at the current moment.
[0029] Furthermore, step 2 is specifically as follows:
[0030]
[0031] λ is the adjustment factor, which is determined by the theoretical innovation covariance S(k) and the innovation covariance mathematical expectation matrix It is composed of the ratio of the trace of .
[0032] Furthermore, step 3 is specifically as follows:
[0033] When the mathematical expectation value of the innovation covariance When , the measurement is considered valid and no processing is performed; when When the ratio of the two is used as an adjustment factor to correct the actual measurement, the correction measures are as follows:
[0034]
[0035] Z_real is the measured value after correction;
[0036] The final state estimate is:
[0037] X(k)=X(k|k-1)+K*(Z_real-Z(k|k-1))
[0038] =X(k|k-1)+K*λ*(Z(k)-Z(k|k-1))
[0039] Compared with the prior art, the present invention has the following beneficial effects: (1) The method used in the present invention is to calculate the mathematical expectation of the novelty covariance based on the previously obtained measurement novelty, and compare it with the currently predicted novelty covariance value to obtain a ratio, and use the ratio to dynamically correct the actual measurement. Thus, the effect of adaptive adjustment is achieved without manual setting; (2) The present invention has a simple principle and good real-time performance, and can perform state estimation and eliminate wild values in real time; and only needs to retain the novelty values of the previous N frames, with a constant-level space complexity.
[0040] The present invention is further described in detail below in conjunction with the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] Figure 1 This is a flow chart of the outlier removal method based on improved Kalman filtering.
[0042] Figure 2 This is the trajectory diagram of the normal Kalman filter and the post-Kalman filter.
[0043] Figure 3 This is a comparison chart of filtering results.
[0044] Figure 4 This is the filter error curve. DETAILED DESCRIPTION
[0045] The present invention proposes a method for dynamically improving the new information for the state filtering part in the target tracking process. The new information described in the present invention is the difference between the actual measured value and the predicted value of the target in distance. The actual measurement of the target can be expressed as Z(k)=[x,y]', where x,y represent the distance value of the target in two-dimensional space coordinates, which is obtained by various sensors in actual engineering such as radar, ultrasonic sensor, camera, etc. The state of the target can be expressed as X(k)=[x,v x ,a x ,y,v y ,a y ]'. The first three items and the last three items represent the target distance, speed, and acceleration in the x and y directions, respectively, and are the real motion attributes of the target. The sensor is used to observe the real state X of the target to obtain the measurement value Z. Then, the present invention is used to make real-time judgment and correction on the measurement under the Kalman filter framework, and ensure that the Kalman filter is stable during the recursive filtering process.
[0046] First, some formulas of Kalman filtering are given:
[0047] (1) Measurement prediction
[0048] Z(k|k-1)=H(k)*X(k|k-1)
[0049] X(k|k-1) is the predicted value of the state at time k
[0050] (2) Measuring the prediction covariance (innovation covariance)
[0051] S(k)=H(k)*P(k|k-1)*H(k)+R(k)
[0052] (3) Kalman gain
[0053] K=P(k|k-1)*H'*S(k) -1
[0054] (4) State update equation
[0055] X(k|k)=X(k|k-1)+K*(Z(k)-Z(k|k-1))
[0056] A steady-state Kalman filter can ensure its convergence in the complete tracking process. However, in the filtering process, once the wrong measurement is included in the calculation, it is very likely to cause the filter to diverge. The purpose of filtering is to obtain the optimal estimate of the target at that moment. From the above formula, it can be obtained that the final estimate of the target is the prediction value plus a gain after the new information. The new information is the difference between the current measurement and the predicted value of the measurement. The new information covariance of a steady-state Kalman filter should satisfy "Formula (2)", and when the measurement has wild values, this relationship will inevitably be destroyed.
[0057] Assume that an outlier occurs at time k
[0058] Z f =Z+Δv
[0059] Δv is the error value of the wild value compared to the true measurement. Then the new information will also have a Δv offset. The final state estimate X(k|k-1) has a K*Δv error, which will be passed to the next round of iterative filtering and eventually lead to the divergence of the filter.
[0060] Based on this, we improve the Kalman filter measurement prediction part. We assume that the estimation and prediction before time k are accurate, so the new information covariance at time k is ideal. Using the window estimation method, we can obtain the mathematical expectation of the new information covariance at the current moment:
[0061]
[0062] v j is the new information at time j, It is the square mean of the new information from k-N+1 to the current k moment, which is the mathematical expectation of the new information covariance at the current moment. The smaller the value, the more it reflects the accuracy of the measurement. The value is less than or equal to When the corresponding value of The value is greater than When the corresponding value is reached, the measurement is uncertain and the current measurement needs to be corrected. The specific correction measures are as follows:
[0063]
[0064] in
[0065]
[0066] Z_real is the measured value after correction, and λ is the adjustment factor, which is composed of the theoretical innovation covariance S(k) and the innovation covariance mathematical expectation matrix From the above formula, we can see that when the mathematical expectation value of the innovation covariance is When the new information covariance value tr(S(k)) is less than or equal to the ideal prediction, we consider the measurement to be valid and do not perform any processing; when When , the ratio of the two is used as an adjustment factor to correct the actual measurement. The greater the difference with S(k), the more the accuracy of the actual measurement is questioned, the smaller the effect, and the corresponding measurement prediction value has a greater effect. Ideally, when the measurement data is completely unrealistic, the measurement prediction value is used as the actual measurement. In the end, the final state estimate can be obtained as
[0067] X(k)=X(k|k-1)+K*(Z_pre-Z(k|k-1))
[0068] =X(k|k-1)+K*λ*(Z(k)-Z(k|k-1))
[0069] The final algorithm process is as follows Figure 1 shown.
[0070] In order to verify the effectiveness of the algorithm, assume that the initial state of a target is X(0) = [-5m, 0m / s, 50m, -5m / s] and it is moving in a uniform linear motion. Assume that the sampling interval is 50ms. The sampling time is 10s. Assume that both the process noise and the measurement noise are Gaussian white noise, and the standard deviation of the process noise is q x =0.5m,q y =0.1m; the standard deviation of the measurement noise is r x =0.2m,r y =0.2m. Assume that the outlier target is mistakenly taken as the real measurement at the 45th, 123rd and 176th scans respectively. The standard Kalman filter and the improved Kalman filter are used for simulation.
[0071] Figure 2 Contains the true trajectory of the target, the trajectory after the improved Kalman filter, and the trajectory after the classic Kalman filter.
[0072] Figure 3 for Figure 2 A local enlargement of the area where the outlier appears. Figure 3 It can be seen that when the measured value is obviously unrealistic, the filter trajectory of the standard Kalman filter will have "burrs", which Figure 4 It can also be seen that the standard Kalman filter error changes greatly where outliers appear. However, the improved Kalman filter can achieve better filtering effects.
[0073] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.
Claims
1. A method for eliminating outliers based on improved Kalman filtering, characterized in that: include: Step 1: Obtain the innovation value v from time k-N+1 to time k through the window estimation method, and use it to calculate the mathematical expectation of the innovation covariance; specifically: (1) Measurement prediction Z(k|k-1)=H(k)*X(k|k-1) H(k) is the observation matrix, X(k|k-1) is the state prediction value at time k, and Z(k|k-1) is the measurement prediction value; (2) Measurement prediction covariance S(k)=H(k)*P(k|k-1)*H(k)+R(k) P(k|k-1) is the predicted value of state covariance, and R(k) is the noise variance at time k; (3) Kalman gain K=P(k|k-1)*H(k)'*S(k) -1 S(k) is the covariance of the new information at time k, and K is the Kalman gain; (4) State update equation X(k|k)=X(k|k-1)+K*(Z(k)-Z(k|k-1)) X(k|k) is the state filter value at time k; Assume that an outlier occurs at time k Z f =Z+Δv Δv is the error between the wild-type value and the true measurement, so the new information will also have an offset of Δv. This will eventually result in the state estimate X(k|k-1) having an error of K*Δv, which will be passed to the next round of iterative filtering. Using the window estimation method, we can obtain the mathematical expectation of the innovation covariance at the current moment: v j is the new information at time j, v j =Z(j)-Z(j|j-1), v j ' is the transpose of the new information, is the square mean of the new information from k-N+1 to the current k moment, which is the mathematical expectation of the new information covariance at the current moment; Step 2: Compare the trace of the current forecast innovation covariance with the trace of the innovation covariance mathematical expectation matrix to obtain the adjustment factor λ. The adjustment factor is calculated as follows: Where λ is the adjustment factor, which is determined by the trace of the theoretical innovation covariance S(k) and the mathematical expectation matrix of the innovation covariance The ratio of the trace of Step 3: Dynamically correct the actual measurement according to the adjustment factor to obtain the adjusted measurement, and use it to perform state estimation; specifically: When the mathematical expectation value of the innovation covariance When , the measurement is considered valid and no processing is performed; when When the ratio of the two is used as an adjustment factor to correct the actual measurement, the correction measures are as follows: Z_real is the measured value after correction; The final state estimate is:
