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

Answers (1)

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

3 Comments

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 ?
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.
You may need to apply a window on the data to reduce the effects of nonzero starting and ending points of the data set.

Sign in to comment.

Categories

Find more on Fourier Analysis and Filtering in Help Center and File Exchange

Asked:

on 6 Aug 2012

Community Treasure Hunt

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

Start Hunting!