DSPRelated.com
Forums

About Butterworth IIR filter ^_^

Started by sxy6z July 4, 2009
Dirk Bell wrote:
> On Jul 4, 8:49 pm, "sxy6z" <icipiq...@yahoo.com.cn> 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 ~~- 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.
This just shows that, too observe the true nature of the filtered waveform, reconstruction filtering (or its equivalent for the purpose) needs to be applied. 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;
On Jul 5, 10:47&#4294967295;am, Jerry Avins <j...@ieee.org> wrote:
> Dirk Bell wrote: > > On Jul 4, 8:49 pm, "sxy6z" <icipiq...@yahoo.com.cn> wrote: > >>> On Sat, 04 Jul 2009 10:40:44 -0500, sxy6z wrote: > >>>> Hello Masters: > >>>> &#4294967295; &#4294967295; &#4294967295; 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 &#4294967295;wave are not the same. > >>>> for example, maybe one is 0.9994 and another is 0.977 etc. > >>>> &#4294967295; &#4294967295; &#4294967295; In fact, Some FIR filters also have this phenomenon. It confused > >>>> &#4294967295; &#4294967295; &#4294967295; me. > >>>> &#4294967295; &#4294967295; &#4294967295; Any remarks are appreciated and thank you very much~~ > >>> Do you mean that different frequencies of sine waves have different > >>> amplitudes? &#4294967295;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. &#4294967295;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. > > This just shows that, too observe the true nature of the filtered > waveform, reconstruction filtering (or its equivalent for the purpose) > needs to be applied. > > 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;- Hide quoted text - > > - Show quoted text -
BTW, in the second case I mentioned, if the answer to the last question is FALSE, while the "peak" value you get will be repetitive, unless your timing is perfect, it will not be the true peak of the sinusoidal waveform. So Jerry's comment is applicable to both cases. Dirk Bell