Let's say you have a perfect sine wave at frequency w. According to Nyquist, in order to be able to recover the sine wave, you need to have a sampling rate of at least 2w. So if you decide to sample at 2w, you end up with 2 samples for each cycle of this sine wave. If you sample at the peaks and troughs (90 and 270 degrees) of the sine wave in time (or spatial) domain, you indeed preserve the amplitude. But what happens when the sampling happens at 0 and 180 degrees? You end up with only zeros. Am I missing something about sampling theorem here? Is a shifted sampling not the same as the origianl unshifted sampling?

# sampling a perfect sinusoid at Nyquist rate?

Started by ●December 19, 2006

Reply by ●December 19, 20062006-12-19

Let's say you have a perfect sine wave at frequency w. According to Nyquist, in order to be able to recover the sine wave, you need to have a sampling rate of at least 2w. So if you decide to sample at 2w, you end up with 2 samples for each cycle of this sine wave. If you sample at the peaks and troughs (90 and 270 degrees) of the sine wave in time (or spatial) domain, you indeed preserve the amplitude. But what happens when the sampling happens at 0 and 180 degrees? You end up with only zeros. Am I missing something about sampling theorem here? Is a shifted sampling not the same as the origianl unshifted sampling?

Reply by ●December 19, 20062006-12-19

jjmai wrote:> Let's say you have a perfect sine wave at frequency w. > According to Nyquist, in order to be able to recover the sine wave, you > need to have a sampling rate of at least 2w. > So if you decide to sample at 2w, you end up with 2 samples for each cycle > of this sine wave. > > If you sample at the peaks and troughs (90 and 270 degrees) of the sine > wave in time (or spatial) domain, you indeed preserve the amplitude. > But what happens when the sampling happens at 0 and 180 degrees? You end > up with only zeros. > > Am I missing something about sampling theorem here? Is a shifted sampling > not the same as the origianl unshifted sampling?How does "equal" come to replace "greater than" in so many people's imagination? 'Taint so. If it's infinitesimally greater, it takes infinite time to resolve the waveform. The sampling frequency must be enough greater so that it slips about half a cycle in the time you're willing to spend sampling. Jerry -- Engineering is the art of making what you want from things you can get. ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯

Reply by ●December 19, 20062006-12-19

Jerry Avins wrote:> jjmai wrote: > > Let's say you have a perfect sine wave at frequency w. > > According to Nyquist, in order to be able to recover the sine wave, you > > need to have a sampling rate of at least 2w. > > So if you decide to sample at 2w, you end up with 2 samples for each cycle > > of this sine wave. > > > > If you sample at the peaks and troughs (90 and 270 degrees) of the sine > > wave in time (or spatial) domain, you indeed preserve the amplitude. > > But what happens when the sampling happens at 0 and 180 degrees? You end > > up with only zeros. > > > > Am I missing something about sampling theorem here? Is a shifted sampling > > not the same as the origianl unshifted sampling? > > How does "equal" come to replace "greater than" in so many people's > imagination? 'Taint so. If it's infinitesimally greater, it takes > infinite time to resolve the waveform. The sampling frequency must be > enough greater so that it slips about half a cycle in the time you're > willing to spend sampling. > >well actually a pure sine wave has zero bandwidth so if you know the frequency, you don't need to sample it at all???? Mark

Reply by ●December 20, 20062006-12-20

jjmai wrote:> Let's say you have a perfect sine wave at frequency w. > According to Nyquist, in order to be able to recover the sine wave, you > need to have a sampling rate of at least 2w.This is wrong. If you know that the signal is a perfect sine wave, all you need is 3 samples to find the amplitude, the phase and the frequency. VLV

Reply by ●December 20, 20062006-12-20

Vladimir Vassilevsky wrote:> jjmai wrote: > > Let's say you have a perfect sine wave at frequency w. > > According to Nyquist, in order to be able to recover the sine wave, you > > need to have a sampling rate of at least 2w. > > This is wrong. > > If you know that the signal is a perfect sine wave, all you need is 3 > samples to find the amplitude, the phase and the frequency.Still not quite correct. You need 3 non-overlapping samples spaced closer together than 2w (or other non-exact-multiples of 2w or w). Otherwise you could get all zeros, or a DC value, for any sine wave. IMHO. YMMV. -- rhn A.T nicholson d.0.t C-o-M

Reply by ●December 20, 20062006-12-20

jjmai wrote:> Let's say you have a perfect sine wave at frequency w. > According to Nyquist, in order to be able to recover the sine wave, you > need to have a sampling rate of at least 2w. > So if you decide to sample at 2w, you end up with 2 samples for each cycle > of this sine wave.However the time it takes to recover the amplitude is proportional to the reciprocal of how close your sampling rate is to 2w. So if you sample at 2w you will only need an infinite number of samples. With infinite samples beyond the life of the universe, any Planck-size clock jitter, drift or galactic decay in any universal time constants such as the speed of light (etc.) will eventually expose the amplitude of your sine wave, if you are willing to wait till "past" the end of time. (maybe... :) IMHO. YMMV. -- rhn A.T nicholson d.0.t C-o-M

