I am trying to simulate BER performance for turbo code. The original code is written by copyright Nov. 1998 Yufei Wu, MPRG lab, Virginia Tech for academic use only . I am trying to incorparate Rayleigh fading instead of AWGN but performance is very poor. The following is a segment of code. Any suggestions will be highly appreciated.
"%%%%%% " encoder" %%%%
en_output = encoderm( x, g, alpha, puncture ) ; % encoder output (+1/-1)
a=sqrt(0.5)*(randn(1,1)+1i*randn(1,1));
%%%%%%%%%%%%%%%%%%% Channel %%%%%%%%%%%%%%%%%%%
en = 10^(EbN0db(nEN)/10); % convert Eb/N0 from unit db to normal numbers
Lc = 4*conj(a)*en*rate; % reliability value of the channel
sigma = 1/sqrt(2*rate*en); % standard deviation of AWGN noise
noise=sigma.*(randn(1,L_total*(2+puncture))+1j*randn(1,L_total*(2+puncture)));
%%%%%%%%%%%%%%%%%%%%%%%%% Receiver %%%%%%%%%%%%%%%%%%%%%%%%%%
r = en_output.*a+noise; % received bits
% Scale the received bits:
rec_ss = 0.5*(Lc.*r);"