# Kalman Filter Tunning

I am trying to figure out a problem with Kalman Filter in Matlab. I have two time series as input y(t) and x(t). I want to regress these data and get B (beta) with Kalman Filter in the following form:

y(t) = B*x(t) + e

- y(t) is my observable vector

- B is my hidden variable that the variable that I want to obtain

I have been applying Kalman Filter in Matlab to solver my problem and I stuck because I do not which value of the covariance matrix I should use. I got a book with a recommendations values but the problems has not been solver yet.

The book suggests Montana formula to initialize the covariance matrix but I do not really like the results. Surfing on the internet, I found a good Matlab toolbox that helps to solve my problem and I do not how to use it. The web site is:

The code I wrote in Matlab is:

x=[x ones(size(x))];

delta=0.0001; % delta=1 gives fastest change in beta, delta=0.000....1 allows no change (like traditional linear regression).

yhat=NaN(size(y)); % measurement prediction

e=NaN(size(y)); % measurement prediction error

Q=NaN(size(y)); % measurement prediction error variance

% initialize R, P and beta.

R=zeros(2);

P=zeros(2);

beta=NaN(2, size(x, 1));

Vw=delta/(1-delta)*eye(2);

Ve=0.001;

% Initialize beta(:, 1) to zero

beta(:, 1)=0;

% Given initial beta and R (and P)

for t=1:length(y)

if (t > 1)

beta(:, t)=beta(:, t-1); % state prediction.

R=P+Vw; % state covariance prediction.

end

yhat(t)=x(t, :)*beta(:, t); % measurement prediction.

Q(t)=x(t, :)*R*x(t, :)'+Ve; % measurement variance prediction.

% Observe y(t)

e(t)=y(t)-yhat(t); % measurement prediction error

K=R*x(t, :)'/Q(t); % Kalman gain

beta(:, t)=beta(:, t)+K*e(t); % State update.

P=R-K*x(t, :)*R; % State covariance update.

end

After that I'd like to graph e (error) and see a stationary series with too much volatility. Now, I graph e and get a stationary low volatile series. I think the results depend of the value of delta and Ve.

If you want more references, please go to the following websites:

Concernant l'employeur :
( 3 commentaires ) Quito, Ecuador

Nº du projet : #8473051

## Décerné à:

JinDongZhe

A proposal has not yet been provided

%selectedBids___i_sum_sub_7% %project_currencyDetails_sign_sub_8% USD en 3 jours
(0 Commentaires)
0.0

## 15 freelance font une offre moyenne de \$182 pour ce travail

VolKa

Hi. I am sure I can do this. Regards...................................................................

%bids___i_sum_sub_35% %project_currencyDetails_sign_sub_36% USD en 3 jours
(81 Commentaires)
5.8
itachi23

A proposal has not yet been provided

%bids___i_sum_sub_35% %project_currencyDetails_sign_sub_36% USD en 3 jours
(44 Commentaires)
5.3
kingch91

Great Task, We have seen and understand all your requirements, We are professional ENGINEERS for these type of works as we are working in the field since 10 years and handle all types of issues and make things accor Plus

%bids___i_sum_sub_35% %project_currencyDetails_sign_sub_36% USD en 3 jours
(21 Commentaires)
4.8
kamranbabarnust2

I had done MS in digital Signal Processing. Also I had several years of experience in the field of Digital Signal Processing using Matlab. I can do this task for you.

%bids___i_sum_sub_35% %project_currencyDetails_sign_sub_36% USD en 3 jours
(13 Commentaires)
4.7
super2lao

A proposal has not yet been provided

%bids___i_sum_sub_35% %project_currencyDetails_sign_sub_36% USD en 3 jours
(9 Commentaires)
5.0
simulnetcode1221

hi, dear friend. I am interesting in your project. I think I can do it. because I have experiences in that. Please contact me. regards.

%bids___i_sum_sub_35% %project_currencyDetails_sign_sub_36% USD en 3 jours
(52 Commentaires)
5.0
elephentplayer

%bids___i_sum_sub_35% %project_currencyDetails_sign_sub_36% USD en 3 jours
(43 Commentaires)
4.7
jhabibi

A proposal has not yet been provided

%bids___i_sum_sub_35% %project_currencyDetails_sign_sub_36% USD en 7 jours
(4 Commentaires)
4.4
Imagepresslib4

Hi, I am an expert in Kalman filter. I have much experience in task similar your project. I can do it accurately. Regards

%bids___i_sum_sub_35% %project_currencyDetails_sign_sub_36% USD en 3 jours
(4 Commentaires)
2.9
ShahidFPGA

A proposal has not yet been provided

%bids___i_sum_sub_35% %project_currencyDetails_sign_sub_36% USD en 3 jours
(1 Évaluation)
2.7
kannasanthosh

Hi, This is Santhosh from India. I am a Business Management Graduate with Computer Science engineering background who is passionate about Data, Mathematics and Technology. I have worked in few data analytics pro Plus

%bids___i_sum_sub_35% %project_currencyDetails_sign_sub_36% USD en 3 jours
(3 Commentaires)
2.0
Soundpresslib111

I am expert in Kalman Filter. I have ever made matlab code that analysis individual amino acids from UV result of complicated amino acid solution by using kalman filter. That was very similar to your project. Thank Plus

%bids___i_sum_sub_32% %project_currencyDetails_sign_sub_33% USD en 1 jour
(1 Évaluation)
1.6
htr1000

%bids___i_sum_sub_32% %project_currencyDetails_sign_sub_33% USD en 1 jour
(2 Commentaires)
1.4
tabassumqr

Dear Sir, I will try to do your job and report back in 3-4 days. If I could do something and I am sure of doing it,I i will send you some result. regards TAB

%bids___i_sum_sub_35% %project_currencyDetails_sign_sub_36% USD en 10 jours
(0 Commentaires)
0.0
kjgroup197318

Hi, there. Your problem is really simple so it's a piece of cake for me. In fact, when I studied in university, I used to solve that kind of problems for nothing for any person because it's very funny for me and good Plus

%bids___i_sum_sub_32% %project_currencyDetails_sign_sub_33% USD en 1 jour
(0 Commentaires)
0.0
yuzwan

i still doing my thesis about kalman filter

%bids___i_sum_sub_32% %project_currencyDetails_sign_sub_33% USD en 1 jour
(0 Commentaires)
0.0
benbran

A proposal has not yet been provided

%bids___i_sum_sub_35% %project_currencyDetails_sign_sub_36% USD en 3 jours
(0 Commentaires)
0.0
mfarooqorakzai

having keen interest in kalman filtering and simulation in Matlab . as i had done research in this area, Contact me for quality of work with reasonable price. thanks

%bids___i_sum_sub_35% %project_currencyDetails_sign_sub_36% USD en 3 jours
(0 Commentaires)
0.0
FREDMANN

hello Sir i'm an engineer in statistics and econometrics ii can do it perfectly , we must talk after about details best regards

%bids___i_sum_sub_35% %project_currencyDetails_sign_sub_36% USD en 10 jours
(0 Commentaires)
0.0