Reply by Jerry Avins November 2, 20042004-11-02
Number 6 wrote:

> "Jerry Avins" <jya@ieee.org> wrote in message > news:2tq3vtF21qhftU1@uni-berlin.de... > >>Randy Yates wrote: >> >> ... >> >> >>>Jeremy, >>> >>>Depending on the nature of the "garble" you are observing, this may >>>have nothing to do with the filter. A delta sigma modulator will >>>introduce "birdies" (highly correlated noise) into the output if it >>>isn't dithered. This could be what's happening. If you could throw up >>>time-domain and frequency-domain displays of the filter output on a >>>web site it would be helpful. >> >>It's also possible that, although your filter is mathematically correct, >>numerical difficulties such as overflow are what you see. As an aside, >>how do you distinguish a first-order Butterworth from any other >>first-order filter? >> > > > You cannot! Trick question as it hs one negative real pole of course - as > does a first order Chebyshev. > > Tom
My intent was not to trick, but to stimulate thought. When one specifies a first- (or even a second-) order Butterworth, one has not seen to the bottom of the problem. I mentioned that earlier in a related thread, but it didn't seem to sink in. Jerry -- Engineering is the art of making what you want from things you can get. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;
Reply by Number 6 November 2, 20042004-11-02
"Jerry Avins" <jya@ieee.org> wrote in message
news:2tq3vtF21qhftU1@uni-berlin.de...
> Randy Yates wrote: > > ... > > > Jeremy, > > > > Depending on the nature of the "garble" you are observing, this may > > have nothing to do with the filter. A delta sigma modulator will > > introduce "birdies" (highly correlated noise) into the output if it > > isn't dithered. This could be what's happening. If you could throw up > > time-domain and frequency-domain displays of the filter output on a > > web site it would be helpful. > > It's also possible that, although your filter is mathematically correct, > numerical difficulties such as overflow are what you see. As an aside, > how do you distinguish a first-order Butterworth from any other > first-order filter? >
You cannot! Trick question as it hs one negative real pole of course - as does a first order Chebyshev. Tom
Reply by Jerry Avins October 22, 20042004-10-22
Jeremy Smith wrote:
> I scrutinized my computer program. There is nothing wrong. > > Then, I reasoned how a decaying exponential behaves and how > a sigma-delta modulator works. The input to the modulator is > a sampled sine wave. The output of the modulator is a sequence > of delta pulses and enters the lowpass filter. > > I drastically increased the sampling rate. Now, the output of > the Butterworth filter resembles the analog sine wave. > > Initially, I had set the sampling rate to a frequency that is > just above the Nyquist frequency. Apparently, the Nyquist > frequency is too low. > > I am not familiar with sigma-delta modulators. I do not have the > theoretical requirement for the sampling frequency for such modulators. > My experiments tell me that the samplying frequency must be, at least, > 50x the Nyquist frequency. Does anyone have an explanation? > > The Butterworth filter seems to require a much higher sampling > frequency than the Sinc filter. Does anyone have an explanation? > > Jerry Avins <jya@ieee.org> wrote in message news:<2tqb29F22kiopU1@uni-berlin.de>... > >>The impulse response isn't the issue. A single sine into any linear >>system produces a sinusoidal output. You are seeing the effect of a >>nonlinearity of some sort. Separate the filter from the rest, feed it >>with a computed sine, and observe the output. After you fix it, put .it >>back and it will work.
An analog first-order filter has a rather slow roll-off: 20 dB/decade. Digital filters for which they are the prototype function reasonably well only at frequencies well below the sample rate. Filters designed with the impulse-invariance method are especially poor. Have you plotted the attenuation of your filter as a function of frequency? You may call your prototype a first-order Butterworth if you like. It is also a first-order Cauer, Chebychev, or any other type you like. The simplest prototype is an R-C rolloff. Second and higher order filters can be classified by type. Jerry -- Engineering is the art of making what you want from things you can get. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;
Reply by Randy Yates October 22, 20042004-10-22
x_luke@hotmail.com (Jeremy Smith) writes:

> I scrutinized my computer program. There is nothing wrong. > > Then, I reasoned how a decaying exponential behaves and how > a sigma-delta modulator works. The input to the modulator is > a sampled sine wave. The output of the modulator is a sequence > of delta pulses and enters the lowpass filter. > > I drastically increased the sampling rate. Now, the output of > the Butterworth filter resembles the analog sine wave. > > Initially, I had set the sampling rate to a frequency that is > just above the Nyquist frequency. Apparently, the Nyquist > frequency is too low. > > I am not familiar with sigma-delta modulators. I do not have the > theoretical requirement for the sampling frequency for such modulators. > My experiments tell me that the samplying frequency must be, at least, > 50x the Nyquist frequency. Does anyone have an explanation?
Yes. Have a look at http://home.earthlink.net/~yatescr/presentation.pdf Specifically, pay attention to figure 9, which relates oversampling ratio to modulator order to converter performance (# of bits).
> The Butterworth filter seems to require a much higher sampling > frequency than the Sinc filter. Does anyone have an explanation?
No, that doesn't make sense at all. The Butterwroth filter is IIR and should perform better than the sinc, which is FIR. Do you have the filter coefficients (the b and a vectors)? -- % Randy Yates % "And all that I can do %% Fuquay-Varina, NC % is say I'm sorry, %%% 919-577-9882 % that's the way it goes..." %%%% <yates@ieee.org> % Getting To The Point', *Balance of Power*, ELO http://home.earthlink.net/~yatescr
Reply by Jeremy Smith October 21, 20042004-10-21
I scrutinized my computer program.  There is nothing wrong.

Then, I reasoned how a decaying exponential behaves and how
a sigma-delta modulator works.  The input to the modulator is
a sampled sine wave.  The output of the modulator is a sequence
of delta pulses and enters the lowpass filter.

I drastically increased the sampling rate.  Now, the output of
the Butterworth filter resembles the analog sine wave.

Initially, I had set the sampling rate to a frequency that is
just above the Nyquist frequency.  Apparently, the Nyquist
frequency is too low.

I am not familiar with sigma-delta modulators.  I do not have the
theoretical requirement for the sampling frequency for such modulators.
My experiments tell me that the samplying frequency must be, at least,
50x the Nyquist frequency.  Does anyone have an explanation?

The Butterworth filter seems to require a much higher sampling
frequency than the Sinc filter.  Does anyone have an explanation?

Jerry Avins <jya@ieee.org> wrote in message news:<2tqb29F22kiopU1@uni-berlin.de>...
> The impulse response isn't the issue. A single sine into any linear > system produces a sinusoidal output. You are seeing the effect of a > nonlinearity of some sort. Separate the filter from the rest, feed it > with a computed sine, and observe the output. After you fix it, put .it > back and it will work.
Reply by Jerry Avins October 21, 20042004-10-21
Jeremy Smith wrote:

  ...

> Could you please tell me whether the impulse response (indicated in the > grandparent article) of the 1st order Butterworth filter is correct?
The impulse response isn't the issue. A single sine into any linear system produces a sinusoidal output. You are seeing the effect of a nonlinearity of some sort. Separate the filter from the rest, feed it with a computed sine, and observe the output. After you fix it, put .it back and it will work. Jerry -- Engineering is the art of making what you want from things you can get. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;
Reply by Jeremy Smith October 21, 20042004-10-21
Randy Yates <yates@ieee.org> wrote in message news:<3c08xy6d.fsf@ieee.org>...
> x_luke@hotmail.com (Jeremy Smith) writes: > > [...]The impulse response of the first order Butterworth filter is > > a decaying one-sided exponential. Suppose that the filter is > > 1/(1 + j f/fc ). Then, the impulse response is > > 2 pi fc exp(-(2 pi fc) t) u(t). Here pi = 3.14159... > > u(t) is the unit step. fc is the cutoff frequency. > > > > The input of my sigma-delta modulator is a simple sine wave. I > > feed the output of the modulator into the Butterworth filter. > > The output of the filter should be the original sine wave. > > I have already set fc appropriately. However, the output is > > garbled although it has the same frequency as my input sine wave. > > [...] > > When I feed the modulator's output into an ideal lowpass filter > > (with impulse response being sinc()), the output of the filter is > > the original sine wave. > > > > What is wrong with my Butterworth filter? Is the impulse response > > of the filter incorrect? > > Jeremy, > > Depending on the nature of the "garble" you are observing, this may > have nothing to do with the filter. A delta sigma modulator will > introduce "birdies" (highly correlated noise) into the output if it > isn't dithered. This could be what's happening. If you could throw up > time-domain and frequency-domain displays of the filter output on a > web site it would be helpful.
Please describe "birdies". The "garble" in my case is the following. Imagine a sine wave at the output of the Butterworth filter. Then at every 5th point on the sine wave, draw a vertical line that is 1/3 of the amplitude of the sine wave. The vertical line is centered on each 5th point of the sine wave. (I am plotting the output in a window of my computer. Here, "point" means a pixel on the screen.) However, if I switch the Butterworth filter to a Sinc() filter, the output is a near perfect sine wave without any distortion. Could you please tell me whether the impulse response (indicated in the grandparent article) of the 1st order Butterworth filter is correct?
Reply by Jerry Avins October 21, 20042004-10-21
Randy Yates wrote:

  ...

