Nyquist rate is not true always

9 次查看(过去 30 天)
I have come up with something. I don't know if it is true or not. I just want your opinion. Nyquist said that the sampling frequency should be at least twice than that of the maximum frequency. But that is not always true if we make use of the phase of the signal.
For eg:
take Sampling frequency fs=8000;
So t=0:1/8000:1;
Consider a signal:
y=sin(2*pi*3000*t);
Consider another signal:
y2=sin(2*pi*5000*t);
Now if we find the fft
k=fft(y);
k2=fft(y2);
a1=abs(k);
a2=abs(k2);
b1=angle(k);
b2=angle(k2);
figure,plot(b1),figure,plot(b2)
The magnitude spectrum of the two waves y and y2 will be same but not the angle spectrum. So take the signal together
z=y+y2;
z2=y;
k=fft(z);
k2=fft(z2);
If you find the magnitude spectrum for both they will be same which states that there is only one frequency component in both of the signals z and z2. So we say there is aliasing. But we can avoid this by taking the angle / phase spectrum into consideration which is
ang1=angle(k);
ang2=angle(k2);
If you plot both they will be different. Using this phase spectrum we can indeed differentiate two signals and say that the signal z consists of 3000Hz and 5000hz waves though the sampling frequency is less than twice that of the maximum frequency of the signal which is 5000Hz. So I believe Nyquist rate is not always true. But anyway the sampling frequency should be at least be equal to the maximum frequency of the wave in the above case or else we will have aliasing for sure. What do you say?

采纳的回答

Daniel Shub
Daniel Shub 2011-11-5
The Nyquist theorem basically says that if you sample at twice the highest frequency you can reconstruct the signal exactly without any additional information.
What you are asking is: if the phase, as a function of frequency, of the signal is known, what sample rate is required to reconstruct the signal. This is a very different question from the one Nyquist address. I believe the answer is that you need to sample at same same frequency as the highest frequency component (i.e., half the Nyquist rate).
EDIT As Wayne points out in one of his answers, the above belief is ridiculously wrong.
Amazingly, if the amplitude, as a function of frequency, of the signal is known, you also only need to sample at 1/2 the Nyquist rate.
As Wayne points out, if the amplitude and phase, as a function of frequency, of the signal is known you don't even need to sample your signal to reconstruct it.
  2 个评论
i Venky
i Venky 2011-11-5
I need to know only phase. I don't need the amplitude. I assumed that the initial phase is zero. Then I can find or else I can't.

请先登录,再进行评论。

更多回答(11 个)

Wayne King
Wayne King 2011-11-5
@iVenky, @Daniel "I need to know only phase. I don't need the amplitude. I assumed that the initial phase is zero. Then I can find or else I can't."
I still do not agree with this but that's fine.
t = 0:0.01:1-0.01;
x = cos(2*pi*10*t);
x1 = cos(2*pi*90*t);
xdft = fft(x);
xdft1 = fft(x1);
Look at the infinitesimal difference between these time domain signals.
max(abs(x-x1))
% and
norm(x-x1)
The DFT of these signals should only have two nonzero DFT coefficients, at [-10, 10] Hz. Which means the phase is zero at all DFT bins except those two.
Of course, the fft() output does contain nonzero DFT coefficients at other bins, but you cannot count on these numerical imprecisions in the computer implementation of the DFT on different architectures and different FFT algorithms as the basis to differentiate between x1 and x above.
The maximum difference between these signals in the time domain is on the order of 10^{-14}. In the Fourier domain,
max(abs(xdft-xdft1))
10^{-13}.
Are you going to assert this is robust enough to tell whether you have x or x1?
And by the way, look at the DFT coefficients at the only frequency that matters:
xdft1(11)
xdft(11)
identical.
  4 个评论
i Venky
i Venky 2011-11-5
Wayne King. Don't use cos. Instead use sin.
i Venky
i Venky 2011-11-5
Anyway I think it's useless to continue because it's impossible to know the initial phase of the signal.

请先登录,再进行评论。


Wayne King
Wayne King 2011-11-5
Hi Venky, That is not correct. There are a few flaws in your reasoning:
How do you presume to tell that the frequency is actually 5 kHz from the phase and not a component at 3 kHz with a different phase? Or an alias from a different frequency? With a sampling rate of 8 kHz, 13 kHz also gets aliased to 3 kHz, as well as an infinite number of other frequencies.
t=0:1/8000:1;
x = cos(2*pi*13000*t);
y2 = cos(2*pi*5000*t);
How will you reproduce the correct analog signal from these samples? HOw do you discern that x came from a 13 kHz signal with a phase of 0, while y2 came from a 5 kHz signal with a phase of 0?
Your general statement, however, can be true. There are instances where you do not need to sample the data at least at the Nyquist rate to be able to reconstruct the original signal (or image).
Read about compressed sensing, or compressive sensing. It's a very important developing area of research, which exactly addresses that question: when is the Nyquist rate not necessary?

