# Nyquist rate determination and oversampling [duplicate]

This question already has an answer here:

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?

## marked as duplicate by Gilles, MBaz, A_A, jojek♦Sep 8 '16 at 9:36

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

• 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. – MimSaad Aug 24 '16 at 10:43

## 1 Answer

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.

• 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. – Aequitas Aug 24 '16 at 4:59
• 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. – robert bristow-johnson Aug 24 '16 at 5:02
• and practically you need to sample a bit more than 2x. maybe 2.5x when using a cheap reconstruction filter (and impulse response). – robert bristow-johnson Aug 24 '16 at 5:03
• The closer a sampling rate is to critical, the longer you need to sample to get reliable result. – hotpaw2 Aug 24 '16 at 15:41