FPGA Intellectual Property
PCI Express*, Networking and Connectivity, Memory Interfaces, DSP IP, and Video IP

FIR_LP Problem

Altera_Forum
Honored Contributor II
1,070 Views

I have a problem of gain with a fir_lp (value < expected value )!!! 

config : 

filtre_type : low pass 

sample rate :10khz 

cutoff freq :500hz 

coeff : 15 

input number system : unsigned binary  

ast_sink_data :INPUT data width 16 bits ( data signal 50hz ampl : 2.5V --> 65535 ) 

ast_source_data :OUTPUT width 27 bits full resolution  

 

when i calculate RMS (value < expected value) : 

{ data in for RMS : lp_out(lp_out'high downto lp_out'high-15) } 

 

thinks for help
0 Kudos
6 Replies
Altera_Forum
Honored Contributor II
357 Views

Cutoff freq is 1/20 of sample frequency, it's impossible to design a good FIR filter with 15 or 30 taps. A first or second order IIR filter will perform much better in this case.

0 Kudos
Altera_Forum
Honored Contributor II
357 Views

Thanks for replying, 

Can i generate irr filter from megawizard or i should design it ?
0 Kudos
Altera_Forum
Honored Contributor II
357 Views

There is no Altera IP for IIR filters as far as I know. MatLab or special filter tools can be used to calculate the difference equation coefficients.

0 Kudos
Altera_Forum
Honored Contributor II
357 Views

ok thanks, 

So it's impossible to use altera FIR compiler with Cutoff freq 1/20 of sample frequency even if i change coeff?
0 Kudos
Altera_Forum
Honored Contributor II
357 Views

fir attenuation image (http://img3.imageshack.us/img3/4210/firlp.jpg)  

in this image 

udat : input signal 16hz (16 bits) 

fir_lp : width 37 bits 

coeff : 100  

(i have always an attenuation even with others coeff)
0 Kudos
Altera_Forum
Honored Contributor II
357 Views

we should start with specifications. 

 

sampling rate:  

pass band:  

stop band:  

in band ripple:  

stop band attenuation:  

 

then we can define how many taps you need, how many bits to use, etc.
0 Kudos
Reply