Antenna adaptive switching method for UWB terminal equipment and computer readable storage medium

By adopting an adaptive switching method in UWB terminal equipment, switching according to the antenna signal quality within different preset time periods, the signal transmission and ranging problems caused by antenna occlusion are solved, and a stable and reliable user experience is achieved.

CN119232219BActive Publication Date: 2025-03-14SHENZHEN GIANT MICROELECTRONICS CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411735498.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-29
Publication Date
2025-03-14
Estimated Expiration
2044-11-29

AI Technical Summary

Technical Problem

In UWB terminal devices, since the antenna may be blocked, signal transmission and distance measurement are affected. It is difficult for the prior art to accurately track the changes in antenna signal quality and switch to antennas with good signal quality without interrupting normal signal transmission, and avoid excessively frequent or aggressive antenna switching.

Method used

An antenna adaptive switching method for UWB terminal devices is proposed. By acquiring the received signal quality of the current working antenna within different preset time periods, confirming whether to switch the antenna, and achieving adaptive switching of the antenna without interrupting normal signal transmission.

Benefits of technology

It realizes that without interrupting normal signal transmission, accurately tracking the changes in antenna signal quality and switching to antennas with good signal quality, avoiding excessively frequent or aggressive antenna switching, thereby ensuring a stable and reliable user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119232219B_ABST
    Figure CN119232219B_ABST
Patent Text Reader

Abstract

The present invention discloses an antenna adaptive switching method for a UWB terminal device and a computer-readable storage medium. The antenna adaptive switching method for the UWB terminal device comprises: in response to the start of the first ranging, entering a first switching antenna state; in the first switching antenna state, starting from the start time of the first ranging in the state, obtaining the quality of the received signal of the current working antenna in a first preset time period, and thereby confirming whether it is necessary to switch the working antenna and whether to jump to the second switching antenna state; in the second switching antenna state, starting from the start time of the first ranging in the state, obtaining the quality of the received signal of the current working antenna in a second preset time period, and thereby confirming whether it is necessary to switch the working antenna and whether to jump to the first switching antenna state; the length of the first preset time period is less than the length of the second preset time period. The present invention ensures a stable and reliable user experience at all times.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of ultra-wideband (UWB) wireless systems, and in particular to an antenna adaptive switching method for a UWB terminal device and a computer-readable storage medium. Background Art

[0002] In the application scenario of UWB terminal devices, the UWB terminal device may communicate and measure distance / angle with a single UWB device on the other end, such as a mobile phone-Tag search application; or the UWB terminal device may communicate and measure distance / angle with multiple UWB anchor points on the other end, such as a digital car key application.

[0003] In the use scenario of UWB terminal devices, the antenna may be severely blocked due to various reasons such as the user holding the terminal product in hand or putting it in the pocket, thus affecting the signal transmission and ranging between the two UWB devices. To solve this problem, the current common solution is to use multiple UWB antennas in the terminal device (considering the size and cost limitations of the terminal device, most of them are 2 antennas) and arrange them in different positions or directions of the terminal product. During UWB ranging, the different positions or directions of the two UWB antennas may lead to different degrees of obstruction. Therefore, it is necessary to use an adaptive switching method of the UWB antenna in the UWB chip firmware, and use the GPIO (General Purpose Input / Output) and other interface pins to control the switch on the board in real time to ensure that the antenna with better current signal quality is always selected to obtain a better user experience.

[0004] Due to the limitation of terminal product volume and structure, the board-level routing between different UWB antennas and the transmitting port / receiving port pins of the UWB chip is different, which will also lead to different degrees of signal loss. These different board-level routing signal losses, superimposed on the different wireless air interface signal losses experienced from each antenna to the wireless peer device, will eventually lead to very large differences in the quality of receiving / transmitting signals of each antenna, and this difference may change with different time and environment.

[0005] In addition, the ultra-wideband UWB protocols such as 802.15.4 and 802.15.4z / 4ab defined by the Institute of Electrical and Electronics Engineers (IEEE) do not define additional detection signal fields required to detect antenna signal quality. In the absence of additional detection signal field support, the method of adaptively switching UWB antennas needs to be able to accurately and in real time track the changes in signal quality of different antennas and switch to antennas with good signal quality without interrupting normal signal transmission, while avoiding blindly switching to antennas with poor signal quality, so as to ensure a stable and reliable user experience at all times. This is a great challenge.

[0006] The disclosure of the above background technology content is only used to assist in understanding the concept and technical solution of the present invention. It does not necessarily belong to the prior art of this patent application. In the absence of clear evidence that the above content has been disclosed on the filing date of this patent application, the above background technology should not be used to evaluate the novelty and creativity of the present application. Summary of the invention

[0007] In order to solve the above technical problems, the present invention proposes an antenna adaptive switching method for UWB terminal equipment and a computer-readable storage medium, which can achieve accurate and real-time tracking of changes in signal quality of different antennas and switching to antennas with good signal quality without interrupting normal signal transmission, while avoiding overly frequent and aggressive switching of antenna operations, thereby ensuring a stable and reliable user experience at all times.

[0008] In order to achieve the above object, the present invention adopts the following technical solutions:

[0009] In a first aspect, the present invention discloses an antenna adaptive switching method for a UWB terminal device, comprising the following steps:

