hi if you pass a signal through two same order filters both having the same coefficients, does it make any difference if you just use only one? i know the response is effectively twice the order with both, but if coeffs are the same why would the response be different between using one or both filters? _____________________________ Posted through www.DSPRelated.com
filter twice
Started by ●February 11, 2014
Reply by ●February 11, 20142014-02-11
On Tue, 11 Feb 2014 13:53:38 -0600, "jonjames" <99436@dsprelated> wrote:>hi >if you pass a signal through two same order filters both having the same >coefficients, does it make any difference if you just use only one? i know >the response is effectively twice the order with both, but if coeffs are >the same why would the response be different between using one or both >filters?Convolve the two coefficient sets together, and you'll get the impulse response of the combination of the two filters. So, yes, the coefficients matter. Eric Jacobsen Anchor Hill Communications http://www.anchorhill.com
Reply by ●February 11, 20142014-02-11
"jonjames" <99436@dsprelated> writes:> hi > if you pass a signal through two same order filters both having the same > coefficients, does it make any difference if you just use only one? i know > the response is effectively twice the order with both, but if coeffs are > the same why would the response be different between using one or both > filters?Hi, Reduce the problem to the trivial case: a one-tap filter, i.e., a gain. Let the gain be denoted "a". Then with one filter, y(t) = a * x(t). With two filters, y(t) = a^2 * x(t). Is a = a^2? Only in a couple of special cases. The effect is more complex with multiple coefficients. For one thing, the passband ripple is worsened, assuming you have a lowpass, bandpass, or highpass filter. In general, if the single filter's system response is H(f), then the double filter's response is H^2(f), or |G(f)| = |H(f)|^2 and arg(G(f)) = 2 * arg(H(f)) where G(f) is the double filter. -- Randy Yates Digital Signal Labs http://www.digitalsignallabs.com
Reply by ●February 11, 20142014-02-11
On Wednesday, February 12, 2014 8:53:38 AM UTC+13, jonjames wrote:> hi > > if you pass a signal through two same order filters both having the same > > coefficients, does it make any difference if you just use only one? i know > > the response is effectively twice the order with both, but if coeffs are > > the same why would the response be different between using one or both > > filters? > > > > > > > > _____________________________ > > Posted through www.DSPRelated.comIf you squeeze and distort a square peg through a round hole and then pass it through a second time, the second time around it will drop through no problem. This is your thinking and it works for some things. However, you're not thinking convolution. A second order system in cascade with an identical one gives a 4th order filter. The slope is doubled and so is the phase shift.
Reply by ●February 11, 20142014-02-11
On 2/11/14 5:22 PM, gyansorova@gmail.com wrote:> On Wednesday, February 12, 2014 8:53:38 AM UTC+13, jonjames wrote: >> hi >> if you pass a signal through two same order filters both having the same >> coefficients, does it make any difference if you just use only one? i know >> the response is effectively twice the order with both, but if coeffs are >> the same why would the response be different between using one or both >> filters? >> > > If you squeeze and distort a square peg through a round hole and then pass it through a second time, the second time around it will drop through no problem. This is your thinking and it works for some things. However, you're not thinking convolution. A second order system in cascade with an identical one gives a 4th order filter. The slope is doubled and so is the phase shift.in the special case of perfect brick-wall filters, this sorta makes a little sense. rect(f/f0) times rect(f/f0) is still just rect(f/f0) (i guess that means that sinc(f0 t) convolved with itself leaves it unchanged.) that's because 1x1=1 and 0x0=0 . but it is not generally true that AxA=A. -- r b-j rbj@audioimagination.com "Imagination is more important than knowledge."
Reply by ●February 11, 20142014-02-11
On Tue, 11 Feb 2014 13:53:38 -0600, jonjames wrote:> hi if you pass a signal through two same order filters both having the > same coefficients, does it make any difference if you just use only one? > i know the response is effectively twice the order with both, but if > coeffs are the same why would the response be different between using > one or both filters?If you cut off and discard half a board, then do it again, is the result different than if you only do it once? Signal filters aren't like coffee filters, where two in a row just gets you coffee slower. They're more like frequency-selective "cut and discard" operations. (Note that Eric's answer about convolving twice is just as valid as what I'm trying to say, only he's thinking in the time domain and I'm thinking in the frequency domain.) So yes, the result will be different. And sometimes it's perfectly valid to have a filtering operation that is just the same primitive filtering operation implemented twice in a row. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com
Reply by ●February 11, 20142014-02-11
On 2/11/14 7:35 PM, Tim Wescott wrote:> On Tue, 11 Feb 2014 13:53:38 -0600, jonjames wrote: > >> hi if you pass a signal through two same order filters both having the >> same coefficients, does it make any difference if you just use only one? >> i know the response is effectively twice the order with both, but if >> coeffs are the same why would the response be different between using >> one or both filters? > > If you cut off and discard half a board, then do it again, is the result > different than if you only do it once?how 'bout if you saw the board to 4 inches width (using a table saw) and then, without touching the setup of the table saw, you pass that 4 inch board through the saw again?> > Signal filters aren't like coffee filters, where two in a row just gets > you coffee slower. They're more like frequency-selective "cut and > discard" operations. > > (Note that Eric's answer about convolving twice is just as valid as what > I'm trying to say, only he's thinking in the time domain and I'm thinking > in the frequency domain.) > > So yes, the result will be different. And sometimes it's perfectly valid > to have a filtering operation that is just the same primitive filtering > operation implemented twice in a row.sometimes, to get linear phase with an IIR, we pass it through once in forward time and the result of that we pass through the same filter *backwards*. it's called "filtfilt()".>-- r b-j rbj@audioimagination.com "Imagination is more important than knowledge."
Reply by ●February 11, 20142014-02-11
Den tirsdag den 11. februar 2014 21.14.15 UTC+1 skrev Randy Yates:> "jonjames" <99436@dsprelated> writes: > > > > > hi > > > if you pass a signal through two same order filters both having the same > > > coefficients, does it make any difference if you just use only one? i know > > > the response is effectively twice the order with both, but if coeffs are > > > the same why would the response be different between using one or both > > > filters? > > > > Hi, > > > > Reduce the problem to the trivial case: a one-tap filter, i.e., a gain. > > Let the gain be denoted "a". Then with one filter, y(t) = a * x(t). With > > two filters, y(t) = a^2 * x(t). Is a = a^2? Only in a couple of special > > cases. > > > > The effect is more complex with multiple coefficients. For one thing, > > the passband ripple is worsened, assuming you have a lowpass, bandpass, > > or highpass filter. >is it? isn't filtering twice just another case of this?: https://ccrma.stanford.edu/~jos/fp2/Forward_Backward_Filtering.html that claims passband ripple in improved -Lasse
Reply by ●February 11, 20142014-02-11
langwadt@fonz.dk writes:> Den tirsdag den 11. februar 2014 21.14.15 UTC+1 skrev Randy Yates: >> "jonjames" <99436@dsprelated> writes: >> >> >> >> > hi >> >> > if you pass a signal through two same order filters both having the same >> >> > coefficients, does it make any difference if you just use only one? i know >> >> > the response is effectively twice the order with both, but if coeffs are >> >> > the same why would the response be different between using one or both >> >> > filters? >> >> >> >> Hi, >> >> >> >> Reduce the problem to the trivial case: a one-tap filter, i.e., a gain. >> >> Let the gain be denoted "a". Then with one filter, y(t) = a * x(t). With >> >> two filters, y(t) = a^2 * x(t). Is a = a^2? Only in a couple of special >> >> cases. >> >> >> >> The effect is more complex with multiple coefficients. For one thing, >> >> the passband ripple is worsened, assuming you have a lowpass, bandpass, >> >> or highpass filter. >> > > is it? isn't filtering twice just another case of this?: > > https://ccrma.stanford.edu/~jos/fp2/Forward_Backward_Filtering.html > > that claims passband ripple in improvedAs I read that, he didn't claim that passband ripple was improved. He said that it is doubled, which is worse, since we want the passband ripple to be as small as possible. However, he did say the stopband attenuation is doubled, which is good. And that would also be the case here. Whether stopband or passband is considered, there will be a difference between filtering once and filtering twice (unless the passband is exactly 1 and the stopband exactly 0, which is not likely). -- Randy Yates Digital Signal Labs http://www.digitalsignallabs.com
Reply by ●February 11, 20142014-02-11
robert bristow-johnson <rbj@audioimagination.com> wrote: (snip, someone wrote)>> If you cut off and discard half a board, then do it again, >> is the result different than if you only do it once?> how 'bout if you saw the board to 4 inches width (using a table saw) and > then, without touching the setup of the table saw, you pass that 4 inch > board through the saw again?There are some filters like that, but they are not LTI, and often aren't frequency sensitive. Consider AGC (automatic gain control) or various kinds of limiters.>> Signal filters aren't like coffee filters, where two in a row >> just gets you coffee slower. They're more like >> frequency-selective "cut and discard" operations.-- glen






