Nyquist Sampling Rate Question

In summary, if you sample a sinewave at twice the bandwidth, you can recover the full signal. However, you need to recover the amplitude as well.
  • #1
frenzal_dude
77
0
They say you can fully recover a signal if you sample it at twice the bandwidth (Nyquist rate). But how is it possible to be able to fully recover the signal since you are missing all the information about the signal between successive samples?

For example if you sample cos(2*pi*B*t) at 2B, you'd get samples which if you connected them together you'd end up with a triangular zig zag type of function, how would you know how to draw them up between the samples?
 
Engineering news on Phys.org
  • #2
I don't know the definition of Nyquist, but I spend three years working for LeCroy, the company that made transient recorders and digital scopes. We design ADCs and we tested it in Nyquest freq. Which the input is a sine wave half the clocking freq. The reason that you can recover the full sine wave is because as long as you are just slightly off of half freq, every time you sample, you sample a slightly offset point.

Say your half clocking frequency is faster than the input frequency by 1/360. Let your first sample of the input sine wave is at 0 deg. Since you are faster by 1/360, the next sample is at 180.5 degree of the input sine wave, the next one will be on 1 degree of the sine wave. From this you see if I take 360 sample, I will have recover the whole input sine wave into 360 points. You literally "walk" along the sine wave point by point.

That is the most harsh test on an ADC, so many ADC failed. One time I tried out an ADC from Analog Devices, an 8 bit ADC and it failed, I saw missing codes all over using the Nyquist test. They were red faced.

On the ADC test, we actually take the code from the ADC and strobe it right back into a proven DAC and regenerate the analog waveform. In the Nyquist test, it looks like two sine waves in opposite phase displace on the scope. This really test the ADC because each point swing to the opposite extreme.Yes, if the event occur only one time and the width is only two clock period wide, you will not get all the detail information. You will not miss the event, but not the detail waveform. It is only through a continuous frequency input that you can recover all the information.
 
  • #3
Its not twice the bandwidth, its twice the highest frequency of the channel. And, of course, this assumes noise isn't an issue. So imagine a sine wave of that frequency (or less) being sampled at twice that highest frequency. Two samples per wave (or more) is enough to find the frequency and phase of the wave. Since any time domain signal can be broken down to separate sine waves of different frequency and phase, that sample rate is sufficient to recover the signal -- assuming noise isn't in your way.
 
  • #4
yungman said:
Say your half clocking frequency is faster than the input frequency by 1/360. Let your first sample of the input sine wave is at 0 deg. Since you are faster by 1/360, the next sample is at 180.5 degree of the input sine wave, the next one will be on 1 degree of the sine wave. From this you see if I take 360 sample, I will have recover the whole input sine wave into 360 points. You literally "walk" along the sine wave point by point.

What you would see with this example is an amplitude modulated sinewave with the frequency of the modulation 1/360 the frequency of the signal. In fact if the sampling frequency were exactly twice the sinewave frequency, the resulting waveform would depend upon the phase relationship between the sinewave and sampling frequency. It is conceivable that if the sample happened to fall on the crossover point every time, you wouldn't get much of anything. Fleem, how would you recover the original signal from that or from yungman's slight oversampling example? It's not enough to recover frequency and phase, you also need to recover amplitude.
 
Last edited:
  • #5
fleem said:
Its not twice the bandwidth, its twice the highest frequency of the channel. And, of course, this assumes noise isn't an issue. So imagine a sine wave of that frequency (or less) being sampled at twice that highest frequency. Two samples per wave (or more) is enough to find the frequency and phase of the wave. Since any time domain signal can be broken down to separate sine waves of different frequency and phase, that sample rate is sufficient to recover the signal -- assuming noise isn't in your way.

What about if you sampled a zigzag wave which had the exact same sample values as the corresponding sine wave?
You could know the frequency and phase, but how would you know if it was saw tooth, rect, or a zigzag etc function?
 
  • #6
frenzal_dude said:
What about if you sampled a zigzag wave which had the exact same sample values as the corresponding sine wave?
You could know the frequency and phase, but how would you know if it was saw tooth, rect, or a zigzag etc function?

