您好,欢迎访问三七文档
当前位置:首页 > 电子/通信 > 综合/其它 > 8psk误码率仿真程序
%%2005-3-26%1transmit,1receive(3bit/s/Hz)%8PSKthetotalrateis2bit/s/Hz%uncodedclearallclc%SNRupto20dBsEbNo=[1015202530];%N,M:numberoftransmitandreceiveantennasN=1;Num=500;%numberofframeK=40;%numverofsymbolsinaframe%initializecountidx=1;BIT=3;%BIT=2forQPSK%BIT=3for8PSK%BIT=4for16QAM%wait=0;%thetotalbitisK*BITforen=1:length(EbNo)sigma=0.5/(10^(EbNo(en)/10));%Num-numberofpacketsforpacket_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=(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_bitx_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);endBER(idx)=sum(error_bit)/(Num*K*BIT);SER(idx)=sum(error_symbol)/(Num*K);idx=idx+1end%***************************************************figure(1);semilogy(EbNo,SER,'bo-');gridon;xlabel('SNR[dB]');%ylabel('SER');holdon;title('8PSK性能曲线');semilogy(EbNo,BER,'ro-');gridon;%ylabel('BER');legend('误符号率','误比特率');
本文标题:8psk误码率仿真程序
链接地址:https://www.777doc.com/doc-6693924 .html