<div dir="ltr"><div><div><div><div><div><div>HI Manikantan,<br><br></div>Answers to your questions:<br></div>1.The delay in the fringeRotationVal should be T, not T'.<br></div><br></div><div>Also, fractional sample correction is normally done differently in a baseline based correlator, but the scheme you describe of going into the frequency domain, correcting, and then back should work (albeit somewhat computationally expensively).  However, you have either a typo or an error in your equation: the phasor exponent should be -i*2*PI*channelfreq*Tfc, not -i*2*PI*Vlo*Tf.  Channelfreq is the frequency of the channel, which would range from 0 to 4 MHz (for upper sideband data), -4 to 0 MHz (for lower sideband data), or -2 to 2 MHz (if this complex subband really has been mixed down to be centred on 0 Hz - see next point).  So the frequency you are multiplying by is not fixed (otherwise what would be the point of going to the frequency domain?), it is a ramp across the band.  If this is really an error and not a typo, then this is certainly destroying your fringes!</div><div><div><br></div><div> Finally, Vlo (the local oscillator frequency) should be the signed sum of the
 effective LO, which is likely at the edge of the 4 MHz band, not in the
 middle.  If you have this wrong, you'll then have a residual fringe rate of half your bandwidth, or 2 MHz
 in this case.<br></div><div><br></div><div>Don't worry about the interpolators in DiFX: they are just down-sampling the 5th order polynomial which is valid for 120 seconds to a 1st or 2nd order polynomial which is valid for of order a few microseconds, for computational efficiency.<br><br></div>Note that autocorrelations are never really a great test, since they are insensitive to the phase, which is where almost every mistake is made :)<br><br></div>2.  The fractional bandwidth is irrelevant for fringe rotation: you can think of the chunk of spectrum as having been shifted in frequency by Vlo in the downconversion process.  That holds true for every frequency within the downconverted subband: assuming upper sideband data, then the lowest band edge has been shifted down from Vlo Hz to 0 Hz, and the upper band edge has been shifted down from Vlo + B Hz to B Hz.  Hence they've all been shifted by Vlo, and that single correction is good for all of the frequencies within the subband. <br><br></div>Cheers,<br></div>Adam<br></div><div class="gmail_extra"><br><div class="gmail_quote">On 20 February 2018 at 05:26, Manikantan Ramadas <span dir="ltr"><<a href="mailto:mramadas@gmail.com" target="_blank">mramadas@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Hi all,</div><div><br></div><div>I have a few questions on Fringe Rotation in general for the VLBI correlation experts..</div><div><br></div><div>A brief paragraph background since it is relevant to some of the design choices made: </div><div>I am working on a VLBI correlator in the context of Interplanetary Spacecraft Navigation - Delta Differential One-Way Ranging. It is essentailly a navigation scheme built upon Delta-VLBI where a session comprises looking at the S/C, an angularly nearby Quasar, back to the same or another nearby Quasar, etc. from two geographically separated antennas. The Quasar scan is essentially to subtract away common error sources such as clock offsets, station-specific effects, media effects etc., from the S/C signal (near-field source’s) delay measurements.</div><div><br></div><div>I have implemented the Quasar (VLBI) correlator based on the XF baseline-based model since it seemed most straight-forward and probably sufficient for this context. Thanks to the email that I sent in this group and the helpful pointers I got earlier, I have a good delay-model based on DiFXCalc-11 - where I have the 5th order polynomial coefficients every 2 mins. I have also implemented the necessary algorithm to convert geocentric theoretical delay to base-line theoretical delay with one of the stations (Stn-A) as reference. I have model delays in the 10-20ns range of accuracy.</div><div><br></div><div>Our data-recording format is based on the CCSDS RDEF format - 2-bit complex samples at 4 MHz sampling rate - and we have 5 such channels for bandwidth synthesis in S-band.</div><div><br></div><div>In the correlator I do the following:</div><div>1. Take Station-A’s complex sample at time t: A_t</div><div>2. Get the model delay at time t:</div><div>    (a) The accurate double value obtained from DiFXCalc-11 for delay at time t: T. </div><div>    (b) Rounded off to the nearest sample as per sampling time unit Ts of 1/4 micro-sec for 4 MHz sampling: T’</div><div>    (c) Fractional error at time t: T’-T = Tf</div><div>3. The correlator supports a configurable number of lags L: </div><div>    -L/2, …, 0, L/2-1.</div><div>    For each lag in -L/2, …, 0, …, L/2-1:</div><div>        (a) delay=T’+lag*(Ts);</div><div>        (b) fringeRotnVal=cexp(-i*2*PI*<wbr>Vlo*delay)</div><div>where Vlo is the central local oscillator frequency of the channel used in downconversion.</div><div>        (c) Station-B’s complex sample at time t+delay=B_td</div><div>        (d) Correlation value = A_t * fringeRotnVal * conjugate(B_td)</div><div>        </div><div>I keep doing this basic loop and accumulate the Correlation values lag-wise. Every 64 samples, I do fractional bit-shift correction of the averaged lag-wise correlation values by taking the L samples to frequency domain, multiply by phasor cexp(-i*2*PI*Vlo*Tfc) where Tfc is the fractional error for the central value of the 64 samples. Then I come back to time-domain to have the 64 fractional error corrected samples. I also do fractional bit shift correction even if 64 samples are not reached - whenever a bit shift happens.</div><div>Our typical delay rates are in the 2 micro-sec per sec order, and since we are dealing with a 2.3 GHz S-band sky frequency, the natural fringe-rate is on the order of 4.6 KHz. Since fringe-rate changes at 2*PI*4600 radians per sec., for 1 radian it would take aroundd 35 micro-second which at 1/4 micro-sec sampling is 140 samples. I could have chosen 128 samples for fractional bit-shift correction / first-level averaging, but chose 64 to be one-step more conservative to be within 1 radian.</div><div><br></div><div>The problem is that I am not seeing any correlation peaks in the lag  vs time (accumulation-period) vs amplitude plane. I have done accumulation for 64 lags (clock-offsets are known to be within the 64/4 = 16 = +/- 8 micro-sec range), and further accumulated the first-level 1sec accumulation period values, further upto 30 sec.</div><div>I have also implemented the FFT conversion from time-to-delay_rate so that I have single-band Fringe-Search grids in the lag vs delay_rate vs amplitude 3-D planes. Even here I am not able to see any peaks.</div><div><br></div><div>I know from our peer agency that the data is good and successfully correlated. I have tested my correlator code for auto-correlation by feeding it the same station files and by-passing the delay/fringe-rotation steps alone; there are no blatant bugs, correlation peaks are visible in this auto-correlation scenario.</div><div><br></div><div>My questions / confusions in this context are:</div><div>1. Am I doing Fringe-Rotation right? Are there any noticeable blunders here or gotcha-s that I might have missed?</div><div>I have seen DiFX code in the mode.cpp file where fringe-rotation is done; there are interpolators used - linear / quadratic / post-FFT modes. But I thought that they may not be required for me since I am getting the model-delay calculated for every sampling period from 5th order polynomials directly without any further delay-modeling..</div><div>2. The 4 MHz bandwidth is only a small fraction of the sky-frequency at 2.3 GHz. I would not lose correlation amplitude right? Or should I consider getting sub-channel-wise Fourier time-series and do Fringe-rotation sub-channel-wise?</div><div><br></div><div>I have spent quite some time on this, but obviously I must be missing something. I would be grateful for any suggestions that you may have. I realise that this is not directly related to DiFX per se., but I don’t know of any other active VLBI correlator community that I could discuss with. I hope that it may still be of general interest for members of the mailing list..If you have any helpful pointers / documents - kindly share it with me. But I have already searched much of what Google could show me.. Thanks!</div><div><br></div><div>Thanks and Regards,</div><div>Manikantan</div><span class="HOEnZb"><font color="#888888"><div><br></div>-- <br><div class="m_-2620239869203968319gmail_signature">"By being pleasant always and smiling, it takes you nearer to God, nearer than any prayer." - Sri Ramakrishna Paramahamsa<br>------------------------------<wbr>------------------------------<wbr>------</div>
</font></span></div>
<br>______________________________<wbr>_________________<br>
Difx-users mailing list<br>
<a href="mailto:Difx-users@listmgr.nrao.edu">Difx-users@listmgr.nrao.edu</a><br>
<a href="https://listmgr.nrao.edu/mailman/listinfo/difx-users" rel="noreferrer" target="_blank">https://listmgr.nrao.edu/<wbr>mailman/listinfo/difx-users</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr" style="font-size:12.8000001907349px"><div dir="ltr" style="font-size:12.8px"><div dir="ltr" style="font-size:12.8px"><div dir="ltr" style="font-size:12.8px"><div dir="ltr" style="font-size:12.8px">!=============================================================!<br>Dr. Adam Deller         </div><div dir="ltr" style="font-size:12.8px">ARC Future Fellow, Senior Lecturer</div><div style="font-size:12.8px">Centre for Astrophysics & Supercomputing </div><div dir="ltr" style="font-size:12.8px">Swinburne University of Technology    <br>John St, Hawthorn VIC 3122 Australia</div><div style="font-size:12.8px">phone: +61 3 9214 5307</div><div style="font-size:12.8px">fax: +61 3 9214 8797</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">office days (usually): Mon-Thu<br>!=============================================================!</div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>
</div>