Sign In

Don't have a Xilinx account yet?

  • Choose to receive important news and product information
  • Gain access to special content
  • Personalize your web experience on Xilinx.com

Create Account

Username

Password

Forgot your password?
XClose Panel
Xilinx Home
Reply
Regular Visitor
arash-rezaee
Posts: 53
Registered: ‎02-01-2012
0

pre-emphasis filter

Hi every one. I wrote a code for pre-emphasis filter (FIR with two coefficients). Regarding to theory frequencies below 400Hz must be with out changing. But my filter is will change the amplitude of input signal when it is below 400Hz. I attached my code for your information. I really appreciate if someone can help me.

 

Regards

Arash

Xilinx Employee
bwiec
Posts: 1,070
Registered: ‎08-02-2011
0

Re: pre-emphasis filter

Have you plotted the frequency response of your filter, say in matlab, to see what you're supposed to be seeing and how it relates to your hardware?

www.xilinx.com
Super Contributor
vlavruhin
Posts: 195
Registered: ‎12-08-2010
0

Re: pre-emphasis filter

Hi, Arash.

How is your project going?

 

What makes you think this filter is what you need? How do you calculate the coefficients of this filter?

Best Regards,
Vitaly.
Regular Visitor
arash-rezaee
Posts: 53
Registered: ‎02-01-2012
0

Re: pre-emphasis filter

Hi Vitaly.

 

My project is well and I only need to fix this filter, Then every thing goes fine and I can finish it. Base on the following attachment which is 50/75us pre-emphasis filter I tried to implement it. First of all, I read a lot through internet and many references and most of them are agree that pre-emphasis filter is first order FIR filter with coefficient of [ 1 , 0.975] or near to this. Then I create first order FIR filter in Matlab and generate VHDL code from FDATOOL. Then I replaced above coefficients with what matlab made for it`s filter. After I programmed my FPGA it shows the frequencies more than 400Hz are same in amplitude. So, I tried try and error technique to find out these coefficient. Do you think my way is wrong? Please guide me to have a very good pre-emphasis filter regarding to the attached file.

 

Regards

Arash

Super Contributor
vlavruhin
Posts: 195
Registered: ‎12-08-2010
0

Re: pre-emphasis filter


arash-rezaee wrote:

First of all, I read a lot through internet and many references and most of them are agree that pre-emphasis filter is first order FIR filter with coefficient of [ 1 , 0.975] or near to this.


Perhaps, it can be roughly approximated by such FIR filter with two coefficients [1, -0.9]. But at what sampling frequency?

 

Originally (in analog implementation) pre-emphasis filter is simple RC first-order high-pass filter with timing constant RC = 50 us (or corner frequency = 1/(2*pi*RC)).

 

There are many ways to design digital filter with frequency response close to the analog prototype. But the coefficients of digital filter depend on the corner frequency (or timing constant) and the sampling frequency together.

 

So, first of all, try to model this filter in Matlab, look at the frequency response in FDATool and tweak the coefficients to achieve desired approximation.

Best Regards,
Vitaly.
Regular Visitor
arash-rezaee
Posts: 53
Registered: ‎02-01-2012
0

Re: pre-emphasis filter

Vitaly wrote:

There are many ways to design digital filter with frequency response close to the analog prototype. But the coefficients of digital filter depend on the corner frequency (or timing constant) and the sampling frequency together.

--------------------------------------------------------------------------------------------------------------------------------------------------------------

can you explain a little more? how to compute coefficient whit help of corner frequency ( or timing constant)?

 

 

my sampling frequency is 95KHz. I just know with FDAtool we can set the cutoff frequency and passpand frequency. is it the way to change the coefficient of the filter designed in matlab?

Sorry I didn`t mentioned about sampling frequency

sampling frequency = 95KHz

Clock = 12.160MHz

 

Regards

Arash

Super Contributor
vlavruhin
Posts: 195
Registered: ‎12-08-2010
0

Re: pre-emphasis filter

Arash, if you have analog prototype of filter, it can be translated into digital filter (IIR) by using one of the following methods:

1) bilinear transformation from s-plane to z-plane (http://en.wikipedia.org/wiki/Bilinear_transform),

2) sampling of impulse response (http://en.wikipedia.org/wiki/Impulse_invariance).

Also you can try to design FIR filter with frequency response close to the frequency response of original analog filter.

 

As to pre-emphasis filter, there is a paper which should help you:

http://wwwjontio.zapto.org/hda1/preempiir.pdf

Just don't forget to use your sampling rate in calculations of the coefficients.

 

Best Regards,
Vitaly.
Regular Visitor
ru551n
Posts: 17
Registered: ‎02-09-2010
0

Re: pre-emphasis filter

I have done this filter as an IIR with good results, contact me if you need feedback.

 

Regards

Regular Visitor
arash-rezaee
Posts: 53
Registered: ‎02-01-2012
0

Re: pre-emphasis filter

Hi

thanks a lot. I don`t know how to contact you. please let me know how can I contqact you. I don`t know I can put my email address here or not. But this is my email address ara2631@yahoo.com .

 

Regards

Arash

Visitor
arash-rezaee
Posts: 9
Registered: ‎06-12-2012
0

Re: pre-emphasis filter

Dear Vitaly

 

I have read the paper you mentioned " http://wwwjontio.zapto.org/hda1/preempiir.pdf ".

Now I have three coefficients for nominator(2) and decimated(1).

I have two question. Once my coefficients are 5.30986,-4.79461,0.48475.

1. How can I quantize them for FPGA.

2. What is the best way to implement IIR filter in FPGA? Is it good to design one first order IIR filter in Matlab and then change it`s coefficients with mine? Or other way?

 

Please help me.

Regards

Arash