The zig-zag (triangle, sawtooth, whatever) wave possesses much higher frequency components than a sine wave of the same frequency. You'd need to sample it at twice the highest frequency component that you want to recover. If you tried to send a zig-zag wave through a channel where the zig-zag's fundamental frequency was the highest available in the channel, then only the fundamental energy of that wave (a sine wave) would come out the other end of the channel.
 
  • #7
You can only fully recover a bandwidth-limited signal from the sampled data.

In other words, if the "original" analog signal had any frequency content above the Nyquist frequency, that information will be lost, or more precisely it will be aliased into frequencies below the Nyquist frequency if you didn't filter it out before you sampled the signal.
 
  • #8
I agree with both fleem and AlephZero in their latest posts. However in my post #4, the sampling rate would be twice or higher than the highest frequency component yet I believe it still would not be possible to recover the original waveform.
 
  • #9
skeptic2 said:
I agree with both fleem and AlephZero in their latest posts. However in my post #4, the sampling rate would be twice or higher than the highest frequency component yet I believe it still would not be possible to recover the original waveform.

One caveat of the Nyquist frequency is that you must take many samples. If you're sampling a sine wave and you only take two samples a half-wave apart, certainly you could not recover the sine wave. Nyquist says that you need more samples, but you can recover it eventually as long as the sample rate is twice the sine wave's frequency. You cannot recover it eventually if the sample rate is less than that.
 
  • #10
skeptic2 said:
I agree with both fleem and AlephZero in their latest posts. However in my post #4, the sampling rate would be twice or higher than the highest frequency component yet I believe it still would not be possible to recover the original waveform.

If the sampling rate is higher than 2x the highest frequency, then you will eventually sample all phases of the waveform.
 
  • #11
olivermsun said:
If the sampling rate is higher than 2x the highest frequency, then you will eventually sample all phases of the waveform.

So how would you distinguish between a sample of a sinewave at f sampled at 2(f + f/360) and an amplitude modulated sinewave modulated with a sinewave at f/360 and sampled at 2f.
 
  • #12
Can you clarify? Is the second case a carrier sine wave at f modulated by an f/360 sine wave, all sampled at 2f?
 
  • #13
frenzal_dude said:
They say you can fully recover a signal if you sample it at twice the bandwidth (Nyquist rate). But how is it possible to be able to fully recover the signal since you are missing all the information about the signal between successive samples?

For example if you sample cos(2*pi*B*t) at 2B, you'd get samples which if you connected them together you'd end up with a triangular zig zag type of function, how would you know how to draw them up between the samples?

To answer your question, you must know Fourier analysis.
 
  • #14
olivermsun said:
Can you clarify? Is the second case a carrier sine wave at f modulated by an f/360 sine wave, all sampled at 2f?

yes

"The message you have entered is too short. Please lengthen your message to at least 4 characters."

yes!
 
  • #15
Let's say you have a zig-zag function with frequency B and amplitude A. Since it is a periodic function, you may decompose it in Fourier series. But, the expansion is:
[tex]
f(t) = \frac{8 A}{\pi^{2}} \, \sum_{n = 0}^{\infty}{\frac{(-1)^{n}}{(2 n + 1)^{2}} \, \sin{\left[(2 n + 1) \pi \, B \, t\right]}}
[/tex]
But, this series contains all frequency components of the form:
[tex]
f_{n} = \left(n + \frac{1}{2} \right) B, \; n = 0, 1, 2, \ldots
[/tex]
albeit with ever decreasing amplitudes that behave as [itex]\sim 1/f^{2}_{n}[/itex]. Thus, this signal is not band limited and, strictly speaking, the Nyquist Theorem does not apply to it.
 
Last edited:
  • #16
Actually you can recover the frequency component of the wave form that is close to sampling frequency or beyond if the input waveform is repetitive! We do these tests also.

With sampling frequency test, you get one point per cycle and same analogy, if you are off by 1/360, you walk on the sine wave 1 degree at a time and take 360 cycle to plot the whole sine wave. Same idea that for twice the sampling freq that you take one point every other cycle and still can plot out the sine wave.

