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.

BPSK rayleigh fading using Jakes model

Status
Not open for further replies.

abcklm

Newbie level 2
Joined
Nov 27, 2009
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,289
i have to generate BER uncoded BPSK in rayleigh fading channel by using Jakes model in MATLAB

anyone have MATLAB code for Jakes model??
:cry::cry::cry:
 

N0 = NumAngles/4;
% Maximum Doppler shift of carrier at some wavelength
omega_m = (2*pi) * fm(Velocity, carrierFreq);
% specify variance of the Rayleigh channel
% use this for *constant* variange - requires changing other params in prog
sigma2 = 10;
% make sigma2 a gaussian RV around u = sigma2 and var = sigma2/5
% use for *non constant* variaance - requires changing other params in prog
sigma2 = sigma2 + sqrt(sigma2/5) .* randn(1,NumWaveforms);
% Initialize phases
alpha_n = []; beta_n = []; theta_nk = [];
% make a hadamard matrix
Ak = hadamard(N0);
% determine phase values 'alpha' and 'beta'
n=[1:N0];
alpha_n = 2*pi*n/NumAngles - pi/NumAngles;
beta_n = pi*n/N0;

% convert to time scale using 'fs' sampling frequency
t=[1/(symbolRate*1000):1/(symbolRate*1000):1/(symbolRate*1000) * Length];

Tk = [];
for q = 1 : NumWaveforms

rand('state',sum(100*clock)) % reset randomizer
theta_nk = rand(1,length(n)) * 2 *pi; % create uniform random phase in range [0,2pi]

sumRes = 0;
for i = 1 : N0
term1 = Ak(NumWaveforms,i);
term2 = cos(beta_n(i)) + j*sin(beta_n(i));
term3 = cos(omega_m .* t .* cos(alpha_n(i)) + theta_nk(i));
sumRes = sumRes + (term1 .* term2 .* term3);
end

Tk(q,:) = sqrt(2/N0) .* sumRes;
% use line below to apply *non-constant* variance
Tk(q,:) = repmat(10.^(sigma2(q)/20),1, Length) .* Tk(q,:); %apply variable in dB

end
this will help u
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top