最近在测试,没有相噪仪,频谱仪只能测出相噪数据,无法得到jitter数据,所以就自己写了一个Matlab程序计算。
计算方法是按照ADI工程师Walt Kester的Converting Oscillator Phase Noise to Time Jitter写的。(pdf我放在超链接里啦,有需要自取)

下面是我写的简单粗暴版的Matlab程序:

[SSPLL_8G_pn] = xlsread('D:\Matlab\Phasenoise.xlsx');     % measured phase noise data
SSPLL_PN = SSPLL_8G_pn(:,2);
freq = SSPLL_8G_pn(:,1);% f=1e8;
fc=8e9;
n = length(SSPLL_PN);
SSPLL_PN_value = zeros(1,n);
rms_jitter = zeros(1,n);
A = zeros(1,n);SSPLL_PN_value = 10.^(SSPLL_PN./20);for i = 1:n-1;A(i) = (freq(i+1)- freq(i))*(SSPLL_PN_value(i+1)+SSPLL_PN_value(i))/2;
endA_all = 10*log10(sum (A(:)));rms_jitter=sqrt(2*10^(A_all/10))/(2*pi*fc);

然后在网上找资料的过程中,看到Matlab网站上也有一个Phase noise转jitter的Matlab功能函数,需要使用的时候调用一下就可以了很方便。也搬运过来,放到下面,大家可以自己选择用哪个:

