说明:19-20第二学期《现代通信原理》课程设计
一、设计方案
  生成一个随机的双极性不归零波形,设计两种无码间串扰的滤波器,并分别观察眼图。
二、设计原理
1、无码间串扰原理
a、产生码间串扰的原因
  产生码间串扰,造成信号判决错误的主要原因是噪声和由于传输特性不良而导致在不同抽样时刻上的信号相互影响,重叠到临近时隙,从而使信号电平越过判决门限,导致信号失真。

b、减少或解决码间串扰的方法
  通过加宽信号的传输频带可以减少脉冲的蔓延造成的影响,但是由于该方法实现成本过高,因此不予考虑。另外一种方法就是通过设计合理的抗码间串扰的波形和传输滤波器,来减少码间串扰。
三、代码

function Y = NoISI
N_sample=17;%两次抽样间隔的单位时间数
N_data=100;%长度
t=-N_data:1/(N_sample-1):N_data;%设定“连续”时间轴
t1=0:1/(N_sample-1):N_data;%设定压缩时间轴
gt=ones(1,N_sample);%数字基带波形
d=sign(randn(1,N_data));%输人数字序列
D=length(d); %测d的长度
dd=zeros(N_sample,D);%产生一个N_sample行D列的零矩阵
dd(1,:)=d;%令dd的第一行等于d
dd=reshape(dd,1,N_sample*D);
%对dd逐列扫描,产生一个1行,N_sample*D列的矩阵
Dt=conv(dd,gt);%卷积后得到双极性波形
figure(1)
subplot(2,1,1)%画在第二行第一列
plot(t1,Dt(1:length(t1)));%压缩时间轴
axis([0 25 -1.5 1.5]);%画出x轴0-20,y轴-1.5到1.5的范围
ylabel('输入双极性NRZ波形');
subplot(2,1,2)%画在第二行第一列
stem(d);
axis([0 25 -1.5 1.5]);
ylabel('输入数字序列');


%用MATLAB仿真理想滤波器
ht=sinc(t*N_sample); %理想滤波器时域表达式,展开时间轴
rt2=conv(Dt,ht);%滤波后的波形
figure(2)
subplot(2,1,1)
plot(t,[0 rt2(1:length(t)-1)]);
axis([0 25 -1.5 1.5]);
ylabel('理想低通滤波后输出');
subplot(2,1,2)
aa=rt2((N_sample-1)*N_data+1:N_sample:end);%抽样
C=length(aa);
aaa=zeros(N_sample,C);
aaa(1,:)=aa;
output=(reshape(aaa,1,N_sample*C));%判决
stem(t1,output(1:length(t1)));%压缩时间轴
axis([0 25 -1.5 1.5])
ylabel('理想低通滤波后抽样判决输出');


%用MATLAB仿真升余弦滚降系统
alpha=0.75;%滚降系数α的取值
ht2=sinc(t*N_sample).*cos(alpha*pi*t*N_sample)./(1-4*alpha*alpha*(t.*t)*N_sample);
%升余弦滚降系统表达式,展开时间轴
rt3=conv(Dt,ht2);%滤波后的波形
figure(3)
subplot(2,1,1)
plot(t,[0 rt3(1:length(t)-1)])
axis([0 25 -1.5 1.5]);
ylabel('α=0.75升余弦滚降滤波后输出');
subplot(2,1,2)
aa1=rt3((N_sample-1)*N_data+1:N_sample+2:end);%抽样
C1=length(aa1);
aaa1=zeros(N_sample,C1);
aaa1(1,:)=aa1;
output1=(reshape(aaa1,1,N_sample*C1));%判决
stem(t1,output1(1:length(t1)));%压缩时间轴
axis([0 25 -1.5 1.5])
ylabel('升余弦滚降滤波后抽样判决输出');


%理想低通和滚降时域对比图
figure(4)
subplot(2,1,1)
plot(t*N_sample,ht);
axis([-20 20 -0.5 1.5]);
xlabel('理想低通滤波器时域图')
subplot(2,1,2)
plot(t*N_sample,ht2);
axis([-20 20 -0.5 1.5]);
xlabel('升余弦滚降函数时域图')


%用MATLAB画出眼图
figure(5)
eye_num=5;
for k=0.5*length(rt2)/N_sample:0.5*length(rt2)/N_sample+10 
%取信号稳定部分
ss=rt2(k*N_sample+1:(k+eye_num)*N_sample);
drawnow;
subplot(2,1,1)
plot(ss);hold on;
axis([0 90 -2 2])
end
xlabel('t/Ts');ylabel('理想低通滤波后输出眼图');
eye_num2=5;
for k1=0.5*length(rt2)/17:0.5*length(rt2)/17+10
%取信号稳定部分
ss1=rt3(k1*N_sample+1:(k1+eye_num2)*N_sample);
drawnow;
subplot(2,1,2)
plot(ss1);hold on;
end
xlabel('t/Ts');ylabel('升余弦滚降滤波后输出眼图');


%对比不同滚降系数的效果
alpha=0.9;
ht2=sinc(t*N_sample).*cos(alpha*pi*t*N_sample)./(1-4*alpha*alpha*(t.*t)*N_sample);
rt3=conv(Dt,ht2);
figure(6)
subplot(2,1,1)
plot(t,[0 rt3(1:length(t)-1)])
axis([0 25 -1.5 1.5]);
ylabel('α=0.9升余弦滚降滤波后输出');
subplot(2,1,2)
aa1=rt3((N_sample-1)*N_data+1:N_sample:end);%抽样
C1=length(aa1);
aaa1=zeros(N_sample,C1);
aaa1(1,:)=aa1;
output1=sign(reshape(aaa1,1,N_sample*C1));%判决
stem(t1,output1(1:length(t1)));%压缩时间轴
axis([0 25 -1.5 1.5])
ylabel('升余弦滚降滤波后抽样判决输出');
eye_num2=5;
figure(7)
for k1=0.5*length(rt2)/17:0.5*length(rt2)/17+10
%取信号稳定部分
ss1=rt3(k1*N_sample+1:(k1+eye_num2)*N_sample);
drawnow;
plot(ss1);hold on;
end
xlabel('t/Ts');ylabel('升余弦滚降滤波后输出眼图');

end

输出为图像显示。

Last modification:December 14, 2021
If you think my article is useful to you, please feel free to appreciate