I am trying to implement Kalman fiter to remove some Gaussian white noise. I have succesfully implemented moving average filter but I would like to compare them in Matlab.
Lets assume that I have nominal values for model parameters:
Code:
Re = 917.5;
Ri = 629.0;
Cm = 3.42e-9;
while model is described with
Code:
Z = Re*(1+1i*w*Ri*Cm)./(1+1i*w*(Re+Ri)*Cm);
where
Code:
w = 2*pi*f;
and
Code:
f = linspace(10e3, 100e3, 100);
Then I would like to add some noise:
Code:
rng(0,'twister');
a = -1;
b = 1;
r = (b-a).*rand(100,1) + a;
Can anyone help me with Kalman filter code for white noise cancellation?
Hi,
To Model your model with Kalman filter, You will need state transition matrix and variance of measurement and process noises.
If you are looking only for comparison purpose, Kalman filter is already implemented in matlab package.
Check this link: https://se.mathworks.com/help/control/examples/kalman-filter-design.html