Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

implementing a frequency selective fading channel

Status
Not open for further replies.

loaded_tk

Newbie level 1
Joined
Nov 12, 2006
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,292
hi ya , the followin is th code for a BER simulation of a modulated qpsk signal over a flat fading channel and my question is how can implement a frequency selective fading on it ( 2-ray ) from what i read it says i have to add a delay tau into the impulse reponse function h but am not exactly sure how to do that, any helo wud be appreciated guys thanks


N_loop = 100;
N_sym = 10^4;
N_bit=2*N_sym;
awgn_sigma = sqrt(0.5);
Eb_dB=5:1:9
Eb = 10.^(Eb_dB/10);
sqrt_Es = sqrt(2*Eb);
BER = zeros(1,length(Eb));
normalized = 1/sqrt(2);

for n=1:N_loop;
D = floor(2*rand(1,N_sym))+j*floor(2*rand(1,N_sym));
Tx_data = normalized * (2*D-(1+j));
h=randn(1,1)+j*randn(1,1);
Noise=awgn_sigma*(randn(N_sym,length(Eb_dB))+j*randn(N_sym,length(Eb_dB)));
Rx_data = (h*transpose(Tx_data)*sqrt_Es) + Noise;
Recov_data1 =Rx_data/h;
Recov_data2 = 0.5*(1+j+sign(real(Recov_data1))+j * sign(imag(Recov_data1)));
BER = BER+sum((abs(Recov_data2-transpose(D)*ones(1,length(Eb_dB)))).^2)/N_bit;
end;
BER = BER/N_loop

semilogy(Eb_dB,BER,'*-');
xlabel('Eb/N0 (dB)');
ylabel('BER');
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top