i Venky
i Venky 2011-11-5
编辑:Walter Roberson 2016-5-10
It's assumed that both have the same phase zero. I know that it can't be implemented practically but theoretically it is possible right? I didn't add 13 Khz at all. According to Nyquist theorem you can't even find 5khz if you sample at 8khz(it will show as 3 khz). In magnitude spectrum you can't find it but using phase spectrum you can distinguish 5khz from 3 khz.

Wayne King
Wayne King 2011-11-5
but how do you know it's 5 kHz and not 3 kHz with a different phase? or 13 kHz, or 24 kHz, and so on, that is the point of aliasing, you can't tell what the frequency is.

i Venky
i Venky 2011-11-5
编辑:Walter Roberson 2016-5-10
First of all in my example I have taken
z=y+y2;
z2=y+y;
y-3Khz and y2-5Khz.
I have never taken 13 Khz.
y=cos(2*pi*3000*t);
y2=cos(2*pi*5000*t); both are sampled at 8000hz.
According to Nyquist theorem if you sample this at 8Khz you can't even find 5khz. But I say that there is a way to find 5khz based on some asssumptions (ie) initial phase is zero for both. Now if you see the magnitude spectrum you can't distinguish between 3khz and 5khz and you will say that it is 3khz. But if you see the angle spectrum of y and y2 you may see that they are indeed different. So with that you can see that the one which has the angle spectrum similar to the former one (i.e. y) has the frequency 3khz and the one which has the angle spectrum similar to the latter one (i.e. y2) has the frequency 5khz.

Wayne King
Wayne King 2011-11-5
Venky, with all due respect, you're missing the point. How are you going to tell that it was 5 kHz and tell its correct phase? That is what you need to reconstruct the signal.
How do you know that you didn't take 13 kHz? That is the problem faced by undersampling.
By your reasoning, if I know exactly what my input was, then I can reconstruct the output exactly even if it is not sampled adequately.
That is trivially true: Here is the my new theorem:
"If I know exactly what the continuous-time input is, then I can reconstruct the signal exactly based on 1 sample taken at any time." (actually better than that I can reconstruct it based on 0 samples).
The Nyquist theorem is not there to guide us when we know what the input signal contains exactly.
Finally, you still have not shown how you can tell 3 kHz from 5 kHz in this situation. If I created files for you with signals consisting of either 3 or 5 kHz (where 5 kHz is alised to 3), you have no way of telling me which frequency it contains. You have no technique that would perform better than chance.

i Venky
i Venky 2011-11-5
编辑:Walter Roberson 2016-5-10
I didn't take 13 khz for the example because it is impossible to find 13khz and I know that. What I wanted to prove that it is possible to find 5khz even though you sample it at 8khz (according to nyquist therem that is also not possible). If you want 13 khz in the input then assume that I have used a LPF that does not allow more than 8khz.

i Venky
i Venky 2011-11-5
You said "Finally, you still have not shown how you can tell 3 kHz from 5 kHz in this situation. If I created files for you with signals consisting of either 3 or 5 kHz (where 5 kHz is alised to 3), you have no way of telling me which frequency it contains. You have no technique that would perform better than chance."
I can tell if I know the initial phase of 5khz.

Wayne King
Wayne King 2011-11-5
OK, here is a 30-point signal
0.9239
0.5225
-0.0785
-0.6494
-0.9724
-0.9239
-0.5225
0.0785
0.6494
0.9724
0.9239
0.5225
-0.0785
-0.6494
-0.9724
-0.9239
-0.5225
0.0785
0.6494
0.9724
0.9239
0.5225
-0.0785
-0.6494
-0.9724
-0.9239
-0.5225
0.0785
0.6494
0.9724
I'll tell you that the sensor only allowed inputs [0,100] Hz. The data is sampled at 100 Hz. Tell me the correct frequency and phase. You need to be able to tell me the correct frequency and phase, or I can't reconstruct the signal.
  2 个评论
Wayne King
Wayne King 2011-11-5
and realize this is much simplified since you have a certain probability of getting it by chance.
Wayne King
Wayne King 2011-11-5
Here is an even better test for you (same scenario):
1.6310
1.6795
1.3566
0.7856
0.1846
-0.2168
-0.2653
0.0577
0.6286
1.2296
1.6310
1.6795
1.3566
0.7856
0.1846
-0.2168
-0.2653
0.0577
0.6286
1.2296
1.6310
1.6795
1.3566
0.7856
0.1846
-0.2168
-0.2653
0.0577
0.6286
1.2296
How you take this data and show me exactly what frequencies and phases are present so I can reconstruct the analog signal.

请先登录,再进行评论。


i Venky
i Venky 2011-11-5
编辑:Walter Roberson 2016-5-10
As I told you before I want the initial phase or else I can't. Anyway I can understand what you are coming to say. I assumed that the initial phase of both is zero. If the initial phase of both frequencies are zero then I can find or else I can't.

Mohammed Sanad
Mohammed Sanad 2018-10-22
Can some one tell me what is the defferent between nyquist frequency and Same as Max frequency?

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by