資源描述:
《IS-95_仿真源程序》由會員上傳分享,免費(fèi)在線閱讀,更多相關(guān)內(nèi)容在教育資源-天天文庫。
1、本科畢業(yè)設(shè)計(jì)IS-95前向鏈路通信系統(tǒng)的設(shè)計(jì)與仿真(附錄)姓名李家蓬學(xué)院信息與電氣工程學(xué)院專業(yè)電子信息工程專業(yè)年級2008級學(xué)號20082312608指導(dǎo)教師王麗麗2012年5月21日IS-95系統(tǒng)仿真源程序%main_IS95_forward.m%此函數(shù)用于IS-95前向鏈路系統(tǒng)的仿真,包括擴(kuò)%頻調(diào)制,匹配濾波,RAKE接收等相關(guān)通信模塊。%仿真環(huán)境:加性高斯白噪聲信道.%數(shù)據(jù)速率=9600KBps%clearallcloseallclcdisp('--------------start-------------------'
2、);globalZiZqZsshowRGiGqclearj;show=0;SD=0;%選擇軟/硬判決接收%-------------------主要的仿真參數(shù)設(shè)置------------------BitRate=9600;ChipRate=1228800;N=184;MFType=1;%匹配濾波器類型--升余弦R=5;%+++++++++++++++++++Viterbi生成多項(xiàng)式++++++++++++++++++G_Vit=[111101011;101110001];K=size(G_Vit,2);L=size(G_Vit
3、,1);%++++++++++++++++++++++++++++++++++++++++++++++++++++++%++++++++++++++++++++++Walsh矩陣++++++++++++++++++++++++WLen=64;Walsh=reshape([1;0]*ones(1,WLen/2),WLen,1);%Walsh=zeros(WLen,1);%++++++++++++++++++++++++++++++++++++++++++++++++++++++%++++++++++++++++++擴(kuò)頻調(diào)制PN碼的
4、生成多項(xiàng)式++++++++++++++%Gi=[1010001110100001]';%Gq=[1001110001111001]';Gi_ind=[15,13,9,8,7,5,0]';Gq_ind=[15,12,11,10,6,5,4,3,0]';Gi=zeros(16,1);Gi(16-Gi_ind)=ones(size(Gi_ind));Zi=[zeros(length(Gi)-1,1);1];%I路信道PN碼生成器的初始狀態(tài)Gq=zeros(16,1);Gq(16-Gq_ind)=ones(size(Gq_ind));Z
5、q=[zeros(length(Gq)-1,1);1];%Q路信道PN碼生成器的初始狀態(tài)%++++++++++++++++++++++++++++++++++++++++++++++++++++++%+++++++++++++++++++擾碼生成多項(xiàng)式++++++++++++++++++++++Gs_ind=[42,35,33,31,27,26,25,22,21,19,18,17,16,10,7,6,5,3,2,1,0]';Gs=zeros(43,1);Gs(43-Gs_ind)=ones(size(Gs_ind));Zs=[z
6、eros(length(Gs)-1,1);1];%長序列生成器的初始狀態(tài)%++++++++++++++++++++++++++++++++++++++++++++++++++++++%++++++++++++++++++++++AWGN信道++++++++++++++++++++++++EbEc=10*log10(ChipRate/BitRate);EbEcVit=10*log10(L);EbNo=[-2:0.5:6.5];%仿真信噪比范圍(dB)%EbNo=[2:0.5:2.5];%++++++++++++++++++++++
7、++++++++++++++++++++++++++++++++%------------------------------------------------------%-------------------------主程序-------------------------ErrorsB=[];ErrorsC=[];NN=[];if(SD==1)fprintf('SOFTDecisionViterbiDecoder');elsefprintf('HARDDecisionViterbiDecoder
8、');endfori=1:length(EbNo)fprintf('Processing%1.1f(dB)',EbNo(i));iter=0;ErrB=0;ErrC=0;while(ErrB<300)&(iter<150)drawnow;%+++++++++