Re: why we want to do folding while performing convolution
- From: "Andor" <andor.bariska@xxxxxxxxx>
- Date: 28 Jul 2006 06:17:50 -0700
jim wrote:
Andor wrote:
jim wrote:
Andor wrote:
That's true. But choosing the center of the kernel as zero-index can
only be done for kernels of an odd size ...
Well, not really. If you limit your indexing capability to whole
integers then you are saddled with that limitation (in other words, if
you require your reference zero to land on a sample point only odd sized
kernels will be allowed). But there is no mathematical reason preventing
you from setting zero to half way between two samples.
Interesting. Let's say you have a first order difference filter (two
coefficients). How does a symmetric indexing scheme work with this
filter?
First of all as you stated in the first post that I replied to, the
shift theorem tells you how much to shift to eliminate the linear phase
term, so you should be able to work it out from that alone.
The shift theorem works only for integer shifts. For non-integer shifts
periodic interpolation in time-domain is performed. This does not
result in the same filter as with bandlimited interpolation. For
example, the first difference filter h = [1 -1] using a shift of 1/2
results in the zero filter (h[k] = cos(2 pi k) => h[k+1/2] = cos(2 pi
(k+1/2)) = 0). Contrast this to bandlimited interpolation of h when
shifted by 1/2 which results in the two-sided antisymmetric IIR filter
h_{1/2} = [ ... -0.339531, 0.848826, 0, -0.848826, 0.339531, .... ]
Remember,
The indices themselves are shifts and the entire kernel can be
decomposed into single shifted impulses. If instead you choose to
decompose into symmetrical and anti symmetrical parts then each part is
composed of matched pairs of impulses where the distance between is
increasing by 2.
For computing the frequency response for kernel of length N that can be
boiled down to this:
For a odd length filter -> sum of sines and cosines with even multiples
of Pi (0, 2, 4, ... N-1)
For a even length filter -> sum of sines and cosines with odd multiples
of Pi (1, 3, 5, ... N-1)
So if your filter was [3 -1]. That decomposes to [1 1] and [2 -2]
and thus the frequency response is cos(pi) + 2*sin(pi)
I'm not quite sure where you are going with your calculation. The
frequency response of the filter [3 -1] is
H(w) = 3 - exp(-j w),
and its magnitude squared response is
|H(w)|^2 = 10 - 6 cos(w).
I don't see how your formula can be turned into either of those.
Anycase, we were discussing the frequency domain equivalent of
time-reversing the filter kernel. It is easy to show in this example
how time-reversion implies conjugation of the frequency response and
the multiplication of the linear-phase term corresponding to a time
shift:
H_r(w) = -1 + 3 exp(-j w) = exp(-j w) (- exp(j w) + 3) = exp(-j w)
H(w)*
Regards,
Andor
.
- Follow-Ups:
- References:
- why we want to do folding while performing convolution
- From: sk
- Re: why we want to do folding while performing convolution
- From: Chris Bore
- Re: why we want to do folding while performing convolution
- From: Andor
- Re: why we want to do folding while performing convolution
- From: jim
- Re: why we want to do folding while performing convolution
- From: Andor
- Re: why we want to do folding while performing convolution
- From: jim
- Re: why we want to do folding while performing convolution
- From: Andor
- Re: why we want to do folding while performing convolution
- From: jim
- why we want to do folding while performing convolution
- Prev by Date: Re: why we want to do folding while performing convolution
- Next by Date: Re: my (not so) little project
- Previous by thread: Re: why we want to do folding while performing convolution
- Next by thread: Re: why we want to do folding while performing convolution
- Index(es):
Relevant Pages
|