常规双边带调幅(AM)
任意的AM
已调信号可以表示为$S_{AM}=\left[A+f\left(t\right)\right]\cos{\left(\omega t+\theta\right)}$,称为标准调幅。A
是外加直流分量;f(t)
是调制信号,它可以是确定信号,也可以是随机信号;ω
为载波信号的角频率;θ
为载波信号的起始相位,为方便起见,通常设为0。
close all;clear all; %AM
dt = 0.001; %时间采样频谱
fm = 1; %信源的最高频率
B = 2 * fm;
fc = 10; %载波中心频率
T = 5; %信号时长
t = 0:dt:T; %采样时间
% N0=0.01; %噪声的功率谱密度
mt = sqrt(2) * cos(2*pi*fm*t); %信源
%AM modulation
A = 2;
s_am = (A + mt) .* cos(2*pi*fc*t);
%noise=noise_nb(fc,B,N0,t);s_am=s_am+noise; %噪音
figure(1)
subplot(311), plot(t, s_am), hold on; %AM信号波形
plot(t, A+mt, 'r--'); %AM包络
title('AM调制信号及其包络');
xlabel('t');
%AM demodulation
rt = s_am .* cos(2*pi*fc*t);
rt = rt - mean(rt);
[f, rf] = T2F(t, rt);
[t, rt] = lpf(f, rf, 2*fm);
subplot(312), plot(t, rt), hold on;
plot(t, mt/2, 'r--');
title('相干解调后的信号波形与输入信号的比较');
xlabel('t')
[f, sf] = T2F(t, s_am);
psf = (abs(sf).^2) / T; %调制信号功率谱密度
subplot(313), plot(f, psf); %AM信号功率谱波形AM
axis([-2 * fc, 2 * fc, 0, max(psf)]);
title('AM信号功率谱');
xlabel('f');
抑制载波双边带调幅(DSB)
在标准调幅时,已调波中含有不携带信息的载波分量,故调制效率较低。为了提高调制效率,在标准调幅的基础上抑制掉载波分量,使总功率全部包含在双边带中,这种调制方式称为抑制载波双边带调制,简称双边带调制(DSB
)。
实现双边带调制就是完成调制信号与载波信号的相乘运算,已调信号可以表示为$S_{DSB}=f\left(t\right)\cos{\left(\omega t+\theta\right)}$,属于线性调制。
close all;clear all; %DSB
dt = 0.001; %时间采样频谱
fm = 1; %信源的最高频率
B = 2 * fm;
fc = 10; %载波中心频率
T = 5; %信号时长
t = 0:dt:T;
%N0=0.01; %噪声的功率谱密度
mt = sqrt(2) * cos(2*pi*fm*t); %信源
%DSB modulation
s_DSB = mt .* cos(2*pi*fc*t);
%noise=noise_nb(fc,B,N0,t); s_DSB=s_DSB+noise; %噪音
figure(1)
subplot(311), plot(t, s_DSB),hold on;
plot(t, mt, 'r--');
title('DSB调制信号');
xlabel('t');
%DSB demodulation
rt = s_DSB .* cos(2*pi*fc*t);
rt = rt - mean(rt);
[f, rf] = T2F(t, rt); %傅里叶变换
[t, rt] = lpf(f, rf, 2*fm); %低通滤波
subplot(313), plot(t, rt), hold on;
plot(t, mt/2, 'r--');
title('相干解调后的信号波形与输入信号的比较');
xlabel('t');
[f, sf] = T2F(t, s_DSB);
psf = (abs(sf).^2) / T;
subplot(312), plot(f, psf);
axis([-2 * fc, 2 * fc, 0, max(psf)]);
title('DSB信号功率谱');
xlabel('f');
单边带调制(SSB)
双边带信号虽然抑制了载波,提高了调制效率,但调制后的频带宽度仍是基带信号带宽的2倍,而且上、下边带是完全对称的,它们所携带的信息完全相同,因此,从信息传输的角度来看,只传输一个边带就可以了。我们把这种只传输一个边带的调制方式称为单边带抑制载波调制,简称为单边带调制(SSB
)。
close all;clear all; %SSB
dt = 0.001; %时间采样频谱
fm = 1; %信源的最高频率
B = fm;
fc = 10; %载波中心频率
T = 5; %信号时长
t = 0:dt:T;
%N0=0.01; %噪声的功率谱密度
mt = sqrt(2) * cos(2*pi*fm*t); %信源
%ssb modulation
s_ssb = real(hilbert(mt).*exp(j*2*pi*fc*t));
%noise=noise_nb(fc,B,N0,t); s_ssb=s_ssb+noise; %噪音
figure(1)
subplot(311),plot(t, s_ssb),hold on;
plot(t, mt, 'r--');
title('ssb调制信号');
xlabel('t');
%SSB demodulation
rt = s_ssb .* cos(2*pi*fc*t);
rt = rt - mean(rt);
[f, rf] = T2F(t, rt);
[t, rt] = lpf(f, rf, 2*fm);
subplot(312), plot(t, rt), hold on;
plot(t, mt/2, 'r--');
title('相干解调后的信号波形与输入信号的比较');
xlabel('t');
[f, sf] = T2F(t, s_ssb);
psf = (abs(sf).^2) / T;
subplot(313), plot(f, psf);
axis([-2 * fc, 2 * fc, 0, max(psf)]);
title('SSB信号功率谱');
xlabel('f');
附录
% 低通滤波函数
function [t, st] = lpf(f, sf, B)
df = f(2) - f(1);
T = 1 / df;
hf = zeros(1, length(f));
bf = [-floor(B/df):floor(B/df)] + floor(length(f)/2);
hf(bf) = 1;
yf = hf .* sf;
[t, st] = F2T(f, yf);
st = real(st);
end
% 时域转频域
function [f, sf] = T2F(t, st)
% dt = t(2)-t(1);
T = t(end);
df = 1 / T;
N = length(st);
f = -N / 2 * df:df:N / 2 * df - df;
sf = fft(st);
sf = T / N * fftshift(sf);
end
% 频域转时域
function[t, st] = F2T(f, Sf)
df = f(2) - f(1);
fmax = (f(end) - f(1) + df);
dt = 1 / fmax;
N = length(f);
t = [0:N - 1] * dt;
Sf = fftshift(Sf);
st = fmax * ifft(Sf);
st = real(st);
end
% 带通滤波
function [t, st] = bpf(f, sf, B1, B2)
df = f(2) - f(1);
T = 1 / df;
hf = zeros(1, length(f));
bf = [floor(B1/df):floor(B2/df)];
bf1 = floor(length(f)/2) + bf;
bf2 = floor(length(f)/2) - bf;
hf(bf1) = 1 / sqrt(2*(B2 - B1));
hf(bf2) = 1 / sqrt(2*(B2 - B1));
yf = hf .* sf .* exp(-j*2*pi*f*0.1*T);
[t, st] = F2T(f, yf);
% 高斯白噪声函数
function [out] = noise_nb(fc, B, N0, t)
dt = t(2) - t(1);
fmx = 1 / dt;
n_len = length(t);
p = N0 * fmx;
rn = sqrt(p) * randn(1:n_len);
[f, rf] = T2F(t, rn);
[t, out] = bpf(f, rf, fc-B/2, fc+B/2);
end
4 条评论
《逃离“自由”电影院》剧情片高清在线免费观看:https://www.jgz518.com/xingkong/3528.html
文章的确不错啊https://www.cscnn.com/
兄弟写的非常好 https://www.cscnn.com/
看的我热血沸腾啊https://www.jiwenlaw.com/