I need a MATLAB code that goes step-by-step in transmitting over time and frequency selective channels

Hello,
I need a MATLAB code that goes step-by-step in transmitting a bit sequence from the source to the destination over a time and frequency selective channel, considering into account the relative speed between the transceivers v, the propagation speed c, and the carrier frequency fc. The signal is Wide-band, i.e.: the ratio between the signal bandwidth and carrier frequency is not negligible. OFDM is used as a means to combat the multipath fading.
Thanks in advance

7 Comments

This is not a project, I have a paper on this with all equations, but I need to do the simulations.
OK, let me explain the system:
I have a binary sequence {X[k]}, and I need to the following steps:
1- N-point IFFT is performed on N signal points to produce {x[n]}.
2- The last L symbols of each block consisting of N symbols are appended to the beginning to the block.
3- Each block is transmitted over a time varying frequency selective channel where the channel impulse response is \sum_{m=0}^L h_m \delta(t+at-\tau_m). {h_m} are i.i.d. Rayleigh fading channel gains, a=v/c is the Doppler effect where v is the relative speed of the transceivers, and c is the propagation speed, and \tau_m is the delay associated with the mth path.
4- At the receiver resampling is done at rate nT_s/(1+a) to transform the problem from wide-band to narrow-band.
5- The residual Doppler effect is carrier frequency offset (CFO) (We can ignore this by assuming that the receiver knows exactly the Doppler factor a).
6- OFDM demodulation and detection.
I wrote part of the code, but I do not know if it correct and how to continue beyond that:
if true clear all; clc;
SNRdB=0:30;%SNR [dB]
SNR=10.^(SNRdB./10);% SNR [Linear]
f_o=15*10^3;% Carrier frequency
R_s=5*10^3;% Symbol rate
T_s=1/R_s;% Symbol Time;
v=1.5;% Relative speed of the transceivers in m/s
c=1500;% Sound speed in UWA channel
a=v/c;% Doppler factor
K=64;%Data subcarriers
tau_t=[0 0.1*10^-3 0.2*10^-3 0.3*10^-3];% The delays of the resolvable multipath compenets.
L=ceil((tau_t(end)-tau_t(1))/T_s);% Find the channel length in symbols
nErr=zeros(1,length(SNR));% Number of errors for each SNR value
count=zeros(1,length(SNR));% Number of symbols generated to reach a specific number of errors.
Nerr=1;% A targer number of errors to be reached.
for ii=1:length(SNR)
while nErr(1,ii)<=Nerr
count(1,ii)=count(1,ii)+K;% Each iteration K data symbols is generated
b=rand(1,K)>0.5;% Generate a sequence of 0s and 1s
X=2.*b-1;% Bipolar BPSK signal consisting of -1s and 1s
x=ifft(X,K_s);% You said I need to do oversampling here, why? Is this correct
xCP=[x(end-L+1:end) x];% Add a cycle prefix of L symb
h=(1/sqrt(2*(L+1))).*(randn(L+1,1)+1i.*randn(L+1,1));% Multipath channel gains
n=(1/sqrt(2*SNR(ii))).*(randn(K+L,1)+1i.*randn(K+L,1));% AWGN
%What is next
end
end
end
Why do you need to do the simulations? And what code have you come up with so far, and what error message did you encounter when you implemented the equations?
There is no errors, I just do not know how to do it in MATLAB. I need to do the simulation to know how to program it in MATLAB and to illustrate the effect of Doppler on my report.
You need to do a report on something that is not a project ?
Actually I am working on a project's report, and I need to demonstrate the effect of Doppler factor on the performance of OFDM.

Answers (0)

This question is closed.

Asked:

on 4 Nov 2012

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!