本文最后更新于 2022-05-09T15:50:57+08:00
数字信号调制
参数及之间的关系
- \(f_b\):码元速率\(=1/T_b\)
- \(f_c\):载波频率
- \(f_s\):采样频率
- \(\text{sps}\):一个符号采样多少个点
- \(\text{span}\):表示截断的符号范围,对滤波器取了几个符号的长度
其中,\(f_s=\text{sps}\cdot f_b\),\(B_{2psk}=2f_b\)
image-20220509144938392
基带信号产生
产生随机数,\(M\)阶数
1
| msg=randi([0 M-1],1,100);
|
星座图映射
成型滤波
插值
1 2
| msgmod = [msgmod;zeros(sps-1, length(msgmod))]; msgmod = reshape(msgmod, 1, sps*length(msgmod));
|
设计滤波器
1
| h = rcosdesign(0.35, span, sps);
|
滤波
1
| msgmod = filter(h, 1, msgmod);
|
上变频
1 2 3
| t=(0:1:length(msgmod)-1)/fs; carry_c=exp(1i*2*pi*fc*t); y=real(msgmod.*carry_c);
|
Result
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
| clear;clc;close all;
M=2; fc=7000; sps = 4; span = 6; fb = 1000; fs = sps*fb;
snr_dB=2000; msg=randi([0 M-1],1,100); msgmod=pskmod(msg,M);
msgmod = [msgmod;zeros(sps-1, length(msgmod))]; msgmod = reshape(msgmod, 1, sps*length(msgmod));
h = rcosdesign(0.35, span, sps);
msgmod = filter(h, 1, msgmod);
t=(0:1:length(msgmod)-1)/fs; carry_c=exp(1i*2*pi*fc*t); y=real(msgmod.*carry_c);
figure(1) plot((-length(y)/2:length(y)/2-1)/length(y)*fs, fftshift(abs(fft(y))))
|
