<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.nsnam.org/mediawiki/index.php?action=history&amp;feed=atom&amp;title=Local_Clocks</id>
	<title>Local Clocks - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://www.nsnam.org/mediawiki/index.php?action=history&amp;feed=atom&amp;title=Local_Clocks"/>
	<link rel="alternate" type="text/html" href="https://www.nsnam.org/mediawiki/index.php?title=Local_Clocks&amp;action=history"/>
	<updated>2026-04-21T16:55:46Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.8</generator>
	<entry>
		<id>https://www.nsnam.org/mediawiki/index.php?title=Local_Clocks&amp;diff=11434&amp;oldid=prev</id>
		<title>Pdbarnes: Created page with &quot;''This is a continuation of the local clocks/per-node clock discussion from GSOC2015MpTcpImplementation#On_the_per_node_clock'''  == Developer List Discussion 2019-01 ==...&quot;</title>
		<link rel="alternate" type="text/html" href="https://www.nsnam.org/mediawiki/index.php?title=Local_Clocks&amp;diff=11434&amp;oldid=prev"/>
		<updated>2019-02-01T18:58:55Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;&amp;#039;&amp;#039;This is a continuation of the local clocks/per-node clock discussion from &lt;a href=&quot;/wiki/GSOC2015MpTcpImplementation#On_the_per_node_clock&amp;#039;&quot; title=&quot;GSOC2015MpTcpImplementation&quot;&gt;GSOC2015MpTcpImplementation#On_the_per_node_clock&amp;#039;&lt;/a&gt;&amp;#039;&amp;#039;  == Developer List Discussion 2019-01 ==...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;''This is a continuation of the local clocks/per-node clock discussion from [[GSOC2015MpTcpImplementation#On_the_per_node_clock']]''&lt;br /&gt;
&lt;br /&gt;
== Developer List Discussion 2019-01 ==&lt;br /&gt;
&lt;br /&gt;
On 24/01/19 at 09:15, Tommaso Pecorella wrote:&lt;br /&gt;
&amp;lt;blockquote&amp;gt;Hi all,&lt;br /&gt;
&lt;br /&gt;
there's an unused and yet potentially very interesting feature in ns-3: Node::GetLocalTime.&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On 25 Jan 2019, at 02:55, Natale Patriciello &lt;br /&gt;
&amp;lt;blockquote&amp;gt;Matt was working on that as part of his GSoC 4 years ago.&lt;br /&gt;
[[GSOC2015MpTcpImplementation#On_the_per_node_clock]]&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On Feb 1, 2019, at 9:15 AM, Barnes, Peter D. &amp;lt;barnes26@llnl.gov&amp;gt; wrote:&lt;br /&gt;
&amp;lt;blockquote&amp;gt;I worked with Matt on this GSoC (gosh was it 4 years ago already?).  This turned out to be more complex than we expected:&lt;br /&gt;
&lt;br /&gt;
1.  (should have been the easy part) Finding code to simulate noisy clocks.  The simple thing would be to just sum samples from a Gaussian (or Poisson) for the actual tick size, but this would give an unrealistic Allen variance (just the noise portion, not the drift, which is typically more significant.)&lt;br /&gt;
&lt;br /&gt;
2.  Each Node has to support it’s own Scheduler, in local time.  (This is so you don’t have to predict accumulated variation over long times, which makes #1 harder.[1])&lt;br /&gt;
&lt;br /&gt;
3.a  For every Now() call you have to decide if it should be GetLocalTime()&lt;br /&gt;
3.b  For every Schedule() call you have to decide if it should be in local time or absolute time.&lt;br /&gt;
&lt;br /&gt;
Happy to talk more,&lt;br /&gt;
Peter&lt;br /&gt;
&lt;br /&gt;
[1]  Longer explanation:&lt;br /&gt;
&lt;br /&gt;
Suppose we’re at time 100 (absolute: 100_a), and want to schedule an event A for +100 (local: +100_l), which will end up at ~200_a.  We could look up the Allan deviation for tau=100 (or equivalently the time deviation), and sample from that to determine the absolute delay to schedule the event.&lt;br /&gt;
&lt;br /&gt;
Now the simulation proceeds and at time 110_a needs to schedule an event B for +80_l, which will end up ~190_a, so we follow the same process.  The difficulty is that each event inserted before A subdivides the original interval, but the shorter intervals will no longer result in the intended Allan deviation. In this example we sampled at tau = 100_l, then tau = 80_l, leaving a gap of 10_l *which we didn’t sample from the full Allan deviation*&lt;br /&gt;
&lt;br /&gt;
I think (but since I don’t understand#1 above it’s more like conjecture) that the right way is to store the events in a local-time schedule, then as we prepare to execute the next event E @ t_E,l, sample the noisy clock for t_E,l - t’_l (where t’_l is the local time of the previous event), in order to compute t_E,a, the absolute time of event E.&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Possibly Relevant Literature ==&lt;br /&gt;
&lt;br /&gt;
=== Series on the Dynamic Allan Variance ===&lt;br /&gt;
* &amp;quot;The Dynamic Allan Variance,&amp;quot; L. Galleani, 2009. ([https://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&amp;amp;arnumber=4816055 pdf])&lt;br /&gt;
* &amp;quot;The Dynamic Allan Variance II: A Fast Computational Algorithm,&amp;quot; L. Galleani, 2019. ([https://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&amp;amp;arnumber=5361540 pdf])&lt;br /&gt;
* &amp;quot;The Dynamic Allan Variance III: Confidence and Detection Surfaces,&amp;quot; L. Galleani, 2019. ([https://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&amp;amp;arnumber=5995212 pdf])&lt;br /&gt;
* &amp;quot;The Dynamic Allan VarianceIV: Characterization of Atomic Clock Anomalies,&amp;quot; L. Galleani, 2009. ([https://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=7103519 pdf])&lt;br /&gt;
* &amp;quot;The Dynamic Allan VarianceV: Recent Advances in Dynamic Stability Analysis,&amp;quot; L. Galleani, 2009. ([https://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=7339453 pdf])&lt;br /&gt;
&lt;br /&gt;
=== Simulation of Noisy Clocks ===&lt;br /&gt;
* &amp;quot;Discrete Simulation Of Power Law Noise,&amp;quot; N.Jeremy Kasdin and Todd Walter, 1992. ([http://www.crya.unam.mx/radiolab/recursos/Allan/Kasdin-Walter.pdf pdf])&amp;lt;br/&amp;gt;Includes C source code.&lt;br /&gt;
* &amp;quot;Discrete Simulation of Power Law Noise,&amp;quot; Neil Ashby, 2011. ([https://arxiv.org/pdf/1103.5062.pdf pdf])&lt;br /&gt;
* colorednoise,&amp;quot; Julia Leute, 2018. ([https://github.com/jleute/colorednoise colorednoise Github Python repo], now merged into next reference)&lt;br /&gt;
* &amp;quot;allantools,&amp;quot; Anders Wallin, 2018. ([https://github.com/aewallin/allantools allantools Github Python repo])&lt;/div&gt;</summary>
		<author><name>Pdbarnes</name></author>
	</entry>
</feed>