how to implement a linear equilizer in matlab

Status
Not open for further replies.

dream_ankur

Newbie level 6
Joined
Dec 22, 2009
Messages
11
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,347
if the input to the equilizer is of the format y[n]=x[n]-a1*x[n-1]-a2*x[n-2]-a3*x[n-3], than how will i implement this in matlab.
Can we use the "filter" command in matlab to implement the shifted samples????
 

you already have it:
Code:
for n=1:N-3
  y(n)=x(n)-a1*x(n-1)-a2*x(n-2)-a3*x(n-3);
end
no need for filters...

I hope it helps!
 

the problem is that x[n] is the receiving bits after upsampling of the bits at the receiver side which is than passed through the root raised cosine filter and thna has to be passed through the equilizer.
Now x[n] which is the output of upsampling is in the matrix form of dimension(say 1 x 20000) and y[n] is the equilizer output. now x[n-1] or x[n-2], i guess basically means the delayed sample. if i will just write the for loop as mentioned above than for n=1 (1st iteration) my equation will become y(1)=x(1)-a1*x(0)+a2*x(-1) and so on, which i guess does not make sense. because its the complete signal which need to be passed through the equilizer and the output should also be of all the bits.
 

I'm sorry, you're right! Here is the correct code!
Code:
y(1)=0;
y(2)=0;
for n=3:N
  y(n)=x(n)-a1*x(n-1)-a2*x(n-2)-a3*x(n-3);
end
you will of course loose the first 2 samples since they are not equalized...
 

I have few queries in the above mentioned code
1) practically we should not loose any information(symbols) by implementing equalization. But in the above case we are loosing some information, why is it so?
2)What exactly is "N" referred to in the for loop?
3)The step size of the for loop should be 3 or 1?

Thanks for your prompt help
 

dream_ankur said:
1) practically we should not loose any information(symbols) by implementing equalization. But in the above case we are loosing some information, why is it so?
you are not loosing any information. The first 2 symbols of the output sequence are 0's because your output must be delayed by the amount of registers you need.
dream_ankur said:
2)What exactly is "N" referred to in the for loop?
N=length(x);
dream_ankur said:
3)The step size of the for loop should be 3 or 1?
The step size must be 1 or you will not include all samples!
 

hi.. thanks for the above reply

I have 1 more query....



or

https://obrazki.elektroda.pl/73_1261510530.jpg

i am attaching the plots of the transmitted signal and the received signal after equilization. I believe that both the graphs should almost be same but there is a big difference in both the graphs.

Can you suggest any reasoning for that or are the graphs wrong...

Thanks in advance.
 

I cannot say much looking at your figures but of course the equalizer will change the waveform!
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…