Companion code for the paper
"Accurate Multi-perturbation Localization in Optical Fibers with Polarization-based Forward Sensing" by Lampros Lanaras, Rick M. Butler, Christian Häger, and Alex Alvarado.
The paper has been accepted for publication. The full reference and link are TO BE ADDED.
This repository contains the simulation code behind the paper. The method localizes multiple simultaneous perturbations (discrete in space) along an optical fiber using only the light received at the fiber output. Each perturbation randomly scrambles the state of polarization (SOP) of the propagating light. Two carrier waves at different wavelengths propagate through the fiber, and chromatic dispersion makes the polarization changes caused by a perturbation arrive at the receiver with a delay that depends on the wavelength. We measure the angular speed of the received state of polarization at both wavelengths, cross correlate the two traces, detect all correlation peaks above an adaptive threshold based on the median absolute deviation, and refine each peak location with parabolic interpolation. In a numerical model of a 50 km fiber sampled at 10 GSa/s we localize five simultaneous perturbations with a median error of 3.5 m.
- Experiments/experiment1.py runs the single perturbation experiment. It sweeps the wavelength separation between the two carriers for amplifier noise figures of 3 dB and 6 dB, and reports the median localization error together with the interquartile range. This produces the data behind Fig. 2 of the paper.
- Experiments/experiment2.py runs the Monte Carlo study with one to five simultaneous perturbations over 1000 random configurations, each evaluated over 50 fiber realizations. It reports true positives, false positives, false negatives, and localization errors, producing the data behind Fig. 3 of the paper.
- Experiments/functions.py holds the signal processing helpers shared by both experiments, such as the angular speed computation, the delay based position estimate, and the amplifier noise model.
- src/tremor_waveplate_toolbox/ is the underlying fiber simulator built on the waveplate model, written by Rick M. Butler. See the upstream repository for its full documentation.
- demos/ contains notebooks demonstrating the toolbox.
- config/parameters.ini provides example toolbox parameters.
- Clone this repository and create an environment with Python 3.12 or newer.
- Install the toolbox together with the extra packages the experiments need.
pip install -e ".[experiments]" - Run the first experiment. It prints a summary table with the median error and interquartile range per noise figure and wavelength separation.
python Experiments/experiment1.py
- Run the second experiment. It appends the Monte Carlo results to the file
monte_carlo_results_4_sigma_mad_final.csvin the current working directory.python Experiments/experiment2.py
Both scripts spread the work across all available CPU cores through multiprocessing, and they can take a long time at the settings used in the paper.
If you use this work, please cite our paper:
@inproceedings{lanaras2026accurate,
title={Accurate Multi-perturbation Localization in Optical Fibers with Polarization-based Forward Sensing},
author={Lanaras, Lampros and Butler, Rick M. and Häger, Christian and Alvarado, Alex},
booktitle={Proceedings of the 2026 European Conference on Optical Communication (ECOC)},
year={2026},
note={To appear}
}The simulator used in this work was developed by Rick M. Butler. A new, more accurate simulator has already been developed and can be found at this repository.
A toolbox to simulate optical fibre perturbations using a propagation model. It models polarisation mode dispersion (PMD) as a constant differential group delay (DGD) along the fibre, and applies random rotations of the principal state of polarisation (PSP) after each correlation length. Sudden perturbations are simulated by applying random-uniform scrambling to the state of polarization (SOP) at specific sections of the fiber. To achieve this, the standard special unitary matrix of a perturbed section is multiplied by a perturbation matrix D_n[k], which is drawn random-uniformly to represent the perturbation-induced scrambling.
This work was partially supported by the Swedish Research Council under grants no. 2025-04836 and 2025-03824 and by the project PINTO with file number NGF.1609.242.015 of the National Growth Fund AiNed programme, which is financed by the Dutch Research Council.
This project is published under the MIT license.