Skip to content

Code corresponding to the paper "Clock synchronization over networks — Identifiability of the sawtooth model"

Notifications You must be signed in to change notification settings

poldap/clock_sync_and_range

Repository files navigation

Clock synchronization over networks — Identifiability of the sawtooth model

This GitHub repository contains the code and explanations that complement the papers "Clock synchronization over networks: Identifiability of the sawtooth model" [6] and "Clock synchronization over networks using sawtooth models" [7].

Pol del Aguila Pla [1], Lissy Pellaco [2], Satyam Dwivedi [3], Peter Händel [4] and Joakim Jaldén [5]

In this repository you will find the code used to implement the different estimation strategies in our paper [7], i.e., the intuitive periodogram and correlation peaks (PCP) technique and the local and global grid search (LGS/GGS) procedures for the sawtooth model. Similiarly, you will also find the code used for their evaluation and the generation of the empirical results in [6] and in [7]. Additionally, you can also find the code used to simulate an ideal physical system implementing the round-trip time (RTT) protocol described in Section II-A of our paper [6], summarized here by Fig.1.

RTT_measurement_scheme

Computation Environment

In order to run our code successfully and in a moderate time, you will need access to a powerful computer. For reference, all our experiments have been run on a computer equipped with Intel(R) Xeon (R) CPU E5-2630 v4 @ 2.20GHz and 32 GB of RAM. In case you do not have access to a powerful CPU and to at least as much RAM, we recommend skipping the intensive-to-compute cells and we suggest to directly load the data to generate the plots from the *.npz files, as set by default in empirical_results.ipynb. This will simply re-render the plots in the selected format, loading the results that we obtained. To run the code locally instead, in order to reproduce our results, change the corresponding flags in each computation cell to True, which will replace the *.npz files.

Reading the code and our explanations

The simplest way to read through the annotated code is to open the relevant *.ipynb 'notebook' files through nbviewer.jupyter.org. You can use nbviewer.jupyter.org from any modern browser, without any further installation requirements. Note that this option only allows you to visualize the notebooks, and it is not possible to execute the code or reproduce the results from the paper in this manner.

Executing the code

If you would like to execute the code on your own computation environment and fully replicate our results, the software requirements are:

  1. Python 3 (for reference, we used python 3.5.2), along with the packages numpy, operator, numba, tabulate, matplotlib,plotly, and matplotlib2tikz.
  2. Jupyter (for reference, we used jupyter 5.2.2).

To execute our code, you will need to be familiar with Jupyter notebooks running Python code. For that, you can refer to any of the several freely available tutorials, like this one. After installation of the required packages, navigate to the folder where this repository has been cloned and execute Jupyter notebook to launch the Jupyter notebook server in that folder. Then, a simple click to any of the *.ipynb files listed in the Jupyter notebook website loads it on a new tab, where controls for running our code are available.

In the following, we go through the different notebooks included and explain what each of them contains. Note that you do not need to run the Jupyter notebooks in any specific order. Each notebook automatically imports all the required dependencies. In particular, if you are interested in the numerical results, i.e., the plots in Section V of our paper [6] and the plots in Section IV of our paper [7], we suggest to directly look at empirical_results.ipynb. If you are interested in the set-up used to simulate a physical system of two nodes that operate following the protocol described in Fig.1 and Section II-A of [6], see Simulated nodes.ipynb

  1. imports_and_library_of_basic_functions.ipynb: In this notebook we provide the basic imports and self-defined functions needed for the implementation of the different concepts and results considered in our papers [6] and [7].
  2. estimation_strategies_with_examples.ipynb: In this notebook we implement our reference estimation strategies (see Section III of our paper [7]) and showcase them by simple examples.
  3. Cramer-Rao_and_Monte-Carlo.ipynb: In this notebook we implement 1) the computation of the CRLBs for an unwrapped model (see Section II of our paper [7]), and 2) the basic machinery to run Monte Carlo experiments with our proposed estimation approaches (see Section III of our paper [7] and estimation_strategies_with_examples.ipynb for their implementation) with respect to the different parameters of interest in the clock synchronization and ranging problem.
  4. empirical_results.ipynb: This notebook complements Section V of our paper [6] and Section IV of our paper [7]. Here, we implement the experiments that yield the numerical results we report in Section V of [6] and Section IV of [7] and generate the figures shown there.
  5. simulated nodes.ipynb: In this notebook an ideal physical system is simulated according to the protocol described in Fig.1 and in Section II-A of [6].
    1. real_parameters_for_simulated_nodes.ipynb: In this notebook it is shown how the real parameters for the simulated nodes are computed. However, such real values lead to an unrealistic computation time, namely around three years. Therefore, we decided to run the simulation of the physical system with toy parameters instead.

References

[1]: Pol del Aguila Pla's research website
[2]: Lissy Pellaco's research profile at KTH
[3]: Satyam Dwivedi's researchgate profile
[4]: Peter Händel's research profile at KTH
[5]: Joakim Jaldén's research profile at KTH
[6]: P. del Aguila Pla, L. Pellaco, S. Dwivedi, P. Händel and J. Jaldén, "Clock Synchronization Over Networks: Identifiability of the Sawtooth Model," in IEEE Open Journal of Signal Processing, vol. 1, pp. 14-27, 2020, doi: 10.1109/OJSP.2020.2978762.
[7]: P. del Aguila Pla, L. Pellaco, S. Dwivedi, P. Händel and J. Jaldén, "Clock Synchronization Over Networks Using Sawtooth Models," ICASSP 2020 - 2020 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), Barcelona, Spain, 2020, pp. 5945-5949, doi: 10.1109/ICASSP40776.2020.9054426.

About

Code corresponding to the paper "Clock synchronization over networks — Identifiability of the sawtooth model"

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published