欢迎来到天天文库
浏览记录
ID:60778491
大小:79.21 KB
页数:7页
时间:2020-12-18
《AM调制解调过程仿真.docx》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、clcfs=1000;fc=20;fm=1;dt=0.001N=5/dt;t=[0:N-1]*dt;snr=1;g=5*cos(2*pi*fm*t);A=5;s_am=(A+g).*cos(2*pi*fc*t);figure(1);subplot(211);plot(g);gridon;df=fs/(N-1);f=(0:N-1)*df;yg=fft(g,N);mg=abs(yg(1:N/2))*2*pi/N;subplot(212);stem(f(1:20),mg(1:20));gridon;figure(2);subpl
2、ot(211);plot(s_am);holdon;plot(A+g,'r-');gridon;df=fs/(N-1);f=(0:N-1)*df;y=fft(s_am,N);m=abs(y(1:N/2))*2*pi/N;subplot(212);stem(f(1:200),m(1:200));gridon;figure(3)subplot(211);x1=awgn(s_am,snr);plot(x1);gridon;N=1500;df=fs/(N-1);f=(0:N-1)*df;y1=fft(x1,N);m1=abs(y1
3、(1:N/2))*2*pi/N;subplot(212);stem(f(1:150),m1(1:150));gridon;y1=x1(:);figure(4)subplot(211)t1=(0:1/fs:(size(y1,1)-1)/fs)';t1=t1(:,ones(1,size(y1,2)));z1=y1.*cos(2*pi*fc*t1);[num,den]=butter(5,fc*2/fs);fori=1:size(y1,2)z1(:,i)=filtfilt(num,den,z1(:,i))*2;endplot(g)
4、;holdonxx=z1-A;plot(xx,'r')holdoff运行结果:图1原始信号及频谱图2已调信号与原始信号对比图及已调信号频谱图3加入噪声信号及频谱图4相干解调的信号与原始信号对比图
此文档下载收益归作者所有