Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

- Community Forums
- :
- Forums
- :
- Hardware Development
- :
- AI Engine, DSP IP and Tools
- :
- Re: pre-emphasis filter

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

Highlighted
##

Anonymous

Not applicable

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

03-03-2012 04:46 AM

9,559 Views

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

10 Replies

Highlighted
##

bwiec

Xilinx Employee

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

03-03-2012 11:32 PM

9,549 Views

Registered:
08-02-2011

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

Highlighted
##

vlavruhin

Explorer

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

03-03-2012 11:52 PM

9,547 Views

Registered:
12-08-2010

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.

Vitaly.

Highlighted
##

Anonymous

Not applicable

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

03-04-2012 01:06 AM

9,542 Views

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

Highlighted
##

vlavruhin

Explorer

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

03-04-2012 04:17 AM

9,537 Views

Registered:
12-08-2010

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.

Vitaly.

Highlighted
##

Anonymous

Not applicable

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

03-04-2012 04:37 AM

9,535 Views

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

Highlighted
##

vlavruhin

Explorer

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

03-04-2012 10:27 PM

9,522 Views

Registered:
12-08-2010

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.

Vitaly.

Highlighted
##

ru551n

Observer

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

03-15-2012 02:18 AM

9,499 Views

Registered:
02-09-2010

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

Regards

Highlighted
##

Anonymous

Not applicable

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

04-15-2012 06:49 AM

9,459 Views

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

Highlighted
##

arash-rezaee

Observer

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

06-19-2012 06:44 AM

9,398 Views

Registered:
06-12-2012

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

Highlighted
##

vlavruhin

Explorer

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

06-20-2012 03:36 AM

3,603 Views

Registered:
12-08-2010

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.

Vitaly.