通信基础-Digital and Analog Modulation With Polar Code and Frequency Hopping
All Code can be found in Github
Digital Modulations and Analog Modulations including 2FSK\4QAM\4PSK\2ASK and AM\DSB\SSB\FM.
There are Polar code and frequency hopping in Digital Modulation.
Especially, due to the imperfect character of digital filter, the simulation of 2FSK does not match the theoretical values. The difference will vanish with the decreased number of frequencies selected in frequency hopping.
Digital Modulations
QPSK
2ASK
2FSK
==(No longer envelope detection)==
for p=1:1:length(st1)/sps
for is = sps*(p-1):sps*(p)-1
st1_sum(p) = st1_sum(p)+st1(is+1);
st2_sum(p) = st2_sum(p)+st2(is+1);
end
end
rx_data = (st1_sum-st2_sum);
4QAM
Analog Modulations
AM
Refer to《通信原理》-第七版(樊昌信)Page 87
It should satisfy and then we can use envelope detection
DSB
SSB
Refer to
FM
Notes
Sampling a stream of data with a small sampling rate will fold the signal, which means:
.But in 2FSK, we found that:
- If is even, it holds,
- If is odd, it should be
We use digital filter in matlab and there will be a time delay. It can be calculated as:
function out = firFilter(N, Wn, data)
fir_lp =fir1(N, Wn, 'low'); %截止频率为Wn*(fs/2) 使用汉明窗设计一个N阶低通带线性相位的FIR滤波器。
out = conv(fir_lp,data);
delay_t = round((length(fir_lp)-1)/2); %低通滤波器的延迟时长
out = out(delay_t+1:end-delay_t);
end
Conversion between EbN0 and SNR:
EbN0 = 0:1:20; % Eb是每个bit的能量,N0是噪声的功率谱密度;EbN0=Eb/N0;
snr = EbN0 - 10*log10(sps*1/2)+10*log10(log2(M)); % SNR和EbN0转换
本文作者: Joffrey-Luo Cheng
本文链接: http://lcjoffrey.top/2023/05/04/DigitalAnanlogModulation/
版权声明: 本博客所有文章除特别声明外,均采用 CC BY-SA 4.0 协议 ,转载请注明出处!