⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 testfxlms.m

📁 卡尔曼滤波器设计的一个例子
💻 M
字号:
iter = 5000;                  % Number of samples to process
ph   = [0;.9;.5;.3;.1];       % Primary path impulse response
sh   = [0.5;0.4;0.1];         % Secondary path impulse response
se   = 0.95*sh;               % estimation of s
xn   = 2*(rand(iter,1)-0.5);  % Input signal, zero mean random.
dn   = filter(ph,1,xn);       % Primary response at the sensor sens = zeros(iter,1);         % vector to collect the sensor signal

% Initialize Filtered-x algorithm with a controller of 10 coef.
[w,x,y,d,e,p,fx] 	= init_fxlms(10,sh,se); 

%% Processing Loop
for (m=1:iter)
   % update the input delay line
   x = [xn(m,:); x(1:end-1,:)];  
      
   % call asptfxlms to calculate the controller output 
   % and update the coefficients. Below a step size of 
   % 0.02 and an AR pole of 0.98 are used.
   [w,y,e,p,fx] 	= asptfxlms(w,x,y,sh,se,dn(m),fx,p, 0.05, 0.98);

   % save the last calculated sensor sample for 
   %performance examination
   sens(m) = e(1);  
end;

% display the sensor signal before and after 
% applying the controller
subplot(2,1,1);
plot([dn sens]);



⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -