I'm new to this. I'm using ShannonGui to generate a sine wave with a $1\textrm{ Hz}$ signal frequency.

From what I can tell to determine the Nyquist rate I need to double the highest frequency, since it's a constant $1\textrm{ Hz}$, I just double it and get a Nyquist rate of $2\textrm{ Hz}$ correct?

Now I also read that the Nyquist rate is the lowest frequency that you can use as a sampling frequency to avoid aliasing, but when I use $2\textrm{ Hz}$ as the sample frequency the reconstructed wave is a straight line at 0. So does this mean the Nyquist rate is wrong or my understanding of it is wrong?

  • $\begingroup$ It is because you are sampling zero crossings for you sine wave, keep your wave frequency and sampling frequency and only add a phase to you sine, I mean change your signal from y(t)=sin(2*pift) to something like y(t)=sin(2*pift+pi/5). Your sampling is correct, however your reconstruction at sampling in exactly nyquiest rate might be so hard or even impossible. $\endgroup$ – MimSaad Aug 24 '16 at 10:43

you actually have to sample at more than twice the highest frequency. if $B$ is the bandwidth or highest frequency and $f_\text{s}$ is the sampling frequency, then to satisfy the Sampling Theorem (for normal baseband sampling):

$$ 2B < f_\text{s} $$

it is not

$$ 2B \le f_\text{s} $$

sampling at exactly twice the frequency of a sinusoid is "critically sampling" and loses amplitude or phase. it can't get both. in your case, it is sampling the sinusoid when it crosses zero.

  • $\begingroup$ Okay, thankyou. How much more than it does it have to be, 2.01 for instance shows a wave at less than half the amplitude of the original. $\endgroup$ – Aequitas Aug 24 '16 at 4:59
  • $\begingroup$ well, then your reconstruction mathematics is less than perfect. 2x is not enough, but theoretically 2.0001x sampling is sufficient. but you would need a lotta terms of the $\operatorname{sinc}()$ function to do it. $\endgroup$ – robert bristow-johnson Aug 24 '16 at 5:02
  • $\begingroup$ and practically you need to sample a bit more than 2x. maybe 2.5x when using a cheap reconstruction filter (and impulse response). $\endgroup$ – robert bristow-johnson Aug 24 '16 at 5:03
  • $\begingroup$ The closer a sampling rate is to critical, the longer you need to sample to get reliable result. $\endgroup$ – hotpaw2 Aug 24 '16 at 15:41

Not the answer you're looking for? Browse other questions tagged or ask your own question.