資源描述:
《基于MATLAB地CDMA系統(tǒng)仿真.doc》由會員上傳分享,免費在線閱讀,更多相關內容在應用文檔-天天文庫。
1、基于MATLAB的CDMA系統(tǒng)仿真姓名:班級:學號:指導老師:日期:作業(yè)要求1.分析附錄的源程序,逐行給出中文注釋,并分析仿真結果。2.按照下列框圖設計一個CDMA系統(tǒng),并進行仿真。信源卷積編碼交織編碼加擾碼擴頻調制AWGN信道調制解擴信宿解卷積解交織去擾碼1.分析附錄的源程序,逐行給出中文注釋,并分析仿真結果。%main_IS95_forward.m%此函數(shù)用于IS-95前向鏈路系統(tǒng)的仿真,包括擴%頻調制,匹配濾波,RAKE接收等相關通信模塊。%仿真環(huán)境:加性高斯白噪聲信道.%數(shù)據(jù)速率=9600KBps%
2、clearallcloseallclcdisp('--------------start-------------------');globalZiZqZsshowRGiGqclearj;show=0;%控制程序運行中的顯示SD=0;%選擇軟/硬判決接收%-------------------主要的仿真參數(shù)設置------------------BitRate=9600;%比特率ChipRate=1228800;%碼片速率N=184;%源數(shù)據(jù)數(shù)MFType=1;%匹配濾波器類型--升余弦R=5;%+++++
3、++++++++++++++Viterbi生成多項式++++++++++++++++++G_Vit=[111101011;101110001];%Viterbi生成多項式矩陣K=size(G_Vit,2);%列數(shù)L=size(G_Vit,1);%行數(shù)%++++++++++++++++++++++++++++++++++++++++++++++++++++++%++++++++++++++++++++++Walsh矩陣++++++++++++++++++++++++WLen=64;%walsh碼的長度Wals
4、h=reshape([1;0]*ones(1,WLen/2),WLen,1);%32個10行%Walsh=zeros(WLen,1);%++++++++++++++++++++++++++++++++++++++++++++++++++++++%++++++++++++++++++擴頻調制PN碼的生成多項式++++++++++++++%Gi=[1010001110100001]';%Gq=[1001110001111001]';Gi_ind=[15,13,9,8,7,5,0]';%i路PN碼生成多項式參數(shù)G
5、q_ind=[15,12,11,10,6,5,4,3,0]';%q路PN碼生成多項式參數(shù)Gi=zeros(16,1);%16×1的0矩陣Gi(16-Gi_ind)=ones(size(Gi_ind));%根據(jù)Gi_ind配置i路PN碼生成多項式Zi=[zeros(length(Gi)-1,1);1];%I路信道PN碼生成器的初始狀態(tài)Gq=zeros(16,1);%16×1的0矩陣Gq(16-Gq_ind)=ones(size(Gq_ind));%根據(jù)Gq_ind配置q路PN碼生成多項式Zq=[zeros(l
6、ength(Gq)-1,1);1];%Q路信道PN碼生成器的初始狀態(tài)%++++++++++++++++++++++++++++++++++++++++++++++++++++++%+++++++++++++++++++擾碼生成多項式++++++++++++++++++++++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);%43×1的0矩陣Gs(43-Gs_ind)=ones(size(Gs_i
7、nd));%根據(jù)Gs_ind配置擾碼生成多項式Zs=[zeros(length(Gs)-1,1);1];%長序列生成器的初始狀態(tài)%++++++++++++++++++++++++++++++++++++++++++++++++++++++%++++++++++++++++++++++AWGN信道++++++++++++++++++++++++EbEc=10*log10(ChipRate/BitRate);%處理增益EbEcVit=10*log10(L);EbNo=[-2:0.5:6.5];%仿真信噪比范圍(
8、dB)%EbNo=[-2:0.5:-1.5];%++++++++++++++++++++++++++++++++++++++++++++++++++++++%------------------------------------------------------%-------------------------主程序-------------------------ErrorsB=[];ErrorsC=[]