balee:FM调制解调

FM调制解调
1.matlab仿真
先用matlab仿真,验证算法的可行性。
代码如下:

echo offclose allclear allclc%%%%%%%%%%%%%%%%%%FM调制%%%%%%%%%%%%%%%%%%%%%ps = 625000; % 数据率625KHzFs = 80*10^6; % 80M采样率dt = 1/Fs; % 采样间隔a = 1000; t = 0:dt:(a*Fs/ps-1)/Fs; % 产生时间序列N = length(t)-1;am = 5; % 设定调制信号幅度fm = 15*10^2; % 调制信号频率fc = 5*10^6; % 载波频率5Mmt = am*sin(2*pi*fm*t); % 生成调制信号ct = cos(2*pi*fc*t); % 生成载波kf = 10000; % 调频系数 频偏75kHzintegral_mt(1)=0;for i=1:N %积分 integral_mt(i+1)=integral_mt(i)+mt(i)*dt;end%figure(100);plot(t,integral_mt); title('integral_mt');sfm= am*cos(2*pi*fc*t+2*pi*kf*integral_mt); %已调信号%%%%%%%%%%%%画图%%%%%%%%%%%%figure(1);subplot(311);plot(t,mt); title('调制信号时域');axis([0 10^(-3) -5 5]); subplot(312);plot(t,ct); title('载波信号时域');axis([0 10^(-5) -1 2]); subplot(313);plot(t,sfm);title('已调信号时域');axis([0 10^(-5) -5 5]); %%%%%%%%%%%%画图%%%%%%%%%%%%figure(2);subplot(311);plot((N/2:N/2)*Fs/N,20*log10(abs(fftshift(fft(mt)))));title('调制信号频域'); subplot(312);plot((N/2:N/2)*Fs/N,20*log10(abs(fftshift(fft(ct)))));title('载波信号频谱'); subplot(313);plot((N/

相关推荐

相关文章