[0010] In response to the start of the first ranging, entering a first antenna switching state;

[0011] In the first antenna switching state, starting from the start time of the first ranging in this state, obtaining the quality of the received signal of the current working antenna within a first preset time period, and confirming whether to switch the working antenna and whether to jump to the second antenna switching state according to the quality of the received signal of the current working antenna within the first preset time period;

[0012] In the second antenna switching state, starting from the start time of the first ranging in this state, obtaining the quality of the received signal of the current working antenna within a second preset time period, and confirming whether to switch the working antenna and whether to jump to the first antenna switching state according to the quality of the received signal of the current working antenna within the second preset time period;

[0013] The length of the first preset time period is shorter than the length of the second preset time period.

[0014] Preferably, determining whether to switch the working antenna and whether to jump to the second antenna switching state according to the received signal quality of the current working antenna within the first preset time period includes:

[0015] When the current working antenna does not successfully receive any data packet within the first preset time period or all received data packets are CRC errors, the working antenna is switched and the first antenna switching state is continued; otherwise, the signal strength indication value of all data packets received by the current working antenna within the first preset time period is obtained, and based on the signal strength indication value of all data packets received by the current working antenna within the first preset time period, whether to switch the working antenna is confirmed, and jump to the second antenna switching state.

[0016] Preferably, when the current working antenna has not successfully received any data packet within the first preset time period or all received data packets are CRC errors, the signal quality difference flag of the current working antenna is set to non-zero, the working antenna is switched, and the first antenna switching state continues; otherwise, the signal strength indication value of all data packets received by the current working antenna within the first preset time period is obtained, and based on the signal strength indication value of all data packets received by the current working antenna within the first preset time period, it is confirmed whether to switch the working antenna, the signal quality difference flags of all antennas are set to zero, and the state of switching to the second antenna switching state is jumped.

[0017] Preferably, the step of determining whether to switch the working antenna according to the signal strength indicator values ​​of all data packets received by the current working antenna within the first preset time period includes:

[0018] According to the signal strength indication values ​​of all data packets received by the current working antenna within the first preset time period, the signal strength indication average value of the current working antenna within the first preset time period is calculated, and it is determined whether the signal strength indication average value of the current working antenna within the first preset time period is greater than or equal to a preset threshold value. If so, the working antenna is not switched; if not, it is determined whether there is an antenna with a signal quality difference flag of zero among other antennas; if so, the working antenna is switched; if not, the antenna is not switched.

[0019] Preferably, the determining whether to switch the working antenna and whether to jump to the first antenna switching state according to the received signal quality of the current working antenna within the second preset time period includes:

[0020] When the current working antenna does not successfully receive any data packet within the second preset time period or all received data packets are CRC errors, the working antenna is switched and the process jumps to the first antenna switching state; otherwise, the signal strength indication value of all data packets received by the current working antenna within the second preset time period is obtained, and based on the signal strength indication value of all data packets received by the current working antenna within the second preset time period, whether to switch the working antenna is confirmed, and the process continues to stay in the second antenna switching state.

[0021] Preferably, when the current working antenna does not successfully receive any data packet within the second preset time period or all received data packets are CRC errors, the signal quality difference flag of the current working antenna is set to non-zero, the working antenna is switched, and the process jumps to the first antenna switching state; otherwise, the signal strength indication value of all data packets received by the current working antenna within the second preset time period is obtained, and based on the signal strength indication value of all data packets received by the current working antenna within the second preset time period, the signal strength indication average value of the current working antenna within the second preset time period is calculated, and it is determined whether the signal strength indication average value of the current working antenna within the second preset time period is greater than or equal to the preset threshold value. If so, the working antenna is not switched; if not, the working antenna is switched.

[0022] Preferably, the preset threshold value has a value range of [-100dbm, -30dbm].

[0023] Preferably, the first preset time period is 50ms-500ms, and the second preset time period is 100ms-1s.

[0024] Preferably, before entering the first antenna switching state in response to the start of the first ranging, the method further comprises:

[0025] In response to the chip of the UWB terminal device being powered on, the signal quality difference flags of all antennas are set to zero, and the current working antenna is selected according to the configuration of the host computer;

[0026] In response to the chip of the UWB terminal device being awakened from the sleep state, the signal quality difference flags of all antennas are set to zero, and the current working antenna is selected according to the configuration of the host computer or the working antenna last selected before the sleep state is used as the current working antenna.

[0027] In a second aspect, the present invention discloses a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to be executable by a processor to execute the antenna adaptive switching method of the UWB terminal device described in the first aspect.

[0028] Compared with the prior art, the beneficial effects of the present invention are as follows: the antenna adaptive switching method and computer-readable storage medium of the UWB terminal device proposed in the present invention, which only confirm whether the antenna needs to be switched and adaptively adjust the frequency of antenna switching actions based on the acquisition of the received signal of the current working antenna, on the one hand, can accurately and real-time track the changes in the signal quality of different antennas and switch to an antenna with good signal quality without interrupting normal signal transmission; on the other hand, it avoids too frequent and aggressive switching of antenna operations that affects the user experience, thereby ensuring a stable and reliable user experience at all times.

[0029] In a further embodiment, the present invention also has the following beneficial effects:

