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

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

?? kalmdemo.m

?? 本書是電子通信類的本科、研究生輔助教材
?? M
字號:
echo on

% This file demonstrates MATLAB's ability to do Kalman filtering.  
% Both a steady state filter and a time varying filter are designed
% and simulated below.

echo off
%	Copyright (c) 1986-93 by the MathWorks, Inc.
echo on

pause % Press any key to continue ...

% Given the following discrete plant
A=[
    1.1269   -0.4940    0.1129
    1.0000         0         0
         0    1.0000         0];
B = [
   -0.3832
    0.5919
    0.5191];
C=[ 1 0 0];
D=0;
printsys(A,B,C,D)

% Design a Kalman filter to filter out Gaussian noise added to the 
% input (i.e sensor noise).

pause % Press any key to continue ...

% Let's do a steady state filter design first using the function 
% DLQE.  The function DLQE determines the optimal steady state 
% filter gain based on the process noise covariance Q, and the 
% sensor noise covariance, R.

% For your information the dcgain of this plant is
ddcgain(A,B,C,D)

% and the covariance of the output due to process noise with 
% covariance of 1 is:
dcovar(A,B,C,D,1)

% Enter the process noise covariance:
Q = input('Enter a number greater than zero (e.g. 1): ')

% Enter the sensor noise covariance:
R = input('Enter a number greater than zero (e.g. 1): ')

% Now design the steady state filter gain
Lss = dlqe(A,B,C,Q,R)

pause % Press any key to continue ...

% The steady state Kalman filter we have just designed has the 
% following update equations:
%                      -         *
%  time update:        x[n+1] = Ax[n] + Bu[n]
%
%                      *      -                -
%  observation update: x[n] = x[n] + L(y[n] - Cx[n] - Du[n])

% Since this is a steady state filter we can combine these equations
% into one state model (the Kalman filter)
%  -                -
%  x[n+1] = (A-ALC) x[n] + AL y[n]
%
%  *                -           
%  y[n]   = (C-CLC) x[n] + CL y[n]
%  
% The function DESTIM produces this model (but also includes the 
% estimated states as outputs):
[af,bf,cf,df] = destim(A,B,C,D,Lss,[1],[1]);

% Remove est. state outputs
[af,bf,cf,df] = ssdelete(af,bf,cf,df,[],[2:4]);
printsys(af,bf,cf,df,'u y','y*','x1 x2 x3')

pause % Press any key to continue ...

% Let's see how it works by generating some data and comparing the 
% filtered response with the true response
%     noise         noise
%       |             |
%       V             V
% u -+->O-->[Plant]-->O--> y --O->[filter]-->y*
%    |                               |
%    +-------------------------------+
%

% To simulate the system above, we could generate the response of 
% each part separately or we could generate both together.  To 
% simulate each seperately we would use DLSIM with the plant first
% and then the filter.  Below we illustrate how to simulate both
% together.

% First, build one plant that contains the original plant and the 
% filter connected as shown in the diagram above.  Use PARALLEL and
% CLOOP.   Before connecting, add a process noise input to the plant
% that is the same as u and a sensor noise input.
a = A; b=[B,B,zeros(3,1)]; c = C; d=[D,D,1];

% Now connect the original plant input (1) with the known input (1)
% of the filter using PARALLEL.
[at,bt,ct,dt] = parallel(a,b,c,d,af,bf,cf,df,[1],[1],[],[]);

% Put the plant output (1) into the filter sensor input (4)
[at,bt,ct,dt] = cloop(at,bt,ct,dt,[1],[4]);

pause % Press any key to continue ...

% The complete system model now has 4 inputs 
%    (plant input,process noise,sensor noise,sensor input),
% 2 outputs
%    (plant output with noise,filtered output),
% and 6 states.

% Generate a sinusoidal input vector (known)
t = [0:100]';
u = sin(t/5);

% Generate process noise and sensor noise vectors
pnoise = sqrt(Q)*randn(length(t),1);
snoise = sqrt(R)*randn(length(t),1);

pause % Press any key to continue ...

% Now simulate using DLSIM
[y,x] = dlsim(at,bt,ct,dt,[u,pnoise,snoise,zeros(length(t),1)]);

% Generate "true" response
ytrue = y(:,1)-snoise;

% Plot comparison
clg
%subplot(211), plot(t,ytrue,t,y), xlabel('No. of samples'), ylabel('Output')
%subplot(212), plot(t,ytrue-y(:,2)), xlabel('No. of samples'), ylabel('Error')
%pause % Press any key to continue ...
echo off
subplot(211), plot(t,ytrue,t,y), xlabel('No. of samples'), ylabel('Output')
subplot(212), plot(t,ytrue-y(:,2)), xlabel('No. of samples'), ylabel('Error')
pause % Press any key after the plot ...
echo on

