《8psk误码率仿真程序(共2页).docx》由会员分享,可在线阅读,更多相关《8psk误码率仿真程序(共2页).docx(2页珍藏版)》请在taowenge.com淘文阁网|工程机械CAD图纸|机械工程制图|CAD装配图下载|SolidWorks_CaTia_CAD_UG_PROE_设计图分享下载上搜索。
1、精选优质文档-倾情为你奉上% 2005-3-26% 1 transmit,1 receive(3bit/s/Hz)% 8PSK the total rate is 2bit/s/Hz % uncodedclear allclc%SNR upto 20 dBsEbNo=10 15 20 25 30;%N, M: number of transmit and receive antennasN=1;Num=500;% number of frameK=40; % numver of symbols in a frame% initialize countidx=1;BIT=3;% BIT=2 fo
2、r QPSK% BIT=3 for 8PSK% BIT=4 for 16QAM%wait=0;% the total bit is K*BITfor en=1:length(EbNo) sigma=0.5/(10(EbNo(en)/10); % Num - number of packets for packet_count=1:Num %waitbar(wait/(Num*length(EbNo); %wait=wait+1; data=randint(1,K*BIT);%randint(1,K*BIT); %* temp=EN_8PSK(data); x_time=temp; %存点 H=
3、(randn(1,1)+j*randn(1,1)/sqrt(2); r_time=H*x_time+sqrt(sigma)*(randn(1,K)+j*randn(1,K); x_est_bit x_est_symbol=DE_8PSK(H,r_time); error_bit(packet_count)=sum(x_est_bit=data); error_symbol(packet_count)=sum(x_est_symbol=temp); end BER(idx)=sum(error_bit)/(Num*K*BIT); SER(idx)=sum(error_symbol)/(Num*K); idx=idx+1 end % *figure(1);semilogy(EbNo,SER,bo-);grid on;xlabel(SNRdB);%ylabel(SER);hold on;title(8PSK性能曲线);semilogy(EbNo,BER,ro-);grid on;%ylabel(BER);legend(误符号率,误比特率);专心-专注-专业