how to find phase angle for the FFT data of a transient signal ?

currently i am using PSD to calculate my fft
[y(:,1),f] = pwelch(z1(:,1),hann(fsize),round(fsize/2),fsize,fs);% calculate PSD
yfft(:,1)=sqrt(1.5*y(:,1));% calculate fft

回答 (1 件)

Honglei Chen
Honglei Chen 2012 年 8 月 6 日

0 投票

Why not just use fft? PSD contains only the power information so the phase information is lost.

3 件のコメント

Mahesh
Mahesh 2012 年 8 月 6 日
i tried using the inbuild matlab function>>>
t = (0:99)/100; % Time vector x = sin(2*pi*15*t+pi/2) + sin(2*pi*40*t); % Signal y = fft(x); % Compute DFT of x p = unwrap(angle(y)); % Phase
Plot the phase: f = (0:length(y)-1)'/length(y)*100; % Frequency vector plot(f,p)
but the result you expect is different from what i expected.
so insted of this i used
L=length(data); fs=100; NFFT = 2^nextpow2(L); % Next power of 2 from length of y Y = fft(data,NFFT)/L; f = fs/2*linspace(0,1,NFFT/2+1); figure plot(f,2*abs(Y(1:NFFT/2+1))) title('Single-Sided Amplitude Spectrum of y(t)') xlabel('Frequency (Hz)') ylabel('|Y(f)|')
how do i get the phase angles in this case ?
Honglei Chen
Honglei Chen 2012 年 8 月 6 日
編集済み: Honglei Chen 2012 年 8 月 6 日
What is your expected result and what is the result you get from FFT? Like I mentioned, you cannot expect to get phase from PSD since there is no phase information in it.
John Petersen
John Petersen 2012 年 8 月 6 日
You may need to apply a window on the data to reduce the effects of nonzero starting and ending points of the data set.

サインインしてコメントする。

カテゴリ

質問済み:

2012 年 8 月 6 日

Community Treasure Hunt

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

Start Hunting!

Translated by