Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
16 years ago

FIR_LP Problem

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

6 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    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.

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Thanks for replying,

    Can i generate irr filter from megawizard or i should design it ?
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    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.

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    ok thanks,

    So it's impossible to use altera FIR compiler with Cutoff freq 1/20 of sample frequency even if i change coeff?
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    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.