This is all in theory, the limitation is the ability for the input chain to pass the signal( bandwidth limit), the ADC aperture uncertainty(the window of sampling).
 
  • #17
yungman said:
Actually you can recover the frequency component of the wave form that is close to sampling frequency or beyond if the input waveform is repetitive! We do these tests also.

With sampling frequency test, you get one point per cycle and same analogy, if you are off by 1/360, you walk on the sine wave 1 degree at a time and take 360 cycle to plot the whole sine wave. Same idea that for twice the sampling freq that you take one point every other cycle and still can plot out the sine wave.

This is all in theory, the limitation is the ability for the input chain to pass the signal( bandwidth limit), the ADC aperture uncertainty(the window of sampling).

I think you are assuming that you know the frequency of the signal before you sample it. If you sample a signal with a frequency of f at f + f/360, the resulting waveform I think will be the same as if signal was f/360. How would you know which one it was?
 
  • #18
That's how we test. I don't know the detail at the time, it was 1981! After three years, that's enough ADCs for me and I never looked back since!:rofl:
 
  • #19
olivermsun said:
Can you clarify? Is the second case a carrier sine wave at f modulated by an f/360 sine wave, all sampled at 2f?
skeptic2 said:
yes

So first of all the sampling needs to be at strictly greater than 2f to sample all phases of the carrier at all. Secondly, the upper sideband created by the amplitude modulation moves frequency content above f, so the sampling theorem is violated here even if the sampling is slightly above 2f.
 
  • #20
Strictly speaking yes, however it would be very difficult to construct a filter that would leave the carrier alone but filter out the upper side band that close to it. Still without knowing the exact frequency before making the measurement, how would you know which you were looking at.

The digital scopes I've used did not switch in low pass filters with a roll off at half the sampling rate for every sampling rate. One always had to be careful to make sure that he wasn't looking at a waveform generated by the aliasing of the sampling rate and the waveform.
 
  • #21
skeptic2 said:
Strictly speaking yes, however it would be very difficult to construct a filter that would leave the carrier alone but filter out the upper side band that close to it. Still without knowing the exact frequency before making the measurement, how would you know which you were looking at.
You wouldn't, but the reconstruction is based on the assumption that you have properly band-limited content.
 

1. What is the Nyquist Sampling Rate?

The Nyquist Sampling Rate is the minimum sampling rate required to accurately capture a signal without losing information. It is based on the Nyquist-Shannon sampling theorem, which states that the sampling rate must be at least twice the highest frequency present in the signal.

2. Why is the Nyquist Sampling Rate important?

The Nyquist Sampling Rate is important because it ensures that a signal can be accurately reconstructed from its sampled version. If the sampling rate is too low, the signal will be distorted and information will be lost.

3. How do I calculate the Nyquist Sampling Rate?

The Nyquist Sampling Rate can be calculated by multiplying the highest frequency present in the signal by 2. For example, if a signal has a highest frequency of 100 Hz, the Nyquist Sampling Rate would be 200 samples per second.

4. What happens if the Nyquist Sampling Rate is not met?

If the Nyquist Sampling Rate is not met, the signal will be distorted and information will be lost. This can result in inaccurate measurements and analysis, and can also lead to aliasing, where higher frequency components are mistakenly interpreted as lower frequency components.

5. Can the Nyquist Sampling Rate ever be exceeded?

Yes, the Nyquist Sampling Rate can be exceeded, but it is not recommended. This can result in the signal being oversampled, which can waste resources and processing power. It is best to use the minimum required sampling rate to accurately capture the signal.

Similar threads

  • Electrical Engineering
Replies
4
Views
788
  • Electrical Engineering
Replies
4
Views
3K
Replies
1
Views
2K
Replies
10
Views
2K
  • Electrical Engineering
Replies
8
Views
3K
Replies
9
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
2
Views
1K
  • Electrical Engineering
Replies
1
Views
3K
  • Electrical Engineering
Replies
1
Views
10K
Replies
6
Views
4K
Back
Top