X hits on this document

PDF document

Performance Evaluation of WiMAX/IEEE 802.16 OFDM Physical Layer - page 98 / 107

295 views

0 shares

0 downloads

0 comments

98 / 107

syms=size(data,1); rem_size=rem(size(data,2), length(punc_pattern));

for i=1:syms

depunct=zeros(s,floor(size(data,2)/length(punc_pattern))); depunct_bits=reshape(data(i,1:end­ rem_size),length(punc_pattern),floor(size(data,2)/length(punc_pattern))); depunct(punc_pattern,:)=depunct(punc_pattern,:)+depunct_bits;

if(rem_size ~=0) remd=zeros(1,s); remd_bits=data(end­rem_size+1:end); remd(punc_pattern(1:rem_size))=remd_bits+remd(punc_pattern(1:rem_size));

native_code(i,:)=[depunct(:)' remd]; else native_code(i,:)=depunct(:)'; end

end

%viterbi decoding of native_code for i=1:syms

c o n v d e c o d _ d a t a ( i , : ) = v i t d e c ( n a t i v e _ c o d e ( i , : ) , I E E E 8 0 2 1 6 p a r a m s . C C . t r e l l i s , 9 6 , ' t r u n c ' , ' u n q u a n t ' ) end ;

%RS decoder

function [rsdecoded_data errs_corr]=rs_decoder(data)

%% rs_encoder(data):Shortend and punctured RS decoder to enablae variable block sizes and %% variable error correction capability %% Has been derived from a systematic RS(N=255,K=239,T=8)code using GF(2^8) global IEEE80216params;

%get parameters for RS encoder generator=IEEE80216params.RS.generator; N=IEEE80216params.RS.N; K=IEEE80216params.RS.K; T=IEEE80216params.RS.T;

%RS decoder starts here syms=size(data,1);% number bits num_bytes=size(data,2)/8; % number of bytes in each block

for i=1:syms %bit to byte conversion bytes=bi2de(reshape(data(i,:),8,num_bytes).','left­msb').'; dblock(i,:)=bytes;

end

if(N == K)% bypass RS decoding for BPSK rsdecoded_data=dblock;

87

Document info
Document views295
Page views301
Page last viewedThu Dec 08 16:45:41 UTC 2016
Pages107
Paragraphs1573
Words17747

Comments