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.

channel equalization/correct the effects of multipath in OFDM

Status
Not open for further replies.

Sherra

Member level 3
Member level 3
Joined
Dec 23, 2010
Messages
62
Helped
7
Reputation
14
Reaction score
7
Trophy points
1,288
Activity points
1,700
Hi everyone!
I am trying to simulate an OFDM system with multipath channels (20 significant paths), and I do not know what are the steps taken to equalize (correct the effect of the multipath). Could anyone kindly suggest to me a good tutorial, a basic matlab code that does so , or any other form of help would be greatly appreciated. I must admit I am not very familiar with the principle either. thanx in advance!!!!
PS: my code is ready , and correct i have already tried it with AWGN channel, now i included a multipath channel using rayleighchan function in matlab but i do not know how to "correct" the errors
 

kalyanasv

Full Member level 3
Full Member level 3
Joined
May 17, 2011
Messages
189
Helped
48
Reputation
96
Reaction score
46
Trophy points
1,308
Location
NY
Activity points
2,455
Hi,

for multipath equalization you can try a simple "lms" equalizer in matlab. or there is trained lms versiontrained lms. Then obviously depending on the type of multipath, colored noise, the adaptive equalization, decsion feedback...etc are there.

Have fun
 

Sherra

Member level 3
Member level 3
Joined
Dec 23, 2010
Messages
62
Helped
7
Reputation
14
Reaction score
7
Trophy points
1,288
Activity points
1,700
My problem is I am stucked when i hAVE TO PASS THE DATA through the channel, I have created a rayleighchan object as follows:
%%%%%%%%%%%%%%%%%%%%%%% Channel %%%%%%%%%%%%%%%%%%%%%%%
ts=1/10000000; % ts is the sample time of the input signal, in seconds
fd=50; % fd is the maximum Doppler shift, in Hertz
delay=sort(randint(1,20,[0 511]))*ts; %tau is a vector of path delays, each specified in seconds
% pdb is a vector of average path gains, each specified in dB of average path gains, each specified in dB
pdb=[0 -1 -2 -3 -4 -5 -6 -7 -8 -9 -10 -11 -12 -13 -14 -15 -16 -17 -18 -19];
H = rayleighchan(ts,fd,delay,pdb);% Create Rayleigh fading channel object
H.ResetBeforeFiltering=0;


%Insert the significant path gains and zeros in the channel
channel=zeros(1,length(tr_data)+512);
sumchannel=0;
path_index=int16(H.PathDelays/ts);
for kk=1:1:p
for nn=1:length(tr_data)
channel((path_index(kk)+nn))=H.PathGains(kk);
end
sumchannel=sumchannel+channel;
end

I am not even sure whether I have to add all teh 20 paths together to make the variable "sumchannel"

after that i need to FFT the "sumchannel" and multiply it with the data to be transmitted (That is what i think maybe i ma wrong...) well i don't know how to do the FFT, shall i do it colum-wise, line wise, on each subcarrier..?

Sorry but my background is not good enough and i am engaging in this simulation, i really need resulsts ASAP..
Thank you for your help!
 

kalyanasv

Full Member level 3
Full Member level 3
Joined
May 17, 2011
Messages
189
Helped
48
Reputation
96
Reaction score
46
Trophy points
1,308
Location
NY
Activity points
2,455
ts=1/10000000; % ts is the sample time of the input signal, in seconds
fd=50; % fd is the maximum Doppler shift, in Hertz
delay=sort(randint(1,20,[0 511]))*ts; %tau is a vector of path delays, each specified in seconds
% pdb is a vector of average path gains, each specified in dB of average path gains, each specified in dB
pdb=[0 -1 -2 -3 -4 -5 -6 -7 -8 -9 -10 -11 -12 -13 -14 -15 -16 -17 -18 -19];
H = rayleighchan(ts,fd,delay,pdb);% Create Rayleigh fading channel object

Now you want to pass the input data through this channel i.e.

Say you create a input signal called: "data = 1 -2.*rand(10000,1); %Generates a set of random +1,-1

Then you pass this data through your channel i.e. output=filter(data,H); %Your creating the channel response for the input data.