function Jitter = Pn2Jitter(f, Lf, fc)
%
% Summary: Jitter (RMS) calculation from phase noise vs. frequency data.
%
% Calculates RMS jitter by integrating phase noise power data.
%  Phase noise data can be derived from graphical information or an
%  actual measurement data file.
%
% Usage:
%   Jitter = Pn2Jitter(f, Lf, fc)
% Inputs:
%   f:  Frequency vector (phase noise break points), in Hz, row or column.
%   Lf: Phase noise vector, in dBc/Hz, same dimensions, size(), as f.
%   fc: Carrier frequency, in Hz, a scalar.
% Output:
%   Jitter: RMS jitter, in seconds.
%
% Examples:
%  [1]   >> f = [10^0 10^1 10^3 10^4  10^6]; Lf = [-39 -73 -122 -131 -149];
%        >> Jitter = Pn2Jitter(f, Lf, 70e6)
%             Jitter = 2.3320e-011
%       Comparing fordahl application note AN-02-3{*} and jittertime.com{+}
%         calculations at fc = 70MHz
%        Pn2Jitter.m:                    23.320ps
%        AN-02-3 (graphical method):     21.135ps
%        AN-02-3 (numerical method):     24.11ps
%        Aeroflex PN9000 computation:    24.56ps
%        JitterTime.com calculation:     23.32ps
%
%    {*} fordahl Application Note AN-02-3:
%                                        "Phase noise to Jitter conversion"
%        http://fordahl.com/images/phasenoise.pdf
%         As of 11 May 2007 it also appears here:
%          http://www.metatech.com.hk/appnote/fordahl/pdf/e_AN-02-3.pdf
%          http://www.metatech.com.tw/doc/appnote-fordahl/e-AN-02-3.pdf
%
%    {+} JitterTime Consulting LLC web calculator
%        http://www.jittertime.com/resources/pncalc.shtml
%         As of 5 May 2008
%
%  [2]   >> f =  [10^2 10^3 10^4 10^5 10^6 10^7 4.6*10^9];
%        >> Lf = [-82  -80  -77  -112 -134 -146 -146    ]; format long
%        >> Jitter = Pn2Jitter(f, Lf, 2.25e9)
%             Jitter = 1.566598599875678e-012
%       Comparing ADI application note{$} calculations at fc = 2.25GHz
%        Pn2Jitter.m:  1.56659859987568ps
%        MT-008:       1.57ps
%        Raltron {&}:  1.56659857673259ps
%        JitterTime:   1.529ps--excluding the (4.6GHz, -146) data point,
%                               as 1GHz is the maximum allowed
%    {$} Analog Devices, Inc. (ADI) application note MT-008:
%                        "Converting Oscillator Phase Noise to Time Jitter"
%        http://www.analog.com/en/content/0,2886,760%255F%255F91502,00.html
%    {&} Raltron web RMS Phase Jitter calculator:
%                                       "Convert SSB phase noise to jitter"
%        http://www.raltron.com/cust/tools/osc.asp
%           Note:  Raltron is restricted to f(min) = 10Hz;
%                  therefore it cannot be used in this example [1].
%
%  [3]   >> f = [10^2 10^3 10^4  200*10^6]; Lf = [-125 -150 -174 -174];
%        >> Jitter = Pn2Jitter(f, Lf, 100e6)
%             Jitter = 6.4346e-014
%       Comparing ADI application note{$} calculations at fc = 100MHz
%        Pn2Jitter.m: 0.064346ps
%        MT-008:      0.064ps
%        JitterTime:  0.065ps
%
% Note:
%   f and Lf must be the same length, lest you get an error and this
%         Improbable Result:  Jitter = 42 + 42i.
%
%  (A spreadsheet, noise.xls, is available from Wenzel Associates, Inc. at
%   http://www.wenzel.com, "Allan Variance from Phase Noise."
%   It requires as input tangents to the plotted measured phase noise data,
%   with slopes of 1/(f^n)--not the actual data itself--for the
%   calculation.  The app. note from fordahl discusses this method, in
%   addition to numerical, to calculate jitter.  This graphical straight-
%   line approximation integration technique tends to underestimate total
%   RMS jitter.)
%
%  [4]   Data can also be imported directly from an Aeroflex PN9000 ASCII
%         file, after removing extraneous text.  How to do it:
%        (1) In Excel, import the PN9000 data file as Tab-delimited data,
%        (2) Remove superfluous columns and first 3 rows, leaving 2 columns
%             with frequency (Hz) and Lf (dBc/Hz) data only.
%             (With the new PN9000 as of April 2006, only the first row
%             is to be removed, and there are only two columns.
%             I may take advantage of this in an updated version of this
%              program,thereby eliminating the need to edit the data),
%        (3) Save As -> Text (MS-DOS) (*.txt), e.g., a:\Stuff.txt,
%        (4) At the MATLAB Command Window prompt:
%             >> load 'a:\Stuff.txt' -ascii
%            Now Stuff is a MATLAB workspace variable with the
%             phase noise data,
%        (5) >> Pn2Jitter(Stuff(:,1), Stuff(:,2), fc);
%              (assuming fc has been defined)
%       One 10MHz carrier data set resulted in the following:
%        Pn2Jitter.m:         368.33fs
%        PN9000 calculation:  375fs
%
% Runs at least as far back as MATLAB version 5.3 (R11.1).
%
% Copyright (c) 2005 by Arne Buck, Axolotol Design, Inc. Friday 13 May 2005
%   arne   (d 0 t)   buck   [a +]   alum   {D o +}   mit   (d 0 +}   e d  u
%   $Revision: 1.2 $  $Date: 2005/05/13 23:42:42 $
%
% License to use and modify this code is granted freely, without warranty,
%  to all as long as the original author is referenced and attributed
%  as such.  The original author maintains the right to be solely
%  associated with this work.  So there.% Bug fixes to resolve problematic data resulting in division by 0, or
%  excessive exponents beyond MATLAB's capability of realmin (2.2251e-308)
%  and realmax (1.7977e+308); no demonstrable effect on jitter calculation
% AB 18May2005 Fix /0 bug for *exactly* -10.000dB difference in adjacent Lf
% AB 24May2005 Fix large and small exponents resulting from PN9000 data
% AB 11May2007 Improve documentation, update URLs
% AB  5May2008 Verify and update URLs
tic
%%  It's almost nine o'clock.  We've got to go to work.
L = length(Lf);
if L == length(f)
% Fix ill-conditioned data.
I=find(diff(Lf) == -10); Lf(I) = Lf(I) + I/10^6; % Diddle adjacent Lf with% a diff=-10.00dB, avoid ai:/0
% Just say "No" to For loops.
lp = L - 1; Lfm = Lf(1:lp); LfM = Lf(2:L); % m~car+, M=cdr
fm  = f(1:lp); fM = f(2:L);  ai = (LfM-Lfm) ./ (log10(fM) - log10(fm));
% Cull out problematic fine-sieve data from the PN9000.
Iinf = find( (fm.^(-ai/10) == inf) | fm.^(-ai/10)<10^(-300)); % Find Inffm(Iinf) = []; fM(Iinf-1) = []; Lfm(Iinf) = []; LfM(Iinf-1) = [];
ai(Iinf) = []; f(Iinf) = []; Lf(Iinf) = [];% Where's the beef?
Jitter = ...1/(2*pi*fc)*sqrt(2*sum( 10.^(Lfm/10) .* (fm.^(-ai/10)) ./ (ai/10+1)....* (fM.^(ai/10+1) - fm.^(ai/10+1)) ));elsedisp('> > Oops!');disp('> > > The f&Lf vector lengths are unequal.  Where''s the data?')Jitter = sqrt(sqrt(-12446784));
end % if L
toc