[0030] (1) Determine whether to switch the working antenna based on the comparison between the signal strength indicator value of all data packets received by the current working antenna within a preset time period and a preset threshold, and confirm that the signal quality difference flag of the switched antenna is non-zero when switching the antenna, thereby avoiding blindly switching to an antenna with poor signal quality, and further ensuring a stable and reliable user experience at all times.

[0031] (2) Based on the fact that the second antenna switching state is relatively slow, the data calculated relative to the first antenna switching state is more accurate; before the first antenna switching state is switched to the second antenna switching state, the signal quality difference flag of each antenna is set to zero, so that when the second antenna switching state is adopted, the signal quality difference flag data of each antenna in the first antenna switching state is no longer used, thereby improving the calculation accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] Figure 1 This is a flow chart of an antenna adaptive switching method for a UWB terminal device disclosed in Embodiment 1 of the present invention;

[0033] Figure 2a and Figure 2b is a block diagram of an example configuration of a UWB terminal device with two antennas according to a specific embodiment of the present invention;

[0034] Figure 3 A schematic diagram of an antenna switching state machine according to a specific embodiment of the present invention;

[0035] Figure 4 This is an example of antenna switching and state jump timing in a specific example of the present invention. DETAILED DESCRIPTION

[0036] The following is a detailed description of the embodiments of the present invention. It should be emphasized that the following description is only exemplary and is not intended to limit the scope and application of the present invention.

[0037] It should be noted that when a component is referred to as being "fixed to" or "disposed on" another component, it can be directly on the other component or indirectly on the other component. When an element is referred to as being "connected to" another element, it can be directly connected to the other element or indirectly connected to the other element. In addition, connection can be used for both fixing and circuit / signal communication.

[0038] It should be understood that the terms "length", "width", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", etc., indicating the orientation or position relationship, are based on the orientation or position relationship shown in the accompanying drawings, and are only for the convenience of describing the embodiments of the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present invention.

[0039] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of the embodiments of the present invention, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.

[0040] like Figure 1 Embodiment 1 of the present invention discloses an antenna adaptive switching method for a UWB terminal device, comprising the following steps:

[0041] S1: In response to the start of the first ranging, entering the first antenna switching state;

[0042] S2: in the first antenna switching state, starting from the start time of the first ranging in this state, obtaining the quality of the received signal of the current working antenna within the first preset time period, and confirming whether to switch the working antenna and whether to jump to the second antenna switching state according to the quality of the received signal of the current working antenna within the first preset time period;

[0043] Among them, determining whether to switch the working antenna and whether to jump to the second antenna switching state according to the quality of the received signal of the current working antenna within the first preset time period includes:

[0044] When the current working antenna does not successfully receive any data packet within the first preset time period or all the received data packets are CRC errors, the signal quality difference flag of the current working antenna is set to non-zero, the working antenna is switched, and the first switching antenna state continues; otherwise, the signal strength indication value of all data packets received by the current working antenna within the first preset time period is obtained, and according to the signal strength indication value of all data packets received by the current working antenna within the first preset time period, it is confirmed whether to switch the working antenna, the signal quality difference flag of all antennas is set to zero, and the state of switching to the second switching antenna is jumped.

[0045] Wherein, determining whether to switch the working antenna according to the signal strength indicator values ​​of all data packets received by the current working antenna within the first preset time period includes:

[0046] According to the signal strength indication values ​​of all data packets received by the current working antenna in the first preset time period, the signal strength indication average value of the current working antenna in the first preset time period is calculated, and it is determined whether the signal strength indication average value of the current working antenna in the first preset time period is greater than or equal to the first preset threshold value. If so, the working antenna is not switched. If not, it is further determined whether there is an antenna with a signal quality difference flag bit of zero among other antennas. If so, the working antenna is switched. If not, the antenna is not switched. The value range of the first preset threshold value is [-100dbm, -30dbm].

[0047] S3: in the second antenna switching state, starting from the start time of the first ranging in this state, obtaining the received signal quality of the current working antenna within a second preset time period, and confirming whether to switch the working antenna and whether to jump to the first antenna switching state according to the received signal quality of the current working antenna within the second preset time period;

[0048] Wherein, determining whether to switch the working antenna and whether to jump to the first antenna switching state according to the received signal quality of the current working antenna in the second preset time period includes:

[0049] When the current working antenna does not successfully receive any data packet within the second preset time period or all received data packets are CRC errors, the signal quality difference flag of the current working antenna is set to non-zero, the working antenna is switched, and the state of the first switching antenna is jumped to; otherwise, the signal strength indication value of all data packets received by the current working antenna within the second preset time period is obtained, and according to the signal strength indication value of all data packets received by the current working antenna within the second preset time period, it is confirmed whether to switch the working antenna, and the second switching antenna state is continued to stay.

[0050] Wherein, determining whether to switch the working antenna according to the signal strength indicator values ​​of all data packets received by the current working antenna within the second preset time period includes:

[0051] According to the signal strength indication values ​​of all data packets received by the current working antenna in the second preset time period, the signal strength indication average value of the current working antenna in the second preset time period is calculated, and it is determined whether the signal strength indication average value of the current working antenna in the second preset time period is greater than or equal to a second preset threshold value, if yes, the working antenna is not switched, if no, the working antenna is switched. The value range of the second preset threshold value is [-100dbm, -30dbm].

