Commit fb7315cd authored by Fredrik Bagge Carlsson's avatar Fredrik Bagge Carlsson
Browse files

corrected errors in kalman filter implementation

parent 60456c31
......@@ -43,13 +43,17 @@ par_sub = genParStruct('cc_bBroadband',0,'cc_wSizeSec',winSec,...
mObj = manager(dObj,'localization',par_sub);
%% Model parameters
fs = 24414;
chunks = 2048;
dt = chunks/fs;
sigma_w = 1;
Q = [1/4+1e-3, 1/2; 1/2, 1]; % Process noise covariance
R = 1000; % Measurement noise covariance
Q = [2/4*dt^4, 1/2*dt^3; 1/2*dt^3, dt^2]*sigma_w; % Process noise covariance
R = 1; % Measurement noise covariance
x = [0; 0]; % Initial state
P = [10, 0; 0, 10]; % Initial state covariance
A = [1, simParams.frameSize; 0, 1]; % System matrix (do not change)
A = [1, dt; 0, 1]; % System matrix (do not change)
c = [1; 0]; % Output vector (do not change)
% Check definiteness of covariance matrices
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment