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\ns$..
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_j T$).
As such, both this origin and the clock defects have to be determined simultaneously.
If the antennas had been fully synchronised, radio interferometry as introduced in Section~\ref{sec:interferometry} can be applied to find the origin of the air shower signal, thus resolving the shower axis.
Starting with an initial grid around this estimated axis, a two-step process zooms in on the shower axis while optimising the interferometric signal.
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).
The first step consists of finding the set of period shifts $k_j$ that maximises the overall maximum amplitude on the grid.
At each location, after removing propagation delays, each waveform and the reference waveform are summed with different time delays $kT$ to find the maximum attainable amplitude of the combined trace.%
This amplitude optimisation is iterated over the grid (see Figure~\ref{fig:findks:maxima}) resulting in a grid measurement of the maximum attainable amplitude and the corresponding set of period defects $k$.
The second step applies the obtained period defects and measures the interferometric power on the same grid (see Figure~\ref{fig:findks:reconstruction}).
Afterwards, a new grid zooms in on the power maximum and the process is repeated (Figures~\ref{fig:findks:maxima:zoomed},~\ref{fig:findks:reconstruction:zoomed}) until the set of period defects is constant between zooming grids.
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.
Figure~\ref{fig:findks:reconstruction} shows such a potential point near $(-1, 0.5)$ with a maximum that is comparable to the selected maximum near the true axis.\Todo{no longer shown}
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 initial grid ($N_x < 13$ at $X=400\,\mathrm{g/cm^2}$) was used while restricting the time delays to $\left| k \right| \leq3$.
As visible in the right side of Figure~\ref{fig:grid_power:repair_full}, not all waveforms are in sync after the optimisation.
In this case, the period defects have been resolved incorrectly for two waveforms, lagging 1 and 3 periods respectively (see Figure~\ref{fig:simu:error:periods}).
As a result, the obtained power for the fully resolved clock defects is slightly less than the obtained power for the true clocks.
\\
% directional reconstruction
This does not impede resolving the shower axis.
Figure~\ref{fig:grid_power:axis} shows the power mapping at four different atmospheric depths for the resolved clock defects.
Except for the low power case at $X=800\,\mathrm{g/cm^2}$, the shower axis is found to be $<0.1^\circ$ of the true shower axis.
\\
% Future: at multiple depths
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.
Interferometric power for the fully resolved clocks at four atmospheric depths for an opening angle of $2^\circ$(\textit{left}) and $0.2^\circ$(\textit{right}).
The simulation axis is indicated by the red plus, the maximum power is indicated by the blue cross.
Except for \subref{fig:grid_power:axis:X800}, the shower axis is resolved within $0.1^\circ$ of the true shower axis.