[0052] The length of the first preset time period is less than the length of the second preset time period; that is, the frequency of the first switching antenna state is higher than that of the second switching antenna state. In some embodiments, the first preset time period is 50ms-500ms, more preferably 100ms-200ms, and the second preset time period is 100ms-1s, more preferably 500ms-600ms.

[0053] Before step S1, the method further includes the following steps:

[0054] In response to the chip of the UWB terminal device being powered on, the signal quality difference flags of all antennas are set to zero, and the current working antenna is selected according to the configuration of the host computer;

[0055] In response to the chip of the UWB terminal device being awakened from the sleep state, the signal quality difference flags of all antennas are set to zero, and the current working antenna is selected according to the configuration of the host computer or the working antenna last selected before the sleep state is used as the current working antenna.

[0056] The antenna adaptive switching method of a UWB terminal device proposed in the preferred embodiment of the present invention is not only applicable to application scenarios with two antennas, but also applicable to application scenarios with more than two antennas. When applied to application scenarios with multiple antennas, the multiple antennas can have serial numbers. When switching antennas, a fixed order is used to determine whether the corresponding antenna quality difference flag is zero, and switch to the first antenna whose antenna quality difference flag is zero. This ensures that multiple antennas can be used, avoiding the situation where some antennas are used too frequently or some antennas are used too infrequently.

[0057] The antenna adaptive switching method of the UWB terminal device proposed by the present invention is further described in detail below in conjunction with specific embodiments.

[0058] Figure 2a and Figure 2bThe present invention is a block diagram of an example of a UWB terminal device with two antennas, wherein the Tx (transmit) pin 11 of the UWB chip 10 is connected to an external DPDT (double-pole double-throw) switch 30 through a Tx matching network 21, and the Rx (receive) pin 12 is connected to an external DPDT (double-pole double-throw) switch 30 through an Rx matching network 22, and then the DPDT switch 30 is connected to two UWB antennas (including antenna 0 and antenna 1) through a BPF (band-pass filter) 40. The DPDT switch 30 is controlled by the GPIO pin 13 of the UWB chip 10.

[0059] When the UWB chip 10 is working normally, the Tx pin 11 and the Rx pin 12 are time-division controlled, and the firmware of the UWB chip 10 can perform antenna switching in the following manner: (a) Figure 2a As shown, when the Tx path inside the UWB chip 10 is working and the Rx path is not working: GPIO=0, at this time the UWB terminal device transmits through antenna 0; Figure 2b As shown in FIG. 1 , when the Rx path inside the UWB chip 10 is working and the Tx path is not working: GPIO=1, at this time the UWB terminal device receives through antenna 0. (b) As shown in FIG. Figure 2b As shown, when the Tx path inside the UWB chip 10 is working and the Rx path is not working: GPIO=1, at this time the UWB terminal device transmits through the antenna 1; Figure 2a As shown, when the Rx path inside the UWB chip 10 is working and the Tx path is not working: GPIO=0, at this time the UWB terminal device receives through the antenna 1.

[0060] The firmware can dynamically adjust the antenna selection parameter ANT_Sel (antennaselection) based on a specific antenna selection strategy:

[0061] ANT_Sel=0: The firmware works in the working mode (a) above, that is, antenna 0 is used for transmission / reception.

[0062] ANT_Sel=1: The firmware works in the working mode (b) above, that is, antenna 1 is used for transmission / reception.

[0063] When N antennas are provided in the UWB terminal device, the value of ANT_Sel may be 0, 1, ... (N-1).

[0064] In the use scenario of UWB terminal equipment, due to the changes in the user's body movements (such as holding the hand, putting it in the trouser pocket), the signal strength of the two antennas of the terminal equipment changes greatly. It is generally believed that this change is relatively slow and occurs within a sub-second time range (such as ~500ms). Therefore, the antenna signal strength monitoring and the frequency of antenna switching actions in the UWB antenna switching strategy in the preferred embodiment of the present invention are considered to occur once every several hundred ms (<500ms). The specific time parameter can be configured by the host computer of the UWB terminal device.

[0065] Generally speaking, if the terminal device antenna position and polarization direction are well designed, it is a low probability event that both antennas are severely blocked at the same time. In most cases, one antenna is severely blocked and the signal of the other antenna is sufficient to support the normal operation of the ranging service.

[0066] by Figure 2a and Figure 2b Taking the UWB terminal device with two antennas as an example, the present invention proposes an antenna adaptive switching method for a UWB terminal device (based on the above description, that is, correspondingly switching the value of ANT_Sel), and its state machine diagram is as follows Figure 3 As shown, it includes the following state jumps:

[0067] A1: After each power-on of the UWB chip, the state machine enters the initialization state, clears the flag parameter indicating the poor quality of the two antenna signals, and ANT_Sel selects the value configured by the host computer.

[0068] After each power-on of the UWB chip, the state machine enters the initialization state. Initialize the flag parameter Bad_CQI(0:1)=0, which indicates whether the signal quality of the two antennas is poor. Bad_CQI(0:1)=0 indicates that the signal quality of antenna 0 and antenna 1 is not bad. Bad_CQI corresponds to Bad Channel Quality Indication. If a bit is 1, it indicates that the signal quality of the corresponding antenna is poor. For example, Bad_CQI(0)=1 indicates that the signal quality of antenna 0 is poor. ANT_Sel selects the value configured by the host computer, so that higher-level strategies from the host computer can be accepted: for example, after each power-on, the main antenna on the terminal product is preferred to work. For example, based on the usual hand-holding habits of people, an antenna that is more likely to be unobstructed can be determined as the main antenna, and the other can be determined as the auxiliary antenna.

