qihongshao的个人博客分享 http://blog.sciencenet.cn/u/qihongshao

博文

[转载]Matlab函数学习—滤波器设计工具箱—adaptfilt.lms

已有 14258 次阅读 2012-3-8 22:56 |系统分类:科研笔记| MATLAB, 自适应滤波器

Matlab函数学习—滤波器设计工具箱—adaptfilt.lms
函数名:adaptfilt.lms
说明:基于LMS的自适应滤波器
用法:ha = adaptfilt.lms(L,step,leakage,coeffs,states)
参数说明:
L 滤波器的长度(必须为整数)
step 步长
leakage 遗漏系数(必须为0到1,默认为0.1)
coeffs 初始滤波器系数矢量(长度必须为L,默认为全0)
states 初始滤波器状态矢量(长度必须为L-1,默认为全0)

例一:
使用500迭代确认一个未知的32级的FIR滤波器.
x  = randn(1,500);     % Input to the filter
b  = fir1(31,0.5);     % FIR system to be identified
n  = 0.1*randn(1,500); % Observation noise signal
d  = filter(b,1,x)+n;  % Desired signal
mu = 0.008;            % LMS step size.
ha = adaptfilt.lms(32,mu);
[y,e] = filter(ha,x,d);
subplot(2,1,1); plot(1:500,[d;y;e]);
title('System Identification of an FIR Filter');
legend('Desired','Output','Error');
xlabel('Time Index'); ylabel('Signal Value');
subplot(2,1,2); stem([b.',ha.coefficients.']);
legend('Actual','Estimated');
xlabel('Coe

fficient #'); ylabel('Coefficient Value');
grid on;


在自适应滤波器构架中使用LMS滤波器确定一个未知的滤波器是一种常用的手段。

Matlab函数学习—滤波器设计工具箱—adaptfilt.lms



https://blog.sciencenet.cn/blog-658273-545624.html


下一篇:MATLAB 信号处理工具箱 函数集
收藏 IP: 222.20.243.*| 热度|

0

该博文允许注册用户评论 请点击登录 评论 (0 个评论)

数据加载中...

Archiver|手机版|科学网 ( 京ICP备07017567号-12 )

GMT+8, 2024-4-27 07:18

Powered by ScienceNet.cn

Copyright © 2007- 中国科学报社

返回顶部