资源描述:
《基于matlab的 am,fm调制与解调报告》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、AM调制与解调100%%AMµ÷ÖÆfigure('Name','Ðźŵ÷Öƹý³ÌÖв¨Ðμ°ÆäƵÆ×','NumberTitle','off')a0=1;f0=2000;fc=20000;fs=1000000;t=[1:0.000001:4];am1=0*cos(2*pi*f0*t);%µ÷ÖÆÐźÅam=a0+am1;t1=cos(2*pi*fc*t);%Ôز¨s_am=am.*t1;AM1=fft(am1);T1=fft(t1);S_AM=fft(s_am);f=(0:3000000)*fs/3000001-fs/2;subplot(3,2,1);plot(t(1
2、:1000),am1(1:1000));title('ÐÅÏ¢ÐźŲ¨ÐÎ');subplot(3,2,2);plot(f,fftshift(abs(AM1)));title('ÐÅÏ¢ÐźÅƵÆ×');subplot(3,2,3);plot(t(1:1000),t1(1:1000));title('Ôز¨ÐźÅ');subplot(3,2,4);plot(f,fftshift(abs(T1)));title('Ôز¨ÐźÅƵÆ×');subplot(3,2,5);plot(t(1:1000),s_am(1:1000));title('Òѵ÷ÐźÅ');subplot
3、(3,2,6);plot(f,fftshift(abs(S_AM)));title('Òѵ÷ÐźÅƵÆ×');%²úÉúÔëÉùfigure('Name','Ìí¼ÓÔëÉù¼°´øͨÂ˲¨¹ý³Ì²¨Ðμ°ÆäƵÆ×','NumberTitle','off');snr=5;y=awgn(s_am,snr);fcuts=[16000175002250024000];mags=[010];devs=[0.050.010.05];[n,Wn,beta,ftype]=kaiserord(fcuts,mags,devs,fs);hh=fir1(n,Wn,ftype,kaiser(n+
4、1,beta),'noscale');[H,f]=freqz(hh,1,1024,fs);st_p=fftfilt(hh,y);Q=fft(st_p);Y=fft(y);f=(0:3000000)*fs/3000001-fs/2;subplot(2,2,1);plot(t(1500001:1501000),y(1500001:1501000));title('Ìí¼ÓÔëÉùºóÐźŲ¨ÐÎ');subplot(2,2,2);plot(f,fftshift(abs(Y)));title('Ìí¼ÓÔëÉùºóÐźÅƵÆ×');subplot(2,2,3);plot(t(150000
5、1:1501000),st_p(1500001:1501000));title('´øͨÂ˲¨ºóÐźŲ¨ÐÎ');subplot(2,2,4);plot(f,fftshift(abs(Q)));title('´øͨÂ˲¨ºóÐźÅƵÆ×');%½âµ÷figure('Name','Ïà¸É½âµ÷ËùµÃ²¨Ðμ°ÆäƵÆ×','NumberTitle','off');ss_am=st_p.*t1;SS_AM=fft(ss_am)f=(0:3000000)*fs/3000001-fs/2;subplot(2,1,1);plot(t(1500001:1503000),s
6、s_am(1500001:1503000));title('Ïà³ËÐźÅ');subplot(2,1,2);plot(f,fftshift(abs(SS_AM)));title('Ïà³ËÐźÅƵÆ×');fcuts1=[2500,30000];mags1=[10];devs1=[0.010.05];[n,Wn,beta,ftype]=kaiserord(fcuts1,mags1,devs1,fs);hh1=fir1(n,Wn,ftype,kaiser(n+1,beta),'noscale');[H,f]=freqz(hh1,1,1024,fs);m0=fftfilt(hh1,ss
7、_am);M0=fft(m0);f=(0:3000000)*fs/3000001-fs/2;figuresubplot(2,1,1);plot(t(1500001:1501000),m0(1500001:1501000));title('½âµ÷ÐźÅ');subplot(2,1,2);plot(f,fftshift(abs(M0)));title('½âµ÷ÐźÅƵÆ×');50%%AMµ÷ÖÆfigure('N