mimomod said:Hi davyzhu,
the matlab codes you wrote are basically right. Off course others could argue that the randn() function is not stable or how to define the right power, etc. But basically, it is right.
But.....when I read your codes I found out that the codes are a little strange for simulating wireless channels. First, the codes generated different fading for each symbol. This happens rarely in practice since the channel will be more or less constant for several symbols, otherwise we have much difficulties to do signal processing at the receiver to get the original data back.
Secondly, the codes generated flat fading channel (more accurately, varying flat fading channel). This fading is the simplest fading in wireless environment. More widely used model is frequency selective fading channel, where you generate a kind of filter with its coefficients are the realizations of flat fading channel as generated by your codes. Better, thus more realistic, you take into account the Doppler effect for fading channel due to movement of TX and/or RX. This generation of fading channel needs more sound knowledge on statistics. You could see the book by Paetzold on fading channels. The book was uploaded in this forum, but sorry that I forget where to find.
mimomod said:First, the codes generated different fading for each symbol. This happens rarely in practice since the channel will be more or less constant for several symbols
davyzhu said:Hi all,
I have got a Rayleigh Fading Channel Simulation code by Matlab.
The code list below:
% Rayleigh fading
a = sqrt(0.5)*( randn( 1, symbols_per_frame) + j*randn( 1, symbols_per_frame) );
% complex noise
noise = sqrt(variance)*( randn(1,symbols_per_frame) + j*randn(1,symbols_per_frame) );
% in all
code_fade = a.*code + noise;
Is the code right? If not right, how to modify it?
Best regards,
Davy
davyzhu said:Hi all,
I have got a Rayleigh Fading Channel Simulation code by Matlab.
The code list below:
% Rayleigh fading
a = sqrt(0.5)*( randn( 1, symbols_per_frame) + j*randn( 1, symbols_per_frame) );
% complex noise
noise = sqrt(variance)*( randn(1,symbols_per_frame) + j*randn(1,symbols_per_frame) );
% in all
code_fade = a.*code + noise;
Is the code right? If not right, how to modify it?
Best regards,
Davy
davyzhu said:...
a = sqrt(0.5)*( randn( 1, symbols_per_frame) + j*randn( 1, symbols_per_frame) );
...
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?