The nature of the transmitted radio signal, hereafter beacon, 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 continous or an intermittent beacon.
This influences the tradeoff between methods.
\\
% outline of chapter
In the following, the synchronisation scheme for both the continuous and intermittent beacon are elaborated upon.
An example setup of two antennas ($A_i$) at different distances from a transmitter ($T$).
}
\label{fig:beacon_spatial_setup}
\end{figure}
The setup of an additional in-band synchronisation mechanism using a transmitter reverses the method of interferometry.\todo{Requires part in intro about IF}
The distances between the transmitter $T$ and the antennas $A_i$ incur a time delay $(\tProp)_i$ caused by the finite propagation speed of the radio signal over these distances.
Since the signal is an electromagnetic wave, its instantanuous 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.
As such, the time delay due to propagation can be written as
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
As the mismatch is the difference between the antenna clock deviations, this scheme does not allow to uniquely attribute the mismatch to one of the clock deviations $(\tClock)_i$.
In general, we are interested in synchronising an array of antennas.
As \eqref{eq:synchro_mismatch_clocks} applies for any two antennas in the array, all the antennas that record the signal can determine the synchronisation mismatches simultaneously.
The mismatch terms for any two pairs of antennas sharing a single antenna $\{(i,j), (j,k)\}$ allows to find the closing mismatch term for $(i,k)$ since
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 clock deviations $(\tClock)_i$.
The tradeoff between the gained accuracy and the timescale between synchronisation periods allows for a dead time of the detectors during synchronisation.
With an estimated accuracy of the \gls{GNSS} below $50\ns$ the correct beacon period can be determined, resulting in a unique $\tTrueEmit$ transmit time\todo{reword}.
The typical \gls{FT} to obtain spectral information from periodic data is the \gls{FFT} (a fast implementation of the \gls{DFT}\eqref{eq:fourier:dft}).
Such an algorithm efficiently finds the magnitudes and phases within a trace $x$ at specific frequencies $f = f_s \tfrac{k}{N}$ determined solely by the number of samples $N$ ($0\leq k < N$) and the sampling frequency $f_s$.
\\
% .. but we require a DTFT
Depending on the frequency of the beacon, the sampling frequency and the number of samples, one can resort to use such a \gls{DFT}.
However, if the frequency of interest is not covered in the specific frequencies, the approach must be modified (e.g. zero-padding or interpolation).
where $X(f)$ is the transform of $x(t)$ at frequency $f$, sampled at $t[n]$.
\\
\bigskip
% DFT sampling of DTFT / efficient multifrequency FFT
When the sampling of $x(t)$ is equally spaced, the $t[n]$ terms can be decomposed as a sequence, $t[n]=\tfrac{n}{f_s}$ such that \eqref{eq:fourier:dtft} becomes the \acrlong{DFT}:
The traces will contain noise from various sources, both internal (e.g. LNA) and external (e.g. radio communications) to the detector.
Adding gaussian noise to the traces in simulation gives a simple noise model, associated to many random noise sources.
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.
A periodic signal is sent out from a transmitter (the oscillator), and captured by an antenna (the chip the oscillator drives).
In a digital circuit, the oscillator often emits a discrete (square wave) signal (see Figure~\ref{fig:beacon:ttl}).
A tick is then defined as the moment that the signal changes from high to low or vice versa.
In this scheme, synchronising requires latching on the change very precisely.
As between the ticks, there is no time information in the signal.
\\
\todo{Possibly Invert story from short->long to long->short}
Instead of introducing more ticks in the same time, and thus a higher frequency of the oscillator, a smooth continous signal can also be used.
This enables the opportunity to determine the phase of the signal by measuring the signal at some time interval.
This time interval has an upper limit on its size depending on the properties of the signal, such as its frequency, but also on the length of the recording.
In Figure~\ref{fig:beacon:sine}, both sampling~1~and~2 can reconstruct the sine wave from the measurements.
Meanwhile, the square wave has some leeway on the precise timing.\todo{reword sentence}
Two syntonised beacons, the actual synchronization is off by a multiple of periods.
}
\label{fig:second_timescale:on}
\end{subfigure}
\caption{
}
\label{fig:second_timescale}
\todo{Fill figure and caption}
\end{figure}
\subsection{Beacons in Airshower timing}
To setup a time synchronising system for airshower measurements, actually only the high frequency part of the beacon must be employed.
The low frequency part, from which the number of oscillations of the high frequency part are counted, is supplied by the very airshower that is measured.
As mentioned in Section~\ref{sec:time:beacon}, a beacon consisting of a single sine wave allows to syntonise two antennas by measuring the phase difference of the beacon at both antennas $\Delta\phase=\phase_1-\phase_2$.
This means the local clock difference of the two antennas can be corrected upto an unknown multiple $k$ of its period, with
In Figure~\ref{fig:beacon_outline}, both such a signal and a sine wave beacon are shown as received at two desynchronised antennas.
The total time delay $\Delta t$ is indicated by the location of the peak of the slow signal.
Part of this delay can be observed as a phase difference $\Delta\phase$ between the two beacons.
% k from coherent sum
\bigskip
The phase difference of the beacon signal obtained in Figure~\ref{fig:beacon_outline} allows to correct small (with respect to the beacon frequency) time delays.
The total time delay may, however, be much larger than one such period.
As shown in \eqref{eq:phase_diff_to_time_diff}, after correcting for the time delay proportional to the phase difference $\Delta t_\phase$, the left-over time delay should be a multiple of the beacon period $kT$.
\bigskip
When the slower signal is transmitted from the transmitter that sent out the beacon signal, then the number of periods $k$ can be obtained directly from the signal.
If, however, the slow signal is sent from a different transmitter, the different distances incur different time delays.
In a static setup, these distance should be measured to such a degree to have a time delay accuracy of about one period of the beacon signal.\todo{reword sentence}
\\
\bigskip
If measuring the distances to the required accuracy is not possible, a different method must be found to obtain the correct number of periods.
The total time delay in \eqref{eq:phase_diff_to_time_diff} contains a continuous term $\Delta t_\phase$ that can be determined from the beacon signal, and a discrete term $k T$ where $k$ is the unknown discrete quantity.