Re: Interpolation And Low-Pass filtering
- From: "Fred Marshall" <fmarshallx@xxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 16 Dec 2005 10:14:55 -0800
"Himanshu" <hs.chauhan@xxxxxxxxx> wrote in message
news:1134741316.351797.113470@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> Fred,
>
> I have a few questions. Sorry, If you find them really dumb, but I want
> to be crystal clear about these facts.
> So, here I go...
>
>>4) Lowpass filter by multiplying in frequency. This >does the
>>interpolation.
>
> How does it do the interpolation? How actually are the zero values
> converted to non-zero values? Is there anything I am missing?
>
>>Replace steps 3 and 4 with:
>>3) zero pad the FFT around fs/2 to get the MN samples >you need.
>>4) IFFT to get the interpolated time sequence.
>>[Purists will point out, rightly so, that this is the
>>same as multiplying by
>>a "perfect" lowpass filter - but without the multiplies >of course].
>
> This causes no problem because we are padding zero. What if we padded
> some non-zero values? Thats going to cause
> problems, I think.
>
>>If we zero pad a time sequence we are tacitly making >the assumption that
>>the
>>nonzero part is a single period of a periodic waveform. >So, it's already
>>time-limited in that sense because of the assumed >periodicity. When we
>>zero
>>stuff or, equivalently, multiply multiple periods by >zero, the
>>corresponding
>>frequency domain affect is to convolve the spectrum >with a sinc.
>
> What is meant by multiplying multiple periods by zeros.
> That would zero them out! And how's that equivalent to convolving
> spectrum with a sinc?
>
> I would really like to continue this discussion further
> until I am really clear with all that stuff.
>
> Thanks for you help, Fred.
Himanshu,
>>4) Lowpass filter by multiplying in frequency. This >does the
>>interpolation.
>
> How does it do the interpolation? How actually are the zero values
> converted to non-zero values? Is there anything I am missing?
>
Here is a somewhat lengthy description accompanied by "cartoons" of the
transform pairs at each step:
INTERPOLATION OF TIME SAMPLES
| | | | | |
x x x x x x x
| x |x x|x x|x x|x x|x x|
| | x | | | | | |
| | | | | | | | |
| | x | | | | | | |
| | | <-> | | | | | | |
| | | | <-> | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| T | T | T | | | | | | |
+-----------------------+ +-ooo-+-ooo-+-ooo-+-ooo-+-ooo-+
time -> 0 fs 2fs 3fs 4fs 5fs
1/T frequency ->
Original samples <-> Original spectrum
multiplied by this: convolved withthis:
X *
o o
o o o o o o o o o o o o o | |
| | | | | | | | | | | | | | |
| | | | | | | | | | | | | | |
| | | | | | | | | | | | | | |
| | | | | | | | | | | | | | |
| | | | | | | | | | | | | | |
| | | | | | | | | | | | | <-> | |
| | | | | | | | | | | | | | |
| | | | | | | | | | | | | | |
| | | | | | | | | | | | | | |
| | | | | | | | | | | | | | |
| | | | | | | | | | | | | | |
+-----------------------+ +-----------------------|------>
time -> 0 frequency ->
fs=4/T
yields: yields:
V V
x x x x x x x
| x |x x|x x|x x|x x|x x|
| | x | | | | | |
| | | | | | | | |
| | x | | | | | | |
| | | | <-> | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
+-o-o-o---o-o-o---o-o-o-+ |-ooo-+-ooo-+-ooo-+-ooo-|-ooo-+
time -> 0 frequency -> fs=4/T
Thus:
stuffing zeros in time increases the sample rate without changing the
frequency spectrum - only the perspective.
Adding N zeros(e.g. 3)
increases the sample rate by (N+1) (e.g. 4)
Now, we will "zero out" the spectrum around the original fs, 2fs
and 3fs to get a sequence that is sampled at 4fs.
There are two ways to do this:
- use a lowpass filter designed for this purpose.
In this case an "eighth band" filter perhaps.
- multiply the spectrum by a perfect frequency "gate" function.
Samples Spectrum
convolved by this: <-> multiplied by this:
* X
o ooooo ooooo
| ||||| |||||
| ||||| |||||
| ||||| |||||
| ||||| |||||
| <-> ||||| |||||
| ||||| |||||
| ||||| |||||
o | o ||||| |||||
| | | ||||| |||||
o | | | o ||||| |||||
| | | | | ||||| |||||
o---o---o---+---o---o---o- oooo|oooooooooooooooooooooo|ooooo+
| time -> | 0 frequency -> fs=4/T
o o
Yields: Yields
V V
X x x
| x x x X x|x x|x
| | | | | x x X | |
| | | | | | x x | | | |
| | | | | | | x X x | | | | |
| | | | | | | | | | | | | <-> | |
| | | | | | | | | | | | | | |
| | | | | | | | | | | | | | |
| | | | | | | | | | | | | | |
| | | | | | | | | | | | | | |
| | | | | | | | | | | | | | |
T | | | | | | | | | | | | | | |
+-----------------------+ - | --------------------- + -
time -> 0 frequency -> fs=4/T
The filtering process is more computationally intensive in that the
frequency domain multiplication must actually be done.
Of course, the frequency multiplication with zeros is so simple
that it need not be done by multiplying at all!
The issue with this process is that there may be time domain aliasing.
How might this temporal aliasing be alleviated?
Well, the problem with stuffing zeros in frequency is that the "gate"
function we use conceptually for multiplying has a very long time
sequence due to the sharp edges.
A "real" filter doesn't have those sharp edges and some of the filters
designed for this purpose actually have a double zero at fs/2, 3fs/2,
5fs/2, 7fs/2 - or even a higher order zero at this point.
These zeros assure that there are no sharp edges of the filter.
Sharp edges of a filter can truncate an otherwise "continuous" spectrum
This creates temporal spreading the same way that a rectangular
window in time will cause spectral spreading. Thus, temporal aliasing.
How might we accomplish something very similar and still take advantage
of the zero-multiplying process?
First, note that if we filter a highly replicated spectrum then there
are lots of points to compute.
So, it may be more efficient to filter in stages so that the
corresponding sample rate is doubled at each step.
Also, we note that a sequence of time samples may or may not have
come from a properly bandlimited signal. This has two effects:
- the sampling will have caused spectral aliasing
- the spectrum of the samples may be far from zero at fs/2.
There is nothing to be done about the aliasing.
However, if the spectrum of the samples is not zero at fs/2
then subsequent processing may introduce temporal aliasing.
So, lowpass filtering of the data may be a good idea.
******************************
>From the above you can see that lowpass filtering after zero-stuffing fills
in the *temporal* zeros that were stuffed.
> This causes no problem because we are padding zero. What if we padded
> some non-zero values? Thats going to cause
> problems, I think.
>
Here there's no padding, just stuffing - the essence of interpolation.
I can't think of what the fundamental underlying operation would be to pad
with nonzero values - at least one that would make sense.
Now, if we're talking about stuffing with nozero values then: you see the
convolution in time with a sinc above (the lowpass filter)?
You can convolve the original samples in time with a sinc-shaped filter
whose delays are 1/M closer together than the original samples. This
accomplishes all the steps above into one operation. That's the common
method of doing temporal interpolation - and it introduces nonzero values
just as the process above eventually introduces nonzero (interpolated
values). So, no, there aren't "problems" as such - just the task of doing
interpolation in some reasonable way. There are lots of methods for
computing the values.
Fred
.
- Follow-Ups:
- Re: Interpolation And Low-Pass filtering
- From: Himanshu
- Re: Interpolation And Low-Pass filtering
- References:
- Interpolation And Low-Pass filtering
- From: Himanshu
- Re: Interpolation And Low-Pass filtering
- From: Fred Marshall
- Re: Interpolation And Low-Pass filtering
- From: Himanshu
- Interpolation And Low-Pass filtering
- Prev by Date: Re: I'm confused ;) was[Re: ADC limitations for bandpass/IF sampling]
- Next by Date: Re: Why is my level adjustment distorting the output?
- Previous by thread: Re: Interpolation And Low-Pass filtering
- Next by thread: Re: Interpolation And Low-Pass filtering
- Index(es):
Relevant Pages
|