An AoA positioning method and terminal based on external radio frequency switching delay closed loop compensation
Patent Information
- Application Number
- CN202611473246.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-21
- Publication Date
- 2026-10-27
AI Technical Summary
1、功耗矛盾:高频次的IQ采样(正交采样)和天线切换导致终端续航极短,无法满足电池供电IoT设备的需求
[0020]本发明通过对外部射频切换单元的实际响应延迟进行测量,并根据测得的实际响应延迟对驱动所述外部射频切换单元的触发信号进行超前补偿,使外部射频切换单元的实际天线切换时序与蓝牙CTE信号的IQ采样时序相匹配,从而降低因外部射频切换单元响应延迟产生的天线切换与IQ采样之间的时序偏差,提高不同天线通道IQ采样数据的时序一致性,进而提高AoA角度计算的准确性和定位结果的稳定性。
Smart Images

Figure CN122994901A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of Internet of Things (IoT) wireless positioning technology, and in particular to an AoA positioning method and terminal based on external radio frequency switching delay closed-loop compensation. Background Technology
[0002] Bluetooth AoA technology achieves high-precision positioning by measuring the phase difference between signals received by multiple antennas. However, in practical applications, it faces the following technical bottlenecks: 1. Power consumption contradiction: High-frequency IQ sampling (quadrature sampling) and antenna switching result in extremely short terminal battery life, which cannot meet the needs of battery-powered IoT devices.
[0003] 2. Synchronization error: When using an external antenna switching chip, the bus transmission delay between the main control SoC (System on Chip) and the switching chip will cause the antenna switching action to fail to be precisely aligned with the CTE (Constant Tone Extension) signal in the Bluetooth data packet.
[0004] 3. Environmental interference: Indoor multipath effect (reflection) can cause fluctuations in positioning accuracy, and blindly performing high-frequency positioning will result in wasted power. Summary of the Invention
[0005] To address the technical problems existing in the background art, this invention proposes an AoA positioning method and terminal based on external radio frequency switching delay closed-loop compensation.
[0006] In a first aspect, the present invention proposes an AoA positioning method based on external radio frequency switching delay closed-loop compensation, comprising: After the positioning terminal is powered on, the main control SoC determines the target frequency and antenna switching sequence for this positioning based on the positioning terminal's motion intensity, remaining battery power, and historical phase linearity corresponding to historical positioning information, and pre-writes the antenna switching sequence into the external switching unit. When a Bluetooth data packet is received and the start bit of the CTE signal in the Bluetooth data packet is detected, the start bit of the CTE signal is mapped to a trigger signal that drives the external switching unit through the hardware event interconnection system inside the main control SoC. The transmission delay value generated by the external switching unit in response to the control command sent by the main control SoC and which is pre-stored in the hardware register is read to perform advance compensation on the trigger signal, so that the trigger signal after advance compensation drives the external switching unit to switch the antenna array according to the antenna switching sequence. IQ sampling data is collected on each antenna channel after the antenna array is switched, and the azimuth angle is calculated based on the IQ sampling data to obtain the AoA positioning result; The current phase linearity is calculated based on the IQ sampling data corresponding to the AoA positioning result, and the target frequency and / or antenna switching sequence for subsequent positioning is adjusted based on the current phase linearity.
[0007] Furthermore, after the positioning terminal is powered on, the main control SoC sends a test control command in advance and receives the feedback signal generated by the external switching unit in response to the execution of the test control command; the transmission delay value is determined according to the time difference between the sending time Ts of the test control command and the receiving time Te of the feedback signal, and the determined transmission delay value is used as the actual response delay compensation parameter corresponding to the external switching unit.
[0008] Furthermore, the transmission delay value is determined based on the timing relationship between the sending time of the test control command and the receiving time of the feedback signal, and serves as the actual response delay compensation parameter corresponding to the external switching unit. Both the sending and receiving times are determined through the hardware timing capture mechanism of the main control SoC to reduce the impact of CPU software execution delay on the delay measurement results.
[0009] In one embodiment, when the transmission path of the test control command and the return path of the feedback signal have approximately symmetrical time delay characteristics, the one-way transmission delay value can be determined based on the time difference between the transmission time Ts of the test control command and the reception time Te of the feedback signal, for example, by calculating Δt = (Te - Ts) × 0.5. Here, Ts represents the transmission time of the test control command, and Te represents the reception time of the feedback signal. In other embodiments, the transmission delay value can also be determined using a corresponding delay conversion method based on the interface characteristics of the external switching unit, the feedback path characteristics, or pre-calibration results.
[0010] Furthermore, the test control command is sent through the communication bus between the main control SoC and the external switching unit. The external switching unit responds to the test control command by performing an antenna switching action and outputs the feedback signal through a status feedback output terminal or an external detection circuit. The main control SoC obtains the reception time Te of the feedback signal through a hardware input capture interface and determines the transmission delay value based on the transmission time Ts and the reception time Te.
[0011] Furthermore, the hardware event interconnection system is a peripheral event interconnection system built into the main control SoC. The peripheral event interconnection system configures the detected CTE signal start bit event as a trigger source and directly maps the trigger source to the GPIO pin that drives the external switching unit to generate the trigger signal.
[0012] Furthermore, the external switching unit is provided with a status feedback output terminal, or is connected to an external detection circuit for detecting the antenna switching response status; the status feedback output terminal or the output terminal of the external detection circuit is connected to the hardware event capture input interface of the main control SoC to form a feedback path; the external switching unit responds to the test control command by executing the corresponding antenna switching action, and outputs the feedback signal through the feedback path when the actual switching response occurs, so that the main control SoC can determine the actual response delay of the external switching unit based on the sending time of the test control command and the receiving time of the feedback signal.
[0013] Furthermore, when generating the trigger signal, the transmission delay value in the hardware register is read, and the trigger signal is output in advance according to the transmission delay value, so that the actual time when the trigger signal after advance compensation arrives at the external switching unit matches the sampling window corresponding to the CTE signal.
[0014] Furthermore, the motion intensity is determined based on the acceleration data detected by the motion sensor built into the positioning terminal; when the motion intensity is greater than a preset motion intensity threshold and the remaining battery power is higher than a preset low battery threshold, the target frequency is increased and the power supply of the external switching unit is turned on, so that the positioning terminal enters a high dynamic positioning mode.
[0015] Furthermore, when the remaining power is not greater than a preset low power threshold, the target frequency is reduced and the power supply to the external switching unit is cut off, so that the positioning terminal enters the energy-saving positioning mode.
[0016] Further, the current phase linearity is calculated based on the IQ sampling data corresponding to the current AoA positioning result; when the current phase linearity is lower than a preset interference threshold, the target frequency is reduced and / or the antenna switching sequence is modified, and Bluetooth data packet reception, antenna array switching, IQ sampling and AoA positioning are re-executed.
[0017] Furthermore, when the current phase linearity is lower than the preset interference threshold, the data statistics window for phase linearity evaluation is extended to increase the amount of IQ sampling data corresponding to the antenna switching cycle, and the phase linearity is recalculated based on the increased IQ sampling data.
[0018] Furthermore, the interference threshold is determined by factory calibration data, historical statistics, or preset rules.
[0019] Secondly, an AoA positioning terminal based on external radio frequency switching delay closed-loop compensation, used to implement the positioning method described in the first aspect, includes a main control SoC, an antenna array, a motion sensor, and an external switching unit for switching antennas, wherein the main control SoC is used for: Send a test control command to the external switching unit, receive the feedback signal generated by the external switching unit in response to the execution of the test control command, calculate the bus transmission delay value based on the sending time of the test control command and the receiving time of the feedback signal, and write it into the hardware register. Based on the motion intensity of the current positioning terminal detected by the motion sensor, the remaining battery power, and the historical phase linearity of the historical positioning information feedback, the target frequency and the corresponding antenna switching sequence for this positioning are determined, and the antenna switching sequence is pre-written into the external switching unit. When receiving a Bluetooth data packet from the outside and detecting the start bit of the CTE signal in the Bluetooth data packet, the hardware event interconnection system inside the main control SoC maps the start bit of the CTE signal to a trigger signal that drives the external switching unit, and reads the transmission delay value in the hardware register to perform advance compensation on the trigger signal, so that the trigger signal after advance compensation drives the external switching unit to switch the antenna array according to the antenna switching sequence. After the switching is completed, IQ sampling data is collected on each antenna channel, and the azimuth angle is calculated based on the IQ sampling data to obtain the positioning result; The current phase linearity is calculated based on the IQ sampling data corresponding to the AoA positioning result, and the target frequency and / or antenna switching sequence for subsequent positioning is adjusted based on the current phase linearity.
[0020] This invention measures the actual response delay of the external RF switching unit and compensates the trigger signal driving the external RF switching unit in advance based on the measured actual response delay. This makes the actual antenna switching timing of the external RF switching unit match the IQ sampling timing of the Bluetooth CTE signal, thereby reducing the timing deviation between antenna switching and IQ sampling caused by the response delay of the external RF switching unit, improving the timing consistency of IQ sampling data from different antenna channels, and thus improving the accuracy of AoA angle calculation and the stability of positioning results.
[0021] This invention employs a dynamic compensation method based on actual response delay, which eliminates the need to pre-fix the response delay parameters of the external RF switching unit. It can determine the corresponding delay compensation parameters according to the actual response characteristics of different external RF switching units, thereby improving the adaptability of the method to different external RF switching units and different hardware connection paths.
[0022] Furthermore, this invention dynamically adjusts the positioning frequency and antenna switching sequence based on the positioning terminal's motion intensity, remaining battery power, and phase linearity. When low power consumption conditions are met, the positioning frequency is reduced or the power supply to the external radio frequency switching unit is turned off, thereby reducing unnecessary positioning sampling and antenna switching operations. This ensures positioning requirements are met while reducing system power consumption and extending the continuous working time of the positioning terminal. Attached Figure Description
[0023] Figure 1 This is a flowchart of a low-power method based on external switching control according to the present invention.
[0024] Figure 2 This is a schematic diagram of the automatic measurement and compensation process for feedback delay of the external switching unit in this invention. Detailed Implementation
[0025] The technical solution of the present invention will now be described in detail with reference to the accompanying drawings and embodiments.
[0026] This invention proposes an AoA positioning terminal based on external RF switching delay closed-loop compensation, comprising a main control SoC, an antenna array, an external switching unit, and a motion sensor. The main control SoC is connected to the external switching unit via an SPI bus, controlling it to perform antenna channel switching operations. The RF input port of the main control SoC is connected to the common output of the external switching unit; multiple antennas of the antenna array are respectively connected to the inputs of the external switching unit. The external switching unit has a status feedback output pin or an external detection circuit. The output of this status feedback output pin or external detection circuit is connected to the hardware event capture input interface of the main control SoC via PCB (Printed Circuit Board) traces, thus forming a feedback path for the feedback signal. The motion sensor is connected to the main control SoC via an I2C interface, and provides motion state trigger signals to the main control SoC through GPIO (General Purpose Input Output) interrupt lines.
[0027] As an example, the motion sensor is an accelerometer, and the main control SoC is an nRF52 SoC chip.
[0028] See Figure 2 The main control SoC sends test control commands to the external switching unit in advance, receives feedback signals generated by the external switching unit in response to the execution of the test control commands, calculates the bus transmission delay value based on the sending time of the test control commands and the receiving time of the feedback signals, and writes it into the hardware register.
[0029] Specifically, after the positioning terminal is powered on, the RTOS kernel inside the main control SoC calls the calibration function to perform bus delay self-calibration. First, the main control SoC starts its internal 16MHz high-frequency timer. Then, the main control SoC sends a test control command to the external switching unit via the SPI bus and records the time of the test control command issuance, denoted as Ts. This recording is achieved through hardware linkage between the interrupt and the timer via the TX of the SPI bus, without relying on the timing of the main control SoC's built-in CPU (Central Processing Unit), thus ensuring the accuracy of Ts.
[0030] Upon receiving the test control command, the external switching unit executes the corresponding antenna switching action and outputs a level transition signal through the status feedback output terminal when the actual switching response occurs. The level transition signal is transmitted to the hardware event capture input interface of the main control SoC via the feedback path. After detecting the rising or falling edge of the level transition signal, the hardware event capture unit of the main control SoC records the corresponding reception time, denoted as Te.
[0031] The main control SoC determines the actual response delay of the external switching unit based on the timing relationship between the transmission time Ts of the test control command and the reception time Te of the feedback signal, and determines the delay compensation parameters for subsequent antenna switching triggering based on the actual response delay. The delay compensation parameters are written into the hardware registers of the main control SoC and serve as the basis for advance compensation of the antenna switching triggering timing during subsequent positioning.
[0032] In one implementation, when the sending path of the test control command and the return path of the feedback signal have a preset time delay relationship, the delay compensation parameter can be determined according to the time difference between Ts and Te and the preset delay conversion relationship. In other implementations, the time difference can be converted, corrected or filtered according to the interface characteristics of the external switching unit, the feedback path characteristics and the factory calibration data to obtain the delay compensation parameter actually used to trigger timing compensation.
[0033] Specifically, the main control SoC determines the target frequency and corresponding antenna switching sequence for this positioning based on the motion intensity of the current positioning terminal detected by the motion sensor, the remaining battery power, and the phase linearity corresponding to the historical positioning information. It then writes the antenna switching sequence into the internal register of the external switching unit via the SPI bus, enabling the external switching unit to enter the antenna switching ready state.
[0034] After completing the actual response delay measurement and delay compensation parameter initialization of the external switching unit, the positioning terminal enters a low-power sleep mode. When the motion sensor detects movement in the positioning terminal, it generates a motion state trigger signal and wakes up the main control SoC via a corresponding interrupt signal, causing the positioning terminal to enter positioning mode. In one embodiment, the motion state trigger signal is input to the main control SoC via the GPIO interrupt corresponding to dataready-gpios.
[0035] After the main control SoC is woken up, it obtains the current motion intensity V, the remaining battery power E, and the phase linearity corresponding to the historical positioning information. And based on the motion intensity V, remaining charge E, and phase linearity Determine the positioning parameters.
[0036] When the motion intensity V is greater than the preset motion intensity threshold and the remaining battery power E is higher than the preset low battery threshold, the main control SoC increases the target positioning frequency and controls the external switching unit to power on, so that the positioning terminal enters the high dynamic positioning mode to improve the positioning update capability in motion.
[0037] When the remaining power E is not higher than the preset low power threshold, the main control SoC reduces the target positioning frequency and shuts down or reduces the power supply to the external switching unit to reduce the power consumption generated by antenna switching and related radio frequency processing, so that the positioning terminal enters the energy-saving positioning mode.
[0038] When the phase linearity corresponding to historical positioning information When the interference level is below a preset interference threshold, the main control SoC determines that the current positioning environment may have strong multipath interference or other signal interference, and adjusts the positioning parameters according to the phase linearity. This includes at least one of the following: reducing the target positioning frequency, modifying the antenna switching sequence, and extending the data statistics window for phase linearity evaluation, in order to reduce the impact of interfered data on the positioning results. The phase linearity is then re-evaluated based on the adjusted sampled data. The interference threshold can be determined based on factory calibration data, historical statistical data, or preset rules.
[0039] The motion intensity V can be determined based on the acceleration data detected by the motion sensor. The main control SoC acquires triaxial acceleration data Ax, Ay, and Az over N consecutive sampling periods, calculates the change in the acceleration vector based on the triaxial acceleration data, and determines the motion intensity V of the positioning terminal through sliding window statistical or averaging processing.
[0040] In one implementation, the motion intensity threshold can be set according to the specific application scenario of the positioning terminal. For example, a lower motion intensity threshold can be set in a fixed asset positioning scenario, while a higher motion intensity threshold can be set in a personnel movement positioning scenario. The specific threshold can be adjusted according to the actual application environment, positioning accuracy requirements, and power consumption requirements.
[0041] When multiple judgment conditions corresponding to motion intensity, remaining battery power, and phase linearity are simultaneously met, the main control SoC determines the positioning parameters according to a preset decision priority. In one implementation, remaining battery power, phase linearity, and motion intensity participate in the positioning parameter decision in descending order of priority, so as to prioritize ensuring the continuous working capability of the positioning terminal in a low battery state, and on this basis, adjust the positioning frequency and antenna switching strategy according to the degree of environmental interference and the terminal's motion state.
[0042] Low-power sleep mode refers to the positioning terminal shutting down or reducing the functional modules related to antenna switching and positioning sampling, and reducing the operating frequency of the main control SoC or entering a low-power state when the preset low motion state and stable positioning quality conditions are met, retaining only the functions required for motion detection, wake-up and necessary system maintenance, so as to reduce the standby power consumption of the positioning terminal.
[0043] After determining the target frequency and antenna switching sequence, the main control SoC pre-writes the antenna switching sequence pattern into the internal register of the external switching unit via the SPI bus, so that the external switching unit can perform antenna channel switching according to the preset antenna switching order when it receives subsequent trigger signals.
[0044] The Bluetooth RF module of the main control SoC receives Bluetooth data packets from the outside world and detects the CTE (Constant Tone Extension) signal start event in the Bluetooth data packets. When the CTE signal start event is detected, the peripheral event interconnect system inside the main control SoC uses the CTE signal start event as a hardware trigger source and directly maps the hardware trigger source to the GPIO pin used to drive the external switching unit to generate a GPIO trigger signal.
[0045] Specifically, the peripheral event interconnect system can utilize the PPI module, EVSYS module, or other hardware event interconnect modules with event routing and hardware triggering capabilities within the main control SoC. In the PPI module, EVSYS module, or other hardware event routing module, the CTE signal initiation event is configured as the trigger source, and the trigger source is mapped to the GPIO pin driving the external switching unit. This allows the CTE signal initiation event to directly generate a GPIO trigger signal through the hardware event path, without needing to go through the CPU's software processing path.
[0046] During the generation of the GPIO trigger signal, the main control SoC determines the output timing of the GPIO trigger signal based on the delay compensation parameters stored in the hardware registers, and outputs the GPIO trigger signal ahead of the CTE signal start event. After transmission through the hardware path, the GPIO trigger signal drives the external switching unit to execute the pre-configured antenna switching sequence, thereby matching the actual antenna switching timing of the external switching unit with the IQ sampling timing corresponding to the CTE signal.
[0047] Since the generation process from the CTE signal initiation event to the external switching unit trigger signal is implemented through the hardware event interconnection system without going through the CPU software execution path, it can reduce the additional delay caused by software scheduling and interrupt response. In addition, the trigger timing of the external switching unit can be adjusted in advance by combining the actual response delay compensation parameters, so as to achieve precise alignment between the CTE signal sampling timing and the antenna switching action.
[0048] Simultaneously, when generating the GPIO trigger signal to drive the external switching unit, the delay compensation parameters written in the hardware register are read, and the output timing of the GPIO trigger signal is determined based on the delay compensation parameters. The timer or hardware trigger logic inside the main control SoC causes the GPIO trigger signal to be output ahead of the detected CTE signal start event. This ensures that after the GPIO trigger signal is transmitted to the external switching unit via the hardware path, the actual antenna switching timing of the external switching unit matches the IQ sampling timing corresponding to the CTE signal, thereby reducing the timing deviation between antenna switching and IQ sampling caused by the actual response delay of the external switching unit.
[0049] The GPIO trigger signal with advance compensation drives the external switching unit to perform antenna array switching according to the pre-written antenna switching sequence. The main control SoC collects IQ sampling data in the sampling window corresponding to each antenna channel, determines the signal phase difference based on the IQ sampling data corresponding to different antenna channels, and calculates the angle of arrival of the Bluetooth signal based on the signal phase difference to obtain the AoA positioning result.
[0050] To improve the environmental adaptability of the positioning terminal during long-term operation, the main control SoC calculates the current phase linearity based on the IQ sampling data corresponding to this positioning after obtaining the current AoA positioning result. When the current phase linearity When the current interference threshold is not lower than the preset threshold, the current sampling data is determined to meet the positioning quality requirements, the positioning process ends, and the positioning terminal enters a low-power sleep mode; when the current phase linearity is... If the interference level is below the preset interference threshold, it is determined that the current positioning process is subject to strong environmental interference. The corresponding interference marker is recorded, and the target frequency for subsequent positioning is reduced and / or the antenna switching sequence is modified. Positioning sampling and AoA positioning are then re-executed.
[0051] In other embodiments, the present invention also provides a positioning method implemented using the above-described AoA positioning terminal. See also Figure 1 The positioning method includes the following steps: Step 1: The positioning terminal is in low-power sleep mode. The motion state trigger signal generated by the motion sensor wakes up the main control SoC, so that the positioning terminal enters positioning mode.
[0052] Step 2: The main control SoC obtains the motion intensity, remaining battery power, and historical phase linearity corresponding to the current positioning terminal. Based on the motion intensity, remaining battery power, and historical phase linearity, it determines the target frequency and corresponding antenna switching sequence for this positioning. The antenna switching sequence is pre-written into the external switching unit, so that the external switching unit enters the antenna switching ready state.
[0053] Step 3: The main control SoC evaluates the historical phase linearity based on historical positioning information or currently available positioning quality information. When the historical phase linearity is lower than the preset interference threshold, the target frequency is reduced and / or the antenna switching sequence is modified, and / or the data statistics window for historical phase linearity evaluation is extended, and the positioning quality evaluation is re-executed based on the adjusted positioning parameters. When the historical phase linearity is not lower than the preset interference threshold, step 4 is executed.
[0054] Step 4: The Bluetooth RF module of the main control SoC receives Bluetooth data packets and detects the CTE signal start event in the Bluetooth data packets. When the CTE signal start event is detected, the CTE signal start event is mapped to a GPIO trigger signal for driving the external switching unit through the internal hardware event interconnection system. The output timing of the GPIO trigger signal is advanced according to the delay compensation parameters written in the hardware register. The advanced GPIO trigger signal drives the external switching unit to perform antenna array switching according to the antenna switching sequence.
[0055] Step 5: After the main control SoC completes the antenna array switching, it collects IQ sampling data in the sampling window corresponding to each antenna channel, determines the signal phase difference based on the IQ sampling data corresponding to different antenna channels, and calculates the angle of arrival of the Bluetooth signal based on the signal phase difference to obtain the AoA positioning result.
[0056] Step 6: The main control SoC calculates the current phase linearity based on the IQ sampling data corresponding to this positioning. When the current phase linearity is not lower than the preset interference threshold, the positioning process ends, the positioning terminal returns to low-power sleep mode, and waits for the next motion state trigger signal. When the current phase linearity is lower than the preset interference threshold, the corresponding interference mark is recorded, the target frequency is reduced and / or the antenna switching sequence is modified according to the current phase linearity, and the process returns to step 4 to re-execute Bluetooth data packet reception, antenna array switching, and IQ sampling.
[0057] This invention measures the actual response delay of the external RF switching unit and compensates the trigger signal used to drive the external RF switching unit based on the measured actual response delay. This makes the actual antenna switching timing of the external RF switching unit match the IQ sampling timing of the Bluetooth CTE signal, thereby reducing the timing deviation between antenna switching and IQ sampling caused by the response delay of the external RF switching unit, improving the timing consistency of IQ sampling data of different antenna channels, and thus improving the accuracy of AoA angle calculation and the stability of positioning results.
[0058] This invention determines the delay compensation parameters based on the actual response delay of the external RF switching unit, rather than using fixed preset delay parameters. Therefore, it can determine the corresponding compensation parameters according to the actual response characteristics of different external RF switching units and their hardware connection paths, thereby improving the adaptability of the delay compensation scheme to different hardware implementation methods.
[0059] Furthermore, this invention dynamically adjusts the target frequency and antenna switching sequence based on the motion intensity, remaining battery power, and phase linearity of the positioning terminal, and reduces the positioning frequency and / or shuts off the power supply to the external radio frequency switching unit when low power consumption conditions are met, thereby reducing unnecessary positioning sampling and antenna switching operations, reducing system power consumption while meeting positioning requirements, and extending the continuous working time of the positioning terminal.
[0060] The above description is merely a preferred embodiment of the present invention and is not intended to limit the scope of protection of the present invention. For those skilled in the art, various modifications and substitutions can be made to the specific embodiments of the present invention without departing from the technical concept of the present invention. All equivalent substitutions, simple transformations, or improvements made within the spirit and principles of the present invention should be included within the scope of protection of the present invention, and the specific scope of protection is determined by the claims.
Claims
1. An AoA positioning method based on external radio frequency switching delay closed-loop compensation, characterized in that, include: After the positioning terminal is powered on, the main control SoC determines the target frequency and antenna switching sequence for this positioning based on the positioning terminal's motion intensity, remaining battery power, and historical phase linearity corresponding to historical positioning information, and pre-writes the antenna switching sequence into the external switching unit. Upon receiving a Bluetooth data packet and detecting the start bit of the CTE signal in the Bluetooth data packet, the hardware event interconnection system inside the main control SoC maps the start bit of the CTE signal to a trigger signal that drives the external switching unit. It also reads the transmission delay value that is pre-stored in the hardware register and generated by the external switching unit in response to the control command sent by the main control SoC, and performs advance compensation on the trigger signal so that the advanced compensated trigger signal drives the external switching unit to switch the antenna array according to the antenna switching sequence. IQ sampling data is collected on each antenna channel after the antenna array is switched, and the azimuth angle is calculated based on the IQ sampling data to obtain the AoA positioning result; The current phase linearity is calculated based on the IQ sampling data corresponding to the AoA positioning result, and the target frequency and / or antenna switching sequence for subsequent positioning is adjusted based on the current phase linearity.
2. The AoA positioning method based on external radio frequency switching delay closed-loop compensation according to claim 1, characterized in that, After the positioning terminal is powered on, the main control SoC sends a test control command in advance and receives the feedback signal generated by the external switching unit in response to the execution of the test control command. The transmission delay value is determined according to the time difference between the sending time Ts of the test control command and the receiving time Te of the feedback signal, and the determined transmission delay value is used as the actual response delay compensation parameter corresponding to the external switching unit.
3. The AoA positioning method based on external radio frequency switching delay closed-loop compensation according to claim 2, characterized in that, The test control command is sent through the communication bus between the main control SoC and the external switching unit. The external switching unit responds to the test control command by performing an antenna switching action and outputs the feedback signal through a status feedback output terminal or an external detection circuit. The main control SoC obtains the reception time of the feedback signal through a hardware input capture interface.
4. The AoA positioning method based on external radio frequency switching delay closed-loop compensation according to claim 3, characterized in that, The hardware event interconnection system is a peripheral event interconnection system built into the main control SoC. The peripheral event interconnection system configures the detected CTE signal start bit event as a trigger source and directly maps the trigger source to the GPIO pin that drives the external switching unit to generate the trigger signal.
5. The AoA positioning method based on external radio frequency switching delay closed-loop compensation according to claim 1, characterized in that, The motion intensity is determined based on the acceleration data detected by the motion sensor built into the positioning terminal; when the motion intensity is greater than a preset motion intensity threshold and the remaining battery power is higher than a preset low battery threshold, the target frequency is increased and the power supply of the external switching unit is turned on, so that the positioning terminal enters a high dynamic positioning mode.
6. The AoA positioning method based on external radio frequency switching delay closed-loop compensation according to claim 5, characterized in that, When the remaining power is not greater than a preset low power threshold, the target frequency is reduced and the power supply to the external switching unit is cut off, so that the positioning terminal enters the energy-saving positioning mode.
7. The AoA positioning method based on external radio frequency switching delay closed-loop compensation according to claim 1, characterized in that, The current phase linearity is calculated based on the IQ sampling data corresponding to the current AoA positioning result; when the current phase linearity is lower than the preset interference threshold, the target frequency is reduced and / or the antenna switching sequence is modified, and Bluetooth data packet reception, antenna array switching, IQ sampling and AoA positioning are re-executed.
8. The AoA positioning method based on external radio frequency switching delay closed-loop compensation according to claim 1, characterized in that, When the historical phase linearity is lower than the preset interference threshold, the data statistics window for phase linearity evaluation is extended to increase the amount of IQ sampling data corresponding to the antenna switching cycle, and the historical phase linearity is recalculated based on the increased IQ sampling data.
9. The AoA positioning method based on external radio frequency switching delay closed-loop compensation according to claim 7, characterized in that, When the recalculated current phase linearity is not lower than the preset interference threshold, the positioning terminal ends the current positioning and enters a low-power sleep mode; when the recalculated current phase linearity is still lower than the preset interference threshold, an interference flag is recorded, and the target frequency is reduced and / or the antenna switching sequence is modified, and the antenna array switching and IQ sampling are re-executed.
10. An AoA positioning terminal based on external radio frequency switching delay closed-loop compensation, characterized in that, It includes a main control SoC, an antenna array, a motion sensor, and an external switching unit for switching antennas. The main control SoC is used for: Send a test control command to the external switching unit, receive the feedback signal generated by the external switching unit in response to the execution of the test control command, calculate the bus transmission delay value based on the sending time of the test control command and the receiving time of the feedback signal, and write it into the hardware register. Based on the motion intensity of the current positioning terminal detected by the motion sensor, the remaining battery power, and the historical phase linearity of the historical positioning information feedback, the target frequency and the corresponding antenna switching sequence for this positioning are determined, and the antenna switching sequence is pre-written into the external switching unit. When receiving a Bluetooth data packet from the outside and detecting the start bit of the CTE signal in the Bluetooth data packet, the hardware event interconnection system inside the main control SoC maps the start bit of the CTE signal to a trigger signal that drives the external switching unit, and reads the transmission delay value in the hardware register to perform advance compensation on the trigger signal, so that the trigger signal after advance compensation drives the external switching unit to switch the antenna array according to the antenna switching sequence. After the switching is completed, IQ sampling data is collected on each antenna channel, and the azimuth angle is calculated based on the IQ sampling data to obtain the positioning result; The current phase linearity is calculated based on the IQ sampling data corresponding to the AoA positioning result, and the target frequency and / or antenna switching sequence for subsequent positioning is adjusted based on the current phase linearity.