1. 卡爾曼濾波怎麼在matlab裡面運算
你可以直接調用matlab 里的kalman()函數進行卡爾曼濾波運算
方程格式如下
[kest,L,P] = kalman(sys,Qn,Rn,Nn)
sys 表示系統狀態方程
Qn,Rn分別是Q矩陣和R矩陣
Nn是觀測雜訊和系統雜訊的協方差
2. 如何用matlab進行卡爾曼預測
ma.add("aaa");
ma.add("bbb");
ma.add("ccc");
Object o = ma.get(1);
Iterator it = ma.iterator();
while(it.hasNext()){
Object o1 = it.next();
System.out.println(o1);
}
3. 卡爾曼濾波演算法用matlab工具模擬,matlab軟體包用什麼
恩 這里有一個直接的卡曼濾波的專業Matlab工具箱
需要的話 可以直接到這里下載http://www.matlabsky.com/thread-224-1-2.html
4. matlab 卡爾曼濾波工具箱怎麼安裝
14-44889-04614-04275-46147-23559-43066-41714-23083-65272-04997-17469-27919-17226-59862-27901-53983-56217-20094-53460-62647-58166-24499-35558-19511-44882-53016-25658-61109-03776-34505-00776-15813-07183
5. 麻煩誰給個matlab的卡爾曼濾波器的toolbox啊~~感激不盡啊
給個郵箱啊,親,不然給你發到哪啊!!!!
6. 請大家奉獻一個效果好的卡爾曼濾波的matlab程序,最好有說明,重謝!
我現在也在研究kalman,這是最新發現的一個程序,我做的標注,有問題一塊研究
function [x, V, VV, loglik] = kalman_filter(y, A, C, Q, R, init_x, init_V, varargin)
% Kalman filter.
% [x, V, VV, loglik] = kalman_filter(y, A, C, Q, R, init_x, init_V, ...)
%
% INPUTS:
% y(:,t) - the observation at time t 在時間t的觀測
% A - the system matrix A 系統矩陣
% C - the observation matrix C 觀測矩陣
% Q - the system covariance Q 系統協方差
% R - the observation covariance R 觀測協方差
% init_x - the initial state (column) vector init_x 初始狀態(列)向量
% init_V - the initial state covariance init_V 初始狀態協方差
%
% OPTIONAL INPUTS (string/value pairs [default in brackets]) 選擇性輸入(字元串/值 對【默認在括弧中】)
% 'model' - model(t)=m means use params from model m at time t [ones(1,T) ] 在時間t,m意味著利用 m模型參數 [ones(1,T) ]
%
% In this case, all the above matrices take an additional final
% dimension, 在這種情況下,上述矩陣採用附加的維數
% i.e., A(:,:,m), C(:,:,m), Q(:,:,m), R(:,:,m). 例如
% However, init_x and init_V are independent of model(1).
% init_x and init_V相對於模型1是獨立的
% 'u' - u(:,t) the control signal at time t [ [] ]
% 在時間t的控制信號
% 'B' - B(:,:,m) the input regression matrix for model m
% 對於模型m的,輸入回歸矩陣
% OUTPUTS (where X is the hidden state being estimated) 輸出(其中X是被估計的隱藏狀態)
% x(:,t) = E[X(:,t) | y(:,1:t)]
% V(:,:,t) = Cov[X(:,t) | y(:,1:t)]
% VV(:,:,t) = Cov[X(:,t), X(:,t-1) | y(:,1:t)] t >= 2
% loglik = sum{t=1}^T log P(y(:,t))
%
% If an input signal is specified, we also condition on it: 如果一個輸入信號是特定的,我們的條件
% e.g., x(:,t) = E[X(:,t) | y(:,1:t), u(:, 1:t)]
% If a model sequence is specified, we also condition on it:
% e.g., x(:,t) = E[X(:,t) | y(:,1:t), u(:, 1:t), m(1:t)]
[os T] = size(y);
ss = size(A,1); % size of state space
% set default params
model = ones(1,T);
u = [];
B = [];
ndx = [];
args = varargin;
nargs = length(args);
for i=1:2:nargs
switch args{i}
case 'model', model = args{i+1};
case 'u', u = args{i+1};
case 'B', B = args{i+1};
case 'ndx', ndx = args{i+1};
otherwise, error(['unrecognized argument ' args{i}])
end
end
x = zeros(ss, T);
V = zeros(ss, ss, T);
VV = zeros(ss, ss, T);
loglik = 0;
for t=1:T
m = model(t);
if t==1
%prevx = init_x(:,m);
%prevV = init_V(:,:,m);
prevx = init_x;
prevV = init_V;
initial = 1;
else
prevx = x(:,t-1);
prevV = V(:,:,t-1);
initial = 0;
end
if isempty(u)
[x(:,t), V(:,:,t), LL, VV(:,:,t)] = ...
kalman_update(A(:,:,m), C(:,:,m), Q(:,:,m), R(:,:,m), y(:,t), prevx, prevV, 'initial', initial);
else
if isempty(ndx)
[x(:,t), V(:,:,t), LL, VV(:,:,t)] = ...
kalman_update(A(:,:,m), C(:,:,m), Q(:,:,m), R(:,:,m), y(:,t), prevx, prevV, ...
'initial', initial, 'u', u(:,t), 'B', B(:,:,m));
else
i = ndx{t};
% over all elements; only some will get updated
x(:,t) = prevx;
prevP = inv(prevV);
prevPsmall = prevP(i,i);
prevVsmall = inv(prevPsmall);
[x(i,t), smallV, LL, VV(i,i,t)] = ...
kalman_update(A(i,i,m), C(:,i,m), Q(i,i,m), R(:,:,m), y(:,t), prevx(i), prevVsmall, ...
'initial', initial, 'u', u(:,t), 'B', B(i,:,m));
smallP = inv(smallV);
prevP(i,i) = smallP;
V(:,:,t) = inv(prevP);
end
end
loglik = loglik + LL;
end
7. matlab中卡爾曼濾波函數中變數sys,Qn,Rn,Nn是什麼
[kest,L,P] = kalman(sys,Qn,Rn,Nn)
卡爾曼濾波器信號模型
x(k) = A * x(k-1) + w(k)
y(k) = C * x(k) + v(k)
下邊的w和v就應該是上邊這兩個w和v了
E{ww'} = QN,這個是系統雜訊協方差陣;
E{vv'} = RN,這個是觀測雜訊協方差陣;
E{wv'} = NN,這個看字面應該是系統雜訊與觀測雜訊的互協方差陣;
白雜訊均值為0,所以上面的幾個值也可以認為是自相關函數和互相關函數;
sys給定系統模型;
8. 求助.MATLAB卡爾曼濾波器工具箱里kalman
% INPUTS:
% y(:,t) - the observation at time t
% A - the system matrix
% C - the observation matrix
% Q - the system covariance
% R - the observation covariance
% init_x - the initial state (column) vector
% init_V - the initial state covariance
9. MATLAB7.0怎麼打開卡爾曼工具箱
在MATLAB的菜單欄中選擇help(幫助)項,在其下拉菜單中選擇function browser,然後在其search項中輸入care,點擊打開即可。
10. 求matlab實現擴展卡爾曼濾波的程序
這里有一個toolbox,希望對你有幫助。
http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=5377&objectType=file