云题海 - 专业文章范例文档资料分享平台

当前位置:首页 > (代码)基于MATLAB的AM调制解调系统仿真报告

(代码)基于MATLAB的AM调制解调系统仿真报告

  • 62 次阅读
  • 3 次下载
  • 2025/6/6 18:32:25

%-------------------------------------------------------------------- Lfft=length(t);

Lfft=2^ceil(log2(Lfft)+1);

S_am=fftshift(fft(s_am,Lfft)/(length(t))); % fft to”s_am” freqs=(-Lfft/2:Lfft/2-1)/(Lfft*ts); %frequency range

%-------------------------------------------------------------------- %Display the Time_domain &Frequency_domain waveform of message_signal %-------------------------------------------------------------------- figure(1); h1=plot(t,m_sig); %title('Message Signal'); xlabel('t(sec)');ylabel('m(t)'); axis([-0.025 0.025 -2 2]); set(h1,'Linewidth',1.5); figure(2);

h2=plot(freqm,abs(M_fre)); %title('Message Spectrum'); xlabel('f(Hz)');ylabel('M(f)'); axis([-200 200 0 0.5]); set(h2,'Linewidth',1.5);

%-------------------------------------------------------------------- % Display the Time_domaim&Frequency_domain waveform Of Carrier %-------------------------------------------------------------------- figure(3);

S_carr=fftshift(fft(s_carr,Lfft)/(length(t))); h3=plot(freqs,abs(S_carr)); %title('Carrier Spectrum');

xlabel('f(Hz)');ylabel('{\\it S}_{\\it carr}({\\it f})'); axis([-700 700 0 0.5]);set(h3,'Linewidth',1.5); figure(4);

h33=plot(t,s_carr); %title('Carrier Signal');

xlabel('t(sec)');ylabel('{\\it s}_{carr}({\\it t})'); axis([-0.005 0.005 -1.5 1.5]);set(h33,'Linewidth',1.5);

%-------------------------------------------------------------------- %Display the Time_domain &Frequency_domain wave of AM Dodulatied_signal %-------------------------------------------------------------------- figure(5);

h4=plot(t,s_am);xlabel('t(sec)');ylabel('{\\it s}_{\\it AM}({\\it t})'); %title('AM Modulated Signal');

axis([-0.025 0.025 -2 2]);set(h4,'Linewidth',1.5);

figure(6);

%S_am is given before

h5=plot(freqs,abs(S_am));xlabel('f(Hz)');ylabel('{\\it S}_{\\it AM}({\\it f})');

%title('AM Specturm');

axis([-700 700 0 0.5]);set(h5,'Linewidth',1.5);

%-------------------------------------------------------------------- % Demodulation begins by using the coherent_demodulation

%-------------------------------------------------------------------- s_dem=s_am.*s_carr;

S_dem=fftshift(fft(s_dem,Lfft)/(length(t)));

%-------------------------------------------------------------------- %Using the ideal LPF with bandwidth 150Hz

%--------------------------------------------------------------------

s_rec=filter(h,1,s_dem);

S_rec=fftshift(fft(s_rec,Lfft)/(length(t)));

%-------------------------------------------------------------------- %Display the Time_domain &Frequency_domain wave of Coherent_signal %-------------------------------------------------------------------- figure(7);

h6=plot(t,s_dem);xlabel('t(sec)');ylabel('{\\it s}_{\\it rect}({\\it t})');

%title('Cohernet Signal');

axis([-0.025 0.025 -2 2]);set(h6,'Linewidth',1.5); figure(8);

h7=plot(freqs,abs(S_dem));xlabel('f(Hz)');ylabel('{\\it S}_{\\it rect}({\\it f})');

%title('Coherent Specturm');

axis([-1200 1200 0 0.5]);set(h7,'Linewidth',1.5);

%-------------------------------------------------------------------- %Display the Time_domain &Frequency_domain wave of Rcecovered_signal %-------------------------------------------------------------------- figure(9);

