Hi All, I am working in Digital ButterWorth filter design. I am using Fourth-order, zero-lag filter design. The Coeffecients calculation by using formula dCutoff2 = dCutoffFrequency * 1.247 Wc = Tan((Application.Pi() * dCutoff2) / dSampleFrequency) K1 = Sqr(2) * Wc K2 = Wc ^ 2 A0 = K2 / (1 + K1 + K2) A1 = 2 * A0 A2 = A0 K3 = (2 * A0) / K2 B1 = -2 * A0 + K3 B2 = 1 - (2 * A0) - K3 It uses forward and reverse process. In the forward process input of first two value assign to output of first two value and also last two of forward input value assign to reverse output value. But the result by slight varation in the end part. I need any algorithm to create butterworth filter or any correction in the formulae. _____________________________ Posted through www.DSPRelated.com

# Digital ButterWorth Filter Design

Started by ●April 21, 2014

Reply by ●April 22, 20142014-04-22

On 4/21/14 12:44 PM, jeeva123 wrote:> Hi All, > > I am working in Digital ButterWorth filter design. I am using > Fourth-order, zero-lag filter design. The Coeffecients calculation by using > formula > dCutoff2 = dCutoffFrequency * 1.247 > Wc = Tan((Application.Pi() * dCutoff2) / dSampleFrequency) > K1 = Sqr(2) * Wc > K2 = Wc ^ 2 > A0 = K2 / (1 + K1 + K2) > A1 = 2 * A0 > A2 = A0 > K3 = (2 * A0) / K2 > B1 = -2 * A0 + K3 > B2 = 1 - (2 * A0) - K3judging that there are three "A" coefs and two "B" coefs, may i presume that the "B" coefs go into the denominator of the transfer function? what is the difference equations for this filter? is it: y[n] = A0*x[n] + A1*x[n-1] + A2*x[n-2] + B1*y[n-1] + B2*y[n-2] ? perhaps the signs are opposite on the "B" coefs? and then the question is: how are these different for the two different 2nd-order sections? for a 4th-order Butterworth, the two 2nd-order sections have identical resonant frequency but different Q. how does the Q get determined with your intermediate "K" values?> It uses forward and reverse process. In the forward process input of first > two value assign to output of first two value and also last two of forward > input value assign to reverse output value.i dunno what this means.> But the result by slight variation in the end part.nor this.> I need any algorithm to create butterworth filter > or any correction in the formulae.-- r b-j rbj@audioimagination.com "Imagination is more important than knowledge."

Reply by ●April 22, 20142014-04-22

>On 4/21/14 12:44 PM, jeeva123 wrote: >> Hi All, >> >> I am working in Digital ButterWorth filter design. I amusing>> Fourth-order, zero-lag filter design. The Coeffecients calculation byusing>> formula >> dCutoff2 = dCutoffFrequency * 1.247 >> Wc = Tan((Application.Pi() * dCutoff2) / dSampleFrequency) >> K1 = Sqr(2) * Wc >> K2 = Wc ^ 2 >> A0 = K2 / (1 + K1 + K2) >> A1 = 2 * A0 >> A2 = A0 >> K3 = (2 * A0) / K2 >> B1 = -2 * A0 + K3 >> B2 = 1 - (2 * A0) - K3 > > >judging that there are three "A" coefs and two "B" coefs, may i presume >that the "B" coefs go into the denominator of the transfer function? > >what is the difference equations for this filter? is it: > > y[n] = A0*x[n] + A1*x[n-1] + A2*x[n-2] + B1*y[n-1] + B2*y[n-2] > >? > >perhaps the signs are opposite on the "B" coefs? > >and then the question is: how are these different for the two different >2nd-order sections? for a 4th-order Butterworth, the two 2nd-order >sections have identical resonant frequency but different Q. how does >the Q get determined with your intermediate "K" values? > >> It uses forward and reverse process. In the forward process input offirst>> two value assign to output of first two value and also last two offorward>> input value assign to reverse output value. > >i dunno what this means. > >> But the result by slight variation in the end part. > >nor this. > >> I need any algorithm to create butterworth filter >> or any correction in the formulae. > > > >-- > >r b-j rbj@audioimagination.com > >"Imagination is more important than knowledge." > > >The Algorithm get from VBA Script. I need any algorithm to create butterworth filter. _____________________________ Posted through www.DSPRelated.com

Reply by ●April 22, 20142014-04-22

On 4/22/14 3:37 AM, jeeva123 wrote:>> On 4/21/14 12:44 PM, jeeva123 wrote: >>> Hi All, >>> >>> I am working in Digital ButterWorth filter design. I am > using >>> Fourth-order, zero-lag filter design. The Coeffecients calculation by > using >>> formula >>> dCutoff2 = dCutoffFrequency * 1.247 >>> Wc = Tan((Application.Pi() * dCutoff2) / dSampleFrequency) >>> K1 = Sqr(2) * Wc >>> K2 = Wc ^ 2 >>> A0 = K2 / (1 + K1 + K2) >>> A1 = 2 * A0 >>> A2 = A0 >>> K3 = (2 * A0) / K2 >>> B1 = -2 * A0 + K3 >>> B2 = 1 - (2 * A0) - K3 >> >> >> judging that there are three "A" coefs and two "B" coefs, may i presume >> that the "B" coefs go into the denominator of the transfer function? >> >> what is the difference equations for this filter? is it: >> >> y[n] = A0*x[n] + A1*x[n-1] + A2*x[n-2] + B1*y[n-1] + B2*y[n-2] >>dunno that this question was answered. it's sorta fundamental.> > The Algorithm get from VBA Script. I need any algorithm to create > butterworth filter.well, i am not reverse-engineering that VBA Script or whatever it is. i can tell it computes coefficients for a second-order section (or "biquad"), there are parameters: dSampleFrequency and dCutoffFrequency, but not one for Q or "dResonance". you will need such because the two second-order sections that make up a fourth-order Butterworth do not have the same Q. -- r b-j rbj@audioimagination.com "Imagination is more important than knowledge."