- You can use a trackingEKF (or a trackingABF) and set it to a constant velocity model.
- You can use trackingKF with a Custom motion model and set ProcessNoise yourself at every step.
set process noise 1D Constant Velocity
조회 수: 3 (최근 30일)
이전 댓글 표시
Hi,
I can define a Kalman filter with the code:
KF = trackingKF ('MotionModel','1D Constant Velocity');
How do I set the process noise? I mean I can set it with e.g:
KF.ProcessNoise=eye(2);
but since the process noise should be a function of one parameter only there should be som other way.
BR/
Per
댓글 수: 0
채택된 답변
Elad Kivelevitch
2019년 6월 26일
Per,
Thanks for the question.
I think I understand your confusion, but let's see if I do. You expect the process noise to be a*Bmat(dt) where a represents the magnitude of the process noise and Bmat(dt) is a time dependent factor that multiplies the acceleration according to the time difference, dt.
We currently don't have that option when you use trackingKF with a defined MotionModel. When you call predict(KF, dt), we assume that a=1 and then the process noise is simply [0.25 0.5;0.5 1];
There are two ways around that:
Option 1: trackingEKF
sigmasq = 3;
EKF = trackingEKF(@constvel,@cvmeas,zeros(2,1),'HasAdditiveProcessNoise', false,'ProcessNoise',sigmasq)
[x_pred,P_pred] = predict(EKF,2) % Predict 2 seconds to the future
Note that P_pred is calculated correctly by taking into account the process noise, sigma, as an acceleration term.
Option 2: trackingKF with custom model:
% Defind the KF custom model:
A = [1 1;1 0];
H = [1 0];
KF = trackingKF(A,H)
% Now predict with sigma = 3 and dt = 2
sigmasq = 3;
dt = 2;
Q = sigmasq * [dt^4/4 dt^3/2; dt^3/2 dt^2];
A = [1 dt; 0 1];
[x_pred, P_pred] = predict(KF, A, Q)
Hope this helps,
Elad
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Tracking and Sensor Fusion에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!