Butterworth 3rd order

Discussion in 'Effects and the DSP' started by boris81, Jan 23, 2011.

  1. boris81

    boris81 New Member

    Joined:
    Dec 17, 2009
    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    0
    Hi,
    I'm looking to implement a 3rd order Butterworth LowPass and HighPass.
    I understand that in order to get a 3rd order filter I need to cascade a 2nd order with a 1st order.
    A Q-factor look-up table can be found in this datasheet p58.
    http://focus.ti.com/lit/ml/sloa088/sloa088.pdf

    KX currently only implements a 2nd order filters. I found the formulas to compute the biquad coefficients for 1st order filters.
    Cascade form IIR Filters | Comp.DSP | DSPRelated.com

    I've been trying to compute and replace these coefficients into the "EQ Lowpass" filter but I can't get it to work.

    Does what I'm trying to do seem right?

    I don't quite understand how the "EQ Lowpass" biquad implementation uses the coefficients and I have some questions.

    - Are all of the coefficients divided by 2?
    - From the EQ-Cookbook a0 = 1 + alpha doesn't come up to 1, does that mean that the rest of the coefficients must be offset by -alpha?
    - Can I type decimal fractions into the Dane editor or do I need to convert to hex?
     
  2. Russ

    Russ Well-Known Member

    Joined:
    Jan 17, 2005
    Messages:
    5,722
    Likes Received:
    13
    Trophy Points:
    48
    I cannot answer all yor questions, but...

    I do not have kX or the SDK installed at the moment, so I cannot look at the code for that plugin, but:
    Often a scale factor is used to ensure that the coefficients do not exceed 1 under all possible settings (with filters that have adjustable settings), etc. IIRC, that plugin does use a scale factor of 2 (the coefficients are divided by 2, and then in the DSP, the output of the filter is multiplied by 2 to correct for it).

    To normalize, all coefficients should be divided by a0 (i.e. 1 + alpha).
    (a0 thus becomes 1, as it is divided by itself)

    Note: In some cases, a coefficient might be made negative or positive to work with the DSP instruction that you want to use (where the result would be the same... e.g. (a - b) is the same as (a + (-b)) ).

    Yes, you can use decimals in the Dane editor.
     
    Last edited: Jan 24, 2011
  3. boris81

    boris81 New Member

    Joined:
    Dec 17, 2009
    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    0
    Thank you, Russ!

    I wasn't able to find the plugin code in the SDK at first.:rolleyes: After your comment I was inspired to search harder.

    I will probably have some further questions about compiling a *.kxl plugin.
     

Share This Page

visited