UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Observer arash-rezaee
Observer
9,243 Views
Registered: ‎02-01-2012

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

0 Kudos
10 Replies
Xilinx Employee
Xilinx Employee
9,233 Views
Registered: ‎08-02-2011

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
0 Kudos
Explorer
Explorer
9,231 Views
Registered: ‎12-08-2010

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.
0 Kudos
Observer arash-rezaee
Observer
9,226 Views
Registered: ‎02-01-2012

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

0 Kudos
Explorer
Explorer
9,221 Views
Registered: ‎12-08-2010

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.
0 Kudos
Highlighted
Observer arash-rezaee
Observer
9,219 Views
Registered: ‎02-01-2012

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

0 Kudos
Explorer
Explorer
9,206 Views
Registered: ‎12-08-2010

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.
0 Kudos
Observer ru551n
Observer
9,183 Views
Registered: ‎02-09-2010

Re: pre-emphasis filter

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

 

Regards

0 Kudos
Observer arash-rezaee
Observer
9,143 Views
Registered: ‎02-01-2012

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

0 Kudos
Observer arash-rezaee
Observer
9,082 Views
Registered: ‎06-12-2012

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

0 Kudos
Explorer
Explorer
3,287 Views
Registered: ‎12-08-2010

Re: pre-emphasis filter

Hi, Arash.

 

Short answer to all your questions is FDATool. It can quantize the coefficients and generate HDL implementation.


Is it good to design one first order IIR filter in Matlab and then change it`s coefficients with mine? Or other way?

But you don't need to design new filter. If you have calculated the coefficients, then just import them (File -> Import Filter from Workspace).

 

Best Regards,
Vitaly.
0 Kudos