[0069] A2: Each time the UWB chip wakes up from sleep mode, the state machine enters the initialization state and clears the flag parameter indicating the poor signal quality of the two antennas. ANT_Sel can be the value configured by the host computer, or the value last selected before sleep and saved in the chip's non-power-down area (Always-On, AON).

[0070] After the UWB chip wakes up from sleep mode each time, the state machine enters the initialization state. The flag parameter Bad_CQI (0:1) indicating whether the signal quality of the two antennas is poor is initialized to 0. ANT_Sel can be selected from the value configured by the host computer, or the value last selected and saved to AON before sleep. The specific selection method can be determined by the host computer configuration. The main considerations are: (1) If the value configured by the host computer is selected, the higher-level strategy from the host computer can be accepted: for example, the main antenna on the terminal device is preferred. Considering the user's usual habits, the main antenna is more likely to be unobstructed; or, for example, based on the terminal device posture before the UWB chip sleeps and the terminal device posture change information provided by the gyroscope in the terminal device during the UWB chip sleeps, the host computer determines to select the antenna that is more likely to be unobstructed at the current moment. (2) If the UWB chip makes the strategy completely independently, the ANT_Sel value last selected and saved to AON before sleep can be selected. Because there is no other higher-level information to refer to, it is only assumed that the posture of the terminal product has not changed significantly during the sleep period.

[0071] A3: During the operation of the UWB chip after power-on or waking up from sleep mode, the state machine enters and stays in the initialization state until the first ranging begins, then jumps to the fast antenna switching state.

[0072] In the fast antenna switching state: starting from the start time of the first ranging when entering this state, observe the quality of the received signal on the current working antenna within a time window of a certain length: if no packet is successfully received within the time window, or the received packets are all CRC errors, it is determined that the current working antenna is blocked, and the flag indicating that the antenna signal quality is poor is recorded and set; after switching the working antenna, continue to stay in the fast antenna switching state; if a packet is successfully received within the time window, and if the average signal strength is less than a certain threshold and the previously recorded flag indicating that the signal quality of the other antenna is poor is invalid, it is considered that the signal of the working antenna is poor and the signal quality of the other antenna has not been determined to be very poor, then switch the antenna, otherwise do not switch the antenna, then clear the flag indicating that the signal quality of the two antennas is poor (set to invalid), and jump to the slow antenna switching state.

[0073] Among them, in the fast antenna switching state: any antenna switching will not take effect until a complete ranging process is completed; antenna switching does not occur during each ranging process; once the chip sleep instruction is received, the firmware saves the last ANT_Sel value before the sleep moment and writes it to the chip's AON, clears the flag indicating the poor signal quality of the two antennas (set to invalid), and returns to the initialization state.

[0074] Specifically, in the fast antenna switching state, starting from the start time of the first ranging in this state, within the next time window of T1 duration, the received signal quality on the current working antenna is observed:

[0075] A31: In the application scenario of ranging between the UWB terminal device and a single UWB device at the opposite end: During this period, if no packet is successfully received, or the received packets are all CRC errors, it is determined that the current working antenna is blocked, and the flag parameter Bad_CQI (ANT_Sel) = 1 is recorded and set to indicate whether the signal quality of the current working antenna is poor (indicating that the signal quality of the current working antenna is poor). After switching the working antenna (changing the ANT_Sel value), continue to stay in the fast antenna switching state.

[0076] In the application scenario of ranging between the UWB terminal device and multiple UWB anchor points at the opposite end: during this period, if the links between the terminal product and all anchor points have not successfully received any packets, or the received packets are all CRC errors, it is determined that the current working antenna is blocked, and the flag parameter Bad_CQI (ANT_Sel) = 1 (indicating that the current working antenna signal quality is poor) is recorded and set. After switching the working antenna (changing the ANT_Sel value), it continues to stay in the fast antenna switching state.

[0077] A32: In the application scenario of ranging between the UWB terminal device and a single UWB device at the opposite end: During this period, if a packet is successfully received, the signal strength indicator (RSSI) value reported by the data packet received in the T1 time window is statistically averaged to obtain the average signal strength indicator RSSI_Avg (ANT_Sel) of the current working antenna, and compared with the first threshold Th1. , it is considered that the signal of the current working antenna is poor and the signal quality of the other antenna has not been considered to be very poor, so the antenna is switched, otherwise the antenna is not switched. After that, the flag indicating the poor signal quality of the two antennas is cleared, that is, Bad_CQI(0:1)=0 is set, and the state of slow antenna switching is jumped to.

[0078] In the application scenario of distance measurement between the UWB terminal device and multiple UWB anchor points at the opposite end: During this period, for each link between the terminal product and each anchor point, if the link successfully receives a packet, the RSSI values ​​received within the T1 time window are statistically averaged and recorded, and the largest value among the multiple links is selected as the average signal strength indication RSSI_Avg (ANT_Sel) of the current working antenna, and compared with the first threshold Th1. If , it is considered that the signal of the current working antenna is poor and the signal quality of the other antenna has not been considered to be very poor, so the antenna is switched, otherwise the antenna is not switched. After that, the flag indicating the poor signal quality of the two antennas is cleared, that is, Bad_CQI(0:1)=0 is set, and the state of slow antenna switching is jumped to.

