X hits on this document

PDF document

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

247 views

0 shares

0 downloads

0 comments

90 / 107

generator=IEEE80216params.RS.generator; N=IEEE80216params.RS.N; K=IEEE80216params.RS.K; T=IEEE80216params.RS.T;

%Data manupulation for RS CODER Input num_bits=size(data,2); % number of bit in data block num_bytes=num_bits/8;% number of byte clear num_bits;

%convert from binary to uint8 bytes=(bi2de(reshape(data,8,num_bytes).','left­msb').');

%get number of block required to fit data num_blocks=ceil(num_bytes/K);

%if we have multiple of block number of bytes then insert and extra block to %have a trailing 0x00 if(num_blocks==floor(num_bytes/K))

num_blocks=num_blocks+1; end

bytes(num_bytes+1:num_blocks*K­1)=255; clear num_bytes; %last byte in the bust is 0x00 bytes=[bytes 0];

%now do the encoding msg_block=reshape(bytes,K,num_blocks).'; %the rows are the blocks to be encoded ref1=msg_block; clear num_blocks; clear bytes;

%RS encoding is bypassed for BPSK modulation if(N == K)

rs_data=msg_block; else

%do RS encoding for other scheme rsenc_block=rsenc(gf(msg_block,8),N,K,[],'beginning'); rs_data=double(rsenc_block.x); % conversion of GF into Double

end clear msg_block; clear rsenc_block; %conversion to binary num_blocks=size(rs_data,1); for i=1:num_blocks

%get the binary data from decimal numbers bit_data=de2bi(rs_data(i,:)',8,'left­msb').'; rs_encoded_data(i,:)=bit_data(:)'; end clear rs_data; clear bit_data;

79

Document info
Document views247
Page views253
Page last viewedSat Dec 03 18:11:06 UTC 2016
Pages107
Paragraphs1573
Words17747

Comments