diff --git a/applications/apertif/matlab/correlator_null_clip_or_wrap.m b/applications/apertif/matlab/correlator_null_clip_or_wrap.m index 43669ce6313403003a58d6906f2c3ea8395be4dd..c5dff941d9bb0a5d620ed0225a79c9b23dfaf69f 100644 --- a/applications/apertif/matlab/correlator_null_clip_or_wrap.m +++ b/applications/apertif/matlab/correlator_null_clip_or_wrap.m @@ -24,9 +24,14 @@ % % Description : % Clipping seems preferrable because it does still contribute somewhat -% constuctive to the correlation. Even a little bit (ampl = 1.1) of -% wrapping already gives seemingly random output, so one could even -% argue that wrapping does not cause decorrelation. +% constuctive to the correlation. Clipping preserves the phase +% information (zero crossings) of the signal and a clipped signal still +% resembles the original overflow signal. +% Even a little bit (ampl = 1.1) of wrapping already gives seemingly +% random output. For severe overflow (ampl > 2) the wrapping cause extra +% zero crossings. If the wrapped signal becomes sufficiently random +% then the contribution of wrapped parts of the signal to the +% correlation will be close to zero. % Using noise input it shows that for clipped input the correlator % output still follows the correlator output of the full scale input % that is used as reference (ref). @@ -34,10 +39,15 @@ % correlator output can be normalized by N or by the number of non-zero % contributions N-cnt. The plots show that nulling and scaling yield % somewhat destructive correlator output. +% Even without RFI the signal may occasionally (e.g. ampl = 1.01) +% overflow due to the variation of the noise. For this clipping seems +% the most graceful choice. % % Conclusion: best choose input clipping for a correlator. % -% Remark: +% Remarks: +% . This model does not investigate the effect of the channel filterbank +% on the data. % . Delay tracking and fringe stopping will take care that the input % b will be in phase with input a, so should we in the plots only % look at the correlator output for phase difference close to 0 or @@ -59,7 +69,7 @@ close all; %rng(0); % random seed for repeatable result % Try different amplitudes -ampl = 1.5; % for input rand() or sin() use > 1 for overflow +ampl = 8; % for input rand() or sin() use > 1 for overflow % for input randn() ampl = sigma, so use >~ 0.3 for overflow N = 1000;