欢迎来到天天文库
浏览记录
ID:34292092
大小:228.00 KB
页数:35页
时间:2019-03-04
《1 BER性能比较范本》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、1BER性能比较:%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%文件说明%函数说明:这是一个比较完整的OFDM系统,我在发送端做了比较简单的QPSK调制映射生成OFDM符号,%经串并转换后插入导频Pilot和循环前缀CP,再进行并串转换加噪声送入多径瑞利信道。%在接收端,先进行串并转换;然后去掉循环前缀,提取导频信息进行LS估计,最后经过并串%转换,QPSK解码还原信息%%%
2、%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%参数说明%X:欲发送的二进制比特流%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%clearall;clc;IFFT_bin_length=128;%IFFT和FFT的点数128carrier_cou
3、nt=100;%子载波个数100bits_per_symbol=2;%每符号上的比特数2symbols_per_carrier=12;%每桢的OFDM符号数12LI=7;%导频之间的间隔Np=ceil(carrier_count/LI)+1;%导频数加1使最后一列也是导频,即有16个导频子信道N_number=carrier_count*symbols_per_carrier*bits_per_symbol;%总共发送的信息比特数%100*12*2=2400carriers=1:carrier_count+N
4、p;GI=8;%保护间隔长度N_snr=40;%每比特信息上的信噪比snr=8;%信噪比间隔%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%发送端变量初始化X=zeros(1,N_number);%X:欲发送的二进制比特流X1=[];%原始的二进制数据流每2个一组进行QPSK映射编码得到X1X2=[];%X1串并转换后得到X2X3=[];%X2插入导频后得到X3X4=[];%IFFT变换后得到X4X5=[];X6=[];%
5、加入循环前缀后得到X6X7=[];%并串转换后得到X7%接收端变量初始化Y1=[];%X1的估计值Y2=[];%提取数据信道上的信息Y3=[];Y4=[];%Y5经FFT变换后得到Y4Y5=[];%Y6去掉循环前缀后得到Y5Y6=[];%Y7并串转换后得到Y6Y7=[];%接收端从信道上得到的信号,即信道输出Y7XX=zeros(1,N_number);dif_bit=zeros(1,N_number);dif_bit1=zeros(1,N_number);dif_bit2=zeros(1,N_number)
6、;dif_bit3=zeros(1,N_number);X=randint(1,N_number);%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%QPSK调制:(11)->pi/4;(01)->3*pi/4;(00)->-3*pi/4;(1,0)->-pi/4;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%s=(X.*2-1)/sqrt(2)
7、;sreal=s(1:2:N_number);%将原信息比特流每两个为一组编码simage=s(2:2:N_number);%前后比特分别编码为OFDM符号的实,虚部X1=sreal+j.*simage;%进行QPSK映射编码(复数形式)%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%产生随机导频信号%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8、%train_sym=randint(1,2*symbols_per_carrier);t=(train_sym.*2-1)/sqrt(2);%将导频序列也进行QPSK调制映射treal=t(1:2:2*symbols_per_carrier);timage=t(2:2:2*symbols_per_carrier);training_symbols1=treal+j.*timage;%构成两组相同的
此文档下载收益归作者所有