資源簡(jiǎn)介
擴(kuò)頻通信系統(tǒng)是指待傳輸信息信號(hào)的頻譜用某個(gè)特定的擴(kuò)頻函數(shù)擴(kuò)展頻譜后成為寬頻帶信號(hào),然后送入信道中傳輸,在接收端再利用相應(yīng)的技術(shù)或手段將擴(kuò)展了的頻譜進(jìn)行壓縮,恢復(fù)為原來待傳輸信息信號(hào)的帶寬,從而達(dá)到傳輸信息目的的通信系統(tǒng)。

代碼片段和文件信息
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function???main()
clc;
clear?all;
Lc=10;
A1=2;
A2=4;
A3=8;
A4=1;
w?=?2;
SNRindB=0:2:30;
for?i=1:length(SNRindB)
????smld_err_prb1(i)=ds_smld(SNRindB(i)LcA1w?)?;
????smld_err_prb2(i)=ds_smld(SNRindB(i)LcA2w?)?;
????smld_err_prb3(i)=ds_smld(SNRindB(i)LcA3w?)?;
end
SNRindB4=0:1:8;
for??i=1:length(SNRindB4)
????smld_err_prb4(i)=ds_smld(SNRindB4(i)LcA4w)?;
end
semilogy(SNRindBsmld_err_prb1‘r-*‘);
hold?on?
semilogy(SNRindBsmld_err_prb2‘r-*‘);??
semilogy(SNRindBsmld_err_prb3‘r-*‘);?????
semilogy(SNRindB4smld_err_prb4‘r-o‘);???
hold?off
xlabel(‘SNR(dB)‘);
ylabel(‘Pe‘);
title(‘DS系統(tǒng)誤碼率仿真‘);
function??[p]?=?ds_smld(snr_in_dBLcAw)?
snr=10^(snr_in_dB/10)?;
sgma=1;
Eb=2*sgma^2*snr;
E_chip=Eb/Lc;
N=10000;
num_of_err=0;
for?i=1:N
????temp=rand;
????if?(temp<0.5)
????????data=-1;
????else?
?????????data=1;
????end
???for?j=1:Lc
???????repeated_data(j)=data;
???end
???for???j=1:Lc
????????temp=rand;
????if?(temp<0.5)
????????pn_seq(j)=-1;
????else?
????????pn_seq(j)=1;
????end
???end?
???trans_sig=sqrt(E_chip)*?repeated_data.*pn_seq;
???noise?=?sgma*rand(1Lc);
???n=(i-1)*Lc+1:i*Lc;
???interference=A*sin(w*n);
???rec_sig=trans_sig+noise+interference;
???temp=rec_sig.*pn_seq;
???decision_variable=sum(?temp);
???if?(?decision_variable<0)
???????decision=-1;
???else?
????????decision=1;
???end
???if?(?decision~=data)
???????num_of_err=?num_of_err+1;
???end
end
p=num_of_err/N;
????
????
????
????
????
?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????文件????????3820??2019-05-31?19:09??王蘇霞+擴(kuò)頻通信系統(tǒng)仿真\figure.fig
?????文件????????1588??2019-05-31?19:11??王蘇霞+擴(kuò)頻通信系統(tǒng)仿真\main.m
?????目錄???????????0??2019-05-31?19:10??王蘇霞+擴(kuò)頻通信系統(tǒng)仿真\
評(píng)論
共有 條評(píng)論