You might want to consider going through Matlab OFDM stuff ..There si matlab code for transmission and reception. thoguh it is not using a rayleigh channel, you only need to filter your tr_data with the "H".

for fft you need a very high sample rate for the ts you have specified just to speed simulations.

Have fun
 

Sherra

Member level 3
Member level 3
Joined
Dec 23, 2010
Messages
62
Helped
7
Reputation
14
Reaction score
7
Trophy points
1,288
Activity points
1,700
Hi kalyanasv ,
Thank you for your reply,
concerning passing the data through teh channel, i have used 4QAM to modulate the data, and i know after this step comes pilot insertion-IFFT -CP then transmission through channel afterwards the reverse process (remove CP-FFT- remove pilots ), only i have read somewhere, i dunnot remember where tough taht, the teh result of "outputdata=filter(data,chan)" is in the time domain, and i actually need a channel in the frequency domain. that is what in that reference i read, tehy said i should do <data multiplied by FFT of the channel> , so i should not do the IIFT and FFT as described in the procss above...
do you think that is correct?

Also, about the concepts of multiple path, i have 20 signiicant path in my channel, does the channel assign each power and delay to the paths as specified by H.PathDelays and H.PathGains or do you I have to include it myself after creatngthe channel (as i did in the code above?)

THANK YOU VERY MUCH IN ADVANCE!!
 

kalyanasv

Full Member level 3
Full Member level 3
Joined
May 17, 2011
Messages
189
Helped
48
Reputation
96
Reaction score
46
Trophy points
1,308
Location
NY
Activity points
2,455
Hi,

yes the output of filtering with the above is in time domain. This you can do just to verify the correctness of the channel.

In the case of OFDM you have modulated and are using an IFFT. since your in the freq domain you can multiply data with the frequency response of the channel.

The tutorial- MATLAB attached should do pretty much that.

Matlab for the versions I know of automatically should assign the 20 variables to the other channel parameters given 20 H.pathdelays if that is your question.
 

Sherra

Member level 3
Member level 3
Joined
Dec 23, 2010
Messages
62
Helped
7
Reputation
14
Reaction score
7
Trophy points
1,288
Activity points
1,700
Hi thank you kalyanasv,

Do you happen to know how can visualize the channel is frequency domain, i have 2048 sucarriers , 20 sugnificant path, i would just like an image to probably better understand, i tried what matlab help asked to do for channel visualization but i think because my channel has a huge number of subcarriers i cant view it properly..
thx in advance


Hi,

yes the output of filtering with the above is in time domain. This you can do just to verify the correctness of the channel.

In the case of OFDM you have modulated and are using an IFFT. since your in the freq domain you can multiply data with the frequency response of the channel.

The tutorial- MATLAB attached should do pretty much that.

Matlab for the versions I know of automatically should assign the 20 variables to the other channel parameters given 20 H.pathdelays if that is your question.
 

kalyanasv

Full Member level 3
Full Member level 3
Joined
May 17, 2011
Messages
189
Helped
48
Reputation
96
Reaction score
46
Trophy points
1,308
Location
NY
Activity points
2,455
try and reduce the number of subcarriers or you can zoom in the freqencey axis in matlab or use xlim() to visualize it better.
 
  • Like
Reactions: Sherra

    Sherra

    Points: 2
    Helpful Answer Positive Rating

ahmeddeia

Member level 2
Member level 2
Joined
Jun 27, 2010
Messages
50
Helped
6
Reputation
12
Reaction score
5
Trophy points
1,288
Location
Egypt
Activity points
1,645
Al salam alikom

i had my graduation project and i studied OFDM and did matlab simulation, i can tell u what i have done

after IFFT and CP insertion, the rayleighchan matlab command, as i think, acts as a multipath propagation channel since u enter in this command the 20 delay and relative power of each path (remember that the paths power must be in dB)

then after specifying my channel model, i use filter command to get the channel output as follows (y_op= filter(chan,x_ip))

at the receiver, CP removal and FFT is done, but in my system, we used pilots which are sub-carriers having their position and values known at both TX and RX.
by using these pilots, i can know their channel response and thus by using interpolation, i can nearly estimate the channel frequency response at each sub-carrier.

