Bluetooth AOA IQ samples

I am a BLE beginner and have some confusion about the IQ data of Bluetooth AOA. I used the example direction_finding_connectionless_rx and direction_finding_connectionless_tx from the SDK and I tried to print raw IQ data which contains 45 samples.

1. Why is the data in each frame exactly the same starting from 24? In the picture are 2 sets of data, I used printk("%d+%di\n", report->sample16[i].i, report->sample16[i].q) to print by console.


2. I also saw the existence of TSAMPLEOFFSET in the white paper, and saw CONFIG_BT_CTLR_DF_SAMPLE_OFFSET_PHY_2M_SAMPLING_2US=20 in the project's .config. The CTE of sending the beacon is 160us, but OFFSET is 20us. Does this mean that the effective sampling is 160us - 20us = 140us and the IQ samples the last 20us / 4 = 5 pieces of data are invalid?

3. Another question is about antenna switching. If I set ant_patterns to 0x1 0x2 0x3 0x4, will the sampled IQ array be 0x1 0x1 0x1 0x1 0x1 0x1 0x1 0x1 0x2 0x3 0x4 0x1 0x2 0x3 0x4 0x1 0x2 0x3 0x4 ..., because based on the white paper I'm not quite sure whether 0x1 should be included in the loop or not. And because the example uses a 2us slot by default, the first 8 data are sampled once every 1us, followed by every 4us, and part of the intermediate interval switching is 3us, right?And post-data processing requires phase correction due to the delay in sampling.

Kind regards,
Hao

  • Hi Zihao,

    1. If you set ant_patterns={ 0x1 0x2 0x3 0x4 }, the setting of dfe-antenna-num should be 4.

    2. Yes, you are correct. We need to phase correction. The method of phase correction is to rotate the IQ value on the IQ plane. In your case, f = 250KHZ, sampling interval = 4us, that means we need shift 2*pi*f*t = 6.28. This means that the second antenna needs to be rotated 2PI in the IQ plane relative to the first antenna. In other words, you don't need to correction under the current parameters, because one rotation is actually equal to the phase before correction.

    3. If you set all twelve antennas in ant_patterns to 0x1, that means all IQ samples comes from 0x1. And according to white paper, the intervel of first 8 samples is 1us, and other samples in your case is 4us. In other words, the first 8 points sample sine at 1M sampling rate, and the following sine is sampled at 250KHZ. Note that the frequency of your sine is set to 250KHZ. This means that if you plot the first 8 points, you will see 4 cycles. Plot the following points and theoretically you will see a straight line. Since the sampling rate is the same as the signal frequency, this means that the same IQ sample is always taken in each cycle. 

    4. You mentioned frequency hopping. Frequency hopping is the different carrier frequencies used in Bluetooth communication and has nothing to do with the frequency here. You can imagine that a 250KHZ single tone signal is RF-converted to a certain 2.4G channel. However, there will be a reverse operation during reception, which we call down-conversion, to 250KHZ. The signal we sampled after downconversion. Because the high-frequency 2.4G does not have such a fast ADC, low-frequency signals can be sampled.

    If you have any other questions, I'd be happy to discuss them together.

    Kind regards,

    Hao

     

  • Hi Hao Du,

    Thank you very much! It has been incredibly helpful for my experiment implementation.

    I ‘m sorry for some of my earlier questions, as I realize now that some of them were quite naive, given that I'm new to this...

    Thanks again!

    Yours,

    Zihao

Related