h8=plot(t,s_rec);xlabel('t(sec)');ylabel('{\\it s}_{\\it rec}({\\it t})');

%title('Recovered Signal');

axis([-0.025 0.025 -0.5 1]);set(h8,'Linewidth',1.5); figure(10);

h9=plot(freqs,abs(S_rec));xlabel('f(Hz)');ylabel('{\\it S}_{\\it rec}({\\it f})');

%title('Recovered Specturm');

axis([-200 200 0 0.5]);set(h9,'Linewidth',1.5);

%-------------------------------------------------------------------- % Display all time_domain wave on one figure(10)

%-------------------------------------------------------------------- region1=[-0.025 0.025 -2 2 ]; figure(11); subplot(221);

h_1=plot(t,m_sig);title('Message

Signal');xlabel('t(sec)');ylabel('m(t)'); set(h_1,'Linewidth',1.5); grid on; axis(region1); subplot(222);

h_2=plot(t,s_am);xlabel('t(sec)');ylabel('{\\it s}_{\\it AM}({\\it t})'); title('AM Modulated Signal');

set(h_2,'Linewidth',1.5);axis(region1); grid on; subplot(223);

h_3=plot(t,s_dem);xlabel('t(sec)');ylabel('{\\it s}_{\\it rect}({\\it t})');

title('Rectified Signal');

axis(region1);set(h_3,'Linewidth',1.5); grid on; subplot(224);

h_4=plot(t,s_rec);xlabel('t(sec)');ylabel('{\\it s}_{\\it rec}({\\it t})');

title('Recovered Signal');

axis([-0.025 0.025 -0.5 1]);set(h_4,'Linewidth',1.5); grid on;

%-------------------------------------------------------------------- %Display all Frequency_domain wave on one figure(11)

%-------------------------------------------------------------------- region2=[-700 700 0 0.5]; figure(12); subplot(221);

h_5=plot(freqm,abs(M_fre));title('Message Spectrum');xlabel('f(Hz)');ylabel('M(f)');

axis([-200 200 0 0.5]);set(h_5,'Linewidth',1.5); grid on; subplot(222);

h_6=plot(freqs,abs(S_am));xlabel('f(Hz)');ylabel('{\\it S}_{\\it AM}({\\it f})'); title('AM Specturm');

axis([-700 700 0 0.5]);set(h_6,'Linewidth',1.5); grid on; subplot(223);

h_7=plot(freqs,abs(S_dem));xlabel('f(Hz)');ylabel('{\\it S}_{\\it

rect}({\\it f})');

title('Coherent Specturm');

axis(region2);set(h_7,'Linewidth',1.5,'color','r');grid on; subplot(224);

h_8=plot(freqs,abs(S_rec));xlabel('f(Hz)');ylabel('{\\it S}_{\\it rec}({\\it f})');

title('Recovered Specturm');

axis([-200 200 0 0.5]);set(h_8,'Linewidth',1.5,'color','r');grid on;

%-------------------------------------------------------------------- %save the result to file

%-------------------------------------------------------------------- save AM_mod_demod_yzliu_10_28

  • 收藏
  • 违规举报
  • 版权认领
下载文档10.00 元 加入VIP免费下载
推荐下载
本文作者:...

共分享92篇相关文档

文档简介:

%-------------------------------------------------------------------- Lfft=length(t); Lfft=2^ceil(log2(Lfft)+1); S_am=fftshift(fft(s_am,Lfft)/(length(t))); % fft to”s_am” freqs=(-Lfft/2:Lfft/2-1)/(Lfft*ts); %frequency range %-------------------------------------------------------------------- %Display the Time_domain &Frequency_domain waveform of message_signal %--------

× 游客快捷下载通道(下载后可以自由复制和排版)
单篇付费下载
限时特价:10 元/份 原价:20元
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信:fanwen365 QQ:370150219
Copyright © 云题海 All Rights Reserved. 苏ICP备16052595号-3 网站地图 客服QQ:370150219 邮箱:370150219@qq.com