⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ch5example8prog2.m

📁 通信程序源代码和模型通信程序源代码和模型通信程序源代码和模型
💻 M
字号:
% ch5example8prog2.m
clear;
Fs=10000;      % 仿真的采样率
t=1/Fs:1/Fs:1; % 仿真时间点
m_t(Fs*1)=0;   % 基带信号变量初始化
for F=150:400  % 基带信号发生:频率150Hz~400Hz
    m_t=m_t+0.003*sin(2*pi*F*t)*(400-F); % 幅度随线性递减
end
m_t90shift=imag(hilbert(m_t)); % 基带信号的希尔伯特变换
carriercos=cos(2*pi*1000*t);   % 1000Hz载波 cos
carriersin=sin(2*pi*1000*t);   % 1000Hz正交载波 sin
s_SSB1=m_t.*carriercos-m_t90shift.*carriersin; % 上边带SSB

out=s_SSB1.*cos(2*pi*1018*t+1);% 存在频率误差的相位误差时的相干解调
[a,b]=butter(4, 500/(Fs/2));   % 低通滤波器设计4阶,截止频率为500Hz
demodsig=filter(a,b,out);      % 解调输出
% 下面作出各波形以及频谱
figure(1);
subplot(3,2,1); plot(t(1:100),s_SSB1(1:100));    % SSB波形
subplot(3,2,2); plot([0:9999],abs(fft(s_SSB1))); % SSB频谱
                axis([0 5000 -500 6000]);
subplot(3,2,3); plot(t(1:100),out(1:100));       % 相干解调波形
subplot(3,2,4); plot([0:9999],abs(fft(out)));    % 相干解调频谱
                axis([0 3000 -500 6000]);
subplot(3,2,5); plot(t(1:100),demodsig(1:100));   % 低通输出信号
subplot(3,2,6); plot([0:9999],abs(fft(demodsig)));% 低通输出信号的频谱
                axis([0 3000 -500 6000]);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -