資源簡介
對(duì)隨機(jī)0、1信號(hào)采用8PSK調(diào)制方式,采用升余弦脈沖,將輸入信號(hào)調(diào)制到合適的載頻上
代碼片段和文件信息
clear?all;
clc;
%%?parameters
nsymbol=3000000;
M=8;
Rb=64000;????????????%?比特率?Rb=32kb/s
Rs=Rb/log2(M);???????%?碼率?Rs=8k?Baud/s
Ts=1/Rs;??????????????%?每碼元持續(xù)時(shí)間,碼元周期
f_carrierwave=2*Rs;%載波頻率
filt_sample_ratio=20;%此參量用在平方根余弦濾波器。為了在載波調(diào)制時(shí)方便(連續(xù)變成離散)filt_sample_ratio為載波頻率?中的4(幾倍碼元)的倍數(shù)關(guān)系
t_cansee=Ts/filt_sample_ratio;%為程序中空口的離散兩點(diǎn)中的時(shí)間間隔,也即是我們程序中可以看到的最小時(shí)間單元
EsN0=5:20;%單位為db
snr1=10.^(EsN0/10);%單位為比例。Es/N0,信噪比轉(zhuǎn)化為線性值
%square-root?raised?cosine?pulse?shaping?parameters
Fd?=?Rs;
Fs?=?filt_sample_ratio*Fd;
rolloff=0.25;
delay=3;
%%?source
msg=randint(1nsymbolM);
%%?baseband?modulation?based?on?16-PSK?with?Gray?mapping?將16進(jìn)制數(shù)gray映射到16psk星座圖上
msgmod=pskmod(msgM0‘gray‘).‘;
%%?square-root?raised?cosine?pulse?shaping
rolloff=0.25;
delay=3;
rrcfilter?=?rcosine(Fd?Fs?‘fir/sqrt‘rolloff?delay);
figure(1)
impz(rrcfilter1);
[psk_trans_ro?ty]?=?rcosflt(msgmodFdFs‘filter‘rrcfilter);
tx=real(psk_trans_ro.*(exp(j*2*pi*f_carrierwave*ty‘)));
figure(2);
%?td=delay:length(msgmod)+delay-1;
%?????stem(td*Tsreal(msgmod)‘r‘);
%?????hold?on
plot(ty?imag(psk_trans_ro)‘-*‘);
xlabel(‘時(shí)間(單位?s)‘);
ylabel(‘幅度‘);
title(‘經(jīng)過發(fā)送濾波器前后的8PSK數(shù)據(jù)的Q路信號(hào)‘);
xlim([0?0.001])
figure(3);
%subplot(211);
plot(tytx);
xlabel(‘時(shí)間(單位?s)‘);
ylabel(‘幅度‘);
title(‘40KHZ高頻調(diào)制后的8PSK帶通信號(hào)時(shí)域圖‘);
xlim([0?0.005]);
L=length(tx);
NFFT?=?2^nex
- 上一篇:函數(shù)繪圖軟件
- 下一篇:ASK調(diào)制matlab代碼
評(píng)論
共有 條評(píng)論