% Compute covariance of error
err1 = ytrue-y(:,1);
err1cov = sum(err1.*err1)/length(err1);
err2 = ytrue-y(:,2);
err2cov = sum(err2.*err2)/length(err2);

% Covariance of error before filtering
err1cov

% Covariance of error after filtering
err2cov

pause % Press any key to continue ...

% Now let's form a time varying Kalman filter to perform the same
% task.  A time varying Kalman filter is able to perform well even
% when the noise covariance is not stationary.  However for this 
% demonstration, we will use stationary covariance.

% The time varying Kalman filter has the following update equations
%                      -         *
%  time update:        x[n+1] = Ax[n] + Bu[n]
%                      -         * 
%                      P[n+1] = AP[n]A' + B*Q*B'
%
%                             -       -       -1
%  observation update: L[n] = P[n]C'(CP[n]C'+R)
%                      *      -                   -
%                      x[n] = x[n] + L[n](y[n] - Cx[n] - Du[n])
%                      *               -
%                      P[n] = (I-L[n]C)P[n]
%                      *       *
%                      y[n] = Cx[n] + Du[n]
%

pause % Press any key to continue ...

% Generate the noisy plant response
y = dlsim(A,B,C,D,u+pnoise) + snoise;

% Now filter. We can't use DLSIM here since the system is nonlinear,
% so just implement the above equations in a loop.  Use the same inputs
% as before.

P=B*Q*B';         % Guess for initial state covariance
x=zeros(3,1);     % Initial condition on the state
yest = zeros(length(t),1);
ycov = zeros(length(t),1); 
for i=1:length(t)
  yest(i) = C*x + D*u(i);
  ycov(i) = C*P*C';

  % Time update
  x = A*x + B*u(i);
  P = A*P*A' + B*Q*B';

  % Observation update
  L = P*C'/(C*P*C'+R);
  x = x + L*(y(i) - C*x - D*u(i));
  P = (eye(3)-L*C)*P;
end

% Compare true response with filtered response
clg
%subplot(211), plot(t,y-snoise,t,yest), ylabel('Output')
%subplot(212), plot(t,yest-y+snoise), ylabel('Error'), pause % Press any key
echo off
subplot(211), plot(t,y-snoise,t,yest), ylabel('Output')
subplot(212), plot(t,yest-y+snoise), ylabel('Error'), pause % Press any key
echo on

% The time varying filter also estimates the output covariance
% during the estimation.  Let's plot it to see if our filter reached
% steady state (as we would expect with stationary input noise).
subplot(111), plot(t,ycov), ylabel('Covar'), pause % Press any key after plot

% From the covariance plot we see that the output covariance did 
% indeed reach a steady state in about 5 samples.  From then on,
% our time varying filter has the same performance as the steady 
% state version.

% Compute covariance of error
err = y-snoise-yest;
errcov = sum(err.*err)/length(err)

pause % Press any key to continue ...

%Let's compare the final Kalman gain matrices
L,Lss

% So we see that they both obtain the same gain matrix in steady
% state.

