失眠网,内容丰富有趣,生活中的好帮手!
失眠网 > matlab设计匹配滤波器 [转载]利用MATLAB实现匹配滤波器的仿真验证

matlab设计匹配滤波器 [转载]利用MATLAB实现匹配滤波器的仿真验证

时间:2020-08-13 23:05:27

相关推荐

matlab设计匹配滤波器 [转载]利用MATLAB实现匹配滤波器的仿真验证

匹配滤波器的仿真验证

一.实验目的:利用matlab验证匹配滤波器的特性

二.实验要求:设二进制数字基带信号s(t)=∑an

g(t-nTs),加性高斯白噪声的功率谱密度为0。

其中an∈{+1,-1},g(t)=1

0

0 其他

(1)若接收滤波器的冲激响应函数h(t)=g(t),画出经过滤波器后的输出波形图;

(2)若H(f)=1

︱f︱<5/(2Ts)

0 其他

画出经过滤波器后的输出波形图.

三. 实验源码

clear all;

close all;

N=100;

N_sample=8;

Ts=1;

dt=Ts/N_sample;

t=0:dt:(N*N_sample-1)*dt;

gt=ones(1,N_sample);

d=sign(randn(1,N));

a=sigexpand(d,N_sample);

st=conv(a,gt);

ht1=gt;

rt1=conv(st,ht1);

ht2=5*sinc(5*(t-5)/Ts);

rt2=conv(st,ht2);

figure(1)

subplot(321)

plot(t,st(1:length(t)));

axis([0 20 -1.5 1.5]);ylabel('输入双极性NRZ数字基带波形

');

subplot(322)

stem(t,a);

axis([0 20 -1.5 1.5]);ylabel('输入数字序列');

subplot(323)

plot(t,[0 rt1(1:length(t)-1)]/8);

axis([0 20 -1.5 1.5]);ylabel('方波滤波后输出');

subplot(324)

dd=rt1(N_sample:N_sample:end);

ddd=sigexpand(dd,N_sample);

stem(t,ddd(1:length(t))/8);

axis([0 20 -1.5 1.5 ]);ylabel('方波滤波后抽样输出');

subplot(325)

plot(t-5,[0 rt2(1:length(t)-1)]/8);

axis([0 20 -1.5 1.5 ]);

xlabel('t/Ts');ylabel('理想低通滤波器输出');

subplot(326)

dd=rt2(N_sample-1:N_sample:end);

ddd=sigexpand(dd,N_sample);

stem(t-5,ddd(1:length(t))/8);

axis([0 20 -1.5 1.5 ]);

xlabel('t/Ts');ylabel('理想低通滤波器抽样输出 ');

function[out]=sigexpand(d,M);

N=length(d);

out=zeros(M,N);

out(1,:)=d;

out=reshape(out,1,M*N);

四. 实验结果及分析

第一问中的接收滤波器为匹配滤波器,第二问中的接收滤波器为非匹配滤波器,该实验的目的是比较两种滤波器的输出波形与发送波形的误码情况。

如果觉得《matlab设计匹配滤波器 [转载]利用MATLAB实现匹配滤波器的仿真验证》对你有帮助,请点赞、收藏,并留下你的观点哦!

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。