[0079] The above parameters T1 and Th1 can be configured by the terminal device host computer. Usually, T1 can be configured to be relatively short, such as 50ms-500ms. More preferably, T1 is 100ms-200ms.

[0080] A4: In the slow antenna switching state: starting from the start time of the first ranging when entering this state, observe the quality of the received signal on the current working antenna within a time window of a certain length: if no packet is successfully received within the time window, or the received packets are all CRC errors, it is determined that the current working antenna is blocked, and the flag indicating that the antenna signal quality is poor is recorded and set. After switching the working antenna, jump to the fast antenna switching state; if a packet is successfully received within the time window, and if the average signal strength is less than a certain threshold, it is considered that the signal of the working antenna is poor, and the antenna is switched, otherwise the antenna is not switched, and then it continues to stay in the slow antenna switching state.

[0081] Among them, on the one hand, if an antenna is determined to have very poor signal quality in the fast antenna switching state, it will remain in the fast antenna switching state; if an antenna is determined to have poor signal quality in the fast antenna switching state, the poor signal quality flags of all antennas will be cleared before jumping to the slow antenna switching state; on the other hand, if an antenna is determined to have very poor signal quality in the slow antenna switching state, it will directly jump to the fast antenna switching state; therefore, in the slow antenna switching state, if it is believed that the signal of the current working antenna is poor, there is no need to determine whether there is another antenna that has not been determined to have very poor signal quality, and the antenna is directly switched, which improves efficiency to a certain extent.

[0082] In the slow antenna switching state: Any antenna switch will not take effect until the end of a complete ranging process; no antenna switch occurs during each ranging process; once the chip sleep instruction is received, the firmware saves the last ANT_Sel value before the sleep moment and writes it into the chip's AON, clears the flag bit indicating the signal quality difference between the two antennas (sets it to invalid), and returns to the initialization state.

[0083] Specifically, in the slow antenna switching state, starting from the start moment of the first ranging, within the time window of the next T2 duration, observe the received signal quality on the working antenna:

[0084] A41: In the application scenario of ranging between this UWB terminal device and a single UWB device at the opposite end: During this period, if no packet is successfully received or all received packets have CRC errors, it is determined that the current working antenna is blocked, record and set the flag bit Bad_CQI(ANT_Sel)=1 indicating poor signal quality of the current working antenna (indicating poor signal quality of this antenna), and after switching the working antenna (changing the ANT_Sel value), jump to the fast antenna switching state.

[0085] In the application scenario of ranging between this UWB terminal device and multiple UWB anchors at the opposite end: During this period, if the links between the terminal product and all anchors are such that no packet is successfully received or all received packets have CRC errors, it is determined that the current working antenna is blocked, record and set the flag bit Bad_CQI(ANT_Sel)=1 indicating poor signal quality of the current working antenna (indicating poor signal quality of this antenna), and after switching the working antenna (changing the ANT_Sel value), jump to the fast antenna switching state.

[0086] A42: In the application scenario of ranging between this UWB terminal device and a single UWB device at the opposite end: During this period, if a packet is successfully received, the RSSI values reported by the data packets received within the T2 time window are statistically averaged to obtain the average signal strength indication RSSI_Avg(ANT_Sel) of the current working antenna, and compared with the second threshold Th2. If RSSI_Avg(ANT_Sel)<Th2, it is considered that the signal of the current working antenna is poor, then switch the antenna, otherwise do not switch the antenna, and then continue to stay in the slow antenna switching state.

[0087] In the application scenario of ranging between the UWB terminal device and multiple UWB anchors at the other end: During this period, for each link between the terminal device and each anchor, if a packet is successfully received on the link, the RSSI values reported by the data packets received within the T2 time window are statistically averaged and recorded. The maximum value among multiple links is selected as the average RSSI value of the current working antenna RSSI_Avg(ANT_Sel), and it is compared with the second threshold Th2. If RSSI_Avg(ANT_Sel) < Th2, it is considered that the signal of the current working antenna is poor, and the antenna is switched, otherwise the antenna is not switched. After that, it continues to stay in the slow antenna switching state.

[0088] Among them, the above parameters T2 and Th2 can both accept the configuration of the upper computer of the terminal device. Usually, T2 can be configured relatively long, such as 100 ms - 1 s. More preferably, T2 is 500 ms - 600 ms.

[0089] It should be noted that whether in the fast antenna switching state or the slow antenna switching state, any antenna switching action has to wait until the end of a complete ranging process before it can take effect. During each ranging process, no antenna switching occurs. For example, in a specific instance, a complete ranging process includes 5 - 6 times of sending and receiving packets between the communication parties. In the T1 time period, it can include 2 - 3 complete ranging processes, and in the T2 time period, it can include more than a dozen complete ranging processes. If at the end of the T1 time period in the fast antenna switching state, it is still in a certain ranging process, the antenna switching action needs to wait until the end of this complete ranging process before it can take effect. Similarly, if at the end of the T2 time period in the slow antenna switching state, it is still in a certain ranging process, the antenna switching action also needs to wait until the end of this complete ranging process before it can take effect.

