## Delay measurement using single tone

Started by 3 years ago●7 replies●latest reply 3 years ago●240 viewsIn Narrow Band IoT (used with 4G...) a device is scheduled once it is detected and its Time of arrival determined. The device sends single tone (in fact several symbols with hopping) at start of a predefined subframe. At the base station the single tone is passed through FFT and a single bin is expected. The delay is then measured by checking phase of that tone in the fft output.

I tried modelling that by inserting delays in the tone, doing fft and computing phase and it looks accurate enough. However, a missing factor is carrier frequency offset (CFO) between device and cell. The effect of CFO is same as physical delay but it is either delay or advance. In our current system CFO is close to zero as delay can be inserted (calibrated) and seen to be correct as expected.

However I need to account for CFO in my calculation since any device or radio must be supported. I can see effect of CFO in my model as leakage around the tone bin and can even see the sense of it (delay or advance) but I find it hard to quantify it mathematically.

I have googled it and found out some versions of complicated pages of equations and derivations but are just boring (ej2*pi*...) style and very hard for me to follow or derive any concept.

Just curious if there is another simple way to describe or include effect of CFO in calculation of delay.

Thanks.

Check this reference which proposes a differential method to deal with (read, avoid dealing with) CFO followed by combining of like symbol-group transitions.

Chougrani et al., *Efficient Preamble Detection and Time-of-Arrival Estimation for Single-Tone Frequency Hopping Random Access in NB-IoT*, IEEE Internet of Things Journal Vol. 8, no. 9, May 2021.

Thanks Lito844,

I already got that paper and more. I can see different methodologies but all use a string of hard equations with multiple indices that admittedly I can't put my head around or even grasp the end equation which is more of benefit to me than derivations.

You may have already tried this, but I will describe it anyway. If your delay is being calculated from the phase, p, of the frequency bin, f, it assumes the phase is linear and = 0 when frequency = 0. Then it is equal to the group delay: tau = -(dphase/df) so your calculated delay is t = -(p-0)/(f - 0), since p = -f*t, t being delay. Now if you apply this to phase which is measured at a frequency with a known offset, cfo, you will have

p= -(f+cfo)*t so

delay = -(p-0)/(f - 0) = -(-(f+cfo))*t/(f-0) = t + (cfo/f)*t

because your calculation still uses f as the nominal bin frequency. Note that your cfo needs to be known or estimated. So the nominal delay is offset by an amount proportional to itself and to the factor (cfo/f).

Hope it makes sense; otherwise consult other replies.

Thanks Marek_Klemes,

calculating delay from phase at CFO = 0 is no problem but estimating actual CFO is the problem. CFO is not known and is variable so the question becomes how do we estimate CFO.

The tones actually are repeated as 20 x n symbols up to n of 64 or more, every 5 symbols (symbol group = SG) are at same tone, first 5 symbols tone is chosen by a device, next 5 symbols hop by one bin, next 5 hop by 6 bins, next 5 hop by one bin (that is 20 symbols) then the sequence is repeated from a different start.

In the case of CFO = 0 I can see that a single symbol is enough to get delay right even after adding noise and some mild CFO shift or having multiple devices added occupying adjacent tones. So I assume the hopping and the multiple repeat of symbols is for some good reason, to help estimate CFO and delay.

I am not involved directly in this processing but I extract tones and send their fft per each symbol to higher layers who take care of it. All they get is 20 x n ffted symbols. But it helps to understand how delay is calculated from these ffts since discussions or conflicts occur during testing. I would like a paper that explains things in terms of these ffted symbols because that is where I am stuck and that is the only input to higher layer.

To be sure, there are a lot of equations and confusing indexing in the Chougrani reference BUT it really does describe an effective way to skirt the CFO problem. So let me walk through my interpretation of the method. Perhaps this guidance will help you get your head around the algorithm.

Eq 3: Ym,i are the fft outputs, just like what you're calculating as described in your previous post

Eq 5: Ym,i are the fft outputs, expressed for the special case of all symbols equal to unity (as in NPRACH)

Eq 6: Ym is the sum of the fft output symbols over each SG (5 symbols), called SG-S in the paper

Eq 7: Zm,1 is the differential symbol processor output for *consecutive *SG-S (hence the 2nd index=1); later in the paper they describe an enhanced method that uses Zm,c for c>1 that they claim performs better

Form vector v by combining Zm,1 terms, as in Fig 3

- each element in v combines like Zm,1's for each hop distance contained in the sequence for hop distances -6...+6 subcarriers (their example)

- v[0]-v[2] are 0 because there are no hops of -6 to -4 subcarriers in their example

- v[3] = Z3,1 because the hop from SG-S3 to SG-S4 is -3 subcarriers

- v[5] = Z2,1 + Z4,1 because these are the two hops of -1 subcarriers

Eq 10: Shows how differential processing pulls the common CFO term out of v, resulting v' quantity is independent of CFO

Eq 13: Take length NFFT (256 in their example) FFT of v', call the result U[k]

Max abs(U[k])^2 is the metric that is evaluated for preamble detection and TOA

Eq 15: Detection hypothesis

Eq 16: TOA calculation

If this still doesn't help an alternative, brute force method is to compute a cross-ambiguity function (CAF) against each possible NPRACH waveform and search for the global maximum. This would be an insane amount of computation given the number of sequences, TOAs, and FOAs but may be easier to comprehend.

Thanks Lito844,

That sounds pretty well described and well broken down. I will give it a go in my model and code it accordingly. Will let know the progress.

Regards

Kaz

Thanks for the clarification, Kaz. I once did a CFO correction loop in time-domain based on correlating the cyclic prefix (CP) with its corresponding part of the OFDM symbol (one symbol period away), based on the reference:

Grigorios Kalivas: “Digital Radio System Design”, © John Wiley & Sons Ltd., Chichester UK, 2009;,

specifically pages around 327-328. I cannot reproduce the simulink blocks here (it's proprietary) but the math is not difficult. It worked well as one of the first blocks in the receiver before any other acquisition / equalization blocks, even before the FFT. It used a Goertzl network to pick out the symbol-rate frequency, which was used to gate the correlations to only the CP intervals at every symbol period.

I hope this may help you to estimate the CFO.

If not, I'm sure it will be all clear after you toast in the New Year 2022 :)

Cheers!