Sensor fusion with Kalman filter
Show older comments
(1) I was wondering how to perform object tracking with the linear Kalman filter “trackingKF” using more than one measurement of the tracked object. In other words, I would like to perform sensor fusion with Kalman filter of a moving object using two position measurements (calculated from two processed sensor data). The code below illustrates how I do it with one set of position measurement.
XY_pos1 = [ 33.544 -214.86
99.551 -218.83
140.1 -213.7
179.69 -206.96
218.29 -200.07
236.45 -215.53
270.55 -200.66
311.27 -193.14
347.55 -176.33
378.1 -167.25
405.9 -145.6
422.43 -132.86
452.4 -92.974
462.61 -70.885
470.82 -54.077
470.59 -42.721
467.96 -24.212
459.13 4.495
452.39 40.051
458.39 69.918
440.54 104.4 ];
initialState = [XY_pos1(1); 0; XY_pos1(2); 0];
KF = trackingKF('MotionModel','2D Constant Velocity','State',initialState);
timeStep=0.5;
for k=1:size(XY_pos1,1)
predStates(k,:) = predict(KF,timeStep);
corrStates(k,:) = correct(KF,XY_pos1(k,:));
end
(2) Besides, I was wondering if the linear Kalman filter can ignore the outlier or noisy position measurements.
Thank you for any idea you could provide.
Accepted Answer
More Answers (0)
Categories
Find more on Tracking and Sensor Fusion in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
