资源简介
LMS MATLAB DSP算法实现和程序收集 LMS MATLAB DSP算法实现和程序收集

代码片段和文件信息
% LMS Adaptive Noise cancellation
%-----Filter Parameters-----;
M = 20;
mu = 0.05;
e_max = 400; %-----maximum of epochs
%-----Contants-----
pi = 3.14;
Fs = 0.01; %-----signal frequency
Fn = 0.05; %-----noise frequency
%-----Initialize-----
w = (randn(1M) - randn(1M))/100;
d = zeros(1M);
u = zeros(1M);
u_out = zeros(1e_max-M);
f_out = zeros(1e_max-M);
%-----Generate desired signal and input(signal+noise)-----
for t=1:M-1
d(t) = sin(2*pi*Fs*t); %%% d--desired signal; u--mixed signal
u(t) = d(t) + 0.5*sin(2*pi*Fn*t) + 0.09*randn; %%% du的1~M-1节拍赋值
end
t = M;
epoch = 0;
while epoch input = sin(2*pi*Fs*t);
for i=2:M %-----shift new input into array %%% 移位,准备下次迭代
d(M-i+2) = d(M-i+1);
u(M-i+2) = u(M-i+1);
end
d(1) = input; %%% d--这次的desired signal; u--这次的mixed signal;(u可以得到,而d是不可得到的;)
u(1) = input +0.5*sin(2*pi*Fn*t)+0.09*randn; %-----add undesired freq & random noise
u_out(t-M+1) = u(1); %%%
output = dot(wu); %-----compute filter output %%% 这次的输出仅取决于w;
f_out(t-M+1) = output;
%-----LMS algorithm-----
e = d(1) - output; %-----compute error----- %%% 其实d(1)不可得;e也不可得;
for n=1:M %-----update weights
w(n) = w(n) + mu*u(n)*e; %%% w的更新;需要事先知道e;
end
int(t-M+1) = u(1);
out(t-M+1) = output;
err(t-M+1) = e;
t = t+1;
epoch = epoch + 1;
%-----plot noise and filtered signal-----
figure(1);
subplot(211)plot(tu(1))axis([0 e_max -2.5 2.5])title(‘LMS Filter Input(Siganal + Noise)‘)drawnowhold on
subplot(212)plot(toutput)axis([0 e_max -2.5 2.5])title(‘LMS Filtered Signal‘)drawnowhold on
end
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 728844 2001-01-01 01:32 LMS\LMS DSP实现.pdf
文件 3638 2001-01-01 01:33 LMS\mls.m
文件 2205 2005-03-22 16:48 LMS\LMS 源程序.txt
文件 2366 2001-01-01 01:35 LMS\lms.m
文件 2154 2001-01-01 01:35 LMS\lms1.m
文件 830 2001-01-01 01:36 LMS\my_lms.m
文件 2697 2009-06-13 21:31 LMS\Chap_5_MVDR.rar
文件 766359 2009-06-13 21:32 LMS\DSP-Matlab_Programs.rar
文件 7656 2009-06-13 21:32 LMS\lms DSP.rar
文件 130472 2009-06-13 21:32 LMS\matlab_algorithms.rar
文件 130756 2009-06-13 21:32 LMS\MATLAB_Arithmetic.rar
文件 8142 2009-06-13 21:32 LMS\mud-code.rar
目录 0 2001-01-02 09:02 LMS
----------- --------- ---------- ----- ----
1786119 13
相关资源
- matlab_OFDM调制解调(来自剑桥大学)
- Matlab路面裂缝识别69319
- 高灵敏度GPS接收机MATLAB仿真,附捕获
- 基于MATLAB的质点弹道计算与外弹道优
- 阵列天线的matlab仿真
- MATLAB 经典程序源代码大全
- MATLAB小波软阈值去噪代码33473
- 天线阵的波束形成在MATLAB仿真程序及
- 非线性SVM算法-matlab实现
- 《MATLAB 智能算法超级学习手册》-程序
- 组合导航matlab程序
- 读取txt文件内容matlab代码实现
- Matlab实现基于相关的模板匹配程序
- matlab优化工具箱讲解
- 基于MATLAB的快速傅里叶变换
- 光纤传输中的分布傅立叶算法matlab实
- 基于matlab的图像处理源程序
- matlab 椭圆拟合程序
- 算术编码解码matlab源代码
- optical_flow 光流法 matlab 实现程序
- 引导图像滤波器 Matlab实现
- 分形几何中一些经典图形的Matlab画法
- OFDM系统MATLAB仿真代码
- SVM工具箱(matlab中运行)
- 图像小波变换MatLab源代码
- LU分解的MATLAB实现
- 冈萨雷斯数字图像处理matlab版(第三
- 替代数据法的matlab程序
- 用matlab实现的多站定位系统性能仿真
- 通过不同方法进行粗糙集属性约简m
评论
共有 条评论