根据PLL相噪测试曲线计算jitter的Matlab程序相关推荐

  1. matlab 万年历,转 计算万年历的Matlab程序

    this.p={ m:2, b:2, loftPermalink:'', id:'fks_0800670800820800740840800950950850850820710820860820740 ...

  2. 电网络节点电压matlab,电力网潮流电压计算例题与matlab程序技术总结.docx

    电力网潮流电压计算例题与MATLAB程序编写佘名寰本文介绍了两个电力网潮流计算例题.一例为5个节点5条支路:另一例有6个节点7条支路,有PQ负荷节点也有PV发电机节点,变压器支路标么变比不为1.本文给 ...

  3. 电网络节点电压matlab,电力网潮流电压计算例题与matlab程序

    本文介绍了电力网潮流计算两个例题,给出了完整的计算程序和计算结果.程序包括计算网络节点导纳矩阵和潮流电压两部分.例题选自研究生教材,比较典型实用.希望供电力专业师生和基层技术人员潮流计算时参考. 电力 ...

  4. 利用dft的定义计算dft的matlab程序_CP2K教程系列之静态计算(Pymatflow篇)

    本系列CP2K教程是<CP2K菜根谭>的升级版,在旧版基础上添加了如何结合Pymatflow工具简化计算流程的内容.话不多说,本文将为您带来CP2K系列教程中的静态计算部分. 静态计算设置 ...

  5. matlab程序算天气,科学网-站点气温数据的积温计算(含Matlab程序实现)-朱永超的博文...

    活动温度总和(简称积温)是某一段时间内逐日平均气温≥10℃持续期间日平均气温的总和.是研究温度与生物有机体发育速度之间关系的一种指标,从强度和作用时间两个方面表示温度对生物有机体生长发育的影响.一般以 ...

  6. matlab程序算天气,科学网—站点气温数据的积温计算(含Matlab程序实现) - 朱永超的博文...

    活动温度总和(简称积温)是某一段时间内逐日平均气温≥10℃持续期间日平均气温的总和.是研究温度与生物有机体发育速度之间关系的一种指标,从强度和作用时间两个方面表示温度对生物有机体生长发育的影响.一般以 ...

  7. 点到直线的距离计算原理及MATLAB程序

    在二维和三维空间,有现成的计算点到空间直线的距离的公式: 如: 三维空间有类似的计算公式. 甚至博客直接提出用叉乘和行列式计算点到直线距离的计算方法和程序.但仅限于二维和三维的情况.更高维的就不适用. ...

  8. Romberg积分法计算定积分(Matlab程序)

    %Romberg积分法计算定积分 %参考教材:<数值分析>李乃成,梅立泉,科学出版社 %<计算方法教程>第二版 凌永祥,陈明逵 clear;clc;close all; for ...

  9. 多通道接收机幅相校准测试系统的设计

    .引言 现代雷达系统为了获得良好的性能,在强杂波环境中检测目标,通常采用将接收到的射频回波信号下变频到中频,再经正交解调器分解为I.Q信号.但是由于电路的不对称.各支路所选器件的不完善以及雷达工作频率 ...

最新文章

  1. Django --ORM常用的字段和参数 多对多创建形式
  2. 2!=5 or 0在python中是否正确-python数据分析第二版:numpy
  3. JAVA操作MYSQL数据库
  4. 关于GCD多任务处理
  5. 文巾解题 1744. 你能在你最喜欢的那天吃到你最喜欢的糖果吗?
  6. 我的第一个Java程序 Hello World!
  7. 交换二维数组元素c语言,二维数组中元素替换问题!
  8. 程序员的数学--排列组合(2)
  9. 正则表达式(读书过程所记未整理)
  10. cad移动时捕捉不到基点_CAD入门必备(一)移动和复制新手必看
  11. XShell 将Linux文件上传、下载到Windows下(rz上传、sz下载)
  12. 计算机图形学(一) 视频显示设备_3_随机扫描显示器
  13. xm文件转换为mp3_怎么才能将M4A转换为MP3?秘籍公开
  14. OPENCV+VS+QT,导入生成别人的.pro文件时提示opencv文件找不到,C1083:无法打开包括文件 opencv2/opencv.hpp
  15. 张小龙:微信产品观(上)
  16. 使用DOSBox自动进入debug模式
  17. 讲真的,大厂员工都在使用的赚钱小技能Python!
  18. 截取邮箱后缀名,拼接访问邮箱地址
  19. CRC碰撞概率 与CRC校验长度的理解
  20. 低学历者已无法生存 程序员尤其明显

热门文章

  1. 「JLOI2015」战争调度 解题报告
  2. 2022年机器人工程毕业设计选题情况
  3. 开发板Linux手指滑动方向,移动应用滑动屏幕方向判断解决方案,JS判断手势方向...
  4. 瓦力机器人故障维修_机器人瓦力让人无力吐槽的坑爹剧情!
  5. day-44(2)mysql
  6. 显卡超频很简单 RivaTuner使用教程
  7. power supply框架
  8. Java进阶:java程序设计慕课版课后答案浪潮优派
  9. IT培训机构如何选择?选择IT培训机构3大误区
  10. 十进制转化为二进制(栈算法)