echo off

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91精品欧美一区二区三区综合在| 免费看日韩精品| 成人a区在线观看| 日本一区二区视频在线| 99在线视频精品| 亚洲精选免费视频| 欧美色男人天堂| 免费在线成人网| 欧美经典三级视频一区二区三区| 成人亚洲一区二区一| 亚洲欧美乱综合| 3d成人h动漫网站入口| 精品亚洲国内自在自线福利| 国产欧美一区二区三区鸳鸯浴| 成人午夜免费视频| 一区二区三区欧美视频| 日韩午夜电影av| 成人教育av在线| 艳妇臀荡乳欲伦亚洲一区| 欧美精品久久久久久久久老牛影院 | 精品理论电影在线观看 | 欧美在线观看视频一区二区三区| 午夜精品一区二区三区三上悠亚| 欧美不卡一区二区| 91丨porny丨在线| 秋霞午夜av一区二区三区| 欧美激情一区在线观看| 在线亚洲免费视频| 狠狠色丁香婷婷综合久久片| 国产精品第13页| 91精品国产乱| 91丨九色丨尤物| 狠狠色狠狠色综合| 亚洲国产欧美日韩另类综合| 久久久久久久久久美女| 在线观看成人免费视频| 国产一区二区三区精品视频| 一区二区日韩电影| 久久久久久久久久久久电影| 欧美性色黄大片| 国产黄色精品视频| 日韩专区一卡二卡| 国产精品欧美久久久久无广告| 88在线观看91蜜桃国自产| 国产盗摄视频一区二区三区| 视频一区二区国产| 亚洲欧美综合网| 国产午夜精品在线观看| 在线播放国产精品二区一二区四区| 国产.欧美.日韩| 麻豆专区一区二区三区四区五区| 亚洲色图都市小说| 国产女人aaa级久久久级| 欧美一区欧美二区| 91蜜桃传媒精品久久久一区二区| 韩国女主播成人在线观看| 午夜精品久久久久久久久久| 亚洲欧洲www| 国产精品久久综合| 久久久久亚洲蜜桃| 精品国产一区久久| 91精品国产色综合久久ai换脸| 91黄色激情网站| 色综合久久久网| 97久久精品人人做人人爽50路| 国产精品99久久久久| 激情欧美一区二区| 韩国毛片一区二区三区| 韩国精品久久久| 久久精品国产99久久6| 日本午夜一本久久久综合| 亚洲二区在线观看| 亚洲国产日韩在线一区模特| 亚洲一二三四区不卡| 亚洲小少妇裸体bbw| 亚洲一线二线三线视频| 亚洲最新在线观看| 亚洲资源在线观看| 午夜一区二区三区视频| 日韩黄色免费电影| 日本vs亚洲vs韩国一区三区 | 在线视频国内自拍亚洲视频| 成人一区二区视频| 国产99久久久国产精品潘金| 国产成人激情av| 成人av在线观| 91视视频在线观看入口直接观看www | 免费av网站大全久久| 毛片基地黄久久久久久天堂| 久久国内精品视频| 精品一区二区在线播放| 国产精品77777| 不卡免费追剧大全电视剧网站| 99久久夜色精品国产网站| 91免费在线看| 欧美日韩国产成人在线91| 在线不卡中文字幕| 精品国产成人在线影院 | 亚洲男人的天堂在线aⅴ视频| 亚洲视频一区在线观看| 亚洲国产成人av好男人在线观看| 亚洲6080在线| 国产在线精品一区二区不卡了| 国产成人精品综合在线观看| 日本韩国欧美在线| 日韩一区二区三区免费观看| 国产三级精品视频| 夜夜嗨av一区二区三区网页| 日韩国产欧美在线播放| 国产精品亚洲一区二区三区妖精| 色综合中文字幕| 7777精品伊人久久久大香线蕉超级流畅 | 国产精品麻豆一区二区| 悠悠色在线精品| 麻豆91小视频| av网站一区二区三区| 欧美久久久一区| 国产精品乱子久久久久| 亚洲超碰精品一区二区| 国产精品自拍毛片| 欧美伊人久久久久久久久影院| 精品欧美乱码久久久久久| 亚洲人xxxx| 国产在线日韩欧美| 欧美中文字幕不卡| 久久精品欧美一区二区三区麻豆 | 久久久午夜电影| 一区av在线播放| 国产一区二区免费视频| 欧美日韩一区不卡| 欧美国产精品v| 日本大胆欧美人术艺术动态| av色综合久久天堂av综合| 日韩欧美成人一区二区| 一区二区三区日韩欧美精品| 国产精品1区2区| 在线不卡一区二区| 亚洲欧美激情小说另类| 国产一区二区三区四区五区美女 | 在线观看网站黄不卡| 久久综合色综合88| 午夜精品一区二区三区免费视频| 91年精品国产| 中文字幕一区二区三区不卡| 国产麻豆视频一区| 日韩视频一区在线观看| 一区二区三区色| 99久久久无码国产精品| 久久奇米777| 毛片av中文字幕一区二区| 欧美精品v日韩精品v韩国精品v| 国产精品国产三级国产专播品爱网| 男人的天堂亚洲一区| 色天使色偷偷av一区二区| 欧美激情资源网| 国产盗摄精品一区二区三区在线 | 不卡一区二区三区四区| 久久蜜桃一区二区| 麻豆国产欧美日韩综合精品二区| 色偷偷久久人人79超碰人人澡| 国产精品无人区| 岛国精品在线观看| 中文字幕乱码日本亚洲一区二区| 国产精品亚洲成人| 日本一区二区三区四区 | 亚洲日本青草视频在线怡红院 | 色哟哟一区二区| 亚洲色图丝袜美腿| 色综合一个色综合亚洲| 亚洲欧美视频在线观看视频| 97精品电影院| 亚洲精品福利视频网站| 欧美三级日韩三级| 日欧美一区二区| 欧美一级夜夜爽| 精品一区二区在线视频| 国产亚洲一区二区三区四区| 国产精品一区二区黑丝| 中文字幕欧美日本乱码一线二线| 成人福利在线看| 亚洲美女一区二区三区| 欧美性xxxxxxxx| 日本午夜精品视频在线观看| 精品国产伦一区二区三区观看体验| 国产一区二区三区电影在线观看 | 欧美亚日韩国产aⅴ精品中极品| 亚洲电影一级黄| 欧美一区二区三区在线| 激情久久五月天| 中文字幕亚洲精品在线观看| 在线视频欧美精品| 日本美女一区二区三区视频| 欧美精品一区二区在线播放| 高潮精品一区videoshd| 亚洲图片激情小说| 91麻豆精品国产91久久久| 国产成人av一区二区三区在线 | 色爱区综合激月婷婷| 婷婷久久综合九色综合绿巨人 | 中日韩av电影|