for estimation the sent data x_estimated= received signal after FFT / channel estimated
this step is called equalization and it is a very simple method i used here
if u want to add AWGN ,then after the filter command, u can use whether:
1- signal_with_noise=signal_without_noise + wgn(.....) see matlab help for wgn command
2-signal_with_noise=awgn(signal_without_noise,snr,'measured') see matlab help for awgn command
in my simulation , i used wgn command as it was recommended for my work
if u need any help please tell me

Al-salam alikom
 
Last edited:
  • Like
Reactions: Sherra

    Sherra

    Points: 2
    Helpful Answer Positive Rating

Ahmed Alaa

Full Member level 5
Full Member level 5
Joined
Jul 22, 2009
Messages
317
Helped
61
Reputation
136
Reaction score
44
Trophy points
1,318
Location
Egypt
Activity points
2,964
The simplest equalizer is a frequency domain, pilot assisted equalizer. Here you have many known subcarriers in the frequency domain called "pilots", these pilots are received after being affected by the channel transfer function, so we deduce the transfer function at these pilots' locations and interpolate them to obtain the complete transfer function, then divide the received signal by it. This is called a Zero-Forcing equalizer.
 

Sherra

Member level 3
Member level 3
Joined
Dec 23, 2010
Messages
62
Helped
7
Reputation
14
Reaction score
7
Trophy points
1,288
Activity points
1,700
Thx, I just forgot to "H.StoreHistory = 1; " store the states, afterwards i just used plot(H) since i am dealing with a sparse multipath channel

---------- Post added at 21:37 ---------- Previous post was at 21:32 ----------

Hi ahmeddeia, thx for your input, i have already done taht, now my pb is to know whether tehre is any relationship between path_gain and path_power also how do you choose the path gain? What are the criteria used in choosing path gains? is it random?

---------- Post added at 21:39 ---------- Previous post was at 21:37 ----------

Hi Ahmed Alaa, shall i understand that the Zero-forcing equalizer is just the same as 1D linear interpolation with LS CE???? Is equalization just another term for channel estimation?
 

Ahmed Alaa

Full Member level 5
Full Member level 5
Joined
Jul 22, 2009
Messages
317
Helped
61
Reputation
136
Reaction score
44
Trophy points
1,318
Location
Egypt
Activity points
2,964
I don't know what is the "path power", it may mean the same as path gain or its square. You don't choose the path gain it is random and usually follows a Rayleigh distribution, besides, it is time variant. Equalization and channel estimation are different; Channel estimation is calculating the channel and deducing the path gains and delays, while channel equalization is removing its effect which may be done by simple Zero Forcing Equalizers. Zero Forcing is an equalization technique, and LS is a channel estimation technique.
 

Sherra

Member level 3
Member level 3
Joined
Dec 23, 2010
Messages
62
Helped
7
Reputation
14
Reaction score
7
Trophy points
1,288
Activity points
1,700
I don't know what is the "path power", it may mean the same as path gain or its square. You don't choose the path gain it is random and usually follows a Rayleigh distribution, besides, it is time variant. Equalization and channel estimation are different; Channel estimation is calculating the channel and deducing the path gains and delays, while channel equalization is removing its effect which may be done by simple Zero Forcing Equalizers. Zero Forcing is an equalization technique, and LS is a channel estimation technique.


Hi Ahmed, thank you for your clarifications. Concerning the path gains, i have to input it , when using "H = rayleighchan(ts,fd,delay,pdb)" ; pdb is a vector of average path gains, each specified in dB of average path gains, and my chosen vector for pdb is : pdb=[0 -1 -2 -3 -4 -5 -6 -7 -8 -9 -10 -11 -12 -13 -14 -15 -16 -17 -18 -19]; since i have 20 significant paths. do you think there is anything wrongwith my pdb vector?
Thx in advance
 

Sherra

Member level 3
Member level 3
Joined
Dec 23, 2010
Messages
62
Helped
7
Reputation
14
Reaction score
7
Trophy points
1,288
Activity points
1,700
I hope this very good blog can help you!
it did help me
PS: all matlab codes are explained
 
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top