MATLAB: Retrieve phase information using ‘pspectrum’

fftphasepspectrum

Hi
Similar to the pwelch function, the function pspectrum divides the signal into overlapping components, windows each segment and averages the periodograms of the segments. This is very handy for signals with much noise(wich i have) and to suppress spurious components. As you can see below, left a normal fft and right using pspectrum. Pspectrum suppresses the spurious components a lot more than a normal fft.
The only problem is that: when calculating the fft you get a complex number wich you can calculate the amplitude and phase from with abs() and angle(). Using the pspectrum plot only gives you real values so you can only plot the amplitude. Is there a way so i can retrieve the complex numbers to also calculate the phase, or maybe alter the code from this psepctrum function? I really need the phase plot and because a normal fft gives bad results i need to use the pspectrum function. I also tried the pwelch function but without results. Any tips are welcome!
kind regards

Best Answer

If you use the bandpass filter approach in digital signal related question(fft,pspectrum) you can easily recover the phase information from the fft of the output.