基带信号m(t)=sin(10πt)+sin(30πt),载波为c(t)=cos(2000πt),编写Matlab代码实现对AM调制信号的相干解调,并作出图形。请用2016版本不要用[b, a] = butter(6, fc*2*pi*0.2, 'low');
时间: 2024-03-24 10:40:53 浏览: 18
以下是Matlab 2016版本的代码实现对AM调制信号的相干解调并作图的过程:
```matlab
% 清空所有变量
clear all
% 设置时间范围和时间步长
t = 0:0.001:1;
% 基带信号
m = sin(10*pi*t) + sin(30*pi*t);
% 载波信号
fc = 2000;
c = cos(2*pi*fc*t);
% AM调制信号
s = (1 + m).*c;
% 信号解调
s_demod = s.*c;
% 设计低通滤波器
fs = 10000; % 采样频率
f_cutoff = 400; % 截止频率
N = 100; % 滤波器阶数
h = fir1(N, f_cutoff/(fs/2));
% 信号滤波
s_filtered = conv(s_demod, h, 'same');
% 绘制图形
subplot(3, 1, 1);
plot(t, m);
title('基带信号');
xlabel('时间/s');
ylabel('幅度');
subplot(3, 1, 2);
plot(t, s);
title('AM调制信号');
xlabel('时间/s');
ylabel('幅度');
subplot(3, 1, 3);
plot(t, s_filtered);
title('解调后信号');
xlabel('时间/s');
ylabel('幅度');
```
运行代码后,会得到绘制的三幅图形,分别是基带信号、AM调制信号和解调后的信号。其中,解调后的信号已经经过了低通滤波器滤波,可以看到它的频率范围已经被限制在了原始基带信号的频率范围内。这里使用了FIR滤波器实现低通滤波。
相关推荐
![docx](https://img-home.csdnimg.cn/images/20210720083331.png)
![docx](https://img-home.csdnimg.cn/images/20210720083331.png)
![pptx](https://img-home.csdnimg.cn/images/20210720083543.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![doc](https://img-home.csdnimg.cn/images/20210720083327.png)
![](https://img-home.csdnimg.cn/images/20210720083646.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![doc](https://img-home.csdnimg.cn/images/20210720083327.png)