[0090] In addition, whether in the fast antenna switching state or the slow antenna switching state, once the instruction to put the chip to sleep is received, the firmware saves the last ANT_Sel value before the sleep moment and writes it into the AON of the chip, clears the flag bit indicating the poor signal quality of the two antennas (set to invalid), and returns to the initialization state.

[0091] Based on the above description of the state machine, Figure 4 A specific example of the antenna dynamic switching and state transition timing of the UWB chip is given. The behavior descriptions of the state machine transition and antenna switching at different times are as follows:

[0092] At time t0: After the UWB chip is powered on or wakes up from sleep, the state machine enters the initialization state, clears the flag bit parameter Bad_CQI(0:1) indicating the poor signal quality of the two antennas, and sets ANT_Sel to the value 0 configured by the host computer, that is, sets antenna 0 as the current working antenna.

[0093] At time t1: The first ranging after time t0 starts, and the state machine jumps from the initialization state to the fast antenna switching state.

[0094] At time t2: It reaches time t2 after timing for a duration of T1 starting from time t1. Within this T1 time window, it is found that no data packet is received or the CRC of the received packet is all wrong. From this, it is judged that the signal of antenna 0 is poor. Therefore, set Bad_CQI(0)=1 and ANT_Sel=1 (switch to antenna 1), and continue to stay in the fast antenna switching state.

[0095] At time t3: The first ranging after time t2 starts.

[0096] At time t4: It reaches time t4 after timing for a duration of T1 starting from time t3. Within this T1 time window, it is found that a packet is successfully received, and the statistical average RSSI_AVG(1)>Th1. From this, it is judged that the signal quality of antenna 1 is okay. Therefore, set Bad_CQI(0:1)=0 (clear the antenna signal quality flag bit), ANT_Sel=1 (continue to use antenna 1), and jump to the slow antenna switching state.

[0097] At time t5: The first ranging after time t4 starts.

[0098] At time t6: It reaches time t6 after timing for a duration of T2 starting from time t5. Within this T2 time window, it is found that a packet is successfully received, and the statistical average RSSI_AVG(1)>Th2. From this, it is judged that the signal quality of antenna 1 is okay. Therefore, set ANT_Sel=1 (continue to use antenna 1), and continue to stay in the slow antenna switching state.

[0099] At time t7: The first ranging after time t6 starts.

[0100] At time t8: It reaches time t8 after timing for a duration of T2 starting from time t7. Within this T2 time window, it is found that a packet is successfully received, but the statistical average RSSI_AVG(1)<Th2. From this, it is judged that the signal quality of antenna 1 is relatively poor. Therefore, set ANT_Sel=0 (switch to antenna 0), and continue to stay in the slow antenna switching state.

[0101] At time t9: The first ranging after time t8 starts.

[0102] Time t10: Time t10 is reached after T2 duration is counted from time t9. In this T2 time window, it is found that no packet is received or the CRC of the received packet is completely wrong. Therefore, it is judged that the signal of antenna 0 is very poor, so Bad_CQI(0)=1, ANT_Sel=1 (switch to antenna 1), and jump to the fast antenna switching state.

[0103] Time t11: The first ranging after time t10 begins.

[0104] Time t12: After the time T1 is counted from time t11, time t12 is reached. In this T1 time window, it is found that a packet is successfully received, and the statistical average RSSI_AVG(1)>Th1, which determines that the signal quality of antenna 1 is good, so Bad_CQI(0:1)=0 is set (clear the antenna signal quality flag), ANT_Sel=1 (continue to use antenna 1), and jump to the slow antenna switching state.

[0105] The above description is mainly for the application scenario of the terminal device with two UWB antennas, but the invention is not limited to the application scenario of two UWB antennas. The method can be intuitively expanded and applied to the application scenario of the terminal device with more UWB antennas.

[0106] The antenna adaptive switching method of the UWB terminal device proposed in the present invention can accurately and in real time track the changes in the signal quality of different antennas and switch to antennas with good signal quality, ensuring a stable and reliable user experience at all times. In addition, the method is based only on the statistical results of the signal quality of the current working antenna to determine whether the antenna needs to be switched, and to adaptively adjust the frequency of the antenna switching action. On the one hand, it avoids too frequent and aggressive switching of antenna operations, thereby affecting the user experience; on the other hand, the antenna switching method and operation are completely transparent and behind the scenes for the opposite device that communicates with the terminal device through UWB, and the high-level protocol in the host computer (except that the host computer needs to configure some parameters). In other words: the existence of the antenna switching method will not affect the normal business processes such as power on and off, sleep, wake-up, and ranging of the normal chip, nor will it generate any additional packet sending / receiving behavior in the air interface to assist in the implementation of the method; that is, the antenna switching action of the UWB terminal device itself does not affect the normal air interface wireless signal transmission, and is invisible to the host computer software in the terminal device and the opposite device.

[0107] Embodiment 2 of the present invention discloses a computer-readable storage medium, in which a computer program is stored. The computer program is configured to be executable by a processor to execute the antenna adaptive switching method of the UWB terminal device in embodiment 1.

[0108] Optionally, the storage medium may include but is not limited to: a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and other media that can store computer programs.