> Jeremy, > > Depending on the nature of the "garble" you are observing, this may > have nothing to do with the filter. A delta sigma modulator will > introduce "birdies" (highly correlated noise) into the output if it > isn't dithered. This could be what's happening. If you could throw up > time-domain and frequency-domain displays of the filter output on a > web site it would be helpful.
It's also possible that, although your filter is mathematically correct, numerical difficulties such as overflow are what you see. As an aside, how do you distinguish a first-order Butterworth from any other first-order filter? Jerry -- Engineering is the art of making what you want from things you can get. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;
Reply by Randy Yates October 21, 20042004-10-21
x_luke@hotmail.com (Jeremy Smith) writes:

> I have been experimenting with a Butterworth filter. I must > be making a mistake. Here is my problem. > > The impulse response of the first order Butterworth filter is > a decaying one-sided exponential. Suppose that the filter is > 1/(1 + j f/fc ). Then, the impulse response is > 2 pi fc exp(-(2 pi fc) t) u(t). Here pi = 3.14159... > u(t) is the unit step. fc is the cutoff frequency. > > The input of my sigma-delta modulator is a simple sine wave. I > feed the output of the modulator into the Butterworth filter. > The output of the filter should be the original sine wave. > I have already set fc appropriately. However, the output is > garbled although it has the same frequency as my input sine wave. > > When I say "feed", I mean that I am analytically performing > the convolution of the filter's impulse response and the > modulator's output. I am doing the convolution in the > time domain, using the decaying one-sided exponential. > > When I feed the modulator's output into an ideal lowpass filter > (with impulse response being sinc()), the output of the filter is > the original sine wave. > > What is wrong with my Butterworth filter? Is the impulse response > of the filter incorrect?
Jeremy, Depending on the nature of the "garble" you are observing, this may have nothing to do with the filter. A delta sigma modulator will introduce "birdies" (highly correlated noise) into the output if it isn't dithered. This could be what's happening. If you could throw up time-domain and frequency-domain displays of the filter output on a web site it would be helpful. -- % Randy Yates % "She's sweet on Wagner-I think she'd die for Beethoven. %% Fuquay-Varina, NC % She love the way Puccini lays down a tune, and %%% 919-577-9882 % Verdi's always creepin' from her room." %%%% <yates@ieee.org> % "Rockaria", *A New World Record*, ELO http://home.earthlink.net/~yatescr
Reply by Jeremy Smith October 21, 20042004-10-21
I have been experimenting with a Butterworth filter.  I must
be making a mistake.  Here is my problem.

The impulse response of the first order Butterworth filter is
a decaying one-sided exponential.  Suppose that the filter is
1/(1 + j f/fc ).  Then, the impulse response is
2 pi fc exp(-(2 pi fc) t) u(t).  Here pi = 3.14159...
u(t) is the unit step.  fc is the cutoff frequency.

The input of my sigma-delta modulator is a simple sine wave.  I
feed the output of the modulator into the Butterworth filter.
The output of the filter should be the original sine wave.
I have already set fc appropriately.  However, the output is
garbled although it has the same frequency as my input sine wave.

When I say "feed", I mean that I am analytically performing
the convolution of the filter's impulse response and the
modulator's output.  I am doing the convolution in the
time domain, using the decaying one-sided exponential.

When I feed the modulator's output into an ideal lowpass filter
(with impulse response being sinc()), the output of the filter is
the original sine wave.

What is wrong with my Butterworth filter?  Is the impulse response
of the filter incorrect?