X hits on this document

PDF document

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

248 views

0 shares

0 downloads

0 comments

99 / 107

errs_corr=0; else %decode the data and get the error correction count [rsdecoded_data,errs_corr]=rsdec(gf(dblock,8),N,K,[],'beginning'); % GF to double conversion r s d e c o d e d _ d a t a = d o u b l e ( r s d e c o d e d _ d a t a . x ) end ;

%% SUI­ Channel

function rx_data=channel_sui(tx_data,ch_impulse_resp) %channel_sui(tx_data,ch_impulse_resp): convolve the transmitted data with SUI %channel impulse response and add noise % global IEEE80216params; % initialize the receive data with zeros r x _ d a t a = z e r o s ( I E E E 8 0 2 1 6 p a r a m s . s i m O p t s . R x D i v , s i z e ( t x _ d a t a , 2 ) + s i z e ( c h _ i m p u l s e _ r e s p , 2 ) ­ 1 ) ;

%convolve tx_data with ch_impulse_response for i=1:IEEE80216params.simOpts.RxDiv

for j=1:IEEE80216params.simOpts.TxDiv r x _ d a t a ( i , : ) = r x _ d a t a ( i , : ) + c o n v ( t x _ d a t a ( j , : ) , c h _ i m p u l s e _ r e s p ( ( 1)*IEEE80216params.simOpts.TxDiv+j,:)); i ­

end end

leng=size(rx_data,2);

%%AWGN NOISE

noise_varience=IEEE80216params.Ofdm.Nfft/IEEE80216params.Ofdm.Nused/(10^(IEEE80216params.si mOpts.SNR/10))/2;

noise=sqrt(noise_varience)*(randn(IEEE80216params.simOpts.RxDiv,leng)+j*randn(IEEE80216params.si mOpts.RxDiv,leng));

%% adding noise to rx_data rx_data=rx_data+noise;

function [CIR,time]=cir(coeffs,time,systime) % cir(coeffs,time,systime): generate the channel impulse response % coeffs: channel coefficients %time: time interval between the change of each coeff. is required % systime: simulated system time

global IEEE80216params;

persistent counter; if (isempty(counter) || (systime==0))

counter=1; end

88

Document info
Document views248
Page views254
Page last viewedSat Dec 03 20:31:34 UTC 2016
Pages107
Paragraphs1573
Words17747

Comments