Reply by ●December 20, 20062006-12-20

jjmai wrote:> Let's say you have a perfect sine wave at frequency w. > According to Nyquist, in order to be able to recover the sine wave, you > need to have a sampling rate of at least 2w. > So if you decide to sample at 2w, you end up with 2 samples for each cycle > of this sine wave. > > If you sample at the peaks and troughs (90 and 270 degrees) of the sine > wave in time (or spatial) domain, you indeed preserve the amplitude. > But what happens when the sampling happens at 0 and 180 degrees? You end > up with only zeros. > > Am I missing something about sampling theorem here? Is a shifted sampling > not the same as the origianl unshifted sampling? > >This question, and more, are answered in my article "Sampling: What Nyquist Didn't Say, and What to Do About It", to be found at http://www.wescottdesign.com/articles/Sampling/sampling.html. I hope it helps. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com Posting from Google? See http://cfaj.freeshell.org/google/ "Applied Control Theory for Embedded Systems" came out in April. See details at http://www.wescottdesign.com/actfes/actfes.html

Reply by ●December 20, 20062006-12-20

"Tim Wescott" <tim@seemywebsite.com> wrote in message news:64ednf87dpLYVxXYnZ2dnUVZ_tadnZ2d@web-ster.com...> jjmai wrote: > > > Let's say you have a perfect sine wave at frequency w. > > According to Nyquist, in order to be able to recover the sine wave, you > > need to have a sampling rate of at least 2w. > > So if you decide to sample at 2w, you end up with 2 samples for eachcycle> > of this sine wave. > > > > If you sample at the peaks and troughs (90 and 270 degrees) of the sine > > wave in time (or spatial) domain, you indeed preserve the amplitude. > > But what happens when the sampling happens at 0 and 180 degrees? Youend> > up with only zeros. > > > > Am I missing something about sampling theorem here? Is a shiftedsampling> > not the same as the origianl unshifted sampling? > > > > > This question, and more, are answered in my article "Sampling: What > Nyquist Didn't Say, and What to Do About It", to be found at > http://www.wescottdesign.com/articles/Sampling/sampling.html. > > I hope it helps. > > -- > > Tim Wescott > Wescott Design Services > http://www.wescottdesign.com > > Posting from Google? See http://cfaj.freeshell.org/google/ > > "Applied Control Theory for Embedded Systems" came out in April. > See details at http://www.wescottdesign.com/actfes/actfes.htmlActually I doubt Nyquist said much at all - it was Shannon wasn't it? S. -- Posted via a free Usenet account from http://www.teranews.com

Reply by ●December 20, 20062006-12-20

Sanctus wrote:> "Tim Wescott" <tim@seemywebsite.com> wrote in message > news:64ednf87dpLYVxXYnZ2dnUVZ_tadnZ2d@web-ster.com... > >>jjmai wrote: >> >> >>>Let's say you have a perfect sine wave at frequency w. >>>According to Nyquist, in order to be able to recover the sine wave, you >>>need to have a sampling rate of at least 2w. >>>So if you decide to sample at 2w, you end up with 2 samples for each > > cycle > >>>of this sine wave. >>> >>>If you sample at the peaks and troughs (90 and 270 degrees) of the sine >>>wave in time (or spatial) domain, you indeed preserve the amplitude. >>>But what happens when the sampling happens at 0 and 180 degrees? You > > end > >>>up with only zeros. >>> >>>Am I missing something about sampling theorem here? Is a shifted > > sampling > >>>not the same as the origianl unshifted sampling? >>> >>> >> >>This question, and more, are answered in my article "Sampling: What >>Nyquist Didn't Say, and What to Do About It", to be found at >>http://www.wescottdesign.com/articles/Sampling/sampling.html. >> >>I hope it helps. >> >>-- >> >>Tim Wescott >>Wescott Design Services >>http://www.wescottdesign.com >> >>Posting from Google? See http://cfaj.freeshell.org/google/ >> >>"Applied Control Theory for Embedded Systems" came out in April. >>See details at http://www.wescottdesign.com/actfes/actfes.html > > > Actually I doubt Nyquist said much at all - it was Shannon wasn't it? >yea yea yea. Officially it's the Nyquist-Shannon theorem, or the Shannon Sampling Theorem. The title (the whole article, in fact) was a response to a spate of newsgroup postings that started with "Nyquist says" and ended with some naive conclusion that comes from taking an absolute limit as a design guide. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com Posting from Google? See http://cfaj.freeshell.org/google/ "Applied Control Theory for Embedded Systems" came out in April. See details at http://www.wescottdesign.com/actfes/actfes.html