However, the combination of large distances and the number of detectors make it prohibitively expensive to realise such a setup for \gls{UHECR} detection.
To obtain a competitive resolution of the atmospheric shower depth \Xmax with radio interferometry requires an inter-detector synchronisation of better than a few nanoseconds (see Figure~\ref{fig:xmax_synchronise}).
The synchronisation defect in \gls{AERA} using a \gls{GNSS} was found to range between a few nanoseconds up to multiple tens of nanoseconds over the course of a single day (see~\cite[Figure~3]{PierreAuger:2015aqe}).
For this section, it is assumed that the transmitter is actively introduced to the array and is therefore fully controlled in terms of produced signals and the transmitting power.
It is foreseeable that ``parasitic'' setups, where sources that are not under control of the experiment introduce signals, can be analysed in a similar manner.
The nature of the transmitted radio signal, hereafter beacon signal, affects both the mechanism of reconstructing the timing information and the measurement of the radio signal for which the antennas have been designed.
Depending on the stability of the station clock, one can choose for employing a continuous beacon (e.g.~a~sine~wave) or one that is emitted at some interval (e.g.~a~pulse).
The distance between the transmitter $T$ and the antenna $A_i$ incur a time delay $(\tProp)_i$ caused by the finite propagation speed of the radio signal.
Since the signal is an electromagnetic wave, its instantaneous velocity $v$ depends solely on the refractive index~$n$ of the medium as $v =\frac{c}{n}$.
In general, the refractive index of air is dependent on factors such as the pressure and temperature of the air the signal is passing through and the frequencies of the signal.
However, in many cases, the refractive index can be taken constant over the trajectory to simplify models.
where $(\tTrueArriv)_i$ and $(\tMeasArriv)_i$ are respectively the true and measured arrival time of the signal at antenna $A_i$.\Todo{different symbols math}
As \eqref{eq:transmitter2antenna_t0} applies for each antenna, two antennas recording the same signal from a transmitter will share the $\tTrueEmit$ term.
In that case, the differences between the true arrival times $(\tTrueArriv)_i$ and propagation delays $(\tProp)_i$ of the antennas can be related as
Note that $\tTrueEmit$ is not required in \eqref{eq:synchro_mismatch_clocks} to be able to synchronise two antennas.
However, without knowledge on the $\tTrueEmit$ of the transmitter, the synchronisation mismatch $(\Delta\tClock)_{ij}$ cannot be uniquely attributed to either of the antennas;
this scheme only provides relative synchronisation.
where $-\pi < \pMeasArriv < \pi$ is the phase of the beacon at time $\tMeasArriv$, $T$ the period of the beacon and $k \in\mathbb{Z}$ is an unknown period counter.
Of course, this means that the clock defects $\tClock$ can only be resolved up to the beacon's period, changing \eqref{eq:synchro_mismatch_clocks} to
In \gls{AERA} for example, multiple sine waves were used amounting to a total beacon period of $\sim1\us$\cite[Figure~2]{PierreAuger:2015aqe}.
With an estimated timing accuracy of the \gls{GNSS} under $50\ns$ the correct beacon period can be determined, resulting in a unique $\tTrueEmit$ transmit time.
The idea of a beacon is to synchronise an array of antennas.
As \eqref{eq:synchro_mismatch_clocks} applies for each pair of antennas in the array, all the antennas that record the beacon signal can determine the synchronisation mismatches simultaneously.
Taking one antenna as the reference antenna with $(\tClock)_r =0$, the mismatches across the array can be determined by applying \eqref{eq:synchro_mismatch_clocks} over consecutive pairs of antennas and thus all relative clock deviations $(\Delta\tClock)_{ir}$.
As discussed previously, the synchronisation problem is different for a continuous and an impulsive beacon due to the non-uniqueness (in the sine wave case) of the $\tTrueEmit$ of the transmitter.
This is illustrated in Figure~\ref{fig:dynamic-resolve} where a three-element array constrains the location of the transmitter using the true timing information of the antennas.
It works by finding the minimum deviation between the putative and measured time differences ($\Delta t_{ij}(x)$, $\Delta t_{ij}$ respectively) per baseline $(i,j)$ for each location on a grid.
\\
For a sine signal, comparing the baseline phase differences instead, this results in a highly complex pattern constraining the transmitter's location.
For each location, the colour indicates the total deviation from the measured time or phase differences in the array, such that $0$ (blue) is considered a valid location of \textit{tx}.
The different baselines allow to reconstruct the direction of an impulsive signal (\textit{left pane}) while a periodic signal (\textit{right pane}) gives rise to a complex pattern (see Appendix~\ref{fig:dynamic-resolve:phase:large} for enhanced size).
The trade-off between the gained accuracy and the timescale between synchronisation periods allows for a dead time of the detectors during synchronisation.
In Figure~\ref{fig:pulse:filter_response}, the impulse and the filter's response are shown, where the Butterworth filter band-passes the signal between $30\MHz$ and $80\MHz$.
Detecting the modelled signal from Figure~\ref{fig:pulse:filter_response} in a waveform can be achieved by finding the correlation (see Section~\ref{sec:correlation}) between the two signals (see Figure~\ref{fig:pulse_correlation}).
This is an effect of the quantisation of the sampling period, where the time offsets $\tau$ are modelled as a uniform distribution in time bins the size of $\Delta t$.
Expecting the noise to be gaussian distributed in the time domain, it is natural to use the \gls{RMS} of its amplitude as a quantity representing the strength of the noise.
From the above, it is clear that both the \gls{SNR} as well as the sampling rate of the template have an effect on the ability to resolve small time offsets.
To further investigate this, we set up a simulation\footnote{\url{https://gitlab.science.ru.nl/mthesis-edeboone/m-thesis-introduction/-/tree/main/simulations}} where templates with different sampling rates are matched to simulated waveforms for multiple \glspl{SNR}.
Second, the matching template is created by sampling the ``analog'' template at the specified sampling rate (here considered are $0.5\ns$, $0.1\ns$ and $0.01\ns$).
Afterwards, simulated waveforms are correlated (see \eqref{eq:correlation_cont} in Chapter~\ref{sec:correlation}) against the matching template, this obtains a best time delay $\tau$ per waveform by finding the maximum correlation (see Figure~\ref{fig:pulse_correlation}).
By evaluating the timing accuracies $\sigma_t$ for some combinations of \glspl{SNR} and template sampling rates, Figure~\ref{fig:pulse:snr_time_resolution} is produced.
It shows that, as long as the pulse is (much) stronger than the noise ($\mathrm{\gls{SNR}}\gtrsim5$), template matching could achieve a sub-nanosecond timing accuracy even if the measured waveform is sampled at a lower rate (here $\Delta t =2\ns$).
Pulse timing accuracy obtained by matching $N=500$ waveforms, sampled at $2\ns$, to a templated pulse, sampled at $\Delta t =0.1\ns$ (blue), $0.05\ns$ (yellow) and $0.001\ns$ (green).
A continuously emitted beacon will be recorded simultaneously with the signals from air showers.
It is therefore important that the beacon does not fully perturb the recording of the air shower signals, but still be prominent enough for synchronising the antennas.
\\
% Use sine wave to filter using frequency
By implementing the beacon signal as one or more sine waves, the beacon can be recovered from the waveform using Fourier Transforms (see Section~\ref{sec:fourier}).
It is then straightforward to discriminate a strong beacon from the air shower signals, resulting in a relatively unperturbed air shower recording for analysis after synchronisation.
\\
Note that for simplicity, the beacon in this section will consist of a single sine wave at $f_\mathrm{beacon}=51.53\MHz$ corresponding to a period of roughly $20\ns$.
By implementing the beacon signal as one or more sine waves, the beacon signal can be recovered from the waveform using Fourier Transforms (see Section~\ref{sec:fourier}).
The typical Fourier Transform implementation, the \gls{FFT}, finds the amplitudes and phases at frequencies $f_m = m \Delta f$ determined solely by properties of the waveform, i.e.~the~sampling frequency $f_s$ and the number of samples $N$ in the waveform ($0\leq m < N$ such that $\Delta f = f_s /(2N)$).
Depending on the frequency content of the beacon, the sampling frequency and the number of samples, one can resort to use such a \gls{DFT}\eqref{eq:fourier:dft}.
However, if the frequency of interest is not covered in the specific frequencies $f_m$, the approach must be modified (e.g.~by~zero-padding or interpolation).
Especially when only a single frequency is of interest, a simpler and shorter route can be taken by evaluating the \gls{DTFT}\eqref{eq:fourier:dtft} for this frequency directly.
To quantify this comparison in terms of signal to noise ratio,
we define the signal level to be the amplitude of the frequency spectrum at the beacon's frequency determined by \gls{DTFT} (the orange line in Figure~\ref{fig:sine:snr_definition}),
and the noise level as the scaled \gls{RMS} of all amplitudes in the noise band determined by \gls{FFT} (blue line in Figure~\ref{fig:sine:snr_definition}).
Since gaussian noise has Rayleigh distributed amplitudes (see Figure~\ref{fig:noise:pdf:amplitude} in Appendix~\ref{sec:phasor_distributions}), this \gls{RMS} is scaled by $1/\sqrt{2\pi}$.
Note that the \gls{DTFT}, as a finite \gls{FT}, suffers from spectral leakage, where signals at adjacent frequencies influence the ability to resolve the signals separately.
Depending on the signal to be recovered, different windowing functions (e.g.~Hann, Hamming, etc.) can be applied to a waveform.
For simplicity, in this document, no special windowing functions are applied to waveforms.
Especially important is that this simple noise model will affect the phase measurement depending on the strength of the beacon with respect to the noise level, without introducing a frequency dependence,~i.e.~ white noise.
It can be shown that for medium and strong signals, the phase residual will be gaussian distributed (see below).
The width of each fitted gaussian in Figure~\ref{fig:sine:snr_histograms} gives an accuracy on the phase offset that is recovered using the \gls{DTFT}.
From Figure~\ref{fig:sine:snr_time_resolution} we can conclude that depending on the \gls{SNR}, the timing accuracy of the beacon is below $1\ns$ for our beacon at $51.53\MHz$.
Since the time accuracy is derived from the phase accuracy, slightly lower frequencies could be used, but they would require a stronger signal to resolve to the same degree.
Likewise, higher frequencies are an available method of linearly improving the time accuracy.
For the $51.53\MHz$ beacon, the next Chapter~\ref{sec:single_sine_sync} shows a method of using an additional signal to counter the period degeneracy of a single sine wave.
Timing accuracy for a sine beacon as a function of signal to noise ratio for waveforms of $10240$ samples containing a sine wave at $51.53\MHz$ and white noise.
It can be shown that the phase accuracies (right y-axis) follow a special distribution~\eqref{eq:random_phasor_sum:phase:sine} that is well approximated by a gaussian distribution for $\mathrm{\gls{SNR}}\gtrsim3$.