As shown in Chapter~\ref{sec:disciplining}, both impulsive and sine beacon signals can synchronise air shower radio detectors to enable the interferometric reconstruction of extensive air showers.
Due to the periodicity of sine beacons, the ability to synchronise an array is limited up to the beacon period $T$.
As previously mentioned, the correct periods can be ascertained by choosing a beacon period much longer than the estimated accuracy of another timing mechanism.\footnote{For reference, \gls{GNSS} timing is expected to be below $30\ns$}
Likewise, this can be achieved using the beating of multiple frequencies such as the four frequency setup in \gls{AERA}, amounting to a total period of $>1\us$.
In this chapter, a different method of resolving these period mismatches is investigated by recording an impulsive signal in combination with the sine beacon.
Figure~\ref{fig:beacon_sync:sine} shows the steps of synchronisation using this combination.
The extra signal declares a shared time $\tTrueEmit$ that is common to the stations, after which the periods can be counted.
Note that the period mismatch term $\Delta k_{ij}$ in \eqref{eq:synchro_mismatch_clocks_periodic} will be referenced throughout this Chapter as $k$ since we can take station $i$ as reference ($k_i =0$).
% Lifting period degeneracy ($k=n-m=7$ periods) using the optimal overlap between impulsive signals.
% }
% \label{fig:beacon_sync:period_alignment}
% \end{subfigure}
% \caption{
% Synchronisation scheme for two antennas using a continuous beacon and an impulsive signal, each emitted from a separate transmitter.
% Vertical dashed lines indicate periods of the beacon (orange),
% solid lines indicate the time of the impulsive signal (blue).
% \\
% \subref{fig:beacon_sync:syntonised}: The beacon allows to resolve a small timing delay ($\Delta \tClockPhase$).
% \\
% \subref{fig:beacon_sync:period_alignment}: Expecting the impulsive signals to come from the same source, the overlap between the two impulsive signals is used to lift the period degeneracy ($k=n-m$).
When the beacon transmitter is also used to emit the signal defining $\tTrueEmit$, the number of periods $k$ can be obtained directly from the signal.
However, if this calibration signal is sent from a different location, its time delays differ from the beacon's time delays.
\\
% Dynamic setup
For static setups, these time delays can be resolved by measuring the involved distances or by taking measurements of the time delays over time.
In dynamic setups, such as for transient signals, the time delays change per event and the distances are not known a priori.
The time delays must therefore be resolved from the information of a single event.
\\
% Beacon + Impulsive -> discrete
As shown in Chapter~\ref{sec:beacon:array}, an impulsive signal allows to reconstruct the direction of origin in a single event depending on the timing resolution of the array.
Synchronising the array with a sine beacon, any clock mismatch is discretized into a number of periods $k$.
This allows to improve the reconstruction by iterating the discrete clock mismatches during reconstruction.
\\
Of course, a limit on the number of periods is required to prevent over-optimisation.
In general, they can be constrained using estimates of the accuracy of other timing mechanisms (see below).
\\
With a restricted set of allowed period shifts, we can alternate optimising the calibration signal's origin and optimising the set of period time delays of the array.
When doing the interferometric analysis for a sine beacon synchronised array, waveforms can only be delayed by an integer amount of periods, thereby giving discrete solutions to maximising the interferometric signal.
To test the idea of combining a single sine beacon with an air shower, we simulated a set of recordings of a single air shower that also contains a beacon signal.
The air shower signal was simulated by \acrlong{ZHAireS}\cite{Alvarez-Muniz:2010hbb} on a grid of 10x10 antennas with a spacing of $50\,\mathrm{meters}$.
A sine beacon ($\fbeacon=51.53\MHz$) was introduced at a distance of approximately $75\,\mathrm{km}$ northwest of the array, primarily received in the X polarisation.
The beacon's amplitude is also dependent on the distance. Although simulated, this effect has not been incorporated in the analysis as it is negligible for the considered grid and distance to the transmitter.
The beacon signal was recorded over a longer time ($10240\,\mathrm{samples}$), to be able to distinguish the beacon and air shower later in the analysis.
The final waveform of an antenna (see Figure~\ref{fig:single:proton}) was then constructed by adding its beacon and air shower waveforms and band-passing with relevant frequencies (here $30$ and $80\MHz$ are taken by default).
Of course, a gaussian white noise component is introduced to the waveform as a simple noise model (see Figure~\ref{fig:sine:snr_time_resolution} for a treatise on the timing accuracy of a sine beacon).
Excerpt of a fully simulated waveform ($N=10240\,\mathrm{samples}$) (blue) containing the air shower (a $10^{16}\eV$~proton), the beacon (green, $\fbeacon=51.53\MHz$) and noise.
After the creation of the antenna waveforms, the clocks are randomised by sampling a gaussian distribution with a standard deviation of $30\ns$. % (see Figure~\ref{fig:simu:sine:periods:repair_none}).
Since the beacon can be recorded for much longer than the air shower signal, we mask a window of $500$ samples around the maximum of the trace as the air shower's signal.
With the obtained beacon parameters, the air shower signal is in turn reconstructed by subtracting the beacon from the full waveform in the time domain.
The small clock defect $\tClockPhase$ is then finally calculated from the beacon's phase $\pMeas$ by subtracting the phase introduced by the propagation from the beacon transmitter.
Shifting the waveforms to remove these small clocks defects, we are left with resolving the correct number of periods $k$ per waveform (see Figure~\ref{fig:grid_power:repair_phases}).
This means that the unknown propagation time delays for the air shower ($\tProp$) affect the alignment of the signals in Figure~\ref{fig:beacon_sync:period_alignment} in addition to the unknown clock period defects ($k T$).
If the antennas had been fully synchronised, radio interferometry as introduced in Chapter~\ref{sec:interferometry} can be applied to find the origin of the air shower signal, thus resolving the shower axis.
Still, a (rough) first estimate of the shower axis might be made using this technique or by employing other detection techniques such as those using surface or fluorescence detectors.
In this process each waveform of the array is allowed to shift by a restricted amount of periods with respect to a reference waveform (taken to be the waveform with the highest maximum).
Define a grid around the estimated shower axis, zooming in on each iteration.
\item\label{algo:kfinding:optimisation}
$k$-optimisation: per grid point, optimise the $k$'s to maximise the sum of the waveforms (see Figure~\ref{fig:single:k-correlation}).
\item\label{algo:kfinding:kfinding}
$k$-finding: find the grid point with the maximum overall sum (see Figure~\ref{fig:findks:maxima}) and select its set of $k$'s.
\item\label{algo:kfinding:break}
Stop when the set of $k$'s is equal to the set of the previous iteration, otherwise continue.
\item\label{algo:kfinding:powermapping}
Finally, make a power mapping with the obtained $k$'s to re-estimate the shower axis (location with maximum power) (see Figure~\ref{fig:findks:reconstruction}), and return to Step~\ref{algo:kfinding:grid} for another iteration.
\end{enumerate}
\vspace*{2pt}
Here, Step~\ref{algo:kfinding:optimisation} has been implemented by summing each waveform to the reference waveform (see above) with different time delays $kT$ and selecting the $k$ that maximises the amplitude of a waveform combination.\footnote{%<<<
This corresponds to the maximum expected time delay between two antennas with a clock randomisation up to $30\ns$ for the considered beacon frequency.%
\footnote{
Figure~\ref{fig:simu:error:periods} shows this is not completely true.
Second \subref{fig:findks:reconstruction}, perform the interferometric reconstruction with this set of period shifts.
Zooming on the maximum power \subref{fig:findks:maxima:zoomed},\subref{fig:findks:reconstruction:zoomed} repeat the steps until the $k$'s are equal between the zoomed grids \subref{fig:findks:maxima:zoomed2},\subref{fig:findks:reconstruction:zoomed2}.
Figure~\ref{fig:grid_power_time_fixes} shows the effect of the various synchronisation stages on both the alignment of the air shower waveforms, and the interferometric power measurement near the true shower axis.
Phase synchronising the antennas gives a small increase in observed power, while further aligning the periods after the optimisation process significantly enhances this power.
Due to selecting the highest maximum amplitude, and the process above zooming in aggressively, wrong candidate axes are selected when there is no grid-location sufficiently close to the true axis.
% premature optimisation / degeneracy
Such locations are subject to differences in propagation delays that are in the order of a few beacon periods.
As the number of computations scales linearly with the number of grid points ($N = N_x N_y$), it is favourable to minimise the number of grid locations.
Unfortunately, the above process has been observed to fall into local maxima when a too coarse and wide initial grid ($N_x < 13$ at $X=400\,\mathrm{g/cm^2}$) was used while restricting the time delays to $\left| k \right| \leq3$.
In this case, the period defects have been resolved incorrectly for two waveforms (see Figure~\ref{fig:simu:error:periods}) due to too stringent limits on the allowable $k$'s.
Looking at Figure~\ref{fig:grid_power:repair_phases}, this was to be predicted since there are two waveforms peaking at $k=4$ from the reference waveform's peak (dashed line).
Of course, this algorithm must be evaluated at relevant atmospheric depths where the interferometric technique can resolve the air shower.
In this case, after manual inspection, the air shower was found to have \Xmax\ at roughly $400\,\mathrm{g/cm^2}$.
The algorithm is expected to perform as long as a region of strong coherent power is resolved.
This means that with the power in both Figure~\ref{fig:grid_power:axis:X200} and Figure~\ref{fig:grid_power:axis:X600}, the clock defects and air shower should be identified to the same degree.
\\
Additionally, since the true period shifts are static per event, evaluating the $k$-finding algorithm at multiple atmospheric depths allows to compare the obtained sets thereof to further minimise any incorrectly resolved period defect.
\\
Further improvements to the algorithm are foreseen in both the definition of the initial grid (Step~\ref{algo:kfinding:grid}) and the optimisation of the $k$'s (Step~\ref{algo:kfinding:optimisation}).
For example, the $k$-optimisation step currently sums the full waveform for each $k$ to find the maximum amplitude for each sum.
Instead, the timestamp of the amplitude maxima of each waveform can be compared, directly allowing to compute $k$ from the difference.
\\
Finally, from the overlapping traces in Figure~\ref{fig:grid_power:repair_full}, it is easily recognisable that some period defects have been determined incorrectly.
Inspecting Figure~\ref{fig:grid_power:repair_phases}, this was to be expected as there are two waveforms with the peak at $\left|k\right| =4$ from the reference waveform.
Therefore, either the $k$-optimisation should have been run with a higher limit on the allowable $k$'s, or, preferably, these waveforms must be optimised after the algorithm is finished with a higher maximum $k$.
Interferometric power for the resolved clocks (from Figure~\ref{fig:grid_power:repair_full}) at four atmospheric depths for an opening angle of $2^\circ$(\textit{left}) and $0.2^\circ$(\textit{right}).