The Designer's Guide Community Forum
https://designers-guide.org/forum/YaBB.pl Measurements >> Phase Noise and Jitter Measurements >> Matlab script to calculate PSD of phase noise https://designers-guide.org/forum/YaBB.pl?num=1234039702 Message started by southofthebay on Feb 7th, 2009, 12:48pm |
Title: Matlab script to calculate PSD of phase noise Post by southofthebay on Feb 7th, 2009, 12:48pm Hi all, I am interested in calculating the PSD of phase noise in order to integrate over some given BW to find phase jitter. I have some questions regarding the Matlab script used to calculate Sphi(f) from Ken's PLL Noise and Jitter paper (http://www.designers-guide.org/Analysis/PLLnoise+jitter.pdf). I will put a portion of the script here for reference: nfft=512; % should be power of two winLength=nfft; overlap=nfft/2; winNBW=1.5; % Noise bandwidth given in bins load periods.m; T=mean(periods); phases=2∗pi∗cumsum(periods)/T; [Sphi,f]=psd(phases,nfft,1/T,winLength,overlap,’linear’); Sphi=winNBW∗Sphi/nfft; In the above, why is Sphi=winNBW*Sphi/nfft used? Is it because (1) the psd function calculates a combined power over nfft points for each window segment and therefore we have to redistribute the power back to those nfft points? (2) the power is actually dB/1.5Hz which means we have to multiply by 1.5 to get the value to dB/Hz? Also, has anyone tried to use the pwelch function or some other function to calculate the PSD? With Matlab's signal processing toolbox, I want to replace [Sphi,f]=psd(phases,nfft,1/T,winLength,overlap,’linear’) with winLength = blackmanharris(winLength); [Sphi,f]=pwelch(phases,winLength,overlap,nfft,1/T); while keeping the rest of the code the same. The results look too good to be true and I think I am missing additional scaling factors. Is this correct? Thanks, south |
The Designer's Guide Community Forum » Powered by YaBB 2.2.2! YaBB © 2000-2008. All Rights Reserved. |