资源简介
RLS和LMS自适应滤波器的性能对比,代码在MATLAB中完美运行。
代码片段和文件信息
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%LMS自适应滤波器性能分析
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
clear
clc
close all
%%%%%%%%%%%%%%参数设置%%%%%%%%%%%%%%%%%%%%%%%
w=3.2;
step_len=0.075;
variance_v=0.001;
repeat_times=200;
iteration_times=500;
filt_len=2;
delay=fix(filt_len/2)-1;
%%%%%%%%%%%%%%%%%%%%变量及数组初始化%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Chan_factor=(1+cos(2*pi*([1:1:3]-2)/w))/2;
Square_err=zeros(repeat_timesiteration_times);
%%%%%%%%%%%%%外循环,重复做repeat_timws次实验,平均值%%%%%%%%%%%%%%%%
for loop1=1:repeat_times
%%%%%%%%%%%%%%内循环变量及数组初始化%%%%%%%%%%%%%%%%%%%%%%%%
Source=zeros(iteration_times1);
W=zeros(filt_len1);
%%%%%%%%%%%%%内循环,做iteration_times次迭代%%%%%%%%%%%%%%%%%%%%%%%%%%%%
for i=1:iteration_times
%%%%%%%%%%%%%%信源,产生等概率分布的正负1%%%%%%%%%%%%%%%%%%%%%%%%%%%%
if rand<0.5
Source(i)=-1;
else
Source(i)=1;
end
end
%%%%%%%%%%%%%%信道,滤波和加噪声%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Revdata=filter(Chan_factor1Source)+randn(iteration_times1)*sqrt(variance_v);
%%%%%%%%%%%%%%均衡器,基于LMS算法%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
for loop2=1:iteration_times-filt_len+1
U=Revdata(loop2:loop2+filt_len-1);
d=Source(loop2+delay);
e=d-W‘*U;
W=W+step_len*U*e;
Square_err(loop1loop2)=e.^2;
end
end
%%%%%%%%%%%%%%作图,显示结果%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Square_err_mean=sum(Square_err(::))/repeat_times;
semilogy(Square_err_mean);
figure(2);
stem(W);
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 1586 2008-01-10 05:07 RLS与LMS算法分析及比较\.m
文件 1749 2007-12-23 22:36 RLS与LMS算法分析及比较\RLSnew.m
文件 736 2017-06-10 20:26 RLS与LMS算法分析及比较\rls_lms.m
目录 0 2017-09-13 14:16 RLS与LMS算法分析及比较
----------- --------- ---------- ----- ----
4071 4
相关资源
- LMS语音信号去噪matlab代码
- LMS MATLAB DSP算法实现和程序收集
- DRLSE距离正则化水平集演化算法的MA
- 自适应滤波器设计及Matlab实现
- 主动噪声控制,fxLMS Active-Noise-Contro
- DRLSE模型matlab代码
- 基于RLS算法的语音噪声回声消除处理
- 水平集level set、李纯明博士DRLSE改进方
- Levinson-Durbin算法AR、MA算法,附送LMS算
- matlab 最小二乘蒙特卡罗LMS美式期权定
- matlab的LMS自适应滤波算法去噪
- 基于自然梯度算法的盲信号分离程序
- 系统辨识,使用者的理论
- CBF MVDR LMS波束形成的Matlab算法
- 递推最小二乘估计(RLS)及模型阶次
- LMS AMESim系统建模和仿真参考手册
- RLS算法的matlab代码
- LMS自适应滤波器MATLAB实现
- RLS算法的matlab实现
- 盲多用户检测LMS和RLS算法matlab实现
- 基于MATLAB的LMS和RLS算法滤波完整程序
- 自适应噪声抵消LMS算法Matlab仿真
- LMS算法自适应滤波器的Matlab仿真分析
- RLS的数据预测与matlab
- RLS功率谱估计
- 基于LMS的自适应回声抵消-f1.m
- 自己写的几个常用自适应波束形成程
- LMS 自适应滤波的 C 语言源代码
- LMS matlab
- 语音去噪RLS自适应滤波算法
评论
共有 条评论