From: Jerry Avins on
Rune Allnor wrote:
> On 1 Feb, 00:52, Jerry Avins <j...(a)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.

It does the art no good to debase clear terms. if "ripple" is
interpreted to mean "deviation from desired value", then nearly every
filter, calculated transfer function, and approximation will exhibit
ripple. We will need to invent a new term. "Actual ripple" perhaps?

> 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...

A lot of sloppy language gets used, most of it informally. We will lose
the ability to communicate if we adopt every illogical neologism.

Jerry
--
Engineering is the art of making what you want from things you can get.
�����������������������������������������������������������������������
From: rickman on
On Jan 28, 7:57 am, "rammya.tv" <rammya...(a)ymail.com> wrote:
> hi all
>   i would like to know the technical description or derivation about
> the slope of a filter
> ie
> why we say that 1st order filters have a 20 dB/decade (or 6 dB/octave)
> slope.
>
> with regards
> rammya

I see you got a lot of replies, but not an answer. I have always had
to "understand" things like this on a physical basis rather than a
purely mathematical basis, so I think I can answer your question so
you will understand it too.

A 1st order filter would use a single reactive component such as a low
pass filter with one capacitor and one resistor.

Vin R
>-------\/\/\------+---------> output
|
|
---
--- C
|
|
---
V

The output voltage is just Vout = Vin * Xc/(R+Xc). Xc is 1/2pi*f*C.

When f is large (well above the corner frequency where Xc = R), Xc is
small and R+Xc is approximately R. So Vout/Vin = Xc/R or

Vout/Vin = 1/(2pi*R*C*f)

So as F changes by a factor of two, the output voltage changes by a
factor of two. A voltage change of a factor of two results in 3 dB
voltage, but dB is conventionally expressed as a power ratio, since P
= V**2/R the result is 6 dB power per octave.

Does that help?

I think a lot of newbies have trouble with decibels more so than the
applications of them. For example, it is common to talk about a -3 dB
point in filters and other applications, but that does not mean the
voltage is half of the 0 dB point. The *power* is half and R = Xc in
the example above, but the reactive component is not in phase with the
resistive component so that the voltages do not add up. Each voltage
is sqrt(2) times the 0dB value.

Maybe this was just a problem for me when I was learning this stuff.
But I find a lot of people don't really get decibels.

Rick
From: HardySpicer on
On Feb 1, 12:52 pm, Jerry Avins <j...(a)ieee.org> wrote:
> HardySpicer wrote:
> > On Feb 1, 9:33 am, HardySpicer <gyansor...(a)gmail.com> wrote:
> >> On Jan 31, 9:10 pm, Rune Allnor <all...(a)tele.ntnu.no> wrote:
>
> >>> On 31 Jan, 08:15, HardySpicer <gyansor...(a)gmail.com> wrote:
> >>>> On Jan 31, 6:45 pm, Rune Allnor <all...(a)tele.ntnu.no> wrote:
> >>>>> On 31 Jan, 03:22, Jerry Avins <j...(a)ieee.org> wrote:
> >>>>>> HardySpicer wrote:
> >>>>>>> On Jan 31, 6:20 am, Jerry Avins <j...(a)ieee.org> wrote:
> >>>>>>>> HardySpicer wrote:
> >>>>>>>>> On Jan 29, 8:59 am, Clay <c...(a)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.
> >>>>>>>> ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
> >>>>>>> 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.
> ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯

As I said it's just because the "ripple factor" is a generalisation
that it is called that. The ripple effect does not apply to
Butterworth - only the attenuation in the passband which need not be
limited to 3dB or 6dB etc..

Hardy
From: Rune Allnor on
On 1 Feb, 19:18, HardySpicer <gyansor...(a)gmail.com> wrote:
> I still don't understand how you go
> about designing a Butterworth filter with say a 1dB attenuation in the
> passband at 1kHz and a 40 dB attenuation in the stopband at 20kHz? Do
> you define only 3dB attenuations and 'work back"?

Start with (view with fixed-width font)

1
H(w) = -------------- [1]
1+(Wp'/Wc)^2N

where N has been determined from the spec, as
indicated earlier. Define Wc == 1, and get

1
Dp = ---------- [2]
1+Wp'^2N

Here, Wp' is *a* frequency Wp' < 1 where the attenuation is Dp.
Solve [2] for Wp' to find

Wp' = (Dp^(-2)-1)^(1/2N) [3]

Proceed to find the coefficients of the N'th order filter.

Last, apply a LP -> LP frequency transform that maps the
design frequency Wp' to the target frequency Wp.

Job done. In s domain. All the DT <-> CT domain mappings
need to be added, if you want a DT filter.

Rune
From: Jerry Avins on
HardySpicer wrote:

...

>> So if the shelf I had intended to be level is a bit low on one end, it
>> ripples? Come on, now. As verbs, "ripple" and "undulate" are synonyms.
>>
>
> I don't think you are right there. although the use of the word ripple
> factor is clearly a miss-noma I still don't understand how you go
> about designing a Butterworth filter with say a 1dB attenuation in the
> passband at 1kHz and a 40 dB attenuation in the stopband at 20kHz? Do
> you define only 3dB attenuations and 'work back"?

All low-pass Butterworth filters of the same order have the same shape
when plotted in normalized co-ordinates, f/fc and log gain. What is
usually specifies is maximum attenuation in the passband and rate of
attenuation in the stopband. The stopband rate in dB/decade is always a
multiple of 20, and the multiple is the order. (A third-order filter
rolls off at 60 dB/decade.)

Given the maximum attenuation allowed in the passband, i.e., the minimum
A(f) in the passband, and the order n, it is easy to solve A(f) =
1/sqrt(1+(f/fc)^2n) for fc.

For your filter (1dB attenuation in the passband at 1kHz and a 40 dB
attenuation in the stopband at 20kHz) the rules of thumb indicate that a
first-order filter with fc=2 KHz meets the spec. (The response will be 1
dB down at fc/2, 3 dB down at fc, 5 dB down at 2fc, and 20 dB down at
10fc. You picked the kind of easy numbers I would use on a quiz.)

An alternate solution that I would rarely use associates 2 values of
A(f) with assigned values of f and solves the simultaneous equations for
n and fc. Of course, one rounds n up to an integer.

Jerry

P.S. A first-order Butterworth (and Chebychev!) is a simple R-C.
--
Engineering is the art of making what you want from things you can get.
�����������������������������������������������������������������������