DSPRelated.com
Forums

Question about FFT phase

Started by Marc2050 November 28, 2011
>On 2 Des, 04:39, "Marc2050" <maarcc@n_o_s_p_a_m.gmail.com> wrote: > >> The FM idea is very interesting... >> The background of my question is really more related to classifying
neural
>> signals. If I understand correctly, therefore, it is better to use
phase
>> component of the FFT to classify neural signal than it is to use >> amplitude to classify. Is this right? > >Don't confuse Phase / Frequency Modulation with >the phase spectrum! > >PM/FM is a non-linear modulation technique which >has nothing to do with the linear FT at all. What >happens in PM/FM is that the baseband source signal >is nonlinearly transformed to a signal at RF which >has far greater bandwidth than the source signal >itself. > >Forget about phase spectra at all. They have very >little use, and are extremely sensitive to noise. >There is nothing to be learned from studying >phase spectra. > >Rune >
Phase spectra are very sensitive to noise because phase can only vary between a range of -pi to pi? If we could take the FFT of a signal and measure the phase of the FFT component and take the variance of that phase over a number of waveforms, would that make the phase a more "stable" parameter to measure? [Sorry if this is now out of topic to the original question]
On 2 Des, 18:44, "Marc2050" <maarcc@n_o_s_p_a_m.gmail.com> wrote:
> >On 2 Des, 04:39, "Marc2050" <maarcc@n_o_s_p_a_m.gmail.com> wrote: > > >> The FM idea is very interesting... > >> The background of my question is really more related to classifying > neural > >> signals. If I understand correctly, therefore, it is better to use > phase > >> component of the FFT to classify neural signal than it is to use > >> amplitude to classify. Is this right? > > >Don't confuse Phase / Frequency Modulation with > >the phase spectrum! > > >PM/FM is a non-linear modulation technique which > >has nothing to do with the linear FT at all. What > >happens in PM/FM is that the baseband source signal > >is nonlinearly transformed to a signal at RF which > >has far greater bandwidth than the source signal > >itself. > > >Forget about phase spectra at all. They have very > >little use, and are extremely sensitive to noise. > >There is nothing to be learned from studying > >phase spectra. > > >Rune > > Phase spectra are very sensitive to noise because phase can only > vary between a range of -pi to pi?
No. because almost no change in the original signal totally distorts the phase spectrum.
> If we could take the FFT of a signal and measure the phase of the > FFT component and take the variance of that phase over a number of > waveforms, would that make the phase a more "stable" parameter to > measure?
No. Rune
>On 2 Des, 18:44, "Marc2050" <maarcc@n_o_s_p_a_m.gmail.com> wrote: >> >On 2 Des, 04:39, "Marc2050" <maarcc@n_o_s_p_a_m.gmail.com> wrote: >> >> >> The FM idea is very interesting... >> >> The background of my question is really more related to classifying >> neural >> >> signals. If I understand correctly, therefore, it is better to use >> phase >> >> component of the FFT to classify neural signal than it is to use >> >> amplitude to classify. Is this right? >> >> >Don't confuse Phase / Frequency Modulation with >> >the phase spectrum! >> >> >PM/FM is a non-linear modulation technique which >> >has nothing to do with the linear FT at all. What >> >happens in PM/FM is that the baseband source signal >> >is nonlinearly transformed to a signal at RF which >> >has far greater bandwidth than the source signal >> >itself. >> >> >Forget about phase spectra at all. They have very >> >little use, and are extremely sensitive to noise. >> >There is nothing to be learned from studying >> >phase spectra. >> >> >Rune >> >> Phase spectra are very sensitive to noise because phase can only >> vary between a range of -pi to pi? > >No. because almost no change in the original signal >totally distorts the phase spectrum. >
How does an almost no change in the original signal cause a totally distort in the phase spectrum? I still couldn't quite understand.
>> If we could take the FFT of a signal and measure the phase of the >> FFT component and take the variance of that phase over a number of >> waveforms, would that make the phase a more "stable" parameter to >> measure? > >No. > >Rune >
Phase spectra! actually there can be no phase spectra cuz we kill it with a conjugate while computing the spectrum of the signal or am I missing something here? 
On 4 Des, 21:56, "Marc2050" <maarcc@n_o_s_p_a_m.gmail.com> wrote:
> >On 2 Des, 18:44, "Marc2050" <maarcc@n_o_s_p_a_m.gmail.com> wrote: > >> >On 2 Des, 04:39, "Marc2050" <maarcc@n_o_s_p_a_m.gmail.com> wrote: > > >> >> The FM idea is very interesting... > >> >> The background of my question is really more related to classifying > >> neural > >> >> signals. If I understand correctly, therefore, it is better to use > >> phase > >> >> component of the FFT to classify neural signal than it is to use > >> >> amplitude to classify. Is this right? > > >> >Don't confuse Phase / Frequency Modulation with > >> >the phase spectrum! > > >> >PM/FM is a non-linear modulation technique which > >> >has nothing to do with the linear FT at all. What > >> >happens in PM/FM is that the baseband source signal > >> >is nonlinearly transformed to a signal at RF which > >> >has far greater bandwidth than the source signal > >> >itself. > > >> >Forget about phase spectra at all. They have very > >> >little use, and are extremely sensitive to noise. > >> >There is nothing to be learned from studying > >> >phase spectra. > > >> >Rune > > >> Phase spectra are very sensitive to noise because phase can only > >> vary between a range of -pi to pi? > > >No. because almost no change in the original signal > >totally distorts the phase spectrum. > > How does an almost no change in the original signal cause a totally distort > in the phase spectrum? I still couldn't quite understand.
Because that's how these things work. Have a look at this example (matlab code): % Generate a reference signal x x = randn(100,1); % Compute its DFT X = fft(x); % And then plot its phase spectrum clf plot(atan2(imag(X),real(X)),'b') % Then flip the sign of the largest element % in x: y = x; y(min(find(y==max(y))))=-max(y); % Compute the DFT Y = fft(y); % And plot phase spectrum in the same plot: hold on plot(atan2(imag(Y),real(Y)),'r') The two phase plots are totally different. You can not use the value in the first plot to predict what value you will get for the same phase coefficient in the other plot. Rune
On 4 Des, 22:02, mobi <mob...@gmail.com> wrote:
> am I missing something here?
Yes. Rune
>On 4 Des, 21:56, "Marc2050" <maarcc@n_o_s_p_a_m.gmail.com> wrote: >> >On 2 Des, 18:44, "Marc2050" <maarcc@n_o_s_p_a_m.gmail.com> wrote: >> >> >On 2 Des, 04:39, "Marc2050" <maarcc@n_o_s_p_a_m.gmail.com> wrote: >> >> >> >> The FM idea is very interesting... >> >> >> The background of my question is really more related to
classifying
>> >> neural >> >> >> signals. If I understand correctly, therefore, it is better to
use
>> >> phase >> >> >> component of the FFT to classify neural signal than it is to use >> >> >> amplitude to classify. Is this right? >> >> >> >Don't confuse Phase / Frequency Modulation with >> >> >the phase spectrum! >> >> >> >PM/FM is a non-linear modulation technique which >> >> >has nothing to do with the linear FT at all. What >> >> >happens in PM/FM is that the baseband source signal >> >> >is nonlinearly transformed to a signal at RF which >> >> >has far greater bandwidth than the source signal >> >> >itself. >> >> >> >Forget about phase spectra at all. They have very >> >> >little use, and are extremely sensitive to noise. >> >> >There is nothing to be learned from studying >> >> >phase spectra. >> >> >> >Rune >> >> >> Phase spectra are very sensitive to noise because phase can only >> >> vary between a range of -pi to pi? >> >> >No. because almost no change in the original signal >> >totally distorts the phase spectrum. >> >> How does an almost no change in the original signal cause a totally
distort
>> in the phase spectrum? I still couldn't quite understand. > >Because that's how these things work. >Have a look at this example (matlab code): > > >% Generate a reference signal x >x = randn(100,1); > >% Compute its DFT >X = fft(x); > > >% And then plot its phase spectrum >clf >plot(atan2(imag(X),real(X)),'b') > > >% Then flip the sign of the largest element >% in x: >y = x; >y(min(find(y==max(y))))=-max(y); > >% Compute the DFT >Y = fft(y); > >% And plot phase spectrum in the same plot: >hold on >plot(atan2(imag(Y),real(Y)),'r') > >The two phase plots are totally different. >You can not use the value in the first plot >to predict what value you will get for the >same phase coefficient in the other plot. > >Rune >
Agree. If you compare point by point. They are different. But when I take the mean of the phase, both X and Y's means are the same. So, if one is to focus on measuring the mean at each segment of the data and use the mean as an indicator of the signal's coherence, phase is a possible good candidate?
I think the problem is the use of term phase spectra. By the looks of the example, its simply the phase term of the DFT of the signal. I did not know that phase of DFT is called the phase spectra of the signal. 
On 5 Des, 01:28, "Marc2050" <maarcc@n_o_s_p_a_m.gmail.com> wrote:
> >On 4 Des, 21:56, "Marc2050" <maarcc@n_o_s_p_a_m.gmail.com> wrote: > >> >On 2 Des, 18:44, "Marc2050" <maarcc@n_o_s_p_a_m.gmail.com> wrote: > >> >> >On 2 Des, 04:39, "Marc2050" <maarcc@n_o_s_p_a_m.gmail.com> wrote: > > >> >> >> The FM idea is very interesting... > >> >> >> The background of my question is really more related to > classifying > >> >> neural > >> >> >> signals. If I understand correctly, therefore, it is better to > use > >> >> phase > >> >> >> component of the FFT to classify neural signal than it is to use > >> >> >> amplitude to classify. Is this right? > > >> >> >Don't confuse Phase / Frequency Modulation with > >> >> >the phase spectrum! > > >> >> >PM/FM is a non-linear modulation technique which > >> >> >has nothing to do with the linear FT at all. What > >> >> >happens in PM/FM is that the baseband source signal > >> >> >is nonlinearly transformed to a signal at RF which > >> >> >has far greater bandwidth than the source signal > >> >> >itself. > > >> >> >Forget about phase spectra at all. They have very > >> >> >little use, and are extremely sensitive to noise. > >> >> >There is nothing to be learned from studying > >> >> >phase spectra. > > >> >> >Rune > > >> >> Phase spectra are very sensitive to noise because phase can only > >> >> vary between a range of -pi to pi? > > >> >No. because almost no change in the original signal > >> >totally distorts the phase spectrum. > > >> How does an almost no change in the original signal cause a totally > distort > >> in the phase spectrum? I still couldn't quite understand. > > >Because that's how these things work. > >Have a look at this example (matlab code): > > >% Generate a reference signal x > >x = randn(100,1); > > >% Compute its DFT > >X = fft(x); > > >% And then plot its phase spectrum > >clf > >plot(atan2(imag(X),real(X)),'b') > > >% Then flip the sign of the largest element > >% in x: > >y = x; > >y(min(find(y==max(y))))=-max(y); > > >% Compute the DFT > >Y = fft(y); > > >% And plot phase spectrum in the same plot: > >hold on > >plot(atan2(imag(Y),real(Y)),'r') > > >The two phase plots are totally different. > >You can not use the value in the first plot > >to predict what value you will get for the > >same phase coefficient in the other plot. > > >Rune > > Agree. If you compare point by point. They are different. > > But when I take the mean of the phase, both X and Y's means > are the same. So, if one is to focus on measuring the > mean at each segment of the data and use the mean as an indicator > of the signal's coherence, phase is a possible good candidate?
You started this thread by asking about the phase spectrum produced by the DFT. Now you start talking about coherence. Coherence is computed as the cross spectrum between two signals with relative temporal offset. The coherence measure ends up being expressed by the magnitude of the normalized cross spectrum. While the phase terms *cause* the lack of cohrence, the phase as such is never used in either the computations or for expressing the results. Forget about the phase. It's useless for analysis. Rune