Forums

About Butterworth IIR filter ^_^

Started by sxy6z July 4, 2009
Hello Masters:

      When I develop a Butterwoth IIR filter. there is a strange
phnomenon. After filter a standard sine signal with it, noise signal has
been removed. but the amplitudes/peaks of each  wave are not the same. for
example, maybe one is 0.9994 and another is 0.977 etc.
      In fact, Some FIR filters also have this phenomenon. It confused me.

      Any remarks are appreciated and thank you very much~~ 


On Jul 4, 11:40&#2013266080;am, "sxy6z" <icipiq...@yahoo.com.cn> wrote:
> Hello Masters: > > &#2013266080; &#2013266080; &#2013266080; When I develop a Butterwoth IIR filter. there is a strange > phnomenon. After filter a standard sine signal with it, noise signal has > been removed. but the amplitudes/peaks of each &#2013266080;wave are not the same. for > example, maybe one is 0.9994 and another is 0.977 etc. > &#2013266080; &#2013266080; &#2013266080; In fact, Some FIR filters also have this phenomenon. It confused me.
could this be... FREQUENCY RESPONSE? r b-j
sxy6z <icipiq_ka@yahoo.com.cn> wrote:

> Hello Masters:
> When I develop a Butterwoth IIR filter. there is a strange > phnomenon. After filter a standard sine signal with it, noise > signal has been removed. but the amplitudes/peaks of each wave > are not the same. for example, maybe one is 0.9994 and another > is 0.977 etc.
Not normal. You have a bug somewhere. Steve
On 4 Jul, 20:57, spop...@speedymail.org (Steve Pope) wrote:
> sxy6z <icipiq...@yahoo.com.cn> wrote: > > Hello Masters: > > When I develop a Butterwoth IIR filter. there is a strange > > phnomenon. After filter a standard sine signal with it, noise > > signal has been removed. but the amplitudes/peaks of each &#2013266080;wave > > are not the same. for example, maybe one is 0.9994 and another > > is 0.977 etc. > > Not normal. &#2013266080;You have a bug somewhere.
Seems slike an overflow in the pole vault. Maybe in the Bubka coefficient? Shouldn't be higher than about 6.14-6.15. Rune
On Jul 4, 8:40&#2013266080;am, "sxy6z" <icipiq...@yahoo.com.cn> wrote:
> Hello Masters: > > &#2013266080; &#2013266080; &#2013266080; When I develop a Butterwoth IIR filter. there is a strange > phnomenon. After filter a standard sine signal with it, noise signal has > been removed. but the amplitudes/peaks of each &#2013266080;wave are not the same. for > example, maybe one is 0.9994 and another is 0.977 etc. > &#2013266080; &#2013266080; &#2013266080; In fact, Some FIR filters also have this phenomenon. It confused me. > > &#2013266080; &#2013266080; &#2013266080; Any remarks are appreciated and thank you very much~~
Look at the frequency response and calculate what the magnitude should be. It will drop depending on the passband attenuation. How many dB attenuation in the passband is there? 3dB? Hardy
On Sat, 04 Jul 2009 10:40:44 -0500, sxy6z wrote:

> Hello Masters: > > When I develop a Butterwoth IIR filter. there is a strange > phnomenon. After filter a standard sine signal with it, noise signal has > been removed. but the amplitudes/peaks of each wave are not the same. > for example, maybe one is 0.9994 and another is 0.977 etc. > In fact, Some FIR filters also have this phenomenon. It confused > me. > > Any remarks are appreciated and thank you very much~~
Do you mean that different frequencies of sine waves have different amplitudes? If so, you're just seeing the fact that a Butterworth filter has a DC gain of 1 and AC gains that are all strictly less than 1. If you mean that you put _one_ sine wave through it, and that one sine wave has peaks at different values, then you are either seeing the transient response of the filter superimposed on it's continuous response, or you are seeing the results of a bug in your code. -- http://www.wescottdesign.com
>On Sat, 04 Jul 2009 10:40:44 -0500, sxy6z wrote: > >> Hello Masters: >> >> When I develop a Butterwoth IIR filter. there is a strange >> phnomenon. After filter a standard sine signal with it, noise signal
has
>> been removed. but the amplitudes/peaks of each wave are not the same. >> for example, maybe one is 0.9994 and another is 0.977 etc. >> In fact, Some FIR filters also have this phenomenon. It confused >> me. >> >> Any remarks are appreciated and thank you very much~~ > >Do you mean that different frequencies of sine waves have different >amplitudes? If so, you're just seeing the fact that a Butterworth filter
>has a DC gain of 1 and AC gains that are all strictly less than 1. > >If you mean that you put _one_ sine wave through it, and that one sine >wave has peaks at different values, then you are either seeing the >transient response of the filter superimposed on it's continuous >response, or you are seeing the results of a bug in your code. > >-- >http://www.wescottdesign.com >
Signal is single frequency 0.5Hz. the peak of each wave is not the same. the added noise frequecy is random noise. After filter, different peaks have different value. Feel some difficult to discribe clearly. hehe ~~
sxy6z <icipiq_ka@yahoo.com.cn> wrote:

>Signal is single frequency 0.5Hz. the peak of each wave is not the same. >the added noise frequecy is random noise. After filter, different peaks >have different value. Feel some difficult to discribe clearly. hehe ~~
This could be additive, low-frequency noise that is not being filtered out. Steve
On Sat, 04 Jul 2009 19:49:04 -0500, sxy6z wrote:

>>On Sat, 04 Jul 2009 10:40:44 -0500, sxy6z wrote: >> >>> Hello Masters: >>> >>> When I develop a Butterwoth IIR filter. there is a strange >>> phnomenon. After filter a standard sine signal with it, noise signal > has >>> been removed. but the amplitudes/peaks of each wave are not the same. >>> for example, maybe one is 0.9994 and another is 0.977 etc. >>> In fact, Some FIR filters also have this phenomenon. It confused >>> me. >>> >>> Any remarks are appreciated and thank you very much~~ >> >>Do you mean that different frequencies of sine waves have different >>amplitudes? If so, you're just seeing the fact that a Butterworth >>filter > >>has a DC gain of 1 and AC gains that are all strictly less than 1. >> >>If you mean that you put _one_ sine wave through it, and that one sine >>wave has peaks at different values, then you are either seeing the >>transient response of the filter superimposed on it's continuous >>response, or you are seeing the results of a bug in your code. >> >>-- >>http://www.wescottdesign.com >> >> > Signal is single frequency 0.5Hz. the peak of each wave is not the same. > the added noise frequecy is random noise. After filter, different peaks > have different value. Feel some difficult to discribe clearly. hehe ~~
Quantization noise? -- http://www.wescottdesign.com
On Jul 4, 8:49&#2013266080;pm, "sxy6z" <icipiq...@yahoo.com.cn> wrote:
> >On Sat, 04 Jul 2009 10:40:44 -0500, sxy6z wrote: > > >> Hello Masters: > > >> &#2013266080; &#2013266080; &#2013266080; When I develop a Butterwoth IIR filter. there is a strange > >> phnomenon. After filter a standard sine signal with it, noise signal > has > >> been removed. but the amplitudes/peaks of each &#2013266080;wave are not the same. > >> for example, maybe one is 0.9994 and another is 0.977 etc. > >> &#2013266080; &#2013266080; &#2013266080; In fact, Some FIR filters also have this phenomenon. It confused > >> &#2013266080; &#2013266080; &#2013266080; me. > > >> &#2013266080; &#2013266080; &#2013266080; Any remarks are appreciated and thank you very much~~ > > >Do you mean that different frequencies of sine waves have different > >amplitudes? &#2013266080;If so, you're just seeing the fact that a Butterworth filter > >has a DC gain of 1 and AC gains that are all strictly less than 1. > > >If you mean that you put _one_ sine wave through it, and that one sine > >wave has peaks at different values, then you are either seeing the > >transient response of the filter superimposed on it's continuous > >response, or you are seeing the results of a bug in your code. > > >-- > >http://www.wescottdesign.com > > Signal is single frequency 0.5Hz. the peak of each wave is not the same. > the added noise frequecy is random noise. After filter, different peaks > have different value. Feel some difficult to discribe clearly. hehe ~~- Hide quoted text - > > - Show quoted text -
1) You did add random wideband noise that may be mostly filtered out but the remaining noise (i.e. noise not in stopband) still remains and will be added to all samples including the peaks, so they wouldn't be the same value. Steve Pope I believe was referring to this. 2) Even if you did not add any noise, and if the sine wave is essentially pure, and there is no quantization noise, and you let the filter transient die out, you can get peaks of different amplitudes depending on the relationship of the input frequency, sampling frequency, and when you take the samples. Is the 0.5Hz wave mathematically generated and fed into your filter code? What is the sample rate? Is there an integer number of samples per cycle of the 0.5 Hz waveform? If the answer to the last question in 2) is not TRUE, the "peak" (largest sample in that half of the sinusoidal cycle) will not be regularly sampled at the actual peak time of the waveform and the "peak" amplitude may wander a bit. Dirk Bell