Reply by Fred Marshall April 28, 20112011-04-28
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 ? > >
Sorry about that... 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
Reply by Clay April 27, 20112011-04-27
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
Reply by steve April 27, 20112011-04-27
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 :)
Reply by steve April 27, 20112011-04-27
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.
Reply by Rune Allnor April 27, 20112011-04-27
On Apr 27, 11: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 ?
Don't know what to expect to see, other than it will *not* be anything like a nice spike as from a sinusoidal. Rune
Reply by sudarshan_onkar April 27, 20112011-04-27
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 ?


Reply by John Monro April 27, 20112011-04-27
On 26/04/2011 5:08 PM, sudarshan_onkar wrote:
> Hi All, > I was analyzing a decimation scheme where two samples are dropped > alternatively . 0,1 are picked 2,3 are dropped , 4,5 are picked and 6 and 7 > are dropped and so on. I have never seen such a decimation scheme . > > I would like to know whats the advantage of the this scheme. And > also > will the sampling frequency change here ??
Hi Sudarshan, I agree with others here that you get a real mess with this sampling scheme. The set of samples you generate is equivalent to a regularly sampled set which has been multiplied by the function: 0.5*(1 + sqrt(2)*sin((2*pi*n/4) + pi/4)) where n is the sample index. This is equivalent to (i) multiplying the original analog signal by a sinusoidal function of frequency fs/4 and phase pi/4 (ii) adding in some of the original signal. (ii) sampling the result at a regular rate fs. Assuming that the original analog signal was low-pass band-limited to 0.25*fs (and not the usual ~0.5*fs) then the result is not totally useless. The band from 0.25*fs to 0.5*fs in the unevenly sampled signal will contain a frequency-translated version of the original signal which might be useful, but there are much better ways to do frequency translation if that is the aim. Any decimation process such as averaging adjacent samples would appear to make matters worse. Regards, John
Reply by steveu April 27, 20112011-04-27
>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've >> done it because of hardware limitations, not because it gave me a >> better signal estimate. > >For practical reasons, one might deviate from the ideal scheme. >Not because it gives any form of 'advantege' - it might not even be >'good' - but because that's all that is available to you. > >Rune
Steve
Reply by Rune Allnor April 27, 20112011-04-27
On Apr 26, 6:43&#4294967295;pm, steve <bungalow_st...@yahoo.com> wrote:
> On Apr 26, 3:08&#4294967295;am, "sudarshan_onkar" > > <sudarshan.onkar@n_o_s_p_a_m.gmail.com> wrote: > > Hi All, > > &#4294967295; &#4294967295; &#4294967295; &#4294967295; I was analyzing a decimation scheme where two samples are dropped > > alternatively . 0,1 are picked 2,3 are dropped , 4,5 are picked and 6 and 7 > > are dropped and so on. I have never seen such a decimation scheme . > > > &#4294967295; &#4294967295; &#4294967295; 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.
> I've > done it because of hardware limitations, not because it gave me a > better signal estimate.
For practical reasons, one might deviate from the ideal scheme. Not because it gives any form of 'advantege' - it might not even be 'good' - but because that's all that is available to you. Rune
Reply by Fred Marshall April 26, 20112011-04-26
On 4/26/2011 12:08 AM, sudarshan_onkar wrote:
> Hi All, > I was analyzing a decimation scheme where two samples are dropped > alternatively . 0,1 are picked 2,3 are dropped , 4,5 are picked and 6 and 7 > are dropped and so on. I have never seen such a decimation scheme . > > I would like to know whats the advantage of the this scheme. And > also > will the sampling frequency change here ??
Well, I gave an answer to my own question but not to yours! What's the advantage? You tell me! It's not at all clear in the sense that it can be viewed as the sum of two closely related sequences decimated by 4. You should get more information content but only more bandwidth via a "trick" I guess. Will the sampling frequency change? Well sure. And, I think effectively by a factor of 4. But that could be disputed. I guess if the phase shift is 90 degrees then you've reinvented a sort of quadrature decimator. That's likely it. Then you treat the two adjacent sample sequences separately. But, *I* ain't gonna prove it! :-) Fred