Is the book wrong about the Nyquist Sampling Criterion?Is the Nyquist plot a plot of Re(G(s)) v.s. Im(G(s) or Re(G(jω)) v.s. Im(G(jω))Problem about Nyquest signalling theorem?Doubt regarding Nyquist theorem for sampling analog signalsHow to find the Nyquist rateNyquist plot Phase QuestionWhat are the connection between bandwidth, Nyquist criteria and quantization?Is the Nyquist plot useful in actual electrical engineering?How to plot a Nyquist Diagram in Simulink?Nyquist Stability CriteriaAccording to the Nyquist criterion this system is stable but when I apply an impulse I get an unstable response, why?

What’s the interaction between darkvision and the Eagle Aspect of the beast, if you have Darkvision past 100 feet?

My parents are Afghan

Why did Dr. Strange keep looking into the future after the snap?

Did Ham the Chimp follow commands, or did he just randomly push levers?

TikZ/PGF draw algorithm

Scaling rounded rectangles in Illustrator

Justification of physical currency in an interstellar civilization?

Test whether a string is in a list with variable

I want to write a blog post building upon someone else's paper, how can I properly cite/credit them?

Why is there a cap on 401k contributions?

How does "politician" work as a job/career?

Can a player choose to add detail and flavor to their character's spells and abilities?

Do the Zhentarim fire members for killing fellow members?

What's weird about Proto-Indo-European Stops?

Is there an idiom that means that a clothe fits perfectly?

Would a legitimized Baratheon have the best claim for the Iron Throne?

What does the copyright in a dissertation protect exactly?

What chord could the notes 'F A♭ E♭' form?

Why is the blank symbol not considered part of the input alphabet of a Turing machine?

Picking a theme as a discovery writer

Extracting the parent, leaf, and extension from a valid path

How could a humanoid creature completely form within the span of 24 hours?

If an attacker targets a creature with the Sanctuary spell cast on them, but fails the Wisdom save, can they choose not to attack anyone else?

Why was Gemini VIII terminated after recovering from the OAMS thruster failure?



Is the book wrong about the Nyquist Sampling Criterion?


Is the Nyquist plot a plot of Re(G(s)) v.s. Im(G(s) or Re(G(jω)) v.s. Im(G(jω))Problem about Nyquest signalling theorem?Doubt regarding Nyquist theorem for sampling analog signalsHow to find the Nyquist rateNyquist plot Phase QuestionWhat are the connection between bandwidth, Nyquist criteria and quantization?Is the Nyquist plot useful in actual electrical engineering?How to plot a Nyquist Diagram in Simulink?Nyquist Stability CriteriaAccording to the Nyquist criterion this system is stable but when I apply an impulse I get an unstable response, why?






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








15












$begingroup$


Is the following statement from a book wrong?



enter image description here



I thought sampling with twice the signal's highest frequency component would be adequate to completely recover the signal. But above it says sampling twice creates a saw-tooth like wave. Is the book wrong?










share|improve this question











$endgroup$







  • 14




    $begingroup$
    To completely recover the signal is they key phrase. Nyquist doesn't say that you can connect the samples with a straight line and get the original signal, but that the information needed to recover the signal is there. So the book is right about what the signal looks like when you connect the dots, and Nyquist is right about what you are able to recover from the samples.
    $endgroup$
    – John D
    May 3 at 14:26







  • 12




    $begingroup$
    Technically, a sampling frequency of exactly 2x the input does not allow for reconstructing the original signal, unless you somehow also know that you are sampling at the peaks/troughs. Just a little bit faster is needed in theory (and significantly faster in practice).
    $endgroup$
    – Justin
    May 3 at 14:30






  • 5




    $begingroup$
    Nyquist specifically mentions that the signal is band limited. Band limiting the input is often mentioned but band limiting the output is not often mentioned. If you band limit the triangle wave to your original signal you will get a sine wave back.
    $endgroup$
    – vini_i
    May 3 at 14:39






  • 7




    $begingroup$
    If you count the little dots that denote sampling, the sampling rate is off by a factor of two in each of those diagrams -- the sampling is at 2x, 4x, and 8x, respectively.
    $endgroup$
    – TimWescott
    May 3 at 14:55






  • 4




    $begingroup$
    @sidA30 The correct procedure is to wait until you have time to write an answer, not just break the policy at your convenience.
    $endgroup$
    – pipe
    May 3 at 15:13

















15












$begingroup$


Is the following statement from a book wrong?



enter image description here



I thought sampling with twice the signal's highest frequency component would be adequate to completely recover the signal. But above it says sampling twice creates a saw-tooth like wave. Is the book wrong?










share|improve this question











$endgroup$







  • 14




    $begingroup$
    To completely recover the signal is they key phrase. Nyquist doesn't say that you can connect the samples with a straight line and get the original signal, but that the information needed to recover the signal is there. So the book is right about what the signal looks like when you connect the dots, and Nyquist is right about what you are able to recover from the samples.
    $endgroup$
    – John D
    May 3 at 14:26







  • 12




    $begingroup$
    Technically, a sampling frequency of exactly 2x the input does not allow for reconstructing the original signal, unless you somehow also know that you are sampling at the peaks/troughs. Just a little bit faster is needed in theory (and significantly faster in practice).
    $endgroup$
    – Justin
    May 3 at 14:30






  • 5




    $begingroup$
    Nyquist specifically mentions that the signal is band limited. Band limiting the input is often mentioned but band limiting the output is not often mentioned. If you band limit the triangle wave to your original signal you will get a sine wave back.
    $endgroup$
    – vini_i
    May 3 at 14:39






  • 7




    $begingroup$
    If you count the little dots that denote sampling, the sampling rate is off by a factor of two in each of those diagrams -- the sampling is at 2x, 4x, and 8x, respectively.
    $endgroup$
    – TimWescott
    May 3 at 14:55






  • 4




    $begingroup$
    @sidA30 The correct procedure is to wait until you have time to write an answer, not just break the policy at your convenience.
    $endgroup$
    – pipe
    May 3 at 15:13













15












15








15


6



$begingroup$


Is the following statement from a book wrong?



enter image description here



I thought sampling with twice the signal's highest frequency component would be adequate to completely recover the signal. But above it says sampling twice creates a saw-tooth like wave. Is the book wrong?










share|improve this question











$endgroup$




Is the following statement from a book wrong?



enter image description here



I thought sampling with twice the signal's highest frequency component would be adequate to completely recover the signal. But above it says sampling twice creates a saw-tooth like wave. Is the book wrong?







nyquist-plot






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited May 3 at 19:53









Toor

2,462216




2,462216










asked May 3 at 14:21









atmntatmnt

964828




964828







  • 14




    $begingroup$
    To completely recover the signal is they key phrase. Nyquist doesn't say that you can connect the samples with a straight line and get the original signal, but that the information needed to recover the signal is there. So the book is right about what the signal looks like when you connect the dots, and Nyquist is right about what you are able to recover from the samples.
    $endgroup$
    – John D
    May 3 at 14:26







  • 12




    $begingroup$
    Technically, a sampling frequency of exactly 2x the input does not allow for reconstructing the original signal, unless you somehow also know that you are sampling at the peaks/troughs. Just a little bit faster is needed in theory (and significantly faster in practice).
    $endgroup$
    – Justin
    May 3 at 14:30






  • 5




    $begingroup$
    Nyquist specifically mentions that the signal is band limited. Band limiting the input is often mentioned but band limiting the output is not often mentioned. If you band limit the triangle wave to your original signal you will get a sine wave back.
    $endgroup$
    – vini_i
    May 3 at 14:39






  • 7




    $begingroup$
    If you count the little dots that denote sampling, the sampling rate is off by a factor of two in each of those diagrams -- the sampling is at 2x, 4x, and 8x, respectively.
    $endgroup$
    – TimWescott
    May 3 at 14:55






  • 4




    $begingroup$
    @sidA30 The correct procedure is to wait until you have time to write an answer, not just break the policy at your convenience.
    $endgroup$
    – pipe
    May 3 at 15:13












  • 14




    $begingroup$
    To completely recover the signal is they key phrase. Nyquist doesn't say that you can connect the samples with a straight line and get the original signal, but that the information needed to recover the signal is there. So the book is right about what the signal looks like when you connect the dots, and Nyquist is right about what you are able to recover from the samples.
    $endgroup$
    – John D
    May 3 at 14:26







  • 12




    $begingroup$
    Technically, a sampling frequency of exactly 2x the input does not allow for reconstructing the original signal, unless you somehow also know that you are sampling at the peaks/troughs. Just a little bit faster is needed in theory (and significantly faster in practice).
    $endgroup$
    – Justin
    May 3 at 14:30






  • 5




    $begingroup$
    Nyquist specifically mentions that the signal is band limited. Band limiting the input is often mentioned but band limiting the output is not often mentioned. If you band limit the triangle wave to your original signal you will get a sine wave back.
    $endgroup$
    – vini_i
    May 3 at 14:39






  • 7




    $begingroup$
    If you count the little dots that denote sampling, the sampling rate is off by a factor of two in each of those diagrams -- the sampling is at 2x, 4x, and 8x, respectively.
    $endgroup$
    – TimWescott
    May 3 at 14:55






  • 4




    $begingroup$
    @sidA30 The correct procedure is to wait until you have time to write an answer, not just break the policy at your convenience.
    $endgroup$
    – pipe
    May 3 at 15:13







14




14




$begingroup$
To completely recover the signal is they key phrase. Nyquist doesn't say that you can connect the samples with a straight line and get the original signal, but that the information needed to recover the signal is there. So the book is right about what the signal looks like when you connect the dots, and Nyquist is right about what you are able to recover from the samples.
$endgroup$
– John D
May 3 at 14:26





$begingroup$
To completely recover the signal is they key phrase. Nyquist doesn't say that you can connect the samples with a straight line and get the original signal, but that the information needed to recover the signal is there. So the book is right about what the signal looks like when you connect the dots, and Nyquist is right about what you are able to recover from the samples.
$endgroup$
– John D
May 3 at 14:26





12




12




$begingroup$
Technically, a sampling frequency of exactly 2x the input does not allow for reconstructing the original signal, unless you somehow also know that you are sampling at the peaks/troughs. Just a little bit faster is needed in theory (and significantly faster in practice).
$endgroup$
– Justin
May 3 at 14:30




$begingroup$
Technically, a sampling frequency of exactly 2x the input does not allow for reconstructing the original signal, unless you somehow also know that you are sampling at the peaks/troughs. Just a little bit faster is needed in theory (and significantly faster in practice).
$endgroup$
– Justin
May 3 at 14:30




5




5




$begingroup$
Nyquist specifically mentions that the signal is band limited. Band limiting the input is often mentioned but band limiting the output is not often mentioned. If you band limit the triangle wave to your original signal you will get a sine wave back.
$endgroup$
– vini_i
May 3 at 14:39




$begingroup$
Nyquist specifically mentions that the signal is band limited. Band limiting the input is often mentioned but band limiting the output is not often mentioned. If you band limit the triangle wave to your original signal you will get a sine wave back.
$endgroup$
– vini_i
May 3 at 14:39




7




7




$begingroup$
If you count the little dots that denote sampling, the sampling rate is off by a factor of two in each of those diagrams -- the sampling is at 2x, 4x, and 8x, respectively.
$endgroup$
– TimWescott
May 3 at 14:55




$begingroup$
If you count the little dots that denote sampling, the sampling rate is off by a factor of two in each of those diagrams -- the sampling is at 2x, 4x, and 8x, respectively.
$endgroup$
– TimWescott
May 3 at 14:55




4




4




$begingroup$
@sidA30 The correct procedure is to wait until you have time to write an answer, not just break the policy at your convenience.
$endgroup$
– pipe
May 3 at 15:13




$begingroup$
@sidA30 The correct procedure is to wait until you have time to write an answer, not just break the policy at your convenience.
$endgroup$
– pipe
May 3 at 15:13










5 Answers
5






active

oldest

votes


















16












$begingroup$


I thought sampling with twice the signal's highest frequency component would be adequate to completely recover the signal. But above it says sampling twice creates a saw-tooth like wave. Is the book wrong?




The book is wrong, but not for the reason you think. If you squint at the dots that indicate samples, it's sampling at twice the frequency that it says.



So first, you should draw some signals and sample them yourself (or use a math package, if you're not up to pencil and paper).



Second, The Nyquist theorem says that it is theoretically possible to reconstruct a signal if you already know that the signal content's spectrum is strictly less than 1/2 the sampling rate.



You reconstruct the signal by low-pass filtering it. Before filtering, the signal can be distorted, so you have to know what you're looking at to see that the result might look OK. Furthermore, the closer your signal content's spectrum is to the Nyquist limit, the sharper the cutoff needs to be in your anti-alias and reconstruction filters. This is fine in theory, but in practice a filter's response in the time domain gets longer roughly in proportion to how sharply it transitions from its passband to its stopband. So in general, if you can, you sample well above Nyquist.



Here's a picture that goes with what your book should have said.



Case A: one sample per cycle (samples made obvious)



Case B: two samples per cycle, landing on the intersections -- note that this is the same output as the one sample per cycle case, but only because I sampled the first one at the intersections.



Case C: Again, two samples per cycle, but this time at the extremes. If you sample at exactly twice the signal component frequency, then you can't reconstruct. In theory you could sample oh-so-slightly lower, but you'd need a filter with an impulse response that spans enough of the result so that you can reconstruct.



Case D: Sampling at 4x the signal frequency. If you connect the dots you get a triangle wave, but it's not correct to do so -- in sampled time, the samples only exist "at the dots". Note that if you put this through a decent reconstruction filter you'll get a sine wave back, and if you change the phase of your sampling then the output will be shifted equally in phase, but its amplitude won't change.



corrected sampling






share|improve this answer











$endgroup$








  • 1




    $begingroup$
    @ThePhoton I count 2, 4, 8 samples per cycle.
    $endgroup$
    – jpa
    May 3 at 16:29






  • 2




    $begingroup$
    As an addendum to what Nyquist's theorem theoretically says, it also assumes you have an infinitely long period of data to sample. In the "sawtooth" example, the book cheats by drawing a signal that has higher frequency components. If you had an infinite series of those high/low/high/low patterns the only signal which can generate forever without a higher frequency component will be the sine wave.
    $endgroup$
    – Cort Ammon
    May 3 at 16:38






  • 2




    $begingroup$
    Did you mean that we should sample above Nyquist?
    $endgroup$
    – Ronan Paixão
    May 3 at 17:35






  • 1




    $begingroup$
    @ThePhoton If you look more closely at the source signal, you can see very faint dots, this makes it 2 4 8, you might have to get further or closer to your monitor to see all the dots in the last signal
    $endgroup$
    – Ferrybig
    May 3 at 17:53






  • 5




    $begingroup$
    @RonanPaixão Yes, in general you want to sample above the Nyquist rate. There's a tradeoff -- sampling fast is expensive in terms of acquisition hardware and memory storage, but as you sample more slowly the necessary anti-aliasing and reconstruction filters get more expensive. So you dicker and think and do big spreadsheets and then you decide -- and five years later on technology has advanced to the point that your "best" solution looks hopelessly wrong.
    $endgroup$
    – TimWescott
    May 3 at 17:59


















5












$begingroup$

Picture B is extremely wrong. It contains very sharp corners in the output signal. Very sharp corners equals very high frequencies, a lot higher then the sample frequency.



In order to fulfill the Nyquist sample theorems, you need to low pass filter the reconstructed signal. After low pass filtering the signal B would look like the input signal, not like like a triangle (as all the sharp corners can not pass the low pass filter).



To be exact you need to lowpass both the input signal and the output signal. The input signal needs to be low pass filtered to max half the sample frequency in order to not "fold" higher frequencies.



Sadly, it is a common misrepresentation of how sampling works. A more correct description will use the sinc function for reconstruction (I recommend a search for sinc function).



In real world applications it is impossible to have a "perfect" low pass filter (passing all frequencies below and blocking all above). This means that you would normally sample with a frequency at least 2.2 times the max frequency you want to reproduce (example: CD quality sampled at 44.1 kHz in order to allow a 20kHz max freqency). Even this difference would make it hard to create analog filters -- most real world applications "oversample" as does the low pass filter partly in the digital area.






share|improve this answer











$endgroup$








  • 3




    $begingroup$
    To be fair, you are interpreting the graphs in a different way than they are presented - there is no claim that they are a "reconstruction" only that they are the digitized output of the ADC. Connecting the dots with lines is a common temptation and feature of systems that minimally represent data without trying to interpret it.
    $endgroup$
    – Chris Stratton
    May 3 at 20:07







  • 1




    $begingroup$
    I agree to the temptation. Often though I see it depicted as steps instead, most software programs shows stairs when zoomed in close. The problem is when people start interpreting the lines (or stairs) as the true meaning of the sampled signal. Most often the samples will be replayed later.
    $endgroup$
    – ghellquist
    2 days ago










  • $begingroup$
    The question clearly shows monofrequency input. Aliasing is not the point of the question.
    $endgroup$
    – Scott Seidman
    yesterday


















2












$begingroup$

The sampling theorem states that the signal can be perfectly reconstructed if the sampling frequency is strictly greater than the highest frequency contents in the signal. But that reconstruction is based on inserting (infinite) sinc pulses at each sample. From a theoretical point of view this is a very important result, but in practice impossible to achieve exactly. What is described in the book page is a reconstruction method based on drawing straight lines between the samples, which is something completely different. So, I would say the book is correct, but it does not have anything to do with the sampling theorem.






share|improve this answer








New contributor



StefanH is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





$endgroup$








  • 3




    $begingroup$
    Not quite, "strictly greater then twice the BANDWIDTH" is the usual formulation, and the difference matters (This is why subsampling as a means to downconvert RF works).
    $endgroup$
    – Dan Mills
    May 3 at 20:09










  • $begingroup$
    Yes, but to explain the sampling theorem with respect to the question I would still go for highest frequency. The question is about sampling a pure sine, and then it can be confusing to introduce the bandwidth.
    $endgroup$
    – StefanH
    2 days ago


















2












$begingroup$

A very nice overview paper is Unser: Sampling - 50 years after Shannon. Your problem arises from the fact that pure, infinite sine signals are not covered by the Shannon sampling theorem. The applicable theorem for periodic signals is the earlier Nyquist sampling theorem.




The Shannon sampling theorem applies to functions that can be represented as



$
x(t)=intlimits_-W^WX(f)e^i2pi ft,df
$



where X is a square-integrable function.
Then this signal can be exactly represented from discrete samples as



$
x(t)=sumlimits_k=-infty^infty x(kfracT2)fracsin(pi W(t-kfracT2))pi W(t-kfracT2)
$



with $T=frac1W$ a "period". Note that the perfect reconstruction depends on samples from arbitrarily large times in the future and past. As their influence only falls as $frac1t$, truncating the sum has to include a rather large number of terms to reduce errors.



A pure sine function is not contained in that class, as its Fourier transform is composed of Dirac-delta distributions.




The earlier Nyquist sampling theorem states (or re-interprets an earlier insight) that if the signal is periodic with period T and highest frequency W=N/T, then it is a trigonometric polynomial



$
x(t)=sumlimits_n=-N^NX_ne^i2pifracnTt
$



with 2N+1 (non-trivial) coefficients and these coefficients can be reconstructed (by linear algebra) from 2N+1 samples in the period.



The case of a pure sine function falls in this class. It promises perfect reconstruction if 2N+1 samples over a time NT are taken.






share|improve this answer










New contributor



LutzL is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





$endgroup$




















    2












    $begingroup$

    What has been shared from the book does not say anything about "Nyquist Sampling Criterion" -- it is only talking about point-sampling a sine wave with a hypothetical ADC, and then (implicitly) constructing an output signal using a (not mentioned) simple DAC that performs a linear interpolation between the sample values.



    Given that context, the thesis statement of 'FIGURE 6.10' is generally correct and well demonstrated.




    As the sampling frequency of the ADC is increased, the fidelity of the digitized signal improves.




    If you wanted to talk about the fidelity of an idealized reconstruction, that's a different matter entirely. Any discussion of the Nyquist rate, implies the use of sinc interpolation which, again, isn't mentioned in the figure shown.




    The real flaw in this figure is the idea that a point-sample is a meaningful concept in engineering. Practically speaking, an ADC will be connected to a sensor component that works by accumulating a real-world input signal over some period of time.




    It's funny, however, that figure is apparently wrong (off by a factor of two) about the specific sampling frequencies shown in the diagrams -- although the "Output" shown is only affected by this in case 'C'.




    Using the quoted statement above, I found an eerily similar diagram in "A Practical Approach to Neurophysiologic Intraoperative Monitoring" in a discussion about EEG waveform processing. For what it's worth, that discussion includes the following:




    The theorem describing the minimum sampling frequency required for an ADC to faithfully represent an analog signal is known as the Nyquist theorem. It states that the sampling frequency of an ADC must be greater than twice that of the fastest frequency component of a waveform.







    share|improve this answer









    $endgroup$












    • $begingroup$
      ...some period of time and/or space -- when translating physical phenomena to digital samples. Crudely, there will always be an inherent low-pass filter.
      $endgroup$
      – nobar
      2 days ago










    • $begingroup$
      Something I just came across that address the inherent low-pass filter: engadget.com/2019/05/04/…
      $endgroup$
      – nobar
      yesterday










    • $begingroup$
      A point that I'm getting at is that a perfect reconstruction of a physical signal is basically impossible (in the general case), and that a best-possible reconstruction should take into account the effective lowpass filtering that is inherent in the physical to digital conversion.
      $endgroup$
      – nobar
      yesterday











    Your Answer






    StackExchange.ifUsing("editor", function ()
    return StackExchange.using("schematics", function ()
    StackExchange.schematics.init();
    );
    , "cicuitlab");

    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "135"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2felectronics.stackexchange.com%2fquestions%2f436768%2fis-the-book-wrong-about-the-nyquist-sampling-criterion%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    5 Answers
    5






    active

    oldest

    votes








    5 Answers
    5






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    16












    $begingroup$


    I thought sampling with twice the signal's highest frequency component would be adequate to completely recover the signal. But above it says sampling twice creates a saw-tooth like wave. Is the book wrong?




    The book is wrong, but not for the reason you think. If you squint at the dots that indicate samples, it's sampling at twice the frequency that it says.



    So first, you should draw some signals and sample them yourself (or use a math package, if you're not up to pencil and paper).



    Second, The Nyquist theorem says that it is theoretically possible to reconstruct a signal if you already know that the signal content's spectrum is strictly less than 1/2 the sampling rate.



    You reconstruct the signal by low-pass filtering it. Before filtering, the signal can be distorted, so you have to know what you're looking at to see that the result might look OK. Furthermore, the closer your signal content's spectrum is to the Nyquist limit, the sharper the cutoff needs to be in your anti-alias and reconstruction filters. This is fine in theory, but in practice a filter's response in the time domain gets longer roughly in proportion to how sharply it transitions from its passband to its stopband. So in general, if you can, you sample well above Nyquist.



    Here's a picture that goes with what your book should have said.



    Case A: one sample per cycle (samples made obvious)



    Case B: two samples per cycle, landing on the intersections -- note that this is the same output as the one sample per cycle case, but only because I sampled the first one at the intersections.



    Case C: Again, two samples per cycle, but this time at the extremes. If you sample at exactly twice the signal component frequency, then you can't reconstruct. In theory you could sample oh-so-slightly lower, but you'd need a filter with an impulse response that spans enough of the result so that you can reconstruct.



    Case D: Sampling at 4x the signal frequency. If you connect the dots you get a triangle wave, but it's not correct to do so -- in sampled time, the samples only exist "at the dots". Note that if you put this through a decent reconstruction filter you'll get a sine wave back, and if you change the phase of your sampling then the output will be shifted equally in phase, but its amplitude won't change.



    corrected sampling






    share|improve this answer











    $endgroup$








    • 1




      $begingroup$
      @ThePhoton I count 2, 4, 8 samples per cycle.
      $endgroup$
      – jpa
      May 3 at 16:29






    • 2




      $begingroup$
      As an addendum to what Nyquist's theorem theoretically says, it also assumes you have an infinitely long period of data to sample. In the "sawtooth" example, the book cheats by drawing a signal that has higher frequency components. If you had an infinite series of those high/low/high/low patterns the only signal which can generate forever without a higher frequency component will be the sine wave.
      $endgroup$
      – Cort Ammon
      May 3 at 16:38






    • 2




      $begingroup$
      Did you mean that we should sample above Nyquist?
      $endgroup$
      – Ronan Paixão
      May 3 at 17:35






    • 1




      $begingroup$
      @ThePhoton If you look more closely at the source signal, you can see very faint dots, this makes it 2 4 8, you might have to get further or closer to your monitor to see all the dots in the last signal
      $endgroup$
      – Ferrybig
      May 3 at 17:53






    • 5




      $begingroup$
      @RonanPaixão Yes, in general you want to sample above the Nyquist rate. There's a tradeoff -- sampling fast is expensive in terms of acquisition hardware and memory storage, but as you sample more slowly the necessary anti-aliasing and reconstruction filters get more expensive. So you dicker and think and do big spreadsheets and then you decide -- and five years later on technology has advanced to the point that your "best" solution looks hopelessly wrong.
      $endgroup$
      – TimWescott
      May 3 at 17:59















    16












    $begingroup$


    I thought sampling with twice the signal's highest frequency component would be adequate to completely recover the signal. But above it says sampling twice creates a saw-tooth like wave. Is the book wrong?




    The book is wrong, but not for the reason you think. If you squint at the dots that indicate samples, it's sampling at twice the frequency that it says.



    So first, you should draw some signals and sample them yourself (or use a math package, if you're not up to pencil and paper).



    Second, The Nyquist theorem says that it is theoretically possible to reconstruct a signal if you already know that the signal content's spectrum is strictly less than 1/2 the sampling rate.



    You reconstruct the signal by low-pass filtering it. Before filtering, the signal can be distorted, so you have to know what you're looking at to see that the result might look OK. Furthermore, the closer your signal content's spectrum is to the Nyquist limit, the sharper the cutoff needs to be in your anti-alias and reconstruction filters. This is fine in theory, but in practice a filter's response in the time domain gets longer roughly in proportion to how sharply it transitions from its passband to its stopband. So in general, if you can, you sample well above Nyquist.



    Here's a picture that goes with what your book should have said.



    Case A: one sample per cycle (samples made obvious)



    Case B: two samples per cycle, landing on the intersections -- note that this is the same output as the one sample per cycle case, but only because I sampled the first one at the intersections.



    Case C: Again, two samples per cycle, but this time at the extremes. If you sample at exactly twice the signal component frequency, then you can't reconstruct. In theory you could sample oh-so-slightly lower, but you'd need a filter with an impulse response that spans enough of the result so that you can reconstruct.



    Case D: Sampling at 4x the signal frequency. If you connect the dots you get a triangle wave, but it's not correct to do so -- in sampled time, the samples only exist "at the dots". Note that if you put this through a decent reconstruction filter you'll get a sine wave back, and if you change the phase of your sampling then the output will be shifted equally in phase, but its amplitude won't change.



    corrected sampling






    share|improve this answer











    $endgroup$








    • 1




      $begingroup$
      @ThePhoton I count 2, 4, 8 samples per cycle.
      $endgroup$
      – jpa
      May 3 at 16:29






    • 2




      $begingroup$
      As an addendum to what Nyquist's theorem theoretically says, it also assumes you have an infinitely long period of data to sample. In the "sawtooth" example, the book cheats by drawing a signal that has higher frequency components. If you had an infinite series of those high/low/high/low patterns the only signal which can generate forever without a higher frequency component will be the sine wave.
      $endgroup$
      – Cort Ammon
      May 3 at 16:38






    • 2




      $begingroup$
      Did you mean that we should sample above Nyquist?
      $endgroup$
      – Ronan Paixão
      May 3 at 17:35






    • 1




      $begingroup$
      @ThePhoton If you look more closely at the source signal, you can see very faint dots, this makes it 2 4 8, you might have to get further or closer to your monitor to see all the dots in the last signal
      $endgroup$
      – Ferrybig
      May 3 at 17:53






    • 5




      $begingroup$
      @RonanPaixão Yes, in general you want to sample above the Nyquist rate. There's a tradeoff -- sampling fast is expensive in terms of acquisition hardware and memory storage, but as you sample more slowly the necessary anti-aliasing and reconstruction filters get more expensive. So you dicker and think and do big spreadsheets and then you decide -- and five years later on technology has advanced to the point that your "best" solution looks hopelessly wrong.
      $endgroup$
      – TimWescott
      May 3 at 17:59













    16












    16








    16





    $begingroup$


    I thought sampling with twice the signal's highest frequency component would be adequate to completely recover the signal. But above it says sampling twice creates a saw-tooth like wave. Is the book wrong?




    The book is wrong, but not for the reason you think. If you squint at the dots that indicate samples, it's sampling at twice the frequency that it says.



    So first, you should draw some signals and sample them yourself (or use a math package, if you're not up to pencil and paper).



    Second, The Nyquist theorem says that it is theoretically possible to reconstruct a signal if you already know that the signal content's spectrum is strictly less than 1/2 the sampling rate.



    You reconstruct the signal by low-pass filtering it. Before filtering, the signal can be distorted, so you have to know what you're looking at to see that the result might look OK. Furthermore, the closer your signal content's spectrum is to the Nyquist limit, the sharper the cutoff needs to be in your anti-alias and reconstruction filters. This is fine in theory, but in practice a filter's response in the time domain gets longer roughly in proportion to how sharply it transitions from its passband to its stopband. So in general, if you can, you sample well above Nyquist.



    Here's a picture that goes with what your book should have said.



    Case A: one sample per cycle (samples made obvious)



    Case B: two samples per cycle, landing on the intersections -- note that this is the same output as the one sample per cycle case, but only because I sampled the first one at the intersections.



    Case C: Again, two samples per cycle, but this time at the extremes. If you sample at exactly twice the signal component frequency, then you can't reconstruct. In theory you could sample oh-so-slightly lower, but you'd need a filter with an impulse response that spans enough of the result so that you can reconstruct.



    Case D: Sampling at 4x the signal frequency. If you connect the dots you get a triangle wave, but it's not correct to do so -- in sampled time, the samples only exist "at the dots". Note that if you put this through a decent reconstruction filter you'll get a sine wave back, and if you change the phase of your sampling then the output will be shifted equally in phase, but its amplitude won't change.



    corrected sampling






    share|improve this answer











    $endgroup$




    I thought sampling with twice the signal's highest frequency component would be adequate to completely recover the signal. But above it says sampling twice creates a saw-tooth like wave. Is the book wrong?




    The book is wrong, but not for the reason you think. If you squint at the dots that indicate samples, it's sampling at twice the frequency that it says.



    So first, you should draw some signals and sample them yourself (or use a math package, if you're not up to pencil and paper).



    Second, The Nyquist theorem says that it is theoretically possible to reconstruct a signal if you already know that the signal content's spectrum is strictly less than 1/2 the sampling rate.



    You reconstruct the signal by low-pass filtering it. Before filtering, the signal can be distorted, so you have to know what you're looking at to see that the result might look OK. Furthermore, the closer your signal content's spectrum is to the Nyquist limit, the sharper the cutoff needs to be in your anti-alias and reconstruction filters. This is fine in theory, but in practice a filter's response in the time domain gets longer roughly in proportion to how sharply it transitions from its passband to its stopband. So in general, if you can, you sample well above Nyquist.



    Here's a picture that goes with what your book should have said.



    Case A: one sample per cycle (samples made obvious)



    Case B: two samples per cycle, landing on the intersections -- note that this is the same output as the one sample per cycle case, but only because I sampled the first one at the intersections.



    Case C: Again, two samples per cycle, but this time at the extremes. If you sample at exactly twice the signal component frequency, then you can't reconstruct. In theory you could sample oh-so-slightly lower, but you'd need a filter with an impulse response that spans enough of the result so that you can reconstruct.



    Case D: Sampling at 4x the signal frequency. If you connect the dots you get a triangle wave, but it's not correct to do so -- in sampled time, the samples only exist "at the dots". Note that if you put this through a decent reconstruction filter you'll get a sine wave back, and if you change the phase of your sampling then the output will be shifted equally in phase, but its amplitude won't change.



    corrected sampling







    share|improve this answer














    share|improve this answer



    share|improve this answer








    edited May 4 at 1:00

























    answered May 3 at 15:04









    TimWescottTimWescott

    7,6341417




    7,6341417







    • 1




      $begingroup$
      @ThePhoton I count 2, 4, 8 samples per cycle.
      $endgroup$
      – jpa
      May 3 at 16:29






    • 2




      $begingroup$
      As an addendum to what Nyquist's theorem theoretically says, it also assumes you have an infinitely long period of data to sample. In the "sawtooth" example, the book cheats by drawing a signal that has higher frequency components. If you had an infinite series of those high/low/high/low patterns the only signal which can generate forever without a higher frequency component will be the sine wave.
      $endgroup$
      – Cort Ammon
      May 3 at 16:38






    • 2




      $begingroup$
      Did you mean that we should sample above Nyquist?
      $endgroup$
      – Ronan Paixão
      May 3 at 17:35






    • 1




      $begingroup$
      @ThePhoton If you look more closely at the source signal, you can see very faint dots, this makes it 2 4 8, you might have to get further or closer to your monitor to see all the dots in the last signal
      $endgroup$
      – Ferrybig
      May 3 at 17:53






    • 5




      $begingroup$
      @RonanPaixão Yes, in general you want to sample above the Nyquist rate. There's a tradeoff -- sampling fast is expensive in terms of acquisition hardware and memory storage, but as you sample more slowly the necessary anti-aliasing and reconstruction filters get more expensive. So you dicker and think and do big spreadsheets and then you decide -- and five years later on technology has advanced to the point that your "best" solution looks hopelessly wrong.
      $endgroup$
      – TimWescott
      May 3 at 17:59












    • 1




      $begingroup$
      @ThePhoton I count 2, 4, 8 samples per cycle.
      $endgroup$
      – jpa
      May 3 at 16:29






    • 2




      $begingroup$
      As an addendum to what Nyquist's theorem theoretically says, it also assumes you have an infinitely long period of data to sample. In the "sawtooth" example, the book cheats by drawing a signal that has higher frequency components. If you had an infinite series of those high/low/high/low patterns the only signal which can generate forever without a higher frequency component will be the sine wave.
      $endgroup$
      – Cort Ammon
      May 3 at 16:38






    • 2




      $begingroup$
      Did you mean that we should sample above Nyquist?
      $endgroup$
      – Ronan Paixão
      May 3 at 17:35






    • 1




      $begingroup$
      @ThePhoton If you look more closely at the source signal, you can see very faint dots, this makes it 2 4 8, you might have to get further or closer to your monitor to see all the dots in the last signal
      $endgroup$
      – Ferrybig
      May 3 at 17:53






    • 5




      $begingroup$
      @RonanPaixão Yes, in general you want to sample above the Nyquist rate. There's a tradeoff -- sampling fast is expensive in terms of acquisition hardware and memory storage, but as you sample more slowly the necessary anti-aliasing and reconstruction filters get more expensive. So you dicker and think and do big spreadsheets and then you decide -- and five years later on technology has advanced to the point that your "best" solution looks hopelessly wrong.
      $endgroup$
      – TimWescott
      May 3 at 17:59







    1




    1




    $begingroup$
    @ThePhoton I count 2, 4, 8 samples per cycle.
    $endgroup$
    – jpa
    May 3 at 16:29




    $begingroup$
    @ThePhoton I count 2, 4, 8 samples per cycle.
    $endgroup$
    – jpa
    May 3 at 16:29




    2




    2




    $begingroup$
    As an addendum to what Nyquist's theorem theoretically says, it also assumes you have an infinitely long period of data to sample. In the "sawtooth" example, the book cheats by drawing a signal that has higher frequency components. If you had an infinite series of those high/low/high/low patterns the only signal which can generate forever without a higher frequency component will be the sine wave.
    $endgroup$
    – Cort Ammon
    May 3 at 16:38




    $begingroup$
    As an addendum to what Nyquist's theorem theoretically says, it also assumes you have an infinitely long period of data to sample. In the "sawtooth" example, the book cheats by drawing a signal that has higher frequency components. If you had an infinite series of those high/low/high/low patterns the only signal which can generate forever without a higher frequency component will be the sine wave.
    $endgroup$
    – Cort Ammon
    May 3 at 16:38




    2




    2




    $begingroup$
    Did you mean that we should sample above Nyquist?
    $endgroup$
    – Ronan Paixão
    May 3 at 17:35




    $begingroup$
    Did you mean that we should sample above Nyquist?
    $endgroup$
    – Ronan Paixão
    May 3 at 17:35




    1




    1




    $begingroup$
    @ThePhoton If you look more closely at the source signal, you can see very faint dots, this makes it 2 4 8, you might have to get further or closer to your monitor to see all the dots in the last signal
    $endgroup$
    – Ferrybig
    May 3 at 17:53




    $begingroup$
    @ThePhoton If you look more closely at the source signal, you can see very faint dots, this makes it 2 4 8, you might have to get further or closer to your monitor to see all the dots in the last signal
    $endgroup$
    – Ferrybig
    May 3 at 17:53




    5




    5




    $begingroup$
    @RonanPaixão Yes, in general you want to sample above the Nyquist rate. There's a tradeoff -- sampling fast is expensive in terms of acquisition hardware and memory storage, but as you sample more slowly the necessary anti-aliasing and reconstruction filters get more expensive. So you dicker and think and do big spreadsheets and then you decide -- and five years later on technology has advanced to the point that your "best" solution looks hopelessly wrong.
    $endgroup$
    – TimWescott
    May 3 at 17:59




    $begingroup$
    @RonanPaixão Yes, in general you want to sample above the Nyquist rate. There's a tradeoff -- sampling fast is expensive in terms of acquisition hardware and memory storage, but as you sample more slowly the necessary anti-aliasing and reconstruction filters get more expensive. So you dicker and think and do big spreadsheets and then you decide -- and five years later on technology has advanced to the point that your "best" solution looks hopelessly wrong.
    $endgroup$
    – TimWescott
    May 3 at 17:59













    5












    $begingroup$

    Picture B is extremely wrong. It contains very sharp corners in the output signal. Very sharp corners equals very high frequencies, a lot higher then the sample frequency.



    In order to fulfill the Nyquist sample theorems, you need to low pass filter the reconstructed signal. After low pass filtering the signal B would look like the input signal, not like like a triangle (as all the sharp corners can not pass the low pass filter).



    To be exact you need to lowpass both the input signal and the output signal. The input signal needs to be low pass filtered to max half the sample frequency in order to not "fold" higher frequencies.



    Sadly, it is a common misrepresentation of how sampling works. A more correct description will use the sinc function for reconstruction (I recommend a search for sinc function).



    In real world applications it is impossible to have a "perfect" low pass filter (passing all frequencies below and blocking all above). This means that you would normally sample with a frequency at least 2.2 times the max frequency you want to reproduce (example: CD quality sampled at 44.1 kHz in order to allow a 20kHz max freqency). Even this difference would make it hard to create analog filters -- most real world applications "oversample" as does the low pass filter partly in the digital area.






    share|improve this answer











    $endgroup$








    • 3




      $begingroup$
      To be fair, you are interpreting the graphs in a different way than they are presented - there is no claim that they are a "reconstruction" only that they are the digitized output of the ADC. Connecting the dots with lines is a common temptation and feature of systems that minimally represent data without trying to interpret it.
      $endgroup$
      – Chris Stratton
      May 3 at 20:07







    • 1




      $begingroup$
      I agree to the temptation. Often though I see it depicted as steps instead, most software programs shows stairs when zoomed in close. The problem is when people start interpreting the lines (or stairs) as the true meaning of the sampled signal. Most often the samples will be replayed later.
      $endgroup$
      – ghellquist
      2 days ago










    • $begingroup$
      The question clearly shows monofrequency input. Aliasing is not the point of the question.
      $endgroup$
      – Scott Seidman
      yesterday















    5












    $begingroup$

    Picture B is extremely wrong. It contains very sharp corners in the output signal. Very sharp corners equals very high frequencies, a lot higher then the sample frequency.



    In order to fulfill the Nyquist sample theorems, you need to low pass filter the reconstructed signal. After low pass filtering the signal B would look like the input signal, not like like a triangle (as all the sharp corners can not pass the low pass filter).



    To be exact you need to lowpass both the input signal and the output signal. The input signal needs to be low pass filtered to max half the sample frequency in order to not "fold" higher frequencies.



    Sadly, it is a common misrepresentation of how sampling works. A more correct description will use the sinc function for reconstruction (I recommend a search for sinc function).



    In real world applications it is impossible to have a "perfect" low pass filter (passing all frequencies below and blocking all above). This means that you would normally sample with a frequency at least 2.2 times the max frequency you want to reproduce (example: CD quality sampled at 44.1 kHz in order to allow a 20kHz max freqency). Even this difference would make it hard to create analog filters -- most real world applications "oversample" as does the low pass filter partly in the digital area.






    share|improve this answer











    $endgroup$








    • 3




      $begingroup$
      To be fair, you are interpreting the graphs in a different way than they are presented - there is no claim that they are a "reconstruction" only that they are the digitized output of the ADC. Connecting the dots with lines is a common temptation and feature of systems that minimally represent data without trying to interpret it.
      $endgroup$
      – Chris Stratton
      May 3 at 20:07







    • 1




      $begingroup$
      I agree to the temptation. Often though I see it depicted as steps instead, most software programs shows stairs when zoomed in close. The problem is when people start interpreting the lines (or stairs) as the true meaning of the sampled signal. Most often the samples will be replayed later.
      $endgroup$
      – ghellquist
      2 days ago










    • $begingroup$
      The question clearly shows monofrequency input. Aliasing is not the point of the question.
      $endgroup$
      – Scott Seidman
      yesterday













    5












    5








    5





    $begingroup$

    Picture B is extremely wrong. It contains very sharp corners in the output signal. Very sharp corners equals very high frequencies, a lot higher then the sample frequency.



    In order to fulfill the Nyquist sample theorems, you need to low pass filter the reconstructed signal. After low pass filtering the signal B would look like the input signal, not like like a triangle (as all the sharp corners can not pass the low pass filter).



    To be exact you need to lowpass both the input signal and the output signal. The input signal needs to be low pass filtered to max half the sample frequency in order to not "fold" higher frequencies.



    Sadly, it is a common misrepresentation of how sampling works. A more correct description will use the sinc function for reconstruction (I recommend a search for sinc function).



    In real world applications it is impossible to have a "perfect" low pass filter (passing all frequencies below and blocking all above). This means that you would normally sample with a frequency at least 2.2 times the max frequency you want to reproduce (example: CD quality sampled at 44.1 kHz in order to allow a 20kHz max freqency). Even this difference would make it hard to create analog filters -- most real world applications "oversample" as does the low pass filter partly in the digital area.






    share|improve this answer











    $endgroup$



    Picture B is extremely wrong. It contains very sharp corners in the output signal. Very sharp corners equals very high frequencies, a lot higher then the sample frequency.



    In order to fulfill the Nyquist sample theorems, you need to low pass filter the reconstructed signal. After low pass filtering the signal B would look like the input signal, not like like a triangle (as all the sharp corners can not pass the low pass filter).



    To be exact you need to lowpass both the input signal and the output signal. The input signal needs to be low pass filtered to max half the sample frequency in order to not "fold" higher frequencies.



    Sadly, it is a common misrepresentation of how sampling works. A more correct description will use the sinc function for reconstruction (I recommend a search for sinc function).



    In real world applications it is impossible to have a "perfect" low pass filter (passing all frequencies below and blocking all above). This means that you would normally sample with a frequency at least 2.2 times the max frequency you want to reproduce (example: CD quality sampled at 44.1 kHz in order to allow a 20kHz max freqency). Even this difference would make it hard to create analog filters -- most real world applications "oversample" as does the low pass filter partly in the digital area.







    share|improve this answer














    share|improve this answer



    share|improve this answer








    edited 2 days ago









    Blair Fonville

    2,70021128




    2,70021128










    answered May 3 at 17:55









    ghellquistghellquist

    1713




    1713







    • 3




      $begingroup$
      To be fair, you are interpreting the graphs in a different way than they are presented - there is no claim that they are a "reconstruction" only that they are the digitized output of the ADC. Connecting the dots with lines is a common temptation and feature of systems that minimally represent data without trying to interpret it.
      $endgroup$
      – Chris Stratton
      May 3 at 20:07







    • 1




      $begingroup$
      I agree to the temptation. Often though I see it depicted as steps instead, most software programs shows stairs when zoomed in close. The problem is when people start interpreting the lines (or stairs) as the true meaning of the sampled signal. Most often the samples will be replayed later.
      $endgroup$
      – ghellquist
      2 days ago










    • $begingroup$
      The question clearly shows monofrequency input. Aliasing is not the point of the question.
      $endgroup$
      – Scott Seidman
      yesterday












    • 3




      $begingroup$
      To be fair, you are interpreting the graphs in a different way than they are presented - there is no claim that they are a "reconstruction" only that they are the digitized output of the ADC. Connecting the dots with lines is a common temptation and feature of systems that minimally represent data without trying to interpret it.
      $endgroup$
      – Chris Stratton
      May 3 at 20:07







    • 1




      $begingroup$
      I agree to the temptation. Often though I see it depicted as steps instead, most software programs shows stairs when zoomed in close. The problem is when people start interpreting the lines (or stairs) as the true meaning of the sampled signal. Most often the samples will be replayed later.
      $endgroup$
      – ghellquist
      2 days ago










    • $begingroup$
      The question clearly shows monofrequency input. Aliasing is not the point of the question.
      $endgroup$
      – Scott Seidman
      yesterday







    3




    3




    $begingroup$
    To be fair, you are interpreting the graphs in a different way than they are presented - there is no claim that they are a "reconstruction" only that they are the digitized output of the ADC. Connecting the dots with lines is a common temptation and feature of systems that minimally represent data without trying to interpret it.
    $endgroup$
    – Chris Stratton
    May 3 at 20:07





    $begingroup$
    To be fair, you are interpreting the graphs in a different way than they are presented - there is no claim that they are a "reconstruction" only that they are the digitized output of the ADC. Connecting the dots with lines is a common temptation and feature of systems that minimally represent data without trying to interpret it.
    $endgroup$
    – Chris Stratton
    May 3 at 20:07





    1




    1




    $begingroup$
    I agree to the temptation. Often though I see it depicted as steps instead, most software programs shows stairs when zoomed in close. The problem is when people start interpreting the lines (or stairs) as the true meaning of the sampled signal. Most often the samples will be replayed later.
    $endgroup$
    – ghellquist
    2 days ago




    $begingroup$
    I agree to the temptation. Often though I see it depicted as steps instead, most software programs shows stairs when zoomed in close. The problem is when people start interpreting the lines (or stairs) as the true meaning of the sampled signal. Most often the samples will be replayed later.
    $endgroup$
    – ghellquist
    2 days ago












    $begingroup$
    The question clearly shows monofrequency input. Aliasing is not the point of the question.
    $endgroup$
    – Scott Seidman
    yesterday




    $begingroup$
    The question clearly shows monofrequency input. Aliasing is not the point of the question.
    $endgroup$
    – Scott Seidman
    yesterday











    2












    $begingroup$

    The sampling theorem states that the signal can be perfectly reconstructed if the sampling frequency is strictly greater than the highest frequency contents in the signal. But that reconstruction is based on inserting (infinite) sinc pulses at each sample. From a theoretical point of view this is a very important result, but in practice impossible to achieve exactly. What is described in the book page is a reconstruction method based on drawing straight lines between the samples, which is something completely different. So, I would say the book is correct, but it does not have anything to do with the sampling theorem.






    share|improve this answer








    New contributor



    StefanH is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.





    $endgroup$








    • 3




      $begingroup$
      Not quite, "strictly greater then twice the BANDWIDTH" is the usual formulation, and the difference matters (This is why subsampling as a means to downconvert RF works).
      $endgroup$
      – Dan Mills
      May 3 at 20:09










    • $begingroup$
      Yes, but to explain the sampling theorem with respect to the question I would still go for highest frequency. The question is about sampling a pure sine, and then it can be confusing to introduce the bandwidth.
      $endgroup$
      – StefanH
      2 days ago















    2












    $begingroup$

    The sampling theorem states that the signal can be perfectly reconstructed if the sampling frequency is strictly greater than the highest frequency contents in the signal. But that reconstruction is based on inserting (infinite) sinc pulses at each sample. From a theoretical point of view this is a very important result, but in practice impossible to achieve exactly. What is described in the book page is a reconstruction method based on drawing straight lines between the samples, which is something completely different. So, I would say the book is correct, but it does not have anything to do with the sampling theorem.






    share|improve this answer








    New contributor



    StefanH is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.





    $endgroup$








    • 3




      $begingroup$
      Not quite, "strictly greater then twice the BANDWIDTH" is the usual formulation, and the difference matters (This is why subsampling as a means to downconvert RF works).
      $endgroup$
      – Dan Mills
      May 3 at 20:09










    • $begingroup$
      Yes, but to explain the sampling theorem with respect to the question I would still go for highest frequency. The question is about sampling a pure sine, and then it can be confusing to introduce the bandwidth.
      $endgroup$
      – StefanH
      2 days ago













    2












    2








    2





    $begingroup$

    The sampling theorem states that the signal can be perfectly reconstructed if the sampling frequency is strictly greater than the highest frequency contents in the signal. But that reconstruction is based on inserting (infinite) sinc pulses at each sample. From a theoretical point of view this is a very important result, but in practice impossible to achieve exactly. What is described in the book page is a reconstruction method based on drawing straight lines between the samples, which is something completely different. So, I would say the book is correct, but it does not have anything to do with the sampling theorem.






    share|improve this answer








    New contributor



    StefanH is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.





    $endgroup$



    The sampling theorem states that the signal can be perfectly reconstructed if the sampling frequency is strictly greater than the highest frequency contents in the signal. But that reconstruction is based on inserting (infinite) sinc pulses at each sample. From a theoretical point of view this is a very important result, but in practice impossible to achieve exactly. What is described in the book page is a reconstruction method based on drawing straight lines between the samples, which is something completely different. So, I would say the book is correct, but it does not have anything to do with the sampling theorem.







    share|improve this answer








    New contributor



    StefanH is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.








    share|improve this answer



    share|improve this answer






    New contributor



    StefanH is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.








    answered May 3 at 19:16









    StefanHStefanH

    1211




    1211




    New contributor



    StefanH is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.




    New contributor




    StefanH is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.









    • 3




      $begingroup$
      Not quite, "strictly greater then twice the BANDWIDTH" is the usual formulation, and the difference matters (This is why subsampling as a means to downconvert RF works).
      $endgroup$
      – Dan Mills
      May 3 at 20:09










    • $begingroup$
      Yes, but to explain the sampling theorem with respect to the question I would still go for highest frequency. The question is about sampling a pure sine, and then it can be confusing to introduce the bandwidth.
      $endgroup$
      – StefanH
      2 days ago












    • 3




      $begingroup$
      Not quite, "strictly greater then twice the BANDWIDTH" is the usual formulation, and the difference matters (This is why subsampling as a means to downconvert RF works).
      $endgroup$
      – Dan Mills
      May 3 at 20:09










    • $begingroup$
      Yes, but to explain the sampling theorem with respect to the question I would still go for highest frequency. The question is about sampling a pure sine, and then it can be confusing to introduce the bandwidth.
      $endgroup$
      – StefanH
      2 days ago







    3




    3




    $begingroup$
    Not quite, "strictly greater then twice the BANDWIDTH" is the usual formulation, and the difference matters (This is why subsampling as a means to downconvert RF works).
    $endgroup$
    – Dan Mills
    May 3 at 20:09




    $begingroup$
    Not quite, "strictly greater then twice the BANDWIDTH" is the usual formulation, and the difference matters (This is why subsampling as a means to downconvert RF works).
    $endgroup$
    – Dan Mills
    May 3 at 20:09












    $begingroup$
    Yes, but to explain the sampling theorem with respect to the question I would still go for highest frequency. The question is about sampling a pure sine, and then it can be confusing to introduce the bandwidth.
    $endgroup$
    – StefanH
    2 days ago




    $begingroup$
    Yes, but to explain the sampling theorem with respect to the question I would still go for highest frequency. The question is about sampling a pure sine, and then it can be confusing to introduce the bandwidth.
    $endgroup$
    – StefanH
    2 days ago











    2












    $begingroup$

    A very nice overview paper is Unser: Sampling - 50 years after Shannon. Your problem arises from the fact that pure, infinite sine signals are not covered by the Shannon sampling theorem. The applicable theorem for periodic signals is the earlier Nyquist sampling theorem.




    The Shannon sampling theorem applies to functions that can be represented as



    $
    x(t)=intlimits_-W^WX(f)e^i2pi ft,df
    $



    where X is a square-integrable function.
    Then this signal can be exactly represented from discrete samples as



    $
    x(t)=sumlimits_k=-infty^infty x(kfracT2)fracsin(pi W(t-kfracT2))pi W(t-kfracT2)
    $



    with $T=frac1W$ a "period". Note that the perfect reconstruction depends on samples from arbitrarily large times in the future and past. As their influence only falls as $frac1t$, truncating the sum has to include a rather large number of terms to reduce errors.



    A pure sine function is not contained in that class, as its Fourier transform is composed of Dirac-delta distributions.




    The earlier Nyquist sampling theorem states (or re-interprets an earlier insight) that if the signal is periodic with period T and highest frequency W=N/T, then it is a trigonometric polynomial



    $
    x(t)=sumlimits_n=-N^NX_ne^i2pifracnTt
    $



    with 2N+1 (non-trivial) coefficients and these coefficients can be reconstructed (by linear algebra) from 2N+1 samples in the period.



    The case of a pure sine function falls in this class. It promises perfect reconstruction if 2N+1 samples over a time NT are taken.






    share|improve this answer










    New contributor



    LutzL is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.





    $endgroup$

















      2












      $begingroup$

      A very nice overview paper is Unser: Sampling - 50 years after Shannon. Your problem arises from the fact that pure, infinite sine signals are not covered by the Shannon sampling theorem. The applicable theorem for periodic signals is the earlier Nyquist sampling theorem.




      The Shannon sampling theorem applies to functions that can be represented as



      $
      x(t)=intlimits_-W^WX(f)e^i2pi ft,df
      $



      where X is a square-integrable function.
      Then this signal can be exactly represented from discrete samples as



      $
      x(t)=sumlimits_k=-infty^infty x(kfracT2)fracsin(pi W(t-kfracT2))pi W(t-kfracT2)
      $



      with $T=frac1W$ a "period". Note that the perfect reconstruction depends on samples from arbitrarily large times in the future and past. As their influence only falls as $frac1t$, truncating the sum has to include a rather large number of terms to reduce errors.



      A pure sine function is not contained in that class, as its Fourier transform is composed of Dirac-delta distributions.




      The earlier Nyquist sampling theorem states (or re-interprets an earlier insight) that if the signal is periodic with period T and highest frequency W=N/T, then it is a trigonometric polynomial



      $
      x(t)=sumlimits_n=-N^NX_ne^i2pifracnTt
      $



      with 2N+1 (non-trivial) coefficients and these coefficients can be reconstructed (by linear algebra) from 2N+1 samples in the period.



      The case of a pure sine function falls in this class. It promises perfect reconstruction if 2N+1 samples over a time NT are taken.






      share|improve this answer










      New contributor



      LutzL is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.





      $endgroup$















        2












        2








        2





        $begingroup$

        A very nice overview paper is Unser: Sampling - 50 years after Shannon. Your problem arises from the fact that pure, infinite sine signals are not covered by the Shannon sampling theorem. The applicable theorem for periodic signals is the earlier Nyquist sampling theorem.




        The Shannon sampling theorem applies to functions that can be represented as



        $
        x(t)=intlimits_-W^WX(f)e^i2pi ft,df
        $



        where X is a square-integrable function.
        Then this signal can be exactly represented from discrete samples as



        $
        x(t)=sumlimits_k=-infty^infty x(kfracT2)fracsin(pi W(t-kfracT2))pi W(t-kfracT2)
        $



        with $T=frac1W$ a "period". Note that the perfect reconstruction depends on samples from arbitrarily large times in the future and past. As their influence only falls as $frac1t$, truncating the sum has to include a rather large number of terms to reduce errors.



        A pure sine function is not contained in that class, as its Fourier transform is composed of Dirac-delta distributions.




        The earlier Nyquist sampling theorem states (or re-interprets an earlier insight) that if the signal is periodic with period T and highest frequency W=N/T, then it is a trigonometric polynomial



        $
        x(t)=sumlimits_n=-N^NX_ne^i2pifracnTt
        $



        with 2N+1 (non-trivial) coefficients and these coefficients can be reconstructed (by linear algebra) from 2N+1 samples in the period.



        The case of a pure sine function falls in this class. It promises perfect reconstruction if 2N+1 samples over a time NT are taken.






        share|improve this answer










        New contributor



        LutzL is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.





        $endgroup$



        A very nice overview paper is Unser: Sampling - 50 years after Shannon. Your problem arises from the fact that pure, infinite sine signals are not covered by the Shannon sampling theorem. The applicable theorem for periodic signals is the earlier Nyquist sampling theorem.




        The Shannon sampling theorem applies to functions that can be represented as



        $
        x(t)=intlimits_-W^WX(f)e^i2pi ft,df
        $



        where X is a square-integrable function.
        Then this signal can be exactly represented from discrete samples as



        $
        x(t)=sumlimits_k=-infty^infty x(kfracT2)fracsin(pi W(t-kfracT2))pi W(t-kfracT2)
        $



        with $T=frac1W$ a "period". Note that the perfect reconstruction depends on samples from arbitrarily large times in the future and past. As their influence only falls as $frac1t$, truncating the sum has to include a rather large number of terms to reduce errors.



        A pure sine function is not contained in that class, as its Fourier transform is composed of Dirac-delta distributions.




        The earlier Nyquist sampling theorem states (or re-interprets an earlier insight) that if the signal is periodic with period T and highest frequency W=N/T, then it is a trigonometric polynomial



        $
        x(t)=sumlimits_n=-N^NX_ne^i2pifracnTt
        $



        with 2N+1 (non-trivial) coefficients and these coefficients can be reconstructed (by linear algebra) from 2N+1 samples in the period.



        The case of a pure sine function falls in this class. It promises perfect reconstruction if 2N+1 samples over a time NT are taken.







        share|improve this answer










        New contributor



        LutzL is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.








        share|improve this answer



        share|improve this answer








        edited 2 days ago





















        New contributor



        LutzL is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.








        answered 2 days ago









        LutzLLutzL

        1233




        1233




        New contributor



        LutzL is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.




        New contributor




        LutzL is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.























            2












            $begingroup$

            What has been shared from the book does not say anything about "Nyquist Sampling Criterion" -- it is only talking about point-sampling a sine wave with a hypothetical ADC, and then (implicitly) constructing an output signal using a (not mentioned) simple DAC that performs a linear interpolation between the sample values.



            Given that context, the thesis statement of 'FIGURE 6.10' is generally correct and well demonstrated.




            As the sampling frequency of the ADC is increased, the fidelity of the digitized signal improves.




            If you wanted to talk about the fidelity of an idealized reconstruction, that's a different matter entirely. Any discussion of the Nyquist rate, implies the use of sinc interpolation which, again, isn't mentioned in the figure shown.




            The real flaw in this figure is the idea that a point-sample is a meaningful concept in engineering. Practically speaking, an ADC will be connected to a sensor component that works by accumulating a real-world input signal over some period of time.




            It's funny, however, that figure is apparently wrong (off by a factor of two) about the specific sampling frequencies shown in the diagrams -- although the "Output" shown is only affected by this in case 'C'.




            Using the quoted statement above, I found an eerily similar diagram in "A Practical Approach to Neurophysiologic Intraoperative Monitoring" in a discussion about EEG waveform processing. For what it's worth, that discussion includes the following:




            The theorem describing the minimum sampling frequency required for an ADC to faithfully represent an analog signal is known as the Nyquist theorem. It states that the sampling frequency of an ADC must be greater than twice that of the fastest frequency component of a waveform.







            share|improve this answer









            $endgroup$












            • $begingroup$
              ...some period of time and/or space -- when translating physical phenomena to digital samples. Crudely, there will always be an inherent low-pass filter.
              $endgroup$
              – nobar
              2 days ago










            • $begingroup$
              Something I just came across that address the inherent low-pass filter: engadget.com/2019/05/04/…
              $endgroup$
              – nobar
              yesterday










            • $begingroup$
              A point that I'm getting at is that a perfect reconstruction of a physical signal is basically impossible (in the general case), and that a best-possible reconstruction should take into account the effective lowpass filtering that is inherent in the physical to digital conversion.
              $endgroup$
              – nobar
              yesterday















            2












            $begingroup$

            What has been shared from the book does not say anything about "Nyquist Sampling Criterion" -- it is only talking about point-sampling a sine wave with a hypothetical ADC, and then (implicitly) constructing an output signal using a (not mentioned) simple DAC that performs a linear interpolation between the sample values.



            Given that context, the thesis statement of 'FIGURE 6.10' is generally correct and well demonstrated.




            As the sampling frequency of the ADC is increased, the fidelity of the digitized signal improves.




            If you wanted to talk about the fidelity of an idealized reconstruction, that's a different matter entirely. Any discussion of the Nyquist rate, implies the use of sinc interpolation which, again, isn't mentioned in the figure shown.




            The real flaw in this figure is the idea that a point-sample is a meaningful concept in engineering. Practically speaking, an ADC will be connected to a sensor component that works by accumulating a real-world input signal over some period of time.




            It's funny, however, that figure is apparently wrong (off by a factor of two) about the specific sampling frequencies shown in the diagrams -- although the "Output" shown is only affected by this in case 'C'.




            Using the quoted statement above, I found an eerily similar diagram in "A Practical Approach to Neurophysiologic Intraoperative Monitoring" in a discussion about EEG waveform processing. For what it's worth, that discussion includes the following:




            The theorem describing the minimum sampling frequency required for an ADC to faithfully represent an analog signal is known as the Nyquist theorem. It states that the sampling frequency of an ADC must be greater than twice that of the fastest frequency component of a waveform.







            share|improve this answer









            $endgroup$












            • $begingroup$
              ...some period of time and/or space -- when translating physical phenomena to digital samples. Crudely, there will always be an inherent low-pass filter.
              $endgroup$
              – nobar
              2 days ago










            • $begingroup$
              Something I just came across that address the inherent low-pass filter: engadget.com/2019/05/04/…
              $endgroup$
              – nobar
              yesterday










            • $begingroup$
              A point that I'm getting at is that a perfect reconstruction of a physical signal is basically impossible (in the general case), and that a best-possible reconstruction should take into account the effective lowpass filtering that is inherent in the physical to digital conversion.
              $endgroup$
              – nobar
              yesterday













            2












            2








            2





            $begingroup$

            What has been shared from the book does not say anything about "Nyquist Sampling Criterion" -- it is only talking about point-sampling a sine wave with a hypothetical ADC, and then (implicitly) constructing an output signal using a (not mentioned) simple DAC that performs a linear interpolation between the sample values.



            Given that context, the thesis statement of 'FIGURE 6.10' is generally correct and well demonstrated.




            As the sampling frequency of the ADC is increased, the fidelity of the digitized signal improves.




            If you wanted to talk about the fidelity of an idealized reconstruction, that's a different matter entirely. Any discussion of the Nyquist rate, implies the use of sinc interpolation which, again, isn't mentioned in the figure shown.




            The real flaw in this figure is the idea that a point-sample is a meaningful concept in engineering. Practically speaking, an ADC will be connected to a sensor component that works by accumulating a real-world input signal over some period of time.




            It's funny, however, that figure is apparently wrong (off by a factor of two) about the specific sampling frequencies shown in the diagrams -- although the "Output" shown is only affected by this in case 'C'.




            Using the quoted statement above, I found an eerily similar diagram in "A Practical Approach to Neurophysiologic Intraoperative Monitoring" in a discussion about EEG waveform processing. For what it's worth, that discussion includes the following:




            The theorem describing the minimum sampling frequency required for an ADC to faithfully represent an analog signal is known as the Nyquist theorem. It states that the sampling frequency of an ADC must be greater than twice that of the fastest frequency component of a waveform.







            share|improve this answer









            $endgroup$



            What has been shared from the book does not say anything about "Nyquist Sampling Criterion" -- it is only talking about point-sampling a sine wave with a hypothetical ADC, and then (implicitly) constructing an output signal using a (not mentioned) simple DAC that performs a linear interpolation between the sample values.



            Given that context, the thesis statement of 'FIGURE 6.10' is generally correct and well demonstrated.




            As the sampling frequency of the ADC is increased, the fidelity of the digitized signal improves.




            If you wanted to talk about the fidelity of an idealized reconstruction, that's a different matter entirely. Any discussion of the Nyquist rate, implies the use of sinc interpolation which, again, isn't mentioned in the figure shown.




            The real flaw in this figure is the idea that a point-sample is a meaningful concept in engineering. Practically speaking, an ADC will be connected to a sensor component that works by accumulating a real-world input signal over some period of time.




            It's funny, however, that figure is apparently wrong (off by a factor of two) about the specific sampling frequencies shown in the diagrams -- although the "Output" shown is only affected by this in case 'C'.




            Using the quoted statement above, I found an eerily similar diagram in "A Practical Approach to Neurophysiologic Intraoperative Monitoring" in a discussion about EEG waveform processing. For what it's worth, that discussion includes the following:




            The theorem describing the minimum sampling frequency required for an ADC to faithfully represent an analog signal is known as the Nyquist theorem. It states that the sampling frequency of an ADC must be greater than twice that of the fastest frequency component of a waveform.








            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered 2 days ago









            nobarnobar

            22028




            22028











            • $begingroup$
              ...some period of time and/or space -- when translating physical phenomena to digital samples. Crudely, there will always be an inherent low-pass filter.
              $endgroup$
              – nobar
              2 days ago










            • $begingroup$
              Something I just came across that address the inherent low-pass filter: engadget.com/2019/05/04/…
              $endgroup$
              – nobar
              yesterday










            • $begingroup$
              A point that I'm getting at is that a perfect reconstruction of a physical signal is basically impossible (in the general case), and that a best-possible reconstruction should take into account the effective lowpass filtering that is inherent in the physical to digital conversion.
              $endgroup$
              – nobar
              yesterday
















            • $begingroup$
              ...some period of time and/or space -- when translating physical phenomena to digital samples. Crudely, there will always be an inherent low-pass filter.
              $endgroup$
              – nobar
              2 days ago










            • $begingroup$
              Something I just came across that address the inherent low-pass filter: engadget.com/2019/05/04/…
              $endgroup$
              – nobar
              yesterday










            • $begingroup$
              A point that I'm getting at is that a perfect reconstruction of a physical signal is basically impossible (in the general case), and that a best-possible reconstruction should take into account the effective lowpass filtering that is inherent in the physical to digital conversion.
              $endgroup$
              – nobar
              yesterday















            $begingroup$
            ...some period of time and/or space -- when translating physical phenomena to digital samples. Crudely, there will always be an inherent low-pass filter.
            $endgroup$
            – nobar
            2 days ago




            $begingroup$
            ...some period of time and/or space -- when translating physical phenomena to digital samples. Crudely, there will always be an inherent low-pass filter.
            $endgroup$
            – nobar
            2 days ago












            $begingroup$
            Something I just came across that address the inherent low-pass filter: engadget.com/2019/05/04/…
            $endgroup$
            – nobar
            yesterday




            $begingroup$
            Something I just came across that address the inherent low-pass filter: engadget.com/2019/05/04/…
            $endgroup$
            – nobar
            yesterday












            $begingroup$
            A point that I'm getting at is that a perfect reconstruction of a physical signal is basically impossible (in the general case), and that a best-possible reconstruction should take into account the effective lowpass filtering that is inherent in the physical to digital conversion.
            $endgroup$
            – nobar
            yesterday




            $begingroup$
            A point that I'm getting at is that a perfect reconstruction of a physical signal is basically impossible (in the general case), and that a best-possible reconstruction should take into account the effective lowpass filtering that is inherent in the physical to digital conversion.
            $endgroup$
            – nobar
            yesterday

















            draft saved

            draft discarded
















































            Thanks for contributing an answer to Electrical Engineering Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            Use MathJax to format equations. MathJax reference.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2felectronics.stackexchange.com%2fquestions%2f436768%2fis-the-book-wrong-about-the-nyquist-sampling-criterion%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Get product attribute by attribute group code in magento 2get product attribute by product attribute group in magento 2Magento 2 Log Bundle Product Data in List Page?How to get all product attribute of a attribute group of Default attribute set?Magento 2.1 Create a filter in the product grid by new attributeMagento 2 : Get Product Attribute values By GroupMagento 2 How to get all existing values for one attributeMagento 2 get custom attribute of a single product inside a pluginMagento 2.3 How to get all the Multi Source Inventory (MSI) locations collection in custom module?Magento2: how to develop rest API to get new productsGet product attribute by attribute group code ( [attribute_group_code] ) in magento 2

            Category:9 (number) SubcategoriesMedia in category "9 (number)"Navigation menuUpload mediaGND ID: 4485639-8Library of Congress authority ID: sh85091979ReasonatorScholiaStatistics

            Magento 2.3: How do i solve this, Not registered handle, on custom form?How can i rewrite TierPrice Block in Magento2magento 2 captcha not rendering if I override layout xmlmain.CRITICAL: Plugin class doesn't existMagento 2 : Problem while adding custom button order view page?Magento 2.2.5: Overriding Admin Controller sales/orderMagento 2.2.5: Add, Update and Delete existing products Custom OptionsMagento 2.3 : File Upload issue in UI Component FormMagento2 Not registered handleHow to configured Form Builder Js in my custom magento 2.3.0 module?Magento 2.3. How to create image upload field in an admin form