資源簡(jiǎn)介
直接法求解循環(huán)譜密度,畫(huà)出3D圖,并與參考文獻(xiàn)中的代碼進(jìn)行比較。
代碼片段和文件信息
%%?Initialization
%?參考文獻(xiàn)
%?E.?L.?Da?Costa?“Detection?and?Identification?of
%?Cyclostationary?Signals“.?MS?Thesis.?1996.?
%?公式(9)使用對(duì)稱(chēng)形式時(shí),本程序參考公式(8),所以不再引入頻移
clc;clear;close?all;
%%?系統(tǒng)參數(shù)配置
span?=?6;???????????????%?Filter?span
fs?=?5e2;
sps?=?8;????????????????%?Samples?per?symbol
rs?=?fs/sps;
fc?=?1*rs;
m_ord?=?2;??????????????%?Size?of?the?signal?constellation
m_bit?=?log2(m_ord);????%?Number?of?bits?per?symbol
EsNo?=?100;
burst_length?=?100;
rolloff?=?0.35;?????????%?Filter?rolloff
%?Generate?a?burst?data?symbols?using?the?randi?function.
%%?生成測(cè)試數(shù)據(jù)
rrcFilter?=?rcosdesign(rolloff?span?sps?‘sqrt‘);?
data?=?randi([0?m_ord-1]?burst_length?1);
%?PSK?modulation
modData?=?pskmod(data?m_ord?pi/4);
%?modData?=?qammod(data?m_ord);
%?Using?the?upfirdn?function?upsample?and?filter?the?input?data.
txSig?=?upfirdn(modData?rrcFilter?sps);
%?Convert?the?Eb/N0?to?SNR?and?then?pass?the?signal?through?an?AWGN?channel.
EbNo?=?EsNo?-?10*log10(m_bit);
SNR?=?EbNo?+?10*log10(m_bit)?-?10*log10(sps);
AwgnSig?=?txSig(1:end)?+?awgn(txSig(1:end)?SNR?‘measured‘);?
%?AwgnSig?=?txSig(1:end-3)?+?awgn(txSig(1:end-3)?SNR?‘measured‘);?%截取非整數(shù)周期,讓DFT泄露
t?=?[0:1/fs:(length(AwgnSig)-1)/fs]‘;
%?rxSig?=?real(AwgnSig.*exp(j*2*pi*fc*t));?%加殘留載波
rxSig?=?
評(píng)論
共有 條評(píng)論