北邮通原软件实验报告.

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

2013年通信原理软件实验报告学院:信息与通信工程学院班级:2011211104姓名:学号:班内序号:目录实验一调幅信号波形频谱仿真..............................4一.实验题目.............................................................4二.基本原理.............................................................41.AM调制原理.........................................................42.DSB调制原理............................................................43.SSB调制原理........................................................4三.仿真思路................................................................4四.程序框图................................................................5五.仿真源代码..............................................................5六.仿真结果及分析.......................................................8实验二调频信号频谱仿真.................................................10一.实验题目............................................................10二.基本原理............................................................10三.仿真思路............................................................10四.程序框图............................................................11五.仿真源代码..........................................................11六.仿真结果分析........................................................12实验三单双极性波形及功率谱仿真.........................................13一.实验题目............................................................13二.基本原理............................................................131.单极性归零码.......................................................132.双极性归零码.......................................................133.各种码的比较.......................................................13三.仿真思路............................................................131.产生RZ码..........................................................132.仿真功率谱密度.....................................................13四.程序框图............................................................14五。仿真源代码..........................................................14六.仿真及结果分析......................................................17实验四根升余弦滚降功率谱密度及眼图仿真..................................25一.实验题目............................................................25二.基本原理............................................................251.升余弦滚降.........................................................252.眼图...............................................................25三.仿真思路............................................................26四.程序框图............................................................26五.仿真源代码............................................................................................................................26六.仿真结果及分析......................................................27心得体会.............................................................29实验一调幅信号波形频谱仿真一.实验题目假设基带信号为()sin(2000)2cos(1000)mttt,载波频率为20kHz,请仿真出AM、DSB-SC、SSB信号,观察已调信号的波形及频谱。二.基本原理1.AM调制原理对于单音频信号()sin(2)mmmtAft进行AM调制的结果为()(sin(2))sin2(1sin(2))sin2AMcmmccmcstAAAftftAAaftft其中调幅系数mAaA,要求1a以免过调引起包络失真。由maxA和minA分别表示AM信号波形包络最大值和最小值,则AM信号的调幅系数为maxminmaxminAAaAA2.DSB-SC调制原理DSB信号的时域表达式为()()cosDSBcstmtt频域表达式为1()[()()]2DSBccSMM3.SSB调制原理SSB信号只发送单边带,比DSB节省一半带宽,其表达式为:三.仿真思路定义时域采样率、截断时间和采样点数,可得到载波和调制信号,容易根据调制原理写出各调制信号表达式,由此可以画出时域波形图。另外,对时域信号进行FFT变换,此处使用预先定义的t2f.m函数替代,进行傅立叶变换,得到频谱,在频域作图即可。四.程序框图五.仿真源代码1.傅里正变换函数代码:functionS=t2f(s,fs)%傅里叶正变换,s表示输入信号,S代表s的频谱,fs是采样率N=length(s);%总样点数T=1/fs*N;%观察时间f=[-N/2:(N/2-1)]/T;%频率采样点tmp1=fft(s)/fs;tmp2=N*ifft(s)/fs;S(1:N/2)=tmp2(N/2+1:-1:2);S(N/2+1:N)=tmp1(1:N/2);S=S.*exp(j*pi*f*T);End2.傅里叶反变换函数代码:确定基本采样参数确定载波和基带待调制信号确定AM,DSB,SSB的一条信号FFT变换得到信号频谱作图functions=f2t(S,fs)%傅里叶反变换N=length(S);T=N/fs;t=[-(T/2):1/fs:(T/2-1/fs)];%时域采样点tmp1=fft(S)/T;tmp2=N*ifft(S)/T;s(1:N/2)=tmp1(N/2+1:-1:2);s(N/2+1:N)=tmp2(1:N/2);s=s.*exp(-j*pi*t*fs);End3.AM信号仿真代码:clearall;closeall;fs=800;T=200;%确定基本的采样参数N=T*fs;dt=1/fs;df=1/T;t=[-T/2:dt:T/2-dt];f=[-fs/2:df:fs/2-df];%kHzfm1=1;fm2=0.5;%设定该题目参量fc=20;a=1/3;%调幅指数m=sin(2*pi*fm1*t)+2*cos(2*pi*fm2*t);%待调制基带信号M=t2f(m,fs);%待调制基带信号傅里叶变换c=cos(2*pi*fc*t);%载波信号s=(1+a*m).*cos(2*pi*fc*t);%AM信号S=t2f(s,fs);%AM信号傅里叶变换figure(1)subplot(2,2,1)%做基带待调制信号波形plot(t,m),axis([-2,2,-max(abs(m)+0.5),max(abs(m)+0.5)])xlabel('t(s)'),ylabel('m(t)(V)'),title('基带待调制信号')subplot(2,2,2)%做载波信号波形plot(t,c),axis([-0.1,0.1,-max(abs(c)+0.5),max(abs(c)+0.5)])xlabel('t(s)'),ylabel('c(t)(V)'),title('载波信号')subplot(2,2,3)%做AM信号波形plot(t,s),axis([-2.5,1.5,-3,3])xlabel('t(ms)'),ylabel('s(t)(V)'),title('AM时域波形')subplot(2,2,4)%做AM信号幅频特性plot(f,abs(S)),axis([18,22,0,max(abs(S)+10)])xlabel('f(kHz)'),ylabel('|AM(f)|(V/Hz)'),title('AM幅频特性')4.DSB信号仿真代码:clearall;closeall;fs=800;T=200;%设置采样基本参数N=T*fs;dt=1/fs;df=1/T;t=[-T/2:dt:T/2-dt];f=[-fs/2:df:fs/2-df];%kHzfm1=1;fm2=0.5;fc=20;%设置该题目参数m=sin(2*pi*fm1*t)+2*cos(2*pi*fm2*t);%基带待调制信号M=t2f(m,fs);%待调制信号频谱s=m.*cos(2*pi*fc*t);%DSB信号S=t2f(s,fs);%DSB信号频谱figure(1)subplot(2,1,1)%做出DSB信号波形plot(t,s),axis([-2.5,1.5,-4,4])xlabel('t(ms)'),ylabel('s(t)(V)')title('DSB-SC时域波形')subplot(2,1,2)%做出DSB信号频谱plot(f,abs(S)),axis([18,22,0,max(abs(S)+10)])xlabel('f(kHz)'),ylabel('|DSB-SC(f)|(V/Hz)')title('DSB-SC幅频特性

1 / 30
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功