# decimation by dropping two samples

Started by April 26, 2011
```On Apr 27, 5:13&#4294967295;am, "sudarshan_onkar"
<sudarshan.onkar@n_o_s_p_a_m.gmail.com> wrote:
> Hi All,
> &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295;I followed Freds explanation until the convolution came and
> spoiled the party.
> &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295;Ok we can narrow down the problem to sine wave , may be then
> i can extend it . If i have a sampled sine wave at some fs and let the
> frequency of sine wave be fm. Now ill decimate this sampled sine wave using
> mentioned scheme.
> original sine wave index = &#4294967295;0,1,2,3,4,5,6,7,8,9,10,11,12 ....
> decimated sinewave index = &#4294967295;0,1,4,5,8,9,12,13 .....
>
> If i see the spectrum (by FFT) what i am expected to see? should i be
> seeing single peak corresponding to fm or some other frequency will also
> appear ?

You will get junk. The FFT you are using was derived assuming equally
spaced samples to begin with, you need a FFT that that matches your
sampling scheme, then you will get the correct spectral estimate.
```
```On Apr 27, 3:45&#4294967295;am, "steveu" <steveu@n_o_s_p_a_m.coppice.org> wrote:
> A blanket statement that samples are not required to be equally spaced is
> obviously bogus. Sampling the first half of a song at 96k/second and
> expecting to be able to play back the whole song is probably not going to
> end well. :-)

you need at least two independent samples at the highest frequency
content, not sampling the second half gives you zero independent
samples :)

```
```On Apr 27, 3:45&#4294967295;am, "steveu" <steveu@n_o_s_p_a_m.coppice.org> wrote:
> >On Apr 26, 6:43=A0pm, steve <bungalow_st...@yahoo.com> wrote:
> >> On Apr 26, 3:08=A0am, "sudarshan_onkar"
>
> >> <sudarshan.onkar@n_o_s_p_a_m.gmail.com> wrote:
> >> > Hi All,
> >> > =A0 =A0 =A0 =A0 I was analyzing a decimation scheme where two samples
> a=
> >re dropped
> >> > alternatively . 0,1 are picked 2,3 are dropped , 4,5 are picked and 6
> a=
> >nd 7
> >> > are dropped and so on. I have never seen such a decimation scheme .
>
> >> > =A0 =A0 =A0 I would like to know whats the advantage of the this
> scheme=
> >. And
> >> > also
> >> > will the sampling frequency change here ??
>
> >> Sampling theory has no requirement for equally spaced points.
>
> >The theory that discusses 'sampling' as generating a discrete
> >sequence
> >x[n] from a continuous signal x(t) on the form x[n] <-> x(nT) is
> >based
> >on the assumption of equally spaced points. As far as I am aware,
> >that's
> >the form of sampling all of DSP is based on.
>
> Most, but not all. Outside the mainstream (e.g. in some interesting
> military applications) structured non-equally spaced samples are used. In
> some applications, which are statistical in nature, relatively slow
> pseudo-randomly spaced samples are used to good effect.
>
> A blanket statement that samples are not required to be equally spaced is
> obviously bogus. Sampling the first half of a song at 96k/second and
> expecting to be able to play back the whole song is probably not going to
> end well. :-) If you sample in a non-equally spaced manner, where no 2
> samples are more than half a cycle of the high frequency component of the
> signal apart, you can recover the signal. However, trying to find practical
> algorithms to manipulate (e.g. filter) the sample stream might be a
> challenge.
>

I concur, Numerical Analists have understood the advantages of
nonuniform sampling for a long time. Just look at Gauss Legendre
Integration for a simple example. Often functions are sampled on
Chebyshev nodes because you will need fewer samples and polynomial
fitting won't require as large a dynamic range in the interpolation
coefs.

Clay
```
```On 4/27/2011 2:13 AM, sudarshan_onkar wrote:
> Hi All,
>           I followed Freds explanation until the convolution came and
> spoiled the party.
>           Ok we can narrow down the problem to sine wave , may be then
> i can extend it . If i have a sampled sine wave at some fs and let the
> frequency of sine wave be fm. Now ill decimate this sampled sine wave using
> mentioned scheme.
> original sine wave index =  0,1,2,3,4,5,6,7,8,9,10,11,12 ....
> decimated sinewave index =  0,1,4,5,8,9,12,13 .....
>
> If i see the spectrum (by FFT) what i am expected to see? should i be
> seeing single peak corresponding to fm or some other frequency will also
> appear ?
>
>

I was trying to present an *approach* without working it all out.

The idea was to split the sampling process into two time-related fs/4
sequences and to perhaps recombine them (and their spectra) by
superposition.  Instead of looking at it as a system running at fs, look
at it as two phase-locked systems running at fs/4.  The hope was this
would yield some insight into what's being done in signal space.

It was to go like this:

Multiplication in time is convolution in frequency (re: Fourier Transforms)

So, if you decimate by 4 then you are also convolving in frequency with
a frequency sample interval of fs/4 so the sample rate is reduced by 4.

If the frequency content is limited to being below fs/8 to begin with
then there is no aliasing in frequency and the spectra are simply
repeated 4 times per the original fs frame.

That is a very simple picture so doing it once more seems another simple
picture.

The only problem I have in visualizing the outcome is in adding the two
together and imagining the phase relationships. So, I sympathize with
your trying to deal with the convolution integral (even if it's maybe
correct which I can but hope).

Later, it occurred to me that what you're doing bears very strong
resemblance to quadrature subsampling or bandpass sampling.
There, one idea is to create I and Q sequences by multiplying by (i.e.
subsampling alternately with sign reversal):
1, 0, -1, 0, 1, 0, -1, 0, 1, 0, -1, 0, 1, 0, -1, 0, ...
and by:
0, 1, 0, -1, 0, 1, 0, -1, 0, 1, 0, -1, 0, 1, 0, -1, ...

The first set of samples is multiplication by a sampled cosine.
The second is multiplication by a sampled sine or a cosine shifted by 90
degrees.
The result is a pair of sequences "I" and "Q" which have to be handled
separately thereafter until properly recombined.

Now, what if you subsample the results of the quadrature sampling?
You multipy by:

1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, ...
and:
0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, ...

which effectively gets rid of all the "-1" multiplied samples  and
creates the samples that you are working with - albeit, I'm still
carrying them in two separate sequences.  And I'm leaving the zeros as
place-holders so we can see what's going on.

I did some simple calculations using this idea and can at least make
some observations:

Assuming convenient temporal alignment and assuming a real, even signal:
- The I and Q sequences have spectra that are purely real and purely
imaginary respectively.
Then, looking at the decimated sequences with the -1 generated samples
set to zero (and assuming that the decimating sequence for I is and even
function of time)
- The decimated I sequence continues to have a spectrum that is purely real
- The original Q sequence was purely imaginary but the decimated Q
sequence is no longer purely imaginary (because *its* decimation
sequence is no longer an even function of time).  That is, it doesn't
have a nice phase relationship with the I sequence because of this time
shift in the decimating sequence .. which is what we've been struggling
with from the beginning.

I'm not "done" with this (or maybe I really am) and a couple of things
occur to me:

If one can sample OK at fs/4 then what good are the extra samples?
Seems application dependent...
(Q: maybe keeping that one extra sample isn't really very useful?)

More: what additional information is carried in the extra samples?

Consider this system:

signal > sampler at fs/4 > output1

signal > delay of 1/fs > sampler at fs/4 > output2

What is the difference between the outputs and their Fourier Transforms?
From one point of view we might say "nothing" because the time base for
the sampler is arbitrary anyway.
From another point of view we should understand what the difference
would be.
And, that seems to be at the core of understanding what 2-of-4 sampling
offers - if anything or to who and when....

One can imagine computing the time derivatives/differences at an fs/4
rate ....

One can imagine averaging double samples to reduce output noise ...
because as the frequency content of the signal goes lower, the
difference becomes smaller until it becomes negligible in the noiseless
case.

Fred

```