Answers.Body: <p>Because you need at least 3 samples per signal period, to uniquely interpolate the original signal. (with regard to aperiodic signals, ‘period’ refers to the time period over which it has been time-limited)The reason for this is as follows:</p>
  <p>When you sample a signal, there are three variables(degrees of freedom) involved:</p>
  <ol>
  <li>The signal frequency/frequency spectrum. This determines the
  magnitude variation between the sample points.</li>
  <li>The sampling frequency. This determines the spacing between the
  sample points.</li>
  <li>The phase of the sampled signal. This determines the relative
  orientation of the sample points. For example, a cosine wave sampled
  at half its frequency, starting from the zero degree point, will
  have a peak followed by a trough, while a sampled sine wave will
  have a trough followed by a peak.</li>
  </ol>
  <p>To uniquely determine the original wave from three variables, we need three relations(constraints) between them. If the number of constraints is less than three, then the solution is not unique.</p>
  <p>Let’s illustrate this, by considering a sinusoid of frequency  <em><strong>f</strong></em>  sampled at a frequency  <em><strong>fs</strong></em>  :</p>
  <p><em><strong>Case 1:  fs≤f</strong></em></p>
  <p>If the sampling frequency is less than or equal to the max signal frequency, then there would be at most one sample in a period. This one sample constrains only one variable - the sampling frequency(the spacing between the samples). The other two variables - the signal frequency and the phase can be freely chosen - meaning that any signal, with any phase, sampled at the given frequency, can pass through those points.
  <a href="https://i.sstatic.net/OXfQG.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/OXfQG.png" alt="enter image description here" /></a></p>
  <p><em><strong>Case 2:  fs=2f</strong></em></p>
  <p>In this case, there are two samples per signal period. Now, consider two sinusoids, one of which has a frequency three times the other, as shown below:
  <a href="https://i.sstatic.net/lbtAN.gif" rel="nofollow noreferrer"><img src="https://i.sstatic.net/lbtAN.gif" alt="enter image description here" /></a></p>
  <p>As can be seen, in this case, there are constraints on two variables - the signal frequency(the magnitude variation between the points) and the sampling frequency(spacing between the points), but the third variable - phase can be freely chosen.</p>
  <p>As a result, a sine wave of 3 times the frequency, but phase-shifted by 270 degrees, can perfectly pass through the points generated by sampling the original wave.</p>
  <p><em><strong>Case 3:  fs&gt;2f</strong></em></p>
  <p>In this case, there are at least three constraints on the sample points and only a signal, that:</p>
  <ol>
  <li><p>Has the required spacing between the sample points.(Sampling frequency)</p>
  </li>
  <li><p>Has the required magnitude variation between the sample points(Signal frequency)</p>
  </li>
  <li><p>Has the required relative orientation of sample points(Signal phase),</p>
  </li>
  </ol>
  <p>will pass through the generated sample points, enabling us to determine the original signal uniquely.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-01-14T14:55:02.143Z
Answers.LastActivityDate: 2022-01-14T14:55:02.143Z
Answers.UserDisplayName: Ahmed Abdelazeem
Answers.Body: <p>If the sampling rate is s, an input frequency of f will yield precisely the same sequence of samples as f+ks for any positive or negative integer k.  If input frequencies are allowed to go to zero and if if the input signal may have any arbitrary phrase, then any input frequency higher than s/2 would be indistinguishable from a frequency within that range.</p>
  
  <p>Note that the Nyquist criterion is only relevant in cases where inputs are
  allowed to go zero.  If the input will only contain a narrow range of
  frquencies, it may be safely sampled at a much lower rate without loss of
  information.  In some cases, such sampling may be be useful to shift a
  frequency which is too high to measure into a range where measurement is
  possible.  For example, if one has a very precise 10.000000MHz reference and
  wants to measure a frequency which is known to be between 100.01Mhz and
  100.02Mhz, sampling the input signal at a rate of 10.00Mhz will yield a
  signal which is between 10,000 and 20,000Hz which may in some cases be
  more easily measured than the direct 100+MHz signal.  Note, however, that
  signals near any multiple of 10.00Mhz will be indistinguishable from those
  of any other.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-02-13T22:08:58.093Z
Answers.LastActivityDate: 2016-02-13T22:08:58.093Z
Answers.UserDisplayName: supercat
Answers.Body: <p>That's Nyquist-Shannon sampling theorem. Think about it in the other way: imagine you are given a set of samples (the black dots in the image).</p>
  
  <p><img src="https://i.sstatic.net/05b9o.png" alt="https://i.sstatic.net/ld5VI.png"></p>
  
  <p>The most intuitive way to recover the original analog signal would be by joining these samples. But you can easily notice that there is not a unique way of joining them. In fact, there are infinite possible signals that would contain the whole set of samples. Obviously, given the sample set, you would join them the easiest way, i.e. the blue signal.</p>
  
  <p>Now, what about sampling? In the image you also have a red signal (which frequency is 1 Hz) that has been sampled too slowly, resulting in the black dot sample set. To have a clue about the real signal, we should have sampled it at, at least, 2 Hz. That way, we also would have samples (dots) at 0.5, 1.5, 2.5, etc seconds. And, as you can draw in Paint, the easiest path to join all the samples would be, again, the red signal. So we would have recovered our original signal successfully.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2013-01-20T02:12:04.297Z
Answers.LastActivityDate: 2013-01-20T05:25:00.703Z
Answers.LastEditDate: 2013-01-20T05:25:00.703Z
Answers.UserDisplayName: Serge
Body: <p>I read this:
  To reproduce a given frequency, the sample rate must be at least twice that frequency.
  Why is this so?</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2013-01-19T21:39:07.600Z
Comments.Text: This is called the Nyquist criterion. Here's the wikipedia page on that subject: http://en.wikipedia.org/wiki/Nyquist_frequency
Comments.UserDisplayName: Saaru Lindestøkke
Tags: <sampling-frequency>
Title: Why must a sample rate by at least twice a frequency in order to reproduce that frequency accurately?
UserDisplayName: joshreesjones
ThreadText: # Why must a sample rate by at least twice a frequency in order to reproduce that frequency accurately?
  
  (Asked by: username_0 on 2013-01-19)
  
  I read this:
  To reproduce a given frequency, the sample rate must be at least twice that frequency.
  Why is this so?
  
  **Tags:** sampling-frequency
  
  > **Comments:**
  > **username_1**: This is called the Nyquist criterion. Here's the wikipedia page on that subject: http://en.wikipedia.org/wiki/Nyquist_frequency  
  
  ---
  
  ## 3 answers
  
  ### Answer by username_4 on 2013-01-20. Score: 7 | Accepted answer
  
  That's Nyquist-Shannon sampling theorem. Think about it in the other way: imagine you are given a set of samples (the black dots in the image).
  
  ![https://i.sstatic.net/ld5VI.png](https://i.sstatic.net/05b9o.png)
  
  The most intuitive way to recover the original analog signal would be by joining these samples. But you can easily notice that there is not a unique way of joining them. In fact, there are infinite possible signals that would contain the whole set of samples. Obviously, given the sample set, you would join them the easiest way, i.e. the blue signal.
  
  Now, what about sampling? In the image you also have a red signal (which frequency is 1 Hz) that has been sampled too slowly, resulting in the black dot sample set. To have a clue about the real signal, we should have sampled it at, at least, 2 Hz. That way, we also would have samples (dots) at 0.5, 1.5, 2.5, etc seconds. And, as you can draw in Paint, the easiest path to join all the samples would be, again, the red signal. So we would have recovered our original signal successfully.
  
  
  ---
  
  ### Answer by username_2 on 2022-01-14. Score: 1
  
  Because you need at least 3 samples per signal period, to uniquely interpolate the original signal. (with regard to aperiodic signals, ‘period’ refers to the time period over which it has been time-limited)The reason for this is as follows:
  
  When you sample a signal, there are three variables(degrees of freedom) involved:
  
  1. The signal frequency/frequency spectrum. This determines the
     magnitude variation between the sample points.
  2. The sampling frequency. This determines the spacing between the
     sample points.
  3. The phase of the sampled signal. This determines the relative
     orientation of the sample points. For example, a cosine wave sampled
     at half its frequency, starting from the zero degree point, will
     have a peak followed by a trough, while a sampled sine wave will
     have a trough followed by a peak.
  
  To uniquely determine the original wave from three variables, we need three relations(constraints) between them. If the number of constraints is less than three, then the solution is not unique.
  
  Let’s illustrate this, by considering a sinusoid of frequency ***f*** sampled at a frequency ***fs*** :
  
  ***Case 1: fs≤f***
  
  If the sampling frequency is less than or equal to the max signal frequency, then there would be at most one sample in a period. This one sample constrains only one variable - the sampling frequency(the spacing between the samples). The other two variables - the signal frequency and the phase can be freely chosen - meaning that any signal, with any phase, sampled at the given frequency, can pass through those points.
  [![enter image description here](https://i.sstatic.net/OXfQG.png)](https://i.sstatic.net/OXfQG.png)
  
  ***Case 2: fs=2f***
  
  In this case, there are two samples per signal period. Now, consider two sinusoids, one of which has a frequency three times the other, as shown below:
  [![enter image description here](https://i.sstatic.net/lbtAN.gif)](https://i.sstatic.net/lbtAN.gif)
  
  As can be seen, in this case, there are constraints on two variables - the signal frequency(the magnitude variation between the points) and the sampling frequency(spacing between the points), but the third variable - phase can be freely chosen.
  
  As a result, a sine wave of 3 times the frequency, but phase-shifted by 270 degrees, can perfectly pass through the points generated by sampling the original wave.
  
  ***Case 3: fs>2f***
  
  In this case, there are at least three constraints on the sample points and only a signal, that:
  
  1. Has the required spacing between the sample points.(Sampling frequency)
  2. Has the required magnitude variation between the sample points(Signal frequency)
  3. Has the required relative orientation of sample points(Signal phase),
  
  will pass through the generated sample points, enabling us to determine the original signal uniquely.
  
  
  ---
  
  ### Answer by username_3 on 2016-02-13. Score: 0
  
  If the sampling rate is s, an input frequency of f will yield precisely the same sequence of samples as f+ks for any positive or negative integer k. If input frequencies are allowed to go to zero and if if the input signal may have any arbitrary phrase, then any input frequency higher than s/2 would be indistinguishable from a frequency within that range.
  
  Note that the Nyquist criterion is only relevant in cases where inputs are
  allowed to go zero. If the input will only contain a narrow range of
  frquencies, it may be safely sampled at a much lower rate without loss of
  information. In some cases, such sampling may be be useful to shift a
  frequency which is too high to measure into a range where measurement is
  possible. For example, if one has a very precise 10.000000MHz reference and
  wants to measure a frequency which is known to be between 100.01Mhz and
  100.02Mhz, sampling the input signal at a rate of 10.00Mhz will yield a
  signal which is between 10,000 and 20,000Hz which may in some cases be
  more easily measured than the direct 100+MHz signal. Note, however, that
  signals near any multiple of 10.00Mhz will be indistinguishable from those
  of any other.
  
  
  ---
  
  