The Designer's Guide Community
Forum
Welcome, Guest. Please Login or Register. Please follow the Forum guidelines.
May 17th, 2024, 10:31pm
Pages: 1
Send Topic Print
Matlab script to calculate PSD of phase noise (Read 5792 times)
southofthebay
New Member
*
Offline



Posts: 6

Matlab script to calculate PSD of phase noise
Feb 07th, 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
Back to top
 
 
View Profile   IP Logged
Pages: 1
Send Topic Print
Copyright 2002-2024 Designer’s Guide Consulting, Inc. Designer’s Guide® is a registered trademark of Designer’s Guide Consulting, Inc. All rights reserved. Send comments or questions to editor@designers-guide.org. Consider submitting a paper or model.