Verification of the IQ data

Hello,

I am currently exploring direction finding connectionless Rx and Tx samples.

I am using two nrf52833DK. I already have an antenna array connected to one of  the development kits. Below is the code that i am using for printing the IQ data.

static void cte_recv_cb(struct bt_le_per_adv_sync *sync,
		struct bt_df_per_adv_sync_iq_samples_report const *report)
{
	printk("CTE[%u]: samples count %d, cte type %s, slot durations: %u [us], "
	       "packet status %s, RSSI %i\n",
	       bt_le_per_adv_sync_get_index(sync), report->sample_count,
	       cte_type2str(report->cte_type), report->slot_durations,
	       packet_status2str(report->packet_status), report->rssi);
	printk("#IQ-Samples: %d\n", report->sample_count);

	for(int i=0; i<report->sample_count; i++){
		printk("[%d]: I:%d Q:%d,\n", i, report->sample[i].i, report->sample[i].q);

		
		// k_sleep(K_MSEC(10));  // Add a delay of 10 milliseconds between prints

    }
} 

and the values I get as an IQ data seems strange.

CTE[0]: samples count 45, cte type AOA, slot durations: 2 [us], packet status CRC OK, RSSI -860
#IQ-Samples: 45
[0]: I:-2 Q:-2,
[1]: I:3 Q:4,
[2]: I:-6 Q:-9,
[3]: I:4 Q:7,
[4]: I:-3 Q:-6,
[5]: I:3 Q:8,
[6]: I:-5 Q:-6,
[7]: I:-2 Q:6,
[8]: I:-2 Q:-6,
[9]: I:-1 Q:-9,
[10]: I:4 Q:-7,
[11]: I:2 Q:-7,
[12]: I:6 Q:-4,
[13]: I:3 Q:-4,
[14]: I:7 Q:-1,
[15]: I:5 Q:-4,
[16]: I:7 Q:3,
[17]: I:6 Q:4,
[18]: I:6 Q:3,
[19]: I:2 Q:2,
[20]: I:6 Q:4,
[21]: I:-1 Q:7,
[22]: I:-1 Q:6,
[23]: I:-2 Q:6,
[24]: I:-4 Q:4,
[25]: I:-4 Q:0,
[26]: I:-9 Q:0,
[27]: I:-4 Q:1,
[28]: I:-8 Q:-3,
[29]: I:-7 Q:-5,
[30]: I:-5 Q:-4,
[31]: I:-8 Q:-7,
[32]: I:-5 Q:-6,
[33]: I:-1 Q:-7,
[34]: I:-3 Q:-7,
[35]: I:-1 Q:-9,
[36]: I:0 Q:-13,
[37]: I:4 Q:-5,
[38]: I:7 Q:-3,
[39]: I:6 Q:-1,
[40]: I:4 Q:2,
[41]: I:9 Q:-1,
[42]: I:6 Q:-1,
[43]: I:5 Q:6,
[44]: I:4 Q:7,
CTE[0]: samples count 45, cte type AOA, slot durations: 2 [us], packet status CRC OK, RSSI -870
#IQ-Samples: 45
[0]: I:2 Q:3,
[1]: I:-4 Q:-8,
[2]: I:2 Q:5,
[3]: I:0 Q:-6,
[4]: I:-3 Q:4,
[5]: I:0 Q:-11,
[6]: I:-2 Q:6,
[7]: I:2 Q:-8,
[8]: I:-4 Q:5,
[9]: I:-2 Q:5,
[10]: I:-3 Q:3,
[11]: I:-8 Q:-3,
[12]: I:-4 Q:-3,
[13]: I:-5 Q:-6,
[14]: I:-10 Q:-6,
[15]: I:-4 Q:-2,
[16]: I:0 Q:-5,
[17]: I:0 Q:-3,
[18]: I:0 Q:-8,
[19]: I:2 Q:-4,
[20]: I:1 Q:-7,
[21]: I:1 Q:-4,
[22]: I:5 Q:-2,
[23]: I:6 Q:-4,
[24]: I:3 Q:-1,
[25]: I:5 Q:3,
[26]: I:6 Q:0,
[27]: I:7 Q:1,
[28]: I:2 Q:4,
[29]: I:4 Q:3,
[30]: I:1 Q:6,
[31]: I:-3 Q:6,
[32]: I:-3 Q:3,
[33]: I:-5 Q:4,
[34]: I:-4 Q:1,
[35]: I:-3 Q:2,
[36]: I:-2 Q:2,
[37]: I:-7 Q:-1,
[38]: I:-5 Q:-4,
[39]: I:-9 Q:-2,
[40]: I:-7 Q:-6,
[41]: I:-5 Q:-7,
[42]: I:-4 Q:-7,
[43]: I:-4 Q:-6,
[44]: I:-3 Q:-6,

Question :

the problem is , both I and Q values seems to follow certain pattern, like it ranges between (-10,+10). According to the Direction finding whitepaper, 


First 8 samples are reference samples, and from the 9th sample [sample: 8], the pattern given should be sampled. 

so my understanding is, by default the CTE is 160 us, so the CTE packet structure should be like,

""" guard period [4 us] + reference samples (samples (0-7)) [8 us] + for 12 antennas it should take [48 us] until it reaches the 160 us. """

so the value from sample [8]: I:-2 Q:-6, and sample [20]: I:6 Q:4, should be similar, but it is rather way afar.


my antenna pattern is 

static const uint8_t ant_patterns[] = { 0x2, 0x0, 0x5, 0x6, 0x1, 0x4,
                    0xC, 0x9, 0xE, 0xD, 0x8, 0xA };
it is by default given by nordic.
I am using a 12-patch antenna design from nordic as an antenna array to calculate the AOA.
this is the prj.conf file
#
# Copyright (c) 2021 Nordic Semiconductor ASA
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#

CONFIG_BT=y
CONFIG_BT_DEVICE_NAME="DF Connectionless Locator App"

CONFIG_BT_EXT_ADV=y
CONFIG_BT_PER_ADV_SYNC=y
CONFIG_BT_OBSERVER=y

# Enable Direction Finding Feature including AoA and AoD
CONFIG_BT_DF=y
CONFIG_BT_DF_CONNECTIONLESS_CTE_RX=y
Am i missing something?
please help me understand why the IQ values doesnt follow the antenna pattern?
I look forward to the response. Thank you in advance.
Darsh.
Parents Reply
  • Also, one more, question , since i am using the design files of nordic 12 patch antenna array and the sample code of direction finding connectionless Rx flashed in nrf52833dk whcih is connected to the antenna array. do i have to build an antenna model and do the calibration of the antenna? or is it already supported in the sample code for the nordic 12 patch antenna array?

    Thanks & Regards,

    Darshan.

Children
No Data
Related