Forums

why first order filter have slope 6db/octave

Started by rammya.tv January 28, 2010
HardySpicer wrote:
> On Jan 31, 3:22 pm, Jerry Avins <j...@ieee.org> wrote: >> HardySpicer wrote: >>> On Jan 31, 6:20 am, Jerry Avins <j...@ieee.org> wrote: >>>> HardySpicer wrote: >>>>> On Jan 29, 8:59 am, Clay <c...@claysturner.com> wrote: >>>> ... >>>>>> p.s. The magnitude response of a nth butterworth lowpass filter is >>>>>> simply >>>>>> A(f) = 1/sqrt(1+(f/fc)^2n) >>>>> Only with 3dB passband ripple.. >>>> Hunh? Show us. (Hint: show that a derivative goes to zero somewhere >>>> other than f=0.) >>>> Jerry >>>> -- >>>> Engineering is the art of making what you want from things you can get. >>>> &#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095; >>> eh? This is standard theory for Butterworth filters but many people >>> only get taught the 3dB version. >>> You specify the attenuation in the passband and find the ripple factor >>> eps for that attenuation. Turns out the the ripple factor is unity >>> (nearly) when the passband attenuation is 3dB. The poles lie in a >>> circle radius unity for 3dB passband ripple but on a circle radius (1/ >>> eps)^1/n if I remember right for a ripple factor eps and order n. The >>> equation A(f) = 1/sqrt(1+(f/fc)^2n) also changes. Look it up. >> I can only guess what you're driving at. "Butterworth" is the same as >> "maximally flat". A Butterworth filter exhibits no ripple at all. True, >> the edge of the passband is 3 dB down from the flat top, but that's not >> ripple. Are you by chance thinking of Butterworth as the flat limit of a >> Chebychev filter? >> >> Jerry >> -- >> Engineering is the art of making what you want from things you can get. >> &#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095; > > It's a bit of a missnoma... it is called ripple and ripple factor in > the literature even though there is no ripple! > This is due to the generalised form of polynomials that define such > filters. For Butterworth a better term is just the dB attenuation in > the passband. > This (with your equations) is defined as 3dB whereas it could be say > 1dB. It's just the droop you get at the end of the passband - no > ripple. > Of course in the case of Chebychev there is a real ripple but the > polynomial is different. > The general form is H(v)^2=1/1+eps^2.Ln(v)^2 where Ln(v) is the > polynomial in normalised freq v of order n. Substitute L, the > polynomial of your choice,Butterworth,Chebychev etc. The "square-root" > of this gives the filter. (actually the spectral factorization)
We're on the same page, then. What did you mean when contradicting Clay by writing "Only with 3dB passband ripple.."? Jerry -- Engineering is the art of making what you want from things you can get. &#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;
On 31 Jan, 03:22, Jerry Avins <j...@ieee.org> wrote:
> HardySpicer wrote: > > On Jan 31, 6:20 am, Jerry Avins <j...@ieee.org> wrote: > >> HardySpicer wrote: > >>> On Jan 29, 8:59 am, Clay <c...@claysturner.com> wrote: > >> &#2013266080; &#2013266080;... > > >>>> p.s. The magnitude response of a nth butterworth lowpass filter is > >>>> simply > >>>> A(f) = 1/sqrt(1+(f/fc)^2n) > >>> Only with 3dB passband ripple.. > >> Hunh? Show us. (Hint: show that a derivative goes to zero somewhere > >> other than f=0.) > > >> Jerry > >> -- > >> Engineering is the art of making what you want from things you can get. > >> &#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095; > > > eh? This is standard theory for Butterworth filters but many people > > only get taught the 3dB version. > > You specify the attenuation in the passband and find the ripple factor > > eps for that attenuation. Turns out the the ripple factor is unity > > (nearly) when the passband attenuation is 3dB. The poles lie in a > > circle radius unity for 3dB passband ripple but on a circle radius (1/ > > eps)^1/n if I remember right for a ripple factor eps and order n. The > > equation &#2013266080;A(f) = 1/sqrt(1+(f/fc)^2n) also changes. Look it up. > > I can only guess what you're driving at. "Butterworth" is the same as > "maximally flat". A Butterworth filter exhibits no ripple at all. True, > the edge of the passband is 3 dB down from the flat top, but that's not > ripple. Are you by chance thinking of Butterworth as the flat limit of a > Chebychev filter?
Clay is right in the formula for the Butterworth frequency response, and in that formula a characteristic frequency appears that indicate the frequency of the 3dB point. However, that characteristic frequency needs not be the cut-off frequency of the filter spec. Given any ripple and corner frequency, one can dedude the corresponding 3dB frequency of the filter. So you discussion hinges on exactly what meaning is assigned to the factor 'fc' in the fomula: The characteristic 3dB frequency, or the passband corner frequency? Rune
On Jan 31, 6:45&#2013266080;pm, Rune Allnor <all...@tele.ntnu.no> wrote:
> On 31 Jan, 03:22, Jerry Avins <j...@ieee.org> wrote: > > > > > HardySpicer wrote: > > > On Jan 31, 6:20 am, Jerry Avins <j...@ieee.org> wrote: > > >> HardySpicer wrote: > > >>> On Jan 29, 8:59 am, Clay <c...@claysturner.com> wrote: > > >> &#2013266080; &#2013266080;... > > > >>>> p.s. The magnitude response of a nth butterworth lowpass filter is > > >>>> simply > > >>>> A(f) = 1/sqrt(1+(f/fc)^2n) > > >>> Only with 3dB passband ripple.. > > >> Hunh? Show us. (Hint: show that a derivative goes to zero somewhere > > >> other than f=0.) > > > >> Jerry > > >> -- > > >> Engineering is the art of making what you want from things you can get. > > >> &#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095; > > > > eh? This is standard theory for Butterworth filters but many people > > > only get taught the 3dB version. > > > You specify the attenuation in the passband and find the ripple factor > > > eps for that attenuation. Turns out the the ripple factor is unity > > > (nearly) when the passband attenuation is 3dB. The poles lie in a > > > circle radius unity for 3dB passband ripple but on a circle radius (1/ > > > eps)^1/n if I remember right for a ripple factor eps and order n. The > > > equation &#2013266080;A(f) = 1/sqrt(1+(f/fc)^2n) also changes. Look it up. > > > I can only guess what you're driving at. "Butterworth" is the same as > > "maximally flat". A Butterworth filter exhibits no ripple at all. True, > > the edge of the passband is 3 dB down from the flat top, but that's not > > ripple. Are you by chance thinking of Butterworth as the flat limit of a > > Chebychev filter? > > Clay is right in the formula for the Butterworth frequency > response, and in that formula a characteristic frequency > appears that indicate the frequency of the 3dB point. > > However, that characteristic frequency needs not be the > cut-off frequency of the filter spec. Given any ripple > and corner frequency, one can dedude the corresponding > 3dB frequency of the filter. > > So you discussion hinges on exactly what meaning is assigned > to the factor 'fc' in the fomula: The characteristic 3dB > frequency, or the passband corner frequency? > > Rune
The convention is to define the dB attenuation in the passband. So we say for example (for a lowpass filter design) you need 1dB attenuation in the passband at 1kHz. The 3dB freq is not normally defined here though of course it exists in all LTI systems. So 1kHz is the passband 'edge" but it is nearly always defined as unity for normalised frequency. My point is that you cannot use the 3dB Butterworth solution for this. For the 1dB case the polynomial changes since the poles no longer lie in a circle radius unity (though the pole angles will be the same). So for a 1dB passband attenuation of 1kHz and a stopband attenuation of 40dB at 10kHz (as a simple example) we use unity as the passband freq and 10 (normalised) as the stopband freq. The poles lie on a circle radius (1/eps)^(1/n) if I remember right. eps is found from Ap (passband attenuation)=10Log10.(1+eps^2) and will be 1/sqrt(2) for the 3dB case. Here we can find eps for the 1dB case from eps^2=[10^0.1Ap]-1 =0.25 so that eps=0.5088. Giving the pole radius as 1.402 and not unity. Anyway we then find the pole polynomial (since we know the angles - we also need the order which I have taken as 2 for simplicity here though we can easily work this out from the attenuation in the stopband). Once we have the pole polynomial we get the NORMALISED transfer function and then apply the low-pass to low-pass transformation viz s-->s/Wx where Wx=2pi*1000 to get the real transfer function. We then end up with a 2nd order Butterworth with a passband freq of 1kHz at 1dB. Hardy
On 31 Jan, 08:15, HardySpicer <gyansor...@gmail.com> wrote:
> On Jan 31, 6:45&#2013266080;pm, Rune Allnor <all...@tele.ntnu.no> wrote: > > > > > > > On 31 Jan, 03:22, Jerry Avins <j...@ieee.org> wrote: > > > > HardySpicer wrote: > > > > On Jan 31, 6:20 am, Jerry Avins <j...@ieee.org> wrote: > > > >> HardySpicer wrote: > > > >>> On Jan 29, 8:59 am, Clay <c...@claysturner.com> wrote: > > > >> &#2013266080; &#2013266080;... > > > > >>>> p.s. The magnitude response of a nth butterworth lowpass filter is > > > >>>> simply > > > >>>> A(f) = 1/sqrt(1+(f/fc)^2n) > > > >>> Only with 3dB passband ripple.. > > > >> Hunh? Show us. (Hint: show that a derivative goes to zero somewhere > > > >> other than f=0.) > > > > >> Jerry > > > >> -- > > > >> Engineering is the art of making what you want from things you can get. > > > >> &#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095; > > > > > eh? This is standard theory for Butterworth filters but many people > > > > only get taught the 3dB version. > > > > You specify the attenuation in the passband and find the ripple factor > > > > eps for that attenuation. Turns out the the ripple factor is unity > > > > (nearly) when the passband attenuation is 3dB. The poles lie in a > > > > circle radius unity for 3dB passband ripple but on a circle radius (1/ > > > > eps)^1/n if I remember right for a ripple factor eps and order n. The > > > > equation &#2013266080;A(f) = 1/sqrt(1+(f/fc)^2n) also changes. Look it up. > > > > I can only guess what you're driving at. "Butterworth" is the same as > > > "maximally flat". A Butterworth filter exhibits no ripple at all. True, > > > the edge of the passband is 3 dB down from the flat top, but that's not > > > ripple. Are you by chance thinking of Butterworth as the flat limit of a > > > Chebychev filter? > > > Clay is right in the formula for the Butterworth frequency > > response, and in that formula a characteristic frequency > > appears that indicate the frequency of the 3dB point. > > > However, that characteristic frequency needs not be the > > cut-off frequency of the filter spec. Given any ripple > > and corner frequency, one can dedude the corresponding > > 3dB frequency of the filter. > > > So you discussion hinges on exactly what meaning is assigned > > to the factor 'fc' in the fomula: The characteristic 3dB > > frequency, or the passband corner frequency? > > > Rune > > The convention is to define the dB attenuation in the passband. So we > say for example (for a lowpass filter design) &#2013266080;you need 1dB > attenuation in the passband at 1kHz. The 3dB freq is not normally > defined here though of course it exists in all LTI systems. So 1kHz is > the passband 'edge" but it is nearly always defined as unity for > normalised frequency. My point is that you cannot use the 3dB > Butterworth solution for this.
Well, given the exact example you state, then no, the equation does not work. But your example only states a partial spec. A complete filter spec gives *two* constraints: The passband and stopband frequencies, with associated attenuations. Given passband parameters (Wp,Dp) and stopband parameters (Ws,Ds) where W means s-domain omega and D means linear-scale ripple, we get Ds^2 = 1 / (1+ (Ws/Wc)^2n ) Dp^2 = 1 / (1+ (Wp/Wc)^2n ) A little algebraic massage, and the two are merged into ( Ws / Wp )^2n = ( Dp^2 -1 )/( Ds^2 -1 ) where the 3dB frequency Wc is gone. Apply some logarithms and you find the formula for estimating the order of the Butterworth filter, given the spec. Getting all this right is intricate, though, particularly if the goal is to end up with a digital filter: You need to pre-warp the spec from discrete-time (DT) domain into contionuous-time (CT) domain, come up with a normalized CT filter, BLT it back to DT domain to a normalized DT filter, which then has to be denormalized. Rune
On Jan 31, 9:10&#2013266080;pm, Rune Allnor <all...@tele.ntnu.no> wrote:
> On 31 Jan, 08:15, HardySpicer <gyansor...@gmail.com> wrote: > > > > > On Jan 31, 6:45&#2013266080;pm, Rune Allnor <all...@tele.ntnu.no> wrote: > > > > On 31 Jan, 03:22, Jerry Avins <j...@ieee.org> wrote: > > > > > HardySpicer wrote: > > > > > On Jan 31, 6:20 am, Jerry Avins <j...@ieee.org> wrote: > > > > >> HardySpicer wrote: > > > > >>> On Jan 29, 8:59 am, Clay <c...@claysturner.com> wrote: > > > > >> &#2013266080; &#2013266080;... > > > > > >>>> p.s. The magnitude response of a nth butterworth lowpass filter is > > > > >>>> simply > > > > >>>> A(f) = 1/sqrt(1+(f/fc)^2n) > > > > >>> Only with 3dB passband ripple.. > > > > >> Hunh? Show us. (Hint: show that a derivative goes to zero somewhere > > > > >> other than f=0.) > > > > > >> Jerry > > > > >> -- > > > > >> Engineering is the art of making what you want from things you can get. > > > > >> &#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095; > > > > > > eh? This is standard theory for Butterworth filters but many people > > > > > only get taught the 3dB version. > > > > > You specify the attenuation in the passband and find the ripple factor > > > > > eps for that attenuation. Turns out the the ripple factor is unity > > > > > (nearly) when the passband attenuation is 3dB. The poles lie in a > > > > > circle radius unity for 3dB passband ripple but on a circle radius (1/ > > > > > eps)^1/n if I remember right for a ripple factor eps and order n. The > > > > > equation &#2013266080;A(f) = 1/sqrt(1+(f/fc)^2n) also changes. Look it up. > > > > > I can only guess what you're driving at. "Butterworth" is the same as > > > > "maximally flat". A Butterworth filter exhibits no ripple at all. True, > > > > the edge of the passband is 3 dB down from the flat top, but that's not > > > > ripple. Are you by chance thinking of Butterworth as the flat limit of a > > > > Chebychev filter? > > > > Clay is right in the formula for the Butterworth frequency > > > response, and in that formula a characteristic frequency > > > appears that indicate the frequency of the 3dB point. > > > > However, that characteristic frequency needs not be the > > > cut-off frequency of the filter spec. Given any ripple > > > and corner frequency, one can dedude the corresponding > > > 3dB frequency of the filter. > > > > So you discussion hinges on exactly what meaning is assigned > > > to the factor 'fc' in the fomula: The characteristic 3dB > > > frequency, or the passband corner frequency? > > > > Rune > > > The convention is to define the dB attenuation in the passband. So we > > say for example (for a lowpass filter design) &#2013266080;you need 1dB > > attenuation in the passband at 1kHz. The 3dB freq is not normally > > defined here though of course it exists in all LTI systems. So 1kHz is > > the passband 'edge" but it is nearly always defined as unity for > > normalised frequency. My point is that you cannot use the 3dB > > Butterworth solution for this. > > Well, given the exact example you state, then no, the equation > does not work. But your example only states a partial spec. > A complete filter spec gives *two* constraints: The passband and > stopband frequencies, with associated attenuations. >
I missed that out for simplicity. Yes there is a formula for order of the filter based on stopband attenuation. It's a bit messy for ascii and doesn't change the results in any way. The formula comes from As=10Log10(1+eps^2.vs^2n) where v is normalised freq, n is order and As is stopband attenuation in dB. eps is the ripple factor previously calculated and vs is the normalise stopband freq.. So you re-arrange the above to find vs^2n=(10^0.1As-1)/eps^2 and by taking logs we find n=0.5Log[(10^0.1As-1)/eps^2] The Butterworth polynomial for say a 2nd order is s^2+sqrt(2)s+1 but this is for 3dB passband attenuation only. This will change for the (say) 1dB case and hence the filter with it. so the basic formula quoted is normally for the 3dB case. Your comments about the digital versions are all valid of course aswith any analogue to discrete conversion. Hardy
On Feb 1, 9:33&#2013266080;am, HardySpicer <gyansor...@gmail.com> wrote:
> On Jan 31, 9:10&#2013266080;pm, Rune Allnor <all...@tele.ntnu.no> wrote: > > > On 31 Jan, 08:15, HardySpicer <gyansor...@gmail.com> wrote: > > > > On Jan 31, 6:45&#2013266080;pm, Rune Allnor <all...@tele.ntnu.no> wrote: > > > > > On 31 Jan, 03:22, Jerry Avins <j...@ieee.org> wrote: > > > > > > HardySpicer wrote: > > > > > > On Jan 31, 6:20 am, Jerry Avins <j...@ieee.org> wrote: > > > > > >> HardySpicer wrote: > > > > > >>> On Jan 29, 8:59 am, Clay <c...@claysturner.com> wrote: > > > > > >> &#2013266080; &#2013266080;... > > > > > > >>>> p.s. The magnitude response of a nth butterworth lowpass filter is > > > > > >>>> simply > > > > > >>>> A(f) = 1/sqrt(1+(f/fc)^2n) > > > > > >>> Only with 3dB passband ripple.. > > > > > >> Hunh? Show us. (Hint: show that a derivative goes to zero somewhere > > > > > >> other than f=0.) > > > > > > >> Jerry > > > > > >> -- > > > > > >> Engineering is the art of making what you want from things you can get. > > > > > >> &#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095; > > > > > > > eh? This is standard theory for Butterworth filters but many people > > > > > > only get taught the 3dB version. > > > > > > You specify the attenuation in the passband and find the ripple factor > > > > > > eps for that attenuation. Turns out the the ripple factor is unity > > > > > > (nearly) when the passband attenuation is 3dB. The poles lie in a > > > > > > circle radius unity for 3dB passband ripple but on a circle radius (1/ > > > > > > eps)^1/n if I remember right for a ripple factor eps and order n. The > > > > > > equation &#2013266080;A(f) = 1/sqrt(1+(f/fc)^2n) also changes. Look it up. > > > > > > I can only guess what you're driving at. "Butterworth" is the same as > > > > > "maximally flat". A Butterworth filter exhibits no ripple at all. True, > > > > > the edge of the passband is 3 dB down from the flat top, but that's not > > > > > ripple. Are you by chance thinking of Butterworth as the flat limit of a > > > > > Chebychev filter? > > > > > Clay is right in the formula for the Butterworth frequency > > > > response, and in that formula a characteristic frequency > > > > appears that indicate the frequency of the 3dB point. > > > > > However, that characteristic frequency needs not be the > > > > cut-off frequency of the filter spec. Given any ripple > > > > and corner frequency, one can dedude the corresponding > > > > 3dB frequency of the filter. > > > > > So you discussion hinges on exactly what meaning is assigned > > > > to the factor 'fc' in the fomula: The characteristic 3dB > > > > frequency, or the passband corner frequency? > > > > > Rune > > > > The convention is to define the dB attenuation in the passband. So we > > > say for example (for a lowpass filter design) &#2013266080;you need 1dB > > > attenuation in the passband at 1kHz. The 3dB freq is not normally > > > defined here though of course it exists in all LTI systems. So 1kHz is > > > the passband 'edge" but it is nearly always defined as unity for > > > normalised frequency. My point is that you cannot use the 3dB > > > Butterworth solution for this. > > > Well, given the exact example you state, then no, the equation > > does not work. But your example only states a partial spec. > > A complete filter spec gives *two* constraints: The passband and > > stopband frequencies, with associated attenuations. > > I missed that out for simplicity. Yes there is a formula for order of > the filter based on stopband attenuation. > It's a bit messy for ascii and doesn't change the results in any way. > The formula comes from > > As=10Log10(1+eps^2.vs^2n) where v is &#2013266080;normalised freq, n is order and > As is stopband attenuation in dB. eps is the ripple factor previously > calculated and vs is the normalise stopband freq.. > So you re-arrange the above to find vs^2n=(10^0.1As-1)/eps^2 and by > taking logs we find n=0.5Log[(10^0.1As-1)/eps^2] > > &#2013266080;The Butterworth polynomial for say a 2nd order is > > s^2+sqrt(2)s+1 &#2013266080;but this is for 3dB passband attenuation only. This > will change for the (say) 1dB case and hence the filter with it. > > so the basic formula quoted is normally for the 3dB case. > > Your comments about the digital versions are all valid of course > aswith any analogue to discrete conversion. > > Hardy
That should read n=0.5Log[(10^0.1As-1)/eps^2]/log(vs)
On Feb 1, 9:33&#2013266080;am, HardySpicer <gyansor...@gmail.com> wrote:
> On Jan 31, 9:10&#2013266080;pm, Rune Allnor <all...@tele.ntnu.no> wrote: > > > On 31 Jan, 08:15, HardySpicer <gyansor...@gmail.com> wrote: > > > > On Jan 31, 6:45&#2013266080;pm, Rune Allnor <all...@tele.ntnu.no> wrote: > > > > > On 31 Jan, 03:22, Jerry Avins <j...@ieee.org> wrote: > > > > > > HardySpicer wrote: > > > > > > On Jan 31, 6:20 am, Jerry Avins <j...@ieee.org> wrote: > > > > > >> HardySpicer wrote: > > > > > >>> On Jan 29, 8:59 am, Clay <c...@claysturner.com> wrote: > > > > > >> &#2013266080; &#2013266080;... > > > > > > >>>> p.s. The magnitude response of a nth butterworth lowpass filter is > > > > > >>>> simply > > > > > >>>> A(f) = 1/sqrt(1+(f/fc)^2n) > > > > > >>> Only with 3dB passband ripple.. > > > > > >> Hunh? Show us. (Hint: show that a derivative goes to zero somewhere > > > > > >> other than f=0.) > > > > > > >> Jerry > > > > > >> -- > > > > > >> Engineering is the art of making what you want from things you can get. > > > > > >> &#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095; > > > > > > > eh? This is standard theory for Butterworth filters but many people > > > > > > only get taught the 3dB version. > > > > > > You specify the attenuation in the passband and find the ripple factor > > > > > > eps for that attenuation. Turns out the the ripple factor is unity > > > > > > (nearly) when the passband attenuation is 3dB. The poles lie in a > > > > > > circle radius unity for 3dB passband ripple but on a circle radius (1/ > > > > > > eps)^1/n if I remember right for a ripple factor eps and order n. The > > > > > > equation &#2013266080;A(f) = 1/sqrt(1+(f/fc)^2n) also changes. Look it up. > > > > > > I can only guess what you're driving at. "Butterworth" is the same as > > > > > "maximally flat". A Butterworth filter exhibits no ripple at all. True, > > > > > the edge of the passband is 3 dB down from the flat top, but that's not > > > > > ripple. Are you by chance thinking of Butterworth as the flat limit of a > > > > > Chebychev filter? > > > > > Clay is right in the formula for the Butterworth frequency > > > > response, and in that formula a characteristic frequency > > > > appears that indicate the frequency of the 3dB point. > > > > > However, that characteristic frequency needs not be the > > > > cut-off frequency of the filter spec. Given any ripple > > > > and corner frequency, one can dedude the corresponding > > > > 3dB frequency of the filter. > > > > > So you discussion hinges on exactly what meaning is assigned > > > > to the factor 'fc' in the fomula: The characteristic 3dB > > > > frequency, or the passband corner frequency? > > > > > Rune > > > > The convention is to define the dB attenuation in the passband. So we > > > say for example (for a lowpass filter design) &#2013266080;you need 1dB > > > attenuation in the passband at 1kHz. The 3dB freq is not normally > > > defined here though of course it exists in all LTI systems. So 1kHz is > > > the passband 'edge" but it is nearly always defined as unity for > > > normalised frequency. My point is that you cannot use the 3dB > > > Butterworth solution for this. > > > Well, given the exact example you state, then no, the equation > > does not work. But your example only states a partial spec. > > A complete filter spec gives *two* constraints: The passband and > > stopband frequencies, with associated attenuations. > > I missed that out for simplicity. Yes there is a formula for order of > the filter based on stopband attenuation. > It's a bit messy for ascii and doesn't change the results in any way. > The formula comes from > > As=10Log10(1+eps^2.vs^2n) where v is &#2013266080;normalised freq, n is order and > As is stopband attenuation in dB. eps is the ripple factor previously > calculated and vs is the normalise stopband freq.. > So you re-arrange the above to find vs^2n=(10^0.1As-1)/eps^2 and by > taking logs we find n=0.5Log[(10^0.1As-1)/eps^2] > > &#2013266080;The Butterworth polynomial for say a 2nd order is > > s^2+sqrt(2)s+1 &#2013266080;but this is for 3dB passband attenuation only. This > will change for the (say) 1dB case and hence the filter with it. > > so the basic formula quoted is normally for the 3dB case. > > Your comments about the digital versions are all valid of course > aswith any analogue to discrete conversion. > > Hardy
Just to summarise the procedure without all the equations: Decide on type of filter reuqired - eg Lowpass,Highpass bandpass Specify a lowpass prototype using the following (for all filter types ie Lowpass,Highpass,Bandpass etc) For a particular Passband freq wp and ws find the normailsed equivalents vp=1 and wp/ws =vs For a particular dB passband attenuation Ap find the ripple factor eps For a particular dB stopband attenuation As find the order n. (see previous post) Find the radius of the poles using eps above and n Find the angle of the poles Construct the pole polynomial P(s) from the above two steps This gives us our low-pass prototype from which we can transform to find the real filter. Find the real filter by first forming the prototype Hp(s)=1/P(s) where P(s) is the pole polynomial found previosley. Then transform Lowpass to Lowpass s--> s/wp or Lowpass to highpass s--
>ws/s and there are other transforms for lowpass to bandpass,lowpass
to bandsstop etc. Lowpass to bandpass is s--->(s^2+w0^2)/Bs where B is bandwidth of passband and w0 is the centre freq - normally the geometric root of wl and wh which are at the lower and higher ends of the passband respectively. Note that for this case when transforming a 2nd order prototype only yields a first order "skirt" ie slope. Once you have all this you can realise the filter analogue style or do the pre-warping and Bilinear transform for digital. You won't get linear phase of course. Hardy
HardySpicer wrote:
> On Feb 1, 9:33 am, HardySpicer <gyansor...@gmail.com> wrote: >> On Jan 31, 9:10 pm, Rune Allnor <all...@tele.ntnu.no> wrote: >> >>> On 31 Jan, 08:15, HardySpicer <gyansor...@gmail.com> wrote: >>>> On Jan 31, 6:45 pm, Rune Allnor <all...@tele.ntnu.no> wrote: >>>>> On 31 Jan, 03:22, Jerry Avins <j...@ieee.org> wrote: >>>>>> HardySpicer wrote: >>>>>>> On Jan 31, 6:20 am, Jerry Avins <j...@ieee.org> wrote: >>>>>>>> HardySpicer wrote: >>>>>>>>> On Jan 29, 8:59 am, Clay <c...@claysturner.com> wrote: >>>>>>>> ... >>>>>>>>>> p.s. The magnitude response of a nth butterworth lowpass filter is >>>>>>>>>> simply >>>>>>>>>> A(f) = 1/sqrt(1+(f/fc)^2n) >>>>>>>>> Only with 3dB passband ripple.. >>>>>>>> Hunh? Show us. (Hint: show that a derivative goes to zero somewhere >>>>>>>> other than f=0.) >>>>>>>> Jerry >>>>>>>> -- >>>>>>>> Engineering is the art of making what you want from things you can get. >>>>>>>> &#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095; >>>>>>> eh? This is standard theory for Butterworth filters but many people >>>>>>> only get taught the 3dB version. >>>>>>> You specify the attenuation in the passband and find the ripple factor >>>>>>> eps for that attenuation. Turns out the the ripple factor is unity >>>>>>> (nearly) when the passband attenuation is 3dB. The poles lie in a >>>>>>> circle radius unity for 3dB passband ripple but on a circle radius (1/ >>>>>>> eps)^1/n if I remember right for a ripple factor eps and order n. The >>>>>>> equation A(f) = 1/sqrt(1+(f/fc)^2n) also changes. Look it up. >>>>>> I can only guess what you're driving at. "Butterworth" is the same as >>>>>> "maximally flat". A Butterworth filter exhibits no ripple at all. True, >>>>>> the edge of the passband is 3 dB down from the flat top, but that's not >>>>>> ripple. Are you by chance thinking of Butterworth as the flat limit of a >>>>>> Chebychev filter? >>>>> Clay is right in the formula for the Butterworth frequency >>>>> response, and in that formula a characteristic frequency >>>>> appears that indicate the frequency of the 3dB point. >>>>> However, that characteristic frequency needs not be the >>>>> cut-off frequency of the filter spec. Given any ripple >>>>> and corner frequency, one can dedude the corresponding >>>>> 3dB frequency of the filter. >>>>> So you discussion hinges on exactly what meaning is assigned >>>>> to the factor 'fc' in the fomula: The characteristic 3dB >>>>> frequency, or the passband corner frequency? >>>>> Rune >>>> The convention is to define the dB attenuation in the passband. So we >>>> say for example (for a lowpass filter design) you need 1dB >>>> attenuation in the passband at 1kHz. The 3dB freq is not normally >>>> defined here though of course it exists in all LTI systems. So 1kHz is >>>> the passband 'edge" but it is nearly always defined as unity for >>>> normalised frequency. My point is that you cannot use the 3dB >>>> Butterworth solution for this. >>> Well, given the exact example you state, then no, the equation >>> does not work. But your example only states a partial spec. >>> A complete filter spec gives *two* constraints: The passband and >>> stopband frequencies, with associated attenuations. >> I missed that out for simplicity. Yes there is a formula for order of >> the filter based on stopband attenuation. >> It's a bit messy for ascii and doesn't change the results in any way. >> The formula comes from >> >> As=10Log10(1+eps^2.vs^2n) where v is normalised freq, n is order and >> As is stopband attenuation in dB. eps is the ripple factor previously >> calculated and vs is the normalise stopband freq.. >> So you re-arrange the above to find vs^2n=(10^0.1As-1)/eps^2 and by >> taking logs we find n=0.5Log[(10^0.1As-1)/eps^2] >> >> The Butterworth polynomial for say a 2nd order is >> >> s^2+sqrt(2)s+1 but this is for 3dB passband attenuation only. This >> will change for the (say) 1dB case and hence the filter with it. >> >> so the basic formula quoted is normally for the 3dB case. >> >> Your comments about the digital versions are all valid of course >> aswith any analogue to discrete conversion. >> >> Hardy > > Just to summarise the procedure without all the equations: > > Decide on type of filter reuqired - eg Lowpass,Highpass bandpass > > Specify a lowpass prototype using the following (for all filter types > ie Lowpass,Highpass,Bandpass etc) > > For a particular Passband freq wp and ws find the normailsed > equivalents vp=1 and wp/ws =vs > > For a particular dB passband attenuation Ap find the ripple factor > eps > > For a particular dB stopband attenuation As find the order n. (see > previous post) > > Find the radius of the poles using eps above and n > > Find the angle of the poles > > Construct the pole polynomial P(s) from the above two steps > > This gives us our low-pass prototype from which we can transform to > find the real filter. > > Find the real filter by first forming the prototype Hp(s)=1/P(s) where > P(s) is the pole polynomial found previosley. > > Then transform Lowpass to Lowpass s--> s/wp or Lowpass to highpass s-- >> ws/s and there are other transforms for lowpass to bandpass,lowpass > to bandsstop etc. > Lowpass to bandpass is s--->(s^2+w0^2)/Bs where B is bandwidth of > passband and w0 is the centre freq - normally the geometric root of wl > and wh which are at the lower and higher ends of the passband > respectively. Note that for this case when transforming a 2nd order > prototype only yields a first order "skirt" ie slope. > > Once you have all this you can realise the filter analogue style or do > the pre-warping and Bilinear transform for digital. You won't get > linear phase of course.
We speak different languages. On this side of the Atlantic, Butterworth means maximally flat, a condition achieved in the low-pass prototype by setting all the derivatives of A(f) to zero at f=0. There is no eps. The formula for A(f) is as Clay gave it, 1/sqrt(1+(f/fc)^2n), where n is the order of the filter. For a first-order filter, fc is 3 dB down and the rolloff is 6 dB/octve. For a second-order filter fc is 6 dB down and the rolloff is 12 dB/octve, and so on. Because A(f) falls monotonically as f increases, there is no ripple. There are many filters with no ripple, but only the Butterworth is maximally flat in the sense I defined above. Jerry -- Engineering is the art of making what you want from things you can get. &#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;
On 1 Feb, 00:52, Jerry Avins <j...@ieee.org> wrote:

> We speak different languages. On this side of the Atlantic, Butterworth > means maximally flat,
...
> Because A(f) falls monotonically as f > increases, there is no ripple. There are many filters with no ripple, > but only the Butterworth is maximally flat in the sense I defined above.
I think the problem is the definition of the term 'ripple'. If one interprets it literally, as something like 'fluctuating back and forth', then yes, the Butterworth has no ripple. If, on the other hand, one interprets the term as 'deviation from desired value', then it is immediately clear that the Butterworth lowpass filter has a non-zero ripple everywhere except at DC. I wasn't there to see what actually happened, but I wouldn't be surprised if the term 'ripple' was preferred over 'deviations from desired value' for rather pragmatic reasons... Rune
On 31 Jan, 23:51, HardySpicer <gyansor...@gmail.com> wrote:

> Just to summarise the procedure without all the equations:
The design of IIR filters from analog prototypes is an excellent excercise for several reasons: - Provides hands-on experience with a number of key concepts in DSP (ZT vs LT, BLT, pre-warping, frequency transforms, numerical root solvers, the various filter types, normalized vs desired filters, ...) - Produces a very useful tool at the end - Can be used as a case study for learning how to program efficiently, no matter what language. There are sufficiently many variables that the design becomes complicated, - Filter type: Butterworth, Cheb 1/2, Elliptic - Spec type: Lowpass, Highpass, Bandpass, Bandstop while at the same time few enough that one is able to keep track of what is going on. Try to implement *one* design procedure that can do all of the combinations above, *without* using a case/switch type construct (including cascaded if-tests) anywhere. It can be done (at least in C++), but one needs to understand both modular programming and the programming language, to achieve it. Rune