加载中…
个人资料
  • 博客等级:
  • 博客积分:
  • 博客访问:
  • 关注人气:
  • 获赠金笔:0支
  • 赠出金笔:0支
  • 荣誉徽章:
正文 字体大小:

数字基带信号通过低通滤波器输出的眼图

(2009-10-31 17:18:44)
标签:

杂谈

分类: matlab

产生基带信号 双极性不归零矩形码

基带信号通过四个带宽不同的理想低通滤波器

加入对应 的带限高斯白噪声

得到四个滤波器的输出

画眼图

程序:

clear all;
close all;
N_eye = 7;%眼图中码元个数
N0 = 0.01;%高斯白噪声功率谱设为N0/2
Ts = 1;%码元宽度设为1
N_sample = 10;%每个码元抽样10个点
dt = Ts/N_sample;
gt = ones(1,N_sample);%矩形不归零脉冲
N_code = 1000;%码元个数

t = 0:dt:N_code*N_sample*dt-dt;
data = sign(randn(1,N_code));
data1 = sigexpand(data,N_sample);
st = conv(data1,gt);%产生NRZ基带信号

h1t =5/Ts*sinc(5*(t-5)/Ts);%滤波器1的冲激响应
h2t = 2/Ts*sinc(2*(t-5)/Ts);%滤波器2的冲激响应
h3t = 1/Ts*sinc(1*(t-5)/Ts);%滤波器3的冲激响应
h4t = 0.5/Ts*sinc(0.5*(t-5)/Ts);

r1t = conv(h1t,st);
r2t = conv(h2t,st);
r3t = conv(h3t,st);
r4t = conv(h4t,st);

r1t = [0 r1t*dt];
r2t = [0 r2t*dt];
r3t = [0 r3t*dt];
r4t = [0 r4t*dt];

sigma1 = sqrt(2.5*N0/Ts);
sigma2 = sqrt(N0/Ts);
sigma3 = sqrt(0.5*N0/Ts);
sigma4 = sqrt(0.25*N0/Ts);

n1 = sigma1*randn(1,length(r1t));
n2 = sigma2*randn(1,length(r2t));
n3 = sigma2*randn(1,length(r3t));%加入白噪声,该白噪声是通过滤波器后的带限白噪声
n4 = sigma2*randn(1,length(r4t));

r1t = r1t + n1;
r2t = r2t + n2;
r3t = r3t + n3;
r3t = r3t + n3;%至此得到基带信号分别通过滤波器1和滤波器2 滤波器3滤波器4的输出波形

ttt = 0:dt:N_eye*N_sample*dt-dt;

figure(1)
subplot(411)%画出滤波器1输出的眼图
for n = 9:1:100
    ss = r1t(n*N_sample*N_eye+1:(n+1)*N_sample*N_eye);
    drawnow;
    plot(ttt,ss);
    hold on;
end
ylabel('B=2.5Hz');
subplot(412)%画出滤波器2输出的眼图
for n = 9:1:100
    ss = r2t(n*N_sample*N_eye+1:(n+1)*N_sample*N_eye);
    drawnow;
    plot(ttt,ss)
    hold on;
end
ylabel('B=1Hz')
subplot(413)%画出滤波器2输出的眼图
for n = 9:1:100
    ss = r3t(n*N_sample*N_eye+1:(n+1)*N_sample*N_eye);
    drawnow;
    plot(ttt,ss)
    hold on;
end
ylabel('B=0.5Hz')
subplot(414)%画出滤波器2输出的眼图
for n = 9:1:100
    ss = r4t(n*N_sample*N_eye+1:(n+1)*N_sample*N_eye);
    drawnow;
    plot(ttt,ss)
    hold on;
end
ylabel('B=0.25Hz')

 

仿真图形点击图片或使用键盘← →翻页

从图中可看出滤波器带宽越窄,码间干扰越大

当1/Ts<2B时,即图1,图2效果还比较好

当1/Ts=2B,即图3,效果就差了很多

当1/Ts>2B,即图4,根本就毫无效果可言

 

0

阅读 收藏 喜欢 打印举报/Report
  

新浪BLOG意见反馈留言板 欢迎批评指正

新浪简介 | About Sina | 广告服务 | 联系我们 | 招聘信息 | 网站律师 | SINA English | 产品答疑

新浪公司 版权所有