亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区免费野_久草精品视频
国产精品美女视频| 麻豆久久久久久| 理论片日本一区| 91视频.com| 日韩一级免费观看| 一区二区三区成人在线视频| 国产一区二区伦理片| 欧美日韩免费观看一区二区三区 | 91久久久免费一区二区| 精品少妇一区二区三区日产乱码| 亚洲欧美国产三级| 国产91露脸合集magnet| 日韩欧美你懂的| 日韩成人免费看| 在线精品视频一区二区三四| 欧美国产日本视频| 国产成人综合精品三级| 精品少妇一区二区三区免费观看| 亚洲成人在线免费| 欧美在线观看视频一区二区 | 日韩精品中文字幕一区| 五月天丁香久久| 欧美系列日韩一区| 一区二区三区在线视频观看58| 丁香一区二区三区| 国产女主播一区| 国产精品中文有码| 国产亚洲欧美色| 国产成a人亚洲精| 国产亚洲欧美日韩在线一区| 国模冰冰炮一区二区| 日韩亚洲欧美中文三级| 久久精品国产澳门| 日韩欧美一区中文| 久久99精品久久只有精品| 日韩三级精品电影久久久| 日韩成人精品在线| 精品三级在线看| 国产精品99久久久久久有的能看| 国产亚洲人成网站| 成人福利视频在线| 亚洲婷婷综合色高清在线| 99精品国产视频| 亚洲一区在线免费观看| 欧美高清视频一二三区| 蜜桃一区二区三区四区| 精品国产污污免费网站入口| 国产高清在线精品| 中文字幕亚洲精品在线观看| 91久久久免费一区二区| 日本中文在线一区| 国产亚洲精品7777| 99视频超级精品| 亚洲第一电影网| 日韩亚洲欧美成人一区| 国产v日产∨综合v精品视频| 亚洲卡通动漫在线| 欧美成人一区二区三区在线观看| 国产伦精品一区二区三区视频青涩| 国产精品私人自拍| 欧美日韩免费在线视频| 国产另类ts人妖一区二区| 亚洲欧美激情小说另类| 91精品国产综合久久精品麻豆| 精品一区二区三区不卡| 综合亚洲深深色噜噜狠狠网站| 欧美日韩精品综合在线| 国产美女一区二区| 天天综合色天天综合色h| 久久久无码精品亚洲日韩按摩| www.av精品| 五月婷婷久久丁香| 国产清纯美女被跳蛋高潮一区二区久久w| 99re热这里只有精品视频| 日本伊人精品一区二区三区观看方式 | 亚洲一区二区三区精品在线| 精品日本一线二线三线不卡| 91丨九色丨黑人外教| 蜜臀va亚洲va欧美va天堂| 欧美国产精品一区| 欧美一区午夜视频在线观看| 99国产精品视频免费观看| 日韩电影在线免费看| 自拍av一区二区三区| 日韩精品专区在线| 欧美日韩精品一区二区三区四区 | 久久成人免费网| 亚洲精品精品亚洲| 国产欧美一区二区精品婷婷| 欧美一级久久久| 在线不卡中文字幕播放| 91美女在线观看| 成人美女在线视频| 国精产品一区一区三区mba视频| 亚洲亚洲人成综合网络| 自拍偷在线精品自拍偷无码专区| 久久久不卡影院| 日韩女优制服丝袜电影| 欧美一区二区三区在线观看| 在线亚洲人成电影网站色www| 成人a区在线观看| 国产精品中文欧美| 精彩视频一区二区| 久久精品国产免费看久久精品| 性久久久久久久久| 亚洲成av人在线观看| 亚洲日本在线看| 综合av第一页| 亚洲色图另类专区| 亚洲女与黑人做爰| 亚洲婷婷综合色高清在线| 亚洲色图20p| 亚洲人成网站精品片在线观看| 国产精品国产三级国产普通话99| 国产日产精品一区| 1区2区3区精品视频| 国产精品成人在线观看| 中文字幕日韩一区| 中文字幕成人网| 中文字幕日本乱码精品影院| 国产精品国产自产拍高清av王其| 国产精品短视频| 国产精品久久久久久户外露出| 国产色产综合产在线视频| 亚洲国产激情av| 亚洲激情图片小说视频| 亚洲中国最大av网站| 日韩中文字幕亚洲一区二区va在线| 亚洲aⅴ怡春院| 日本欧美肥老太交大片| 国产麻豆一精品一av一免费| 国产精品亚洲午夜一区二区三区| 国产精品亚洲第一区在线暖暖韩国 | 麻豆91精品视频| 国内精品国产成人| 成人免费视频caoporn| 91碰在线视频| 欧美一区二区三区影视| 久久久精品免费免费| 中文字幕的久久| 丝袜美腿亚洲一区二区图片| 久久国产精品99精品国产| 99精品桃花视频在线观看| 欧美日韩亚洲国产综合| 精品久久久久久久久久久院品网 | 一本一本久久a久久精品综合麻豆 一本一道波多野结衣一区二区 | 国产精品久久久久aaaa| 亚洲精品videosex极品| 欧美a一区二区| 粉嫩av亚洲一区二区图片| 色婷婷亚洲精品| 日韩免费电影一区| 综合久久久久综合| 免费在线看成人av| 色综合色综合色综合色综合色综合| 8v天堂国产在线一区二区| 国产欧美日韩在线观看| 香蕉乱码成人久久天堂爱免费| 韩国一区二区在线观看| 91啪亚洲精品| 久久精品综合网| 视频一区二区中文字幕| 成人免费观看视频| 欧美va天堂va视频va在线| 一区二区三区鲁丝不卡| 国产91精品久久久久久久网曝门| 欧美午夜精品久久久久久孕妇 | 亚洲视频在线观看一区| 国产乱人伦偷精品视频不卡| 99精品1区2区| 亚洲精品一线二线三线| 一区二区高清视频在线观看| 国产精品综合视频| 51精品秘密在线观看| 亚洲人成网站精品片在线观看 | 色婷婷精品大在线视频| 久久中文字幕电影| 亚洲不卡一区二区三区| 92国产精品观看| 欧美激情一区二区三区不卡| 蜜桃一区二区三区在线| 欧美乱熟臀69xxxxxx| 亚洲视频资源在线| 成人综合日日夜夜| 久久久精品综合| 国产一区二区三区四区五区入口| 欧美日韩成人综合在线一区二区 | 韩国精品主播一区二区在线观看| 欧美综合一区二区三区| 日韩美女精品在线| 成人免费看黄yyy456| 26uuu精品一区二区三区四区在线 26uuu精品一区二区在线观看 | 亚洲一区二区在线免费看| eeuss国产一区二区三区| 国产欧美一区二区在线观看| 韩国视频一区二区| 欧美大度的电影原声| 久久国产三级精品| 精品欧美乱码久久久久久1区2区| 青娱乐精品视频|