亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? demo_mc.m

?? 一個UPF的例程
?? M
?? 第 1 頁 / 共 3 頁
字號:
% PURPOSE : Demonstrate the differences between the following filters on the same problem:%           %           1) Extended Kalman Filter  (EKF)%           2) Unscented Kalman Filter (UKF)%           3) Particle Filter         (PF)%           4) PF with EKF proposal    (PFEKF)%           5) PF with UKF proposal    (PFUKF)% For more details refer to:% AUTHORS  : Nando de Freitas      (jfgf@cs.berkeley.edu)%            Rudolph van der Merwe (rvdmerwe@ece.ogi.edu)% DATE     : 17 August 2000clear all;clc;echo off;path('./ukf',path);% INITIALISATION AND PARAMETERS:% ==============================no_of_runs = 100;            % number of experiments to generate statistical                            % averagesdoPlot = 0;                 % 1 plot online. 0 = only plot at the end.sigma =  1e-5;              % Variance of the Gaussian measurement noise.g1 = 3;                     % Paramater of Gamma transition prior.g2 = 2;                     % Parameter of Gamman transition prior.                            % Thus mean = 3/2 and var = 3/4.T = 60;                     % Number of time steps.R = 1e-5;                   % EKF's measurement noise variance. Q = 3/4;                    % EKF's process noise variance.P0 = 3/4;                   % EKF's initial variance of the states.N = 200;                     % Number of particles.resamplingScheme = 1;       % The possible choices are                            % systematic sampling (2),                            % residual (1)                            % and multinomial (3).                             % They're all O(N) algorithms. Q_pfekf = 10*3/4;R_pfekf = 1e-1;Q_pfukf = 2*3/4;R_pfukf = 1e-1;			    alpha = 1;                  % UKF : point scaling parameterbeta  = 0;                  % UKF : scaling parameter for higher order terms of Taylor series expansion kappa = 2;                  % UKF : sigma point selection scaling parameter (best to leave this = 0)%**************************************************************************************% SETUP BUFFERS TO STORE PERFORMANCE RESULTS% ==========================================rmsError_ekf      = zeros(1,no_of_runs);rmsError_ukf      = zeros(1,no_of_runs);rmsError_pf       = zeros(1,no_of_runs);rmsError_pfMC     = zeros(1,no_of_runs);rmsError_pfekf    = zeros(1,no_of_runs);rmsError_pfekfMC  = zeros(1,no_of_runs);rmsError_pfukf    = zeros(1,no_of_runs);rmsError_pfukfMC  = zeros(1,no_of_runs);time_pf       = zeros(1,no_of_runs);     time_pfMC     = zeros(1,no_of_runs);time_pfekf    = zeros(1,no_of_runs);time_pfekfMC  = zeros(1,no_of_runs);time_pfukf    = zeros(1,no_of_runs);time_pfukfMC  = zeros(1,no_of_runs);%**************************************************************************************% MAIN LOOPfor j=1:no_of_runs,  rand('state',sum(100*clock));   % Shuffle the pack!  randn('state',sum(100*clock));   % Shuffle the pack!  % GENERATE THE DATA:% ==================x = zeros(T,1);y = zeros(T,1);processNoise = zeros(T,1);measureNoise = zeros(T,1);x(1) = 1;                         % Initial state.for t=2:T  processNoise(t) = gengamma(g1,g2);    measureNoise(t) = sqrt(sigma)*randn(1,1);      x(t) = feval('ffun',x(t-1),t) +processNoise(t);     % Gamma transition prior.    y(t) = feval('hfun',x(t),t) + measureNoise(t);      % Gaussian likelihood.end;  % PLOT THE GENERATED DATA:% ========================figure(1)clf;plot(1:T,x,'r',1:T,y,'b');ylabel('Data','fontsize',15);xlabel('Time','fontsize',15);legend('States (x)','Observations(y)');%%%%%%%%%%%%%%%  PERFORM EKF and UKF ESTIMATION  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  ==============================  %%%%%%%%%%%%%%%%%%%%%% INITIALISATION:% ==============mu_ekf = ones(T,1);     % EKF estimate of the mean of the states.P_ekf = P0*ones(T,1);   % EKF estimate of the variance of the states.mu_ukf = mu_ekf;        % UKF estimate of the mean of the states.P_ukf = P_ekf;          % UKF estimate of the variance of the states.yPred = ones(T,1);      % One-step-ahead predicted values of y.mu_ekfPred = ones(T,1); % EKF O-s-a estimate of the mean of the states.PPred = ones(T,1);      % EKF O-s-a estimate of the variance of the states.disp(' ');for t=2:T,      fprintf('run = %i / %i :  EKF & UKF : t = %i / %i  \r',j,no_of_runs,t,T);  fprintf('\n')    % PREDICTION STEP:  % ================   mu_ekfPred(t) = feval('ffun',mu_ekf(t-1),t);  Jx = 0.5;                             % Jacobian for ffun.  PPred(t) = Q + Jx*P_ekf(t-1)*Jx';     % CORRECTION STEP:  % ================  yPred(t) = feval('hfun',mu_ekfPred(t),t);  if t<=30,    Jy = 2*0.2*mu_ekfPred(t);                 % Jacobian for hfun.  else    Jy = 0.5;  %  Jy = cos(mu_ekfPred(t))/2;  %   Jy = 2*mu_ekfPred(t)/4;                 % Jacobian for hfun.   end;  M = R + Jy*PPred(t)*Jy';                 % Innovations covariance.  K = PPred(t)*Jy'*inv(M);                 % Kalman gain.  mu_ekf(t) = mu_ekfPred(t) + K*(y(t)-yPred(t));  P_ekf(t) = PPred(t) - K*Jy*PPred(t);    % Full Unscented Kalman Filter step  % =================================  [mu_ukf(t),P_ukf(t)]=ukf(mu_ukf(t-1),P_ukf(t-1),[],Q,'ukf_ffun',y(t),R,'ukf_hfun',t,alpha,beta,kappa);    end;   % End of t loop.%%%%%%%%%%%%%%%  PERFORM SEQUENTIAL MONTE CARLO  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  ==============================  %%%%%%%%%%%%%%%%%%%%%% INITIALISATION:% ==============xparticle_pf = ones(T,N);        % These are the particles for the estimate                                 % of x. Note that there's no need to store                                 % them for all t. We're only doing this to                                 % show you all the nice plots at the end.xparticlePred_pf = ones(T,N);    % One-step-ahead predicted values of the states.yPred_pf = ones(T,N);            % One-step-ahead predicted values of y.w = ones(T,N);                   % Importance weights.disp(' '); tic;                             % Initialize timer for benchmarkingfor t=2:T,      fprintf('run = %i / %i :  PF : t = %i / %i  \r',j,no_of_runs,t,T);  fprintf('\n')    % PREDICTION STEP:  % ================   % We use the transition prior as proposal.  for i=1:N,    xparticlePred_pf(t,i) = feval('ffun',xparticle_pf(t-1,i),t) + gengamma(g1,g2);     end;  % EVALUATE IMPORTANCE WEIGHTS:  % ============================  % For our choice of proposal, the importance weights are give by:    for i=1:N,    yPred_pf(t,i) = feval('hfun',xparticlePred_pf(t,i),t);            lik = inv(sqrt(sigma)) * exp(-0.5*inv(sigma)*((y(t)-yPred_pf(t,i))^(2))) ...	  + 1e-99; % Deal with ill-conditioning.    w(t,i) = lik;      end;    w(t,:) = w(t,:)./sum(w(t,:));                % Normalise the weights.    % SELECTION STEP:  % ===============  % Here, we give you the choice to try three different types of  % resampling algorithms. Note that the code for these algorithms  % applies to any problem!  if resamplingScheme == 1    outIndex = residualR(1:N,w(t,:)');        % Residual resampling.  elseif resamplingScheme == 2    outIndex = systematicR(1:N,w(t,:)');      % Systematic resampling.  else      outIndex = multinomialR(1:N,w(t,:)');     % Multinomial resampling.    end;  xparticle_pf(t,:) = xparticlePred_pf(t,outIndex); % Keep particles with                                                    % resampled indices.end;   % End of t loop.time_pf(j) = toc;    % How long did this take?%%%%%%%%%%%%%%  PERFORM SEQUENTIAL MONTE CARLO WITH MCMC  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  ========================================  %%%%%%%%%%%%%%%%% INITIALISATION:% ==============xparticle_pfMC = ones(T,N);      % These are the particles for the estimate                                 % of x. Note that there's no need to store                                 % them for all t. We're only doing this to                                 % show you all the nice plots at the end.xparticlePred_pfMC = ones(T,N);  % One-step-ahead predicted values of the states.yPred_pfMC = ones(T,N);          % One-step-ahead predicted values of y.w = ones(T,N);                   % Importance weights.previousXMC = ones(T,N);         % Particles at the previous time step. previousXResMC = ones(T,N);      % Resampled previousX.disp(' '); tic;                             % Initialize timer for benchmarkingfor t=2:T,      fprintf('run = %i / %i :  PF-MCMC : t = %i / %i  \r',j,no_of_runs,t,T);  fprintf('\n')    % PREDICTION STEP:  % ================   % We use the transition prior as proposal.  for i=1:N,    xparticlePred_pfMC(t,i) = feval('ffun',xparticle_pfMC(t-1,i),t) + gengamma(g1,g2);     end;  previousXMC(t,:) = xparticle_pfMC(t-1,:);  % Store the particles at t-1.   % EVALUATE IMPORTANCE WEIGHTS:  % ============================  % For our choice of proposal, the importance weights are give by:    for i=1:N,    yPred_pfMC(t,i) = feval('hfun',xparticlePred_pfMC(t,i),t);            lik = inv(sqrt(sigma)) * exp(-0.5*inv(sigma)*((y(t)-yPred_pfMC(t,i))^(2))) ...	  + 1e-99; % Deal with ill-conditioning.    w(t,i) = lik;      end;    w(t,:) = w(t,:)./sum(w(t,:));                % Normalise the weights.    % SELECTION STEP:  % ===============  % Here, we give you the choice to try three different types of  % resampling algorithms. Note that the code for these algorithms  % applies to any problem!  if resamplingScheme == 1    outIndex = residualR(1:N,w(t,:)');        % Residual resampling.  elseif resamplingScheme == 2    outIndex = systematicR(1:N,w(t,:)');      % Systematic resampling.  else      outIndex = multinomialR(1:N,w(t,:)');     % Multinomial resampling.    end;  xparticle_pfMC(t,:) = xparticlePred_pfMC(t,outIndex); % Keep particles with                                                        % resampled                                                        % indices.  previousXResMC(t,:) = previousXMC(t,outIndex);  % Resample particles                                                  % at t-1.    % METROPOLIS-HASTINGS STEP:  % ========================  u=rand(N,1);   accepted=0;  rejected=0;  for i=1:N,       xProp = feval('ffun',previousXResMC(t,i),t) + gengamma(g1,g2);       mProp = feval('hfun',xProp,t);            likProp = inv(sqrt(sigma)) * exp(-0.5*inv(sigma)*((y(t)-mProp)^(2))) + 1e-99;         m = feval('hfun',xparticle_pfMC(t,i),t);            lik = inv(sqrt(sigma)) * exp(-0.5*inv(sigma)*((y(t)-m)^(2))) + 1e-99;         acceptance = min(1,likProp/lik);    if u(i,1) <= acceptance       xparticle_pfMC(t,i) = xProp;      accepted=accepted+1;    else      xparticle_pfMC(t,i) = xparticle_pfMC(t,i);       rejected=rejected+1;    end;  end;    end;   % End of t loop.time_pfMC(j) = toc;    % How long did this take?%%%%%%%%%%%%%%%  PERFORM SEQUENTIAL MONTE CARLO  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  ======== EKF proposal ========  %%%%%%%%%%%%%%%%%%%%%% INITIALISATION:% ==============xparticle_pfekf = ones(T,N);        % These are the particles for the estimate                                    % of x. Note that there's no need to store                                    % them for all t. We're only doing this to                                    % show you all the nice plots at the end.Pparticle_pfekf = P0*ones(T,N);     % Particles for the covariance of x.xparticlePred_pfekf = ones(T,N);    % One-step-ahead predicted values of the states.PparticlePred_pfekf = ones(T,N);    % One-step-ahead predicted values of P.yPred_pfekf = ones(T,N);            % One-step-ahead predicted values of y.w = ones(T,N);                      % Importance weights.muPred_pfekf = ones(T,1);           % EKF O-s-a estimate of the mean of the states.PPred_pfekf = ones(T,1);            % EKF O-s-a estimate of the variance of the states.mu_pfekf = ones(T,1);               % EKF estimate of the mean of the states.P_pfekf = P0*ones(T,1);             % EKF estimate of the variance of the states.disp(' ');tic;                                % Initialize timer for benchmarkingfor t=2:T,      fprintf('run = %i / %i :  PF-EKF : t = %i / %i  \r',j,no_of_runs,t,T);  fprintf('\n')    % PREDICTION STEP:  % ================   % We use the EKF as proposal.  for i=1:N,    muPred_pfekf(t) = feval('ffun',xparticle_pfekf(t-1,i),t);    Jx = 0.5;                                 % Jacobian for ffun.    PPred_pfekf(t) = Q_pfekf + Jx*Pparticle_pfekf(t-1,i)*Jx';     yPredTmp = feval('hfun',muPred_pfekf(t),t);    if t<=30,      Jy = 2*0.2*muPred_pfekf(t);                     % Jacobian for hfun.    else

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
精品盗摄一区二区三区| 国产精品国产自产拍在线| 久久精品免费在线观看| 一二三四社区欧美黄| 国产真实乱对白精彩久久| 欧美片在线播放| 国产精品福利av| 国产不卡免费视频| 精品裸体舞一区二区三区| 丝袜a∨在线一区二区三区不卡| 成人性色生活片免费看爆迷你毛片| 日韩欧美在线不卡| 亚洲国产毛片aaaaa无费看| 岛国精品一区二区| 国产日韩欧美a| 国产综合色在线视频区| 欧美电影精品一区二区| 人人狠狠综合久久亚洲| 欧美日产国产精品| 丝袜美腿高跟呻吟高潮一区| 欧美性色黄大片| 一区二区成人在线| 色婷婷av一区二区三区大白胸| 国产精品黄色在线观看| 成人中文字幕在线| 亚洲欧洲日韩av| 成人av资源站| 亚洲色图另类专区| 色婷婷激情综合| 亚洲综合在线第一页| 91黄色激情网站| 亚洲成在人线在线播放| 欧美日韩午夜影院| 日韩av一区二区在线影视| 91麻豆精品国产91久久久资源速度 | 亚洲欧洲美洲综合色网| 成人aa视频在线观看| 亚洲女人****多毛耸耸8| 日本高清免费不卡视频| 午夜精品久久久久久久99水蜜桃| 欧美日韩日日夜夜| 极品少妇一区二区| 国产视频不卡一区| 91网站在线观看视频| 亚洲午夜三级在线| 日韩视频永久免费| 国产成人精品亚洲777人妖| 国产精品进线69影院| 欧美在线播放高清精品| 日韩中文字幕区一区有砖一区 | 韩国精品免费视频| 国产精品麻豆99久久久久久| 色先锋aa成人| 日本不卡123| 国产日产欧美一区| 91国内精品野花午夜精品| 午夜私人影院久久久久| 精品国产凹凸成av人导航| 成人影视亚洲图片在线| 午夜久久久久久电影| 久久亚洲一级片| 在线观看视频91| 国产剧情一区在线| 一区二区三区四区在线| 欧美一区二区三区不卡| 成人动漫av在线| 午夜私人影院久久久久| 欧美国产日产图区| 欧美喷潮久久久xxxxx| 国产成人免费视频网站高清观看视频| 亚洲精品第一国产综合野| 精品国产污污免费网站入口| 色哟哟亚洲精品| 国产精品自拍在线| 日韩影院在线观看| 成人欧美一区二区三区在线播放| 日韩一区二区麻豆国产| 91美女福利视频| 狠狠色综合播放一区二区| 亚洲成人免费影院| 中文字幕亚洲在| wwww国产精品欧美| 91精品欧美久久久久久动漫| 91浏览器打开| 国产白丝网站精品污在线入口| 日本亚洲天堂网| 伊人婷婷欧美激情| 国产精品色哟哟| 日韩久久精品一区| 欧美日韩精品一二三区| 色综合咪咪久久| 波多野结衣一区二区三区 | 日韩国产高清影视| 亚洲综合色成人| 亚洲欧美色一区| 国产精品毛片大码女人| 久久久久亚洲蜜桃| 精品久久久久久久久久久久包黑料 | 亚洲欧美另类小说| 日韩欧美色综合网站| 欧美视频在线不卡| 91热门视频在线观看| 成人性生交大片免费| 国产一区二区三区四区五区美女| 天堂资源在线中文精品| 亚洲精品视频免费看| 国产精品美女久久福利网站| 国产亚洲人成网站| 国产午夜精品久久久久久免费视| 日韩欧美成人一区二区| 日韩一级完整毛片| 91精品国产91久久久久久最新毛片 | 国产精品1区二区.| 国产一区二区在线看| 极品少妇一区二区三区精品视频| 久久国产精品99久久久久久老狼 | 色综合婷婷久久| 亚洲成人免费视频| 一片黄亚洲嫩模| 亚洲一区中文在线| 日韩高清不卡一区| 美日韩黄色大片| 国产精品一区二区男女羞羞无遮挡| 国产在线一区观看| 不卡一二三区首页| 欧美三级中文字幕| 欧美男生操女生| 日韩欧美第一区| 中文一区在线播放| 亚洲自拍偷拍图区| 免费观看在线综合| 国产成人av电影在线| 91麻豆产精品久久久久久| 欧美日韩成人在线一区| 久久婷婷色综合| 中文字幕制服丝袜一区二区三区| 一区二区三区在线免费视频| 青青草原综合久久大伊人精品优势| 精品影院一区二区久久久| 成人免费看视频| 欧美日韩美女一区二区| 中文字幕中文在线不卡住| 亚洲女与黑人做爰| 免费xxxx性欧美18vr| 夫妻av一区二区| 欧美日韩精品一区二区天天拍小说| 日韩一区二区三区高清免费看看| 中文字幕乱码亚洲精品一区| 一区二区三区产品免费精品久久75| 奇米在线7777在线精品| 成人黄色av电影| 日韩色在线观看| 亚洲天堂a在线| 久久99精品国产.久久久久| 99re视频这里只有精品| 欧美成人精品1314www| 国产精品灌醉下药二区| 麻豆91免费看| 91精品91久久久中77777| 久久奇米777| 日本美女视频一区二区| 91啦中文在线观看| 久久午夜羞羞影院免费观看| 午夜久久久久久久久久一区二区| 成人午夜看片网址| 欧美成人r级一区二区三区| 一区二区三区资源| 国产成人精品午夜视频免费| 欧美一区二区在线不卡| 亚洲综合在线第一页| 成人高清视频在线| 国产亚洲视频系列| 裸体歌舞表演一区二区| 欧美手机在线视频| 精品1区2区在线观看| 午夜久久久久久电影| 色天使色偷偷av一区二区| 欧美国产欧美亚州国产日韩mv天天看完整 | 在线观看视频一区二区欧美日韩| 国产日韩欧美精品在线| 极品瑜伽女神91| 日韩一区二区不卡| 日韩av网站在线观看| 欧美亚洲愉拍一区二区| 亚洲精品成人a在线观看| 99久久精品国产毛片| 国产精品白丝在线| 成人精品视频一区| 国产精品久久二区二区| 粉嫩aⅴ一区二区三区四区| 久久尤物电影视频在线观看| 狠狠色丁香久久婷婷综合丁香| 欧美一区二区免费视频| 日韩国产欧美在线观看| 欧美精品在线观看一区二区| 亚洲超丰满肉感bbw| 91麻豆精品国产自产在线| 日韩中文字幕1| 精品久久久久久久一区二区蜜臀| 久久www免费人成看片高清|