{"id":719,"date":"2022-02-04T19:10:51","date_gmt":"2022-02-04T19:10:51","guid":{"rendered":"https:\/\/geekblog.febo.com\/?p=719"},"modified":"2022-08-25T17:33:13","modified_gmt":"2022-08-25T17:33:13","slug":"allan-deviation-the-time-nuts-statistic","status":"publish","type":"post","link":"https:\/\/blog.febo.com\/?p=719","title":{"rendered":"Allan Deviation &#8212; the Time-Nut&#8217;s Statistic"},"content":{"rendered":"<p>The essence of time-nuttery is measuring the stability of clocks and oscillators.&nbsp; Allan Deviation (&#8220;ADEV&#8221;) is the statistic most commonly used to talk about frequency stability.&nbsp; There&#8217;s a <a href=\"https:\/\/en.wikipedia.org\/wiki\/Allan_variance\">very good article about it on Wikipedia<\/a>, but it&#8217;s a bit deep for many.&nbsp; This post is a <a href=\"https:\/\/www.merriam-webster.com\/dictionary\/TL%3BDR\">TL;DR<\/a> description.&nbsp; To keep it simple I&#8217;m skipping over a lot and making analogies that may not quite be correct (fellow time-nuts, please forgive me).<span class=\"footnote_referrer\"><a role=\"button\" tabindex=\"0\" onclick=\"footnote_moveToReference_719_1('footnote_plugin_reference_719_1_1');\" onkeypress=\"footnote_moveToReference_719_1('footnote_plugin_reference_719_1_1');\" ><sup id=\"footnote_plugin_tooltip_719_1_1\" class=\"footnote_plugin_tooltip_text\">[1]<\/sup><\/a><span id=\"footnote_plugin_tooltip_text_719_1_1\" class=\"footnote_tooltip\">One simplification is that I&#8217;m almost always going to be talking about &#8220;deviation&#8221; but the underlying statistic is actually <strong>variation<\/strong>.&nbsp; Deviation is the square root of the variance.&nbsp; The post at <a href=\"https:\/\/www.mathsisfun.com\/data\/standard-deviation.html\"><span class=\"footnote_url_wrap\">https:\/\/www.mathsisfun.com\/data\/standard-deviation.html<\/span><\/a> does a good job explaining it.<\/span><\/span><script type=\"text\/javascript\"> jQuery('#footnote_plugin_tooltip_719_1_1').tooltip({ tip: '#footnote_plugin_tooltip_text_719_1_1', tipClass: 'footnote_tooltip', effect: 'fade', predelay: 0, fadeInSpeed: 200, delay: 400, fadeOutSpeed: 200, position: 'top center', relative: true, offset: [-7, 0], });<\/script>&nbsp; But hopefully this will help you understand an ADEV plot without your eyes glazing over.&nbsp;<\/p>\n<p>There is variation from the ideal values in just about any set of data.&nbsp; <a href=\"https:\/\/en.wikipedia.org\/wiki\/Standard_deviation\">Standard deviation<\/a> is a statistic commonly used to understand that variation, or &#8220;variance&#8221;.&nbsp; It gives you an idea of the how the data is distributed around the mean value.&nbsp; Under the right circumstances it can help predict future results based on past performance.&nbsp; But it only works well for noise that has certain characteristics (&#8220;noise&#8221; is the generic term for unwanted variance in signals; there are many types).<\/p>\n<p>Unfortunately, oscillator noise does not have those characteristics.&nbsp; Specifically, the results of a standard deviation calculation should converge.&nbsp; In other words, the more data points you have, the more certain the measurement should become.&nbsp;<\/p>\n<p>The types of noise encountered in oscillators, though, does not always converge; sometimes the more data you have, the <strong>less<\/strong> reliable the standard deviation calculation becomes.&nbsp; Allan Deviation was created by <a href=\"https:\/\/en.wikipedia.org\/wiki\/David_W._Allan\">David Allan<\/a> as a statistic that does converge with oscillator noise.<\/p>\n<p>The main purpose of ADEV is to quantify the likely difference between any two successive measurements taken a specified time interval apart. &nbsp;Shorthand for that measurement interval is the Greek character <a href=\"https:\/\/en.wikipedia.org\/wiki\/Tau#Physics\"><strong>tau<\/strong><\/a>. I try to avoid jargon in these posts, but &#8220;tau&#8221; is so much easier than &#8220;measurement interval&#8221; that I&#8217;ll use it frequently.<\/p>\n<p>Often ADEV at a single tau does not tell the full story because the quantity and type of noise changes with the interval between measurements.&nbsp; So rather than a single number, ADEV is usually presented as a plot with tau (time) on the horizontal or X axis, and stability on the vertical or Y axis.&nbsp; Because of the wide range of values on both axes, the plot is usually made in log-log form, so each major tick represents one power of ten greater or lesser than the last.<\/p>\n<p>The tau range of interest depends on the device being measured.&nbsp; For example, a stopwatch should be very stable and repeatable over time scales of seconds.&nbsp; On the other hand, the <a href=\"https:\/\/longnow.org\/clock\/\">Clock of the Long Now<\/a> worries about keeping time for the next 10,000 years. &nbsp; For the stopwatch, ADEV at a tau of 1 second is meaningful.&nbsp; For the Long Now, a tau of centuries or even millennia might be appropriate.<\/p>\n<p>Tau is a pretty simple concept &#8212; the time between successive measurements) &#8212; but the stability number on the Y axis of an ADEV plot might be a bit more challenging.&nbsp; It&#8217;s usually expressed as <a href=\"https:\/\/www.its.bldrdoc.gov\/fs-1037\/dir-016\/_2309.htm\">dimensionless fractional frequency error<\/a>.&nbsp; TThat&#8217;s just a fancy name for a ratio &#8212; the difference between the nominal frequency and the measured frequency normalized to 1 Hz.&nbsp; It&#8217;s &#8220;dimensionless&#8221; because the nominal frequency could be 1 microHertz or 10 GigaHertz and the relative stability would be the same (in other words, the noise scales with the signal frequency).&nbsp;<\/p>\n<p>With electronic oscillators, the fractional frequency error is often a <strong>very<\/strong> small percentage of the carrier frequency, so it&#8217;s common to express ADEV with exponential notation rather than a period followed by a bunch of zeroes.&nbsp;&nbsp; As an example of fractional frequency error, let&#8217;s look at a 1 MHz oscillator.&nbsp; If we measure an error of 1000 Hz (1 kHz), that is 1&#215;10<sup>-3<\/sup>, or 1 part per thousand, or 0.1%.&nbsp; Scaling from there, an error at 1 MHz of:<\/p>\n<ul>\n<li>1 Hz is 1&#215;10<sup>-6<\/sup>, which is 1 part per million or 0.0001%<\/li>\n<li>0.001 Hz (1 mHz) is 1&#215;10<sup>-9<\/sup>, which is 1 part per billion or 0.0000001%<\/li>\n<li>0.000001 Hz (1 uHz) is 1&#215;10<sup>-12<\/sup>, which is 1 part per trillion or 0.0000000001%<\/li>\n<\/ul>\n<p>By the way, unless you&#8217;re dealing with exotic parts, most of the ADEV values you see will be in the range of parts per million to parts per trillion.<\/p>\n<p>Here&#8217;s an example of an ADEV plot, showing the stability of a cesium atomic frequency standard measured against two reference oscillators: another cesium standard (blue trace), and a high-quality crystal oscillator (violet trace):<a href=\"http:\/\/blog.febo.com\/wp-content\/uploads\/2017\/08\/fts4100-08-11-17_combined_adev.png\" data-rel=\"penci-gallery-image-content\" ><img decoding=\"async\" class=\"aligncenter size-full wp-image-197\" src=\"http:\/\/blog.febo.com\/wp-content\/uploads\/2017\/08\/fts4100-08-11-17_combined_adev.png\" alt=\"\" width=\"1280\" height=\"717\" srcset=\"https:\/\/blog.febo.com\/wp-content\/uploads\/2017\/08\/fts4100-08-11-17_combined_adev.png 1280w, https:\/\/blog.febo.com\/wp-content\/uploads\/2017\/08\/fts4100-08-11-17_combined_adev-300x168.png 300w, https:\/\/blog.febo.com\/wp-content\/uploads\/2017\/08\/fts4100-08-11-17_combined_adev-1024x574.png 1024w\" sizes=\"(max-width: 1280px) 100vw, 1280px\" \/><\/a><\/p>\n<p>The horizontal axis runs from tau = 1 second to tau = 100000 seconds , with each major line being 10 times the last.&nbsp; The vertical axis runs from 1&#215;10<sup>-11<\/sup> at the top to 1&#215;10<sup>-13<\/sup> at the bottom, again with each line being ten times lower than the last.&nbsp; <strong>Lower on the Y axis means less noise<\/strong>, which is a good thing.<\/p>\n<p>Let&#8217;s find the ADEV at tau= 100 seconds.&nbsp; Look on the horizontal axis for &#8220;100s&#8221; and then up from there to where the two traces cross that point, at a bit less than 4&#215;10<sup>-12<\/sup> on the vertical axis.&nbsp; That means that if we take successive measurements 100 seconds apart, it&#8217;s likely that their values will be within 4&#215;10<sup>-12<\/sup> of each other.<\/p>\n<p>The right ends of the traces have some strange squiggles and hook upward.&nbsp; It&#8217;s a good idea not to trust the last few points on the plot as their potential error is quite high.&nbsp; That&#8217;s because it requires at least three measurements at a given tau to calculate the ADEV, and with only three measurements the confidence level is very low.&nbsp; For a given measurement length, there will be fewer data points at long measurement intervals than at short ones.&nbsp; We can have more confidence in ADEV at shorter taus because we have more (or many more) data points; the ADEV converges.&nbsp;<\/p>\n<p>What makes the ADEV graph so useful is that one plot can show an oscillator&#8217;s performance over a very wide range of measurement intervals and stability.&nbsp; You get a broad picture in one image.<\/p>\n<p>Another reason that an ADEV plot is useful is that the slope of the plot can indicate the type of noise that predominates at each range of tau.&nbsp; Oscillators can have several types of noise &#8212; white noise, random walk noise, flicker noise, and variations of those.&nbsp; An ADEV plot can identify some of these types by their characteristic slope, while other related measurements like Modified Allan Deviation (&#8220;MDEV&#8221;) can pull out further information.&nbsp; If you&#8217;re interested in oscillator noise, <a href=\"https:\/\/tf.nist.gov\/phase\/Properties\/main.htm\">this NIST paper is a good (if mathematical) place to start<\/a>.<\/p>\n<p><a href=\"https:\/\/en.wikipedia.org\/wiki\/Modified_Allan_variance\">MDEV<\/a> is useful because it can distinguish white noise from flicker noise, if you&#8217;re interested in that sort of thing.&nbsp; The <a href=\"http:\/\/www.wriley.com\/paper4ht.htm\">Hadamard Deviation<\/a> (&#8220;HDEV&#8221;) is interesting because it is not sensitive to frequency drift, which makes it easier to see the underlying performance of some oscillator types that are known to drift even though they are of very high quality &#8212; Rubidium vapor and Hydrogen maser standards are in that category.&nbsp; There are also a couple of statistics, <a href=\"https:\/\/en.wikipedia.org\/wiki\/Time_deviation\">Time Deviation<\/a> (&#8220;TDEV&#8221;) and <a href=\"https:\/\/en.wikipedia.org\/wiki\/Maximum_time_interval_error\">Maximum Time Interval Error<\/a>&nbsp; (&#8220;MTIE&#8221;) are related statistics that focus more on time rather than frequency performance.<\/p>\n<p>This has been a high level introduction to ADEV.&nbsp; I highly recommend using the Wikipedia article linked above as a starting point if you would like to learn more.<\/p>\n<div class=\"speaker-mute footnotes_reference_container\"> <div class=\"footnote_container_prepare\"><p><span role=\"button\" tabindex=\"0\" class=\"footnote_reference_container_label pointer\" onclick=\"footnote_expand_collapse_reference_container_719_1();\">References<\/span><span role=\"button\" tabindex=\"0\" class=\"footnote_reference_container_collapse_button\" style=\"display: none;\" onclick=\"footnote_expand_collapse_reference_container_719_1();\">[<a id=\"footnote_reference_container_collapse_button_719_1\">+<\/a>]<\/span><\/p><\/div> <div id=\"footnote_references_container_719_1\" style=\"\"><div class=\"pcrstb-wrap\"><table class=\"footnotes_table footnote-reference-container\"><caption class=\"accessibility\">References<\/caption> <tbody> \r\n\r\n<tr class=\"footnotes_plugin_reference_row\"> <th scope=\"row\" class=\"footnote_plugin_index_combi pointer\"  onclick=\"footnote_moveToAnchor_719_1('footnote_plugin_tooltip_719_1_1');\"><a id=\"footnote_plugin_reference_719_1_1\" class=\"footnote_backlink\"><span class=\"footnote_index_arrow\">&#8593;<\/span>1<\/a><\/th> <td class=\"footnote_plugin_text\">One simplification is that I&#8217;m almost always going to be talking about &#8220;deviation&#8221; but the underlying statistic is actually <strong>variation<\/strong>.&nbsp; Deviation is the square root of the variance.&nbsp; The post at <a href=\"https:\/\/www.mathsisfun.com\/data\/standard-deviation.html\"><span class=\"footnote_url_wrap\">https:\/\/www.mathsisfun.com\/data\/standard-deviation.html<\/span><\/a> does a good job explaining it.<\/td><\/tr>\r\n\r\n <\/tbody> <\/table><\/div> <\/div><\/div><script type=\"text\/javascript\"> function footnote_expand_reference_container_719_1() { jQuery('#footnote_references_container_719_1').show(); jQuery('#footnote_reference_container_collapse_button_719_1').text('\u2212'); } function footnote_collapse_reference_container_719_1() { jQuery('#footnote_references_container_719_1').hide(); jQuery('#footnote_reference_container_collapse_button_719_1').text('+'); } function footnote_expand_collapse_reference_container_719_1() { if (jQuery('#footnote_references_container_719_1').is(':hidden')) { footnote_expand_reference_container_719_1(); } else { footnote_collapse_reference_container_719_1(); } } function footnote_moveToReference_719_1(p_str_TargetID) { footnote_expand_reference_container_719_1(); var l_obj_Target = jQuery('#' + p_str_TargetID); if (l_obj_Target.length) { jQuery( 'html, body' ).delay( 0 ); jQuery('html, body').animate({ scrollTop: l_obj_Target.offset().top - window.innerHeight * 0.2 }, 380); } } function footnote_moveToAnchor_719_1(p_str_TargetID) { footnote_expand_reference_container_719_1(); var l_obj_Target = jQuery('#' + p_str_TargetID); if (l_obj_Target.length) { jQuery( 'html, body' ).delay( 0 ); jQuery('html, body').animate({ scrollTop: l_obj_Target.offset().top - window.innerHeight * 0.2 }, 380); } }<\/script>","protected":false},"excerpt":{"rendered":"<p>The essence of time-nuttery is measuring the stability of clocks and oscillators.&nbsp; Allan Deviation (&#8220;ADEV&#8221;) is the statistic most commonly used to talk about frequency stability.&nbsp; There&#8217;s a very good&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_lmt_disableupdate":"","_lmt_disable":"","ngg_post_thumbnail":0,"footnotes":""},"categories":[54,7,2],"tags":[53,75,73,74,76],"class_list":["post-719","post","type-post","status-publish","format-standard","hentry","category-gps","category-test-and-lab-equipment","category-time-and-frequency","tag-adev","tag-frequency","tag-ptti","tag-time","tag-time-nuts"],"_links":{"self":[{"href":"https:\/\/blog.febo.com\/index.php?rest_route=\/wp\/v2\/posts\/719","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.febo.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.febo.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.febo.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.febo.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=719"}],"version-history":[{"count":20,"href":"https:\/\/blog.febo.com\/index.php?rest_route=\/wp\/v2\/posts\/719\/revisions"}],"predecessor-version":[{"id":1067,"href":"https:\/\/blog.febo.com\/index.php?rest_route=\/wp\/v2\/posts\/719\/revisions\/1067"}],"wp:attachment":[{"href":"https:\/\/blog.febo.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=719"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.febo.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=719"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.febo.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=719"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}