[0109] The background section of the present invention may contain background information about the problem or environment of the present invention, rather than describing the prior art by others. Therefore, the content contained in the background section is not an admission by the applicant that the prior art is available.

[0110] The above content is a further detailed description of the present invention in combination with specific / preferred embodiments, and it cannot be determined that the specific implementation of the present invention is limited to these descriptions. For ordinary technicians in the technical field to which the present invention belongs, without departing from the concept of the present invention, it can also make several substitutions or modifications to these described embodiments, and these substitutions or modifications should be regarded as belonging to the protection scope of the present invention. In the description of this specification, the description of reference terms "an embodiment", "some embodiments", "preferred embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials or characteristics described in combination with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily target the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner. In addition, in the absence of mutual contradiction, the technical personnel in this field can combine and combine the different embodiments or examples described in this specification and the features of different embodiments or examples. Although the embodiments of the present invention and their advantages have been described in detail, it should be understood that various changes, substitutions and modifications can be made herein without departing from the scope defined by the attached claims.

Claims

1. An antenna adaptive switching method for a UWB terminal device, characterized in that: The following steps are involved: In response to the start of the first ranging, entering a first antenna switching state; In the first antenna switching state, starting from the start time of the first ranging in this state, obtaining the quality of the received signal of the current working antenna within a first preset time period, and confirming whether to switch the working antenna and whether to jump to the second antenna switching state according to the quality of the received signal of the current working antenna within the first preset time period; In the second antenna switching state, starting from the start time of the first ranging in this state, obtaining the quality of the received signal of the current working antenna within a second preset time period, and confirming whether to switch the working antenna and whether to jump to the first antenna switching state according to the quality of the received signal of the current working antenna within the second preset time period; The length of the first preset time period is shorter than the length of the second preset time period, so that the frequency of switching antennas in the first antenna switching state is higher than the frequency of switching antennas in the second antenna switching state; The determining whether to switch the working antenna and whether to jump to the second antenna switching state according to the quality of the received signal of the current working antenna within the first preset time period includes: When the current working antenna does not successfully receive any data packet within the first preset time period or all received data packets are CRC errors, the signal quality difference flag of the current working antenna is set to non-zero, the working antenna is switched, and the first switching antenna state is continued; otherwise, the signal strength indication value of all data packets received by the current working antenna within the first preset time period is obtained, and according to the signal strength indication value of all data packets received by the current working antenna within the first preset time period, it is confirmed whether to switch the working antenna, the signal quality difference flag of all antennas is set to zero, and the state of switching to the second switching antenna is jumped; The step of determining whether to switch the working antenna according to the signal strength indicator values ​​of all data packets received by the current working antenna within the first preset time period includes: Calculate the signal strength indication average value of the current working antenna in the first preset time period according to the signal strength indication values ​​of all data packets received by the current working antenna in the first preset time period, and determine whether the signal strength indication average value of the current working antenna in the first preset time period is greater than or equal to a preset threshold value, if yes, do not switch the working antenna, if not, continue to determine whether there is an antenna with a signal quality difference flag bit of zero among other antennas, if yes, switch the working antenna, if not, do not switch the antenna; The determining whether to switch the working antenna and whether to jump to the first antenna switching state according to the quality of the received signal of the current working antenna within the second preset time period includes: When the current working antenna fails to successfully receive any data packet within the second preset time period or all received data packets are CRC errors, the signal quality difference flag of the current working antenna is set to non-zero, the working antenna is switched, and the state of the first switching antenna is jumped to; otherwise, the signal strength indication value of all data packets received by the current working antenna within the second preset time period is obtained, and according to the signal strength indication value of all data packets received by the current working antenna within the second preset time period, it is confirmed whether to switch the working antenna, and the state of the second switching antenna is continued to be stayed; The step of determining whether to switch the working antenna according to the signal strength indicator values ​​of all data packets received by the current working antenna within the second preset time period includes: According to the signal strength indication values ​​of all data packets received by the current working antenna within the second preset time period, the signal strength indication average value of the current working antenna within the second preset time period is calculated, and it is determined whether the signal strength indication average value of the current working antenna within the second preset time period is greater than or equal to a preset threshold value. If so, the working antenna is not switched; if not, the working antenna is switched.

2. The antenna adaptive switching method of a UWB terminal device according to claim 1, characterized in that: The preset threshold value ranges from [-100dbm, -30dbm].

3. The antenna adaptive switching method of a UWB terminal device according to claim 1, characterized in that: The first preset time period is 50ms-500ms, and the second preset time period is 100ms-1s.

4. The antenna adaptive switching method of a UWB terminal device according to claim 1, characterized in that: Before entering the first antenna switching state in response to the start of the first ranging, the method further includes: In response to the chip of the UWB terminal device being powered on, the signal quality difference flags of all antennas are set to zero, and the current working antenna is selected according to the configuration of the host computer; In response to the chip of the UWB terminal device being awakened from the sleep state, the signal quality difference flags of all antennas are set to zero, and the current working antenna is selected according to the configuration of the host computer or the working antenna last selected before the sleep state is used as the current working antenna.

5. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program is configured to be executable by a processor to execute the antenna adaptive switching method of the UWB terminal device as claimed in any one of claims 1 to 4.

Citation Information

Patent Citations

  • KR20240028899A