Communication device and method for dynamically adjusting packet detection threshold

By dynamically adjusting the packet detection threshold, the packet detection circuit and the threshold determination circuit are used to solve the problem of poor beacon packet detection in the noise environment, and the reception performance and transmission efficiency of the communication device are improved.

CN113453307BActive Publication Date: 2024-11-19REALTEK SEMICON CORP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202010219954.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-03-25
Publication Date
2024-11-19
Estimated Expiration
2040-03-25

AI Technical Summary

Technical Problem

In a noise-filled environment, it is difficult for communication devices to accurately detect beacon packets, resulting in poor reception performance and reduced transmission volume, and may even lead to disconnection problems.

Method used

The method of dynamically adjusting the packet detection threshold is adopted, and the threshold value is dynamically adjusted according to the received signal and environmental conditions through the combination of the packet detection circuit, the decoding circuit and the threshold determination circuit to improve the sensitivity and accuracy of the packet detection.

Benefits of technology

In a noisy environment, the detection accuracy and communication performance of beacon packets are effectively improved, the risk of disconnection is reduced, and the overall signal processing capability is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113453307B_ABST
    Figure CN113453307B_ABST
Patent Text Reader

Abstract

The present application relates to a communication device and a method for dynamically adjusting a packet detection threshold. A communication device includes: a packet detection circuit, a decoding circuit, and a threshold determination circuit. The packet detection circuit is used to perform packet detection according to at least one threshold value to determine whether a received signal includes a packet. The decoding circuit is used to decode the packet when the packet detection circuit determines that the received signal includes a packet to determine whether the packet is a predetermined packet. The threshold determination circuit is used to calculate a number of predetermined packets received within a time interval and adjust the threshold according to the number of predetermined packets.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a method for dynamically adjusting a packet detection threshold in a communication device, and more particularly to a method for dynamically adjusting a packet detection threshold that can effectively improve the sensitivity and accuracy of packet detection in a noisy environment. Background Art

[0002] In a wireless local area network (WLAN), an access point (AP) broadcasts its service set identifier (SSID) by sending beacon packets to inform the devices (Stations) within its coverage area of ​​the existence of the access point. In this way, after a device enters an area, it can scan to know whether there is an access point in this area. In addition to the service set identifier, the beacon packet can also contain information such as the transmission rate supported by the access point and the media access control (MAC) address of the access point, so that the device can use this information to connect to the access point.

[0003] Generally speaking, a device can continuously detect signal energy using corresponding packet detection technology and determine whether the received signal is a beacon packet transmitted by an access point. However, in a noisy environment, signals from different access points or devices may also affect the reception of beacon packets. For a device, when the reception performance of a beacon packet sent by a specific access point is very poor, or the device cannot receive the beacon packet sent by the specific access point, the device will have to perform a scanning operation to scan the energy in the environment, which will cause the throughput of the device to decrease, or even cause the device to be disconnected from the specific access point.

[0004] In view of this, a method for dynamically adjusting the packet detection threshold is needed, by dynamically adjusting the threshold used when performing packet detection, the sensitivity and accuracy of packet detection can be dynamically and adaptively adjusted according to environmental conditions. In this way, even in a noisy environment, the communication device can accurately detect the beacon packet. Summary of the invention

[0005] An object of the present invention is to provide a method for dynamically adjusting a packet detection threshold to solve the problem of poor receiving performance of a communication device in a noisy environment.

[0006] At least one embodiment of the present invention provides a communication device, comprising: a packet detection circuit, a decoding circuit, and a threshold determination circuit. The packet detection circuit is used to perform packet detection according to at least one threshold value to determine whether a received signal includes a packet. The decoding circuit is used to decode the packet when the packet detection circuit determines that the received signal includes a packet to determine whether the packet is a predetermined packet. The threshold determination circuit is used to calculate a number of predetermined packets received within a time interval and adjust the threshold according to the number of predetermined packets.

[0007] Another embodiment of the present invention provides a method for dynamically adjusting at least one threshold used by a communication device when performing packet detection, comprising: performing packet detection according to the threshold to determine whether a received signal includes a packet; when determining that the received signal includes a packet, decoding the packet to determine whether the packet is a predetermined packet and obtaining a determination result; calculating a number of predetermined packets received by the communication device within a time interval based on the determination result obtained within a time interval; and adjusting the threshold, wherein the threshold is adjusted based on the number of predetermined packets. BRIEF DESCRIPTION OF THE DRAWINGS

[0008] Figure 1 FIG. 4 is a block diagram showing an example of a communication device according to an embodiment of the present invention.

[0009] Figure 2 is a flow chart showing a method for dynamically adjusting a threshold for group detection according to an embodiment of the present invention.

[0010] Figure 3 FIG. 1 is a flowchart showing the adjustment / determination of threshold values ​​according to the first embodiment of the present invention.

[0011] Figure 4 FIG. 1 is a flowchart showing the adjustment / determination of threshold values ​​according to the second embodiment of the present invention.

[0012] Figure 5 FIG. 4 is a detailed flowchart showing the first stage of setting a threshold value according to RSSI according to the second embodiment of the present invention.

[0013] Figure 6 FIG. 4 is a detailed flowchart showing the second stage of setting the threshold value according to BCN_Cnt according to the second embodiment of the present invention. DETAILED DESCRIPTION

[0014] Figure 1 is a block diagram showing an example of a communication device according to an embodiment of the present invention. It is worth noting that Figure 1FIG. 1 is a simplified schematic diagram of a communication device, in which only components related to the present invention are shown. A person skilled in the art will appreciate that a communication device may include many components not shown in FIG. Figure 1 components to implement wireless communication and related signal processing functions.

[0015] The communication device 100 may include at least one antenna 110, a radio frequency circuit 120, a packet detection circuit 130, an automatic gain control (AGC) circuit 140, a decoding circuit 150, and a threshold determination circuit 160. The radio frequency circuit 120 is used to transmit or receive a wireless radio frequency signal through the antenna 110, and further process the received radio frequency signal and the radio frequency signal to be transmitted. The packet detection circuit 130 is a detection circuit, which is used to perform packet detection according to at least one threshold value to determine whether a received signal includes a packet. The packet detection circuit 130 can continuously perform packet detection on the received signal to continuously generate corresponding packet detection results. The automatic gain control circuit 140 is used to control the gain value of an amplifier (not shown in the figure) in the radio frequency circuit 120. For example, the automatic gain control circuit 140 can adjust the gain value of the amplifier according to the packet detection result and / or the signal strength indicator (RSSI) generated by the packet detection circuit 130.

[0016] The decoding circuit 150 is used to further decode the packet when the packet detection circuit 130 determines that the received signal includes a packet, so as to determine the content of the packet and obtain a corresponding determination result. For example, the decoding circuit 150 can determine whether the packet is a predetermined packet, determine whether the packet is a packet transmitted to the communication device 100, and determine the content of the packet. The threshold determination circuit 160 is used to calculate or count the number of predetermined packets received in a time interval according to the determination result obtained from the decoding circuit 150 in the time interval, and adjust the above threshold according to the number of predetermined packets.

[0017] Figure 2 is a flow chart showing a method for dynamically adjusting a threshold for group detection according to an embodiment of the present invention.

[0018] Step S202: The RF circuit 120 receives a signal through the antenna 110 and processes the received signal.

[0019] Step S204: The packet detection circuit 130 performs packet detection according to at least one threshold value to determine whether a received signal includes a packet. According to an embodiment of the present invention, the packet detection circuit 130 may use a matched filter to perform a cross correlation operation on the received signal and a predetermined signal sequence (e.g., a Barker code) to obtain an operation result, and determine whether the operation result is greater than a cross correlation threshold. If so, a first flag is set. In addition, the packet detection circuit 130 may further count the energy size (or power) of the received signal within a period of time of two consecutive symbol time lengths to obtain an energy statistical result, and determine whether the energy statistical result is greater than an energy threshold. If so, a second flag is set. After the above operation is completed, the packet detection circuit 130 determines whether both the first flag and the second flag are set. If so, the packet detection circuit 130 determines that the received signal includes a packet (i.e., the packet detection circuit 130 detects a packet), and the process enters step S206. If not, the packet detection circuit 130 determines that the received signal does not include a packet (i.e., the packet detection circuit 130 does not detect a packet), and the process returns to step S202. In another embodiment of the present invention, the packet detection circuit 130 determines whether the received signal includes a packet by determining whether at least one of the first flag and the second flag is set.

[0020] Step S206: The decoding circuit 150 decodes the packet detected by the packet detection circuit 130 to determine whether the packet is a predetermined packet. If so, the process enters step S208. If not, the process returns to step S202. According to one embodiment of the present invention, the predetermined packet is a broadcast packet. According to another embodiment of the present invention, the predetermined packet is a packet periodically transmitted by a specific device (for example, an access point currently connected to the communication device 100, or an access point to which the communication device 100 wants to connect). For example, the predetermined packet is a beacon packet periodically transmitted by the specific device. The decoding circuit 150 can determine whether it is a beacon packet transmitted by the specific device based on the header content of the packet.

[0021] In one embodiment of the present invention, the predetermined group may be a group modulated according to a complementary code keying (CCK) modulation technique (e.g., a beacon group), a group modulated according to an orthogonal frequency division multiplexing (OFDM) modulation technique (e.g., a beacon group), or a group modulated according to other modulation techniques that comply with the Institute of Electrical and Electronics Engineers (IEEE) 802.11 specification. It is worth noting that the threshold used in the group detection can be adjusted or set accordingly according to the modulation technique used by the predetermined group to be detected.

[0022] Step S208: The threshold determination circuit 160 calculates the number of predetermined packets received by the communication device 100 within a time interval according to the determination result of step S206. For example, the threshold determination circuit 160 may set the initial count value to 0 when starting a new statistical time interval, and use this count value to count the number of predetermined packets received. Whenever the process enters step S208, the threshold determination circuit 160 may add 1 to this count value.

[0023] Step S210: The threshold determination circuit 160 may determine whether the time interval has expired. For example, the statistical time interval for calculating the number of predetermined packets may be set to 2 seconds. The threshold determination circuit 160 may determine whether the time interval has expired based on a system frequency. If so, the process proceeds to step S212. If not, the process returns to step S202.

[0024] Step S212: The threshold determination circuit 160 may adjust at least one of the aforementioned threshold values ​​according to the obtained count value (i.e., the number of received predetermined packets), provide the adjusted threshold value to the packet detection circuit 130 for performing subsequent packet detection, and start a new statistical time interval before returning to step S202, and reset the count value. In an embodiment of the present invention, the threshold determination circuit 160 may adjust at least one of the aforementioned cross-correlation threshold value and the aforementioned energy threshold value according to the number of received predetermined packets. It is worth noting that the aforementioned cross-correlation threshold value and the aforementioned energy threshold value are only one embodiment of the present invention, and the present invention is not limited thereto. In an embodiment of the present invention, the threshold determination circuit 160 may adjust any threshold value used when performing packet detection according to the number of received predetermined packets.

[0025] Figure 31 is a flowchart showing the adjustment / determination of the threshold according to the first embodiment of the present invention. In the first embodiment of the present invention, the threshold determination circuit 160 can adjust or set at least one threshold used when performing packet detection according to the number of received predetermined packets.

[0026] Step S302: The threshold determination circuit 160 counts the number of predetermined packets received within a time interval to obtain a statistical value BCN_Cnt.

[0027] Step S304: The threshold determination circuit 160 determines whether the statistical value BCN_Cnt is less than the first statistical threshold THBCNLV1. If so, the process proceeds to step S306. If not, the process proceeds to step S308.

[0028] Step S306: The threshold determination circuit 160 sets at least one threshold PD_TH used in packet detection to PD_TH1.

[0029] Step S308: The threshold determination circuit 160 determines whether the statistical value BCN_Cnt is between the first statistical threshold THBCNLV1 and the second statistical threshold THBCNLV2. If yes, the process proceeds to step S310. If no, the process proceeds to step S312.

[0030] Step S310: The threshold determination circuit 160 sets at least one threshold PD_TH used in packet detection to PD_TH2.

[0031] Step S312: The threshold determination circuit 160 determines whether the statistical value BCN_Cnt is between the second statistical threshold THBCNLV2 and the third statistical threshold THBCNLV3. If yes, the process proceeds to step S314. If no, the process proceeds to step S316.

[0032] Step S314: The threshold determination circuit 160 sets at least one threshold PD_TH used in packet detection to PD_TH3.

[0033] Step S316: The threshold determination circuit 160 determines whether the statistical value BCN_Cnt is between the third statistical threshold THBCNLV3 and the fourth statistical threshold THBCNLV4. If so, the process proceeds to step S318. If not, the process proceeds to step S320.

[0034] Step S318: The threshold determination circuit 160 sets at least one threshold PD_TH used in packet detection to PD_TH4.

[0035] Step S320: The threshold determination circuit 160 sets at least one threshold PD_TH used in packet detection to PD_TH5.

[0036] It is worth noting that, although in the above-mentioned embodiment, the threshold determination circuit 160 determines which of the five predetermined references PD_TH1 to PD_TH5 to set the packet detection threshold PD_TH according to the four statistical thresholds THBCNLV1 to THBCNLV4, the present invention is not limited thereto. In the embodiment of the present invention, the number of statistical thresholds and predetermined references can be flexibly selected or designed according to system requirements. In addition, the values ​​of the predetermined references PD_TH1 to PD_TH5 can also be flexibly selected or designed according to system requirements.

[0037] According to an embodiment of the present invention, by repeatedly executing the process shown in FIG. 3, the packet detection threshold PD_TH will be adjusted / set accordingly as the number of predetermined packets statistic value BCN_Cnt changes. For example, when it is found that the number of predetermined packets received by the communication device 100 decreases, it means that the current communication environment is more difficult for the communication device 100 to detect / receive the predetermined packets. Therefore, the threshold determination circuit 160 may decide to lower the packet detection threshold PD_TH to increase the probability of detecting the predetermined packets. Conversely, when it is found that the number of predetermined packets received by the communication device 100 increases, the threshold determination circuit 160 may decide to increase the packet detection threshold PD_TH to improve the overall signal processing performance.

[0038] More specifically, according to an embodiment of the present invention, when the threshold determination circuit 160 determines that the number of predetermined packets received by the communication device 100 in the current statistical time interval is less than the number of the predetermined packets received by the communication device 100 in another previous statistical time interval, the threshold determination circuit 160 may decide to lower the packet detection threshold PD_TH. When the threshold determination circuit 160 determines that the number of predetermined packets received by the communication device 100 in the current statistical time interval is greater than the number of the predetermined packets received by the communication device 100 in another previous statistical time interval, the threshold determination circuit 160 may decide to increase the packet detection threshold PD_TH.

[0039] Figure 4 is a flow chart showing the adjustment / determination of the threshold value according to the second embodiment of the present invention. In the second embodiment of the present invention, the threshold determination circuit 160 may further obtain a signal strength indicator (RSSI) of the received signal, and adjust or set at least one threshold used when performing packet detection according to the RSSI and the number of received predetermined packets (e.g., the number statistics value BCN_Cnt). In the second embodiment of the present invention, the adjustment / setting of the threshold value may be staged. For example, the threshold determination circuit 160 may perform a preliminary setting (coarse adjustment) of the threshold value according to the RSSI, and then perform a fine setting (fine adjustment) of the threshold value according to the number of received predetermined packets.

[0040] Step S402: The threshold determination circuit 160 counts the number of predetermined packets received within a time interval to obtain a statistical value BCN_Cnt. In addition, the threshold determination circuit 160 also obtains the RSSI of the received signal. For example, the packet detection circuit 130 can calculate the RSSI of the received signal based on the aforementioned energy statistics, wherein the RSSI can be the RSSI average value, median, maximum value, minimum value of the signal received within a time interval, or a value obtained after calculation based on any of the aforementioned or any measured energy value. The threshold determination circuit 160 can obtain relevant information about the RSSI of the received signal from the packet detection circuit 130.

[0041] Step S404: The threshold determination circuit 160 performs the first stage setting (coarse adjustment) of the threshold according to the RSSI. For example, the threshold determination circuit 160 determines a first setting value according to the RSSI.

[0042] Step S406: The threshold determination circuit 160 performs a second stage setting (fine tuning) of the threshold according to BCN_Cnt. For example, the threshold determination circuit 160 determines a second setting value according to the statistical value BCN_Cnt, and determines the threshold PD_TH according to a sum of the first setting value and the second setting value.

[0043] Step S408: The threshold determination circuit 160 provides the adjusted threshold PD_TH to the packet detection circuit 130 for performing subsequent packet detection, and resets the packet quantity count value BCN_Cnt as in step S212 to re-count the number of received predetermined packets in a new statistical time interval.

[0044] Figure 5 4 is a detailed flowchart showing the first stage of setting the threshold value according to RSSI (eg, the aforementioned step S404 ) according to the second embodiment of the present invention.

[0045] Step S502: The threshold determination circuit 160 determines whether the RSSI is less than the first RSSI threshold THRSSILV1. If so, the process proceeds to step S504. If not, the process proceeds to step S506.

[0046] Step S504: The threshold determination circuit 160 sets at least one threshold PD_TH used in packet detection to PD_TH1.

[0047] Step S506: The threshold determination circuit 160 determines whether the RSSI is between the first RSSI threshold THRSSILV1 and the second RSSI threshold THRSSILV2. If yes, proceed to step S508. If not, proceed to step S510.

[0048] Step S508: The threshold determination circuit 160 sets at least one threshold PD_TH used in packet detection to PD_TH2.

[0049] Step S510: The threshold determination circuit 160 determines whether the RSSI is between the second RSSI threshold THRSSILV2 and the third RSSI threshold THRSSILV3. If yes, proceed to step S512. If no, proceed to step S514.

[0050] Step S512: The threshold determination circuit 160 sets at least one threshold PD_TH used in packet detection to PD_TH3.

[0051] Step S514: The threshold determination circuit 160 determines whether the RSSI is between the third RSSI threshold THRSSILV3 and the fourth RSSI threshold THRSSILV4. If so, the process proceeds to step S516. If not, the process proceeds to step S518.

[0052] Step S516: The threshold determination circuit 160 sets at least one threshold PD_TH used in packet detection to PD_TH4.

[0053] Step S518: The threshold determination circuit 160 sets at least one threshold PD_TH used in packet detection to PD_TH5.

[0054] It is worth noting that, although in the above-mentioned embodiment, the threshold determination circuit 160 determines which of the five predetermined references PD_TH1 to PD_TH5 to set the packet detection threshold PD_TH according to the four RSSI thresholds THRSSILV1 to THRSSILV4, the present invention is not limited thereto. In the embodiment of the present invention, the number of RSSI thresholds and predetermined references can be flexibly selected or designed according to system requirements. In addition, the values ​​of the predetermined references PD_TH1 to PD_TH5 can also be flexibly selected or designed according to system requirements.

[0055] Figure 6 4 is a detailed flowchart showing the second stage of setting the threshold value according to BCN_Cnt (eg, the aforementioned step S406 ) according to the second embodiment of the present invention.

[0056] Step S602: The threshold determination circuit 160 determines whether the statistical value BCN_Cnt is less than the first statistical threshold THBCNLV1. If so, the process proceeds to step S604. If not, the process proceeds to step S606.

[0057] Step S604: The threshold determination circuit 160 sets the fine adjustment amount (Offset) of at least one threshold used in packet detection to Offset=value_1.

[0058] Step S606: The threshold determination circuit 160 determines whether the statistical value BCN_Cnt is between the first statistical threshold THBCNLV1 and the second statistical threshold THBCNLV2. If yes, the process proceeds to step S608. If no, the process proceeds to step S610.

[0059] Step S608: The threshold determination circuit 160 sets the fine adjustment amount of at least one threshold used in packet detection to Offset=value_2.

[0060] Step S610: The threshold determination circuit 160 determines whether the statistical value BCN_Cnt is between the second statistical threshold THBCNLV2 and the third statistical threshold THBCNLV3. If yes, the process proceeds to step S612. If no, the process proceeds to step S614.

[0061] Step S612: The threshold determination circuit 160 sets the fine adjustment amount of at least one threshold used in packet detection to Offset=value_3.

[0062] Step S614: The threshold determination circuit 160 determines whether the statistical value BCN_Cnt is between the third statistical threshold THBCNLV3 and the fourth statistical threshold THBCNLV4. If so, the process proceeds to step S616. If not, the process proceeds to step S618.

[0063] Step S616: The threshold determination circuit 160 sets the fine adjustment amount of at least one threshold used in packet detection to Offset=value_4.

[0064] Step S618: The threshold determination circuit 160 sets the fine adjustment amount of at least one threshold used in packet detection to Offset=value_5.

[0065] Step S620: The threshold determination circuit 160 sets the threshold to PD_TH=PD_TH+Offset according to the determined threshold fine adjustment amount (second setting value) and the first setting value obtained in step S404.

[0066] It is worth noting that although in the above embodiment, the threshold determination circuit 160 determines which of the five predetermined references value_1 to value_5 the fine-tuning amount of the packet detection threshold is to be set according to the four statistical thresholds THBCNLV1 to THBCNLV4, the present invention is not limited thereto. In the embodiment of the present invention, the number of statistical thresholds and predetermined references can be flexibly selected or designed according to system requirements.

[0067] According to one embodiment of the present invention, by repeatedly executing Figure 4In the process shown, the packet detection threshold PD_TH will be adjusted / set accordingly with the change of RSSI and the number statistics value BCN_Cnt of the predetermined packets. Among them, the threshold determination circuit 160 can adjust the threshold according to the RSSI with an adjustment step size greater than the adjustment step size of the threshold according to the number statistics value BCN_Cnt of the predetermined packets. For example, the adjustment step size of the first setting value in step S404 can be 1 (for example, PD_TH1=5, PD_TH2=6 in Figure 5, and so on), and the adjustment step size of the second setting value in step S406 can be 0.5 or 0.1 (for example, value_1=0.5, value_2=0.6 in Figure 6, and so on).

[0068] In addition, according to an embodiment of the present invention, when it is found that the number of predetermined packets received by the communication device 100 decreases, it means that the current communication environment is more difficult for the communication device 100 to detect / receive the predetermined packets. Therefore, the threshold determination circuit 160 can decide to reduce the packet detection threshold PD_TH by reducing the threshold fine-tuning amount (second setting value) to increase the probability of detecting the predetermined packets. Conversely, when it is found that the number of predetermined packets received by the communication device 100 increases, the threshold determination circuit 160 can decide to increase the packet detection threshold PD_TH by increasing the threshold fine-tuning amount (second setting value) to improve the overall signal processing performance.

[0069] More specifically, according to an embodiment of the present invention, when the threshold determination circuit 160 determines that the number of predetermined packets received by the communication device 100 in the current statistical time interval is less than the number of the predetermined packets received by the communication device 100 in another previous statistical time interval, the threshold determination circuit 160 may decide to lower the packet detection threshold PD_TH. When the threshold determination circuit 160 determines that the number of predetermined packets received by the communication device 100 in the current statistical time interval is greater than the number of the predetermined packets received by the communication device 100 in another previous statistical time interval, the threshold determination circuit 160 may decide to increase the packet detection threshold PD_TH.

[0070] Similarly, when the signal strength indicator RSSI is found to be decreasing, the threshold determination circuit 160 may decide to lower the packet detection threshold PD_TH by reducing the first setting value of the threshold to increase the probability of detecting the predetermined packet. Conversely, when the signal strength indicator RSSI is found to be increasing, the threshold determination circuit 160 may decide to increase the packet detection threshold PD_TH by increasing the first setting value of the threshold to improve the overall signal processing performance.

[0071] According to the third embodiment of the present invention, the threshold determination circuit 160 can further obtain the false alarm rate of the packet detection, and adjust or set at least one threshold used when performing the packet detection according to the false alarm rate and the number of received predetermined packets (for example, the number statistics value BCN_Cnt). Wherein, each time the decoding circuit 150 determines that a packet is not a packet transmitted to the communication device 100 after decoding a packet, a false alarm count value can be increased, and the false alarm rate can be obtained according to the false alarm count value and a packet count value calculated according to the number of packets detected by the packet detection circuit 130.

[0072] In the third embodiment of the present invention, the threshold value may also be adjusted / set in stages. For example, the threshold value determination circuit 160 may be as follows: Figure 4 and Figure 5 As shown in FIG. 1 , the threshold is initially set (coarse adjustment) according to the false alarm rate, and then as shown in FIG. Figure 4 and Figure 6 The method of adjusting or setting at least one threshold used in performing packet detection according to the false alarm rate and the number of received predetermined packets in the third embodiment of the present invention is similar to the method of adjusting or setting at least one threshold used in performing packet detection according to the RSSI and the number of received predetermined packets in the second embodiment of the present invention, wherein only Figure 4 and Figure 5 By making corresponding modifications to the parameters used in (eg, RSSI, RSSI threshold, first setting value, etc.), the detailed flow chart of threshold adjustment / setting described in the third embodiment of the present invention can be derived. Therefore, for the sake of brevity, it will not be repeated here.

[0073] Similarly, according to an embodiment of the present invention, by repeatedly executing Figure 4 In the process shown, the packet detection threshold PD_TH will be adjusted / set accordingly with the change of the false alarm rate and the number of predetermined packets statistic value BCN_Cnt. Among them, the threshold determination circuit 160 can adjust the threshold according to the false alarm rate with a step size greater than the step size of the threshold according to the number of predetermined packets statistic value BCN_Cnt.

[0074] In addition, according to an embodiment of the present invention, when it is found that the number of predetermined packets received by the communication device 100 decreases, it means that the current communication environment is more difficult for the communication device 100 to detect / receive the predetermined packets. Therefore, the threshold determination circuit 160 can decide to reduce the packet detection threshold PD_TH by reducing the threshold fine-tuning amount (second setting value) to increase the probability of detecting the predetermined packets. Conversely, when it is found that the number of predetermined packets received by the communication device 100 increases, the threshold determination circuit 160 can decide to increase the packet detection threshold PD_TH by increasing the threshold fine-tuning amount (second setting value) to improve the overall signal processing performance.

[0075] For example, when the threshold determination circuit 160 determines that the number of predetermined packets received by the communication device 100 in the current statistical time interval is less than the number of the predetermined packets received by the communication device 100 in another previous statistical time interval, the threshold determination circuit 160 may decide to lower the packet detection threshold PD_TH. When the threshold determination circuit 160 determines that the number of predetermined packets received by the communication device 100 in the current statistical time interval is greater than the number of the predetermined packets received by the communication device 100 in another previous statistical time interval, the threshold determination circuit 160 may decide to increase the packet detection threshold PD_TH.

[0076] In summary, the present invention proposes a method for dynamically adjusting the packet detection threshold, by dynamically adjusting at least one threshold used when performing packet detection according to one or more parameters such as RSSI, false alarm rate, and the number of received predetermined packets, so that the sensitivity and accuracy of packet detection can be dynamically and adaptively adjusted according to environmental conditions. In this way, even in a noisy environment, the communication device can accurately detect the beacon packet. It should be noted that the above-mentioned various method steps can be implemented by hardware, software or firmware according to the designer's needs.

[0077] The above description is only a preferred embodiment of the present invention. All equivalent changes and modifications made according to the scope of the patent application of the present invention should fall within the scope of the present invention.

[0078]

Explanation of symbols

[0079] 100:Communication device

[0080] 110: Antenna

[0081] 120: RF circuit

[0082] 130: Packet detection circuit

[0083] 140: Automatic gain control circuit

[0084] 150: decoding circuit

[0085] 160: Threshold determination circuit

Claims

1. A communication device, comprising: a packet detection circuit for performing packet detection according to at least one threshold value to determine whether a received signal includes a packet; a decoding circuit, for decoding the packet to determine whether the packet is a predetermined packet when the packet detection circuit determines that the received signal includes a packet; as well as a threshold determination circuit, for calculating a number of the predetermined packets received within a time interval, and adjusting the threshold according to the number of the predetermined packets, The threshold determination circuit is configured as follows: When the threshold decision circuit determines that the number of the predetermined packets received by the communication device in the time interval is less than another number of the predetermined packets received by the communication device in another previous time interval, lowering the threshold, and The threshold value is increased when the threshold value decision circuit determines that the number of the predetermined packets received by the communication device in the time interval is greater than the other number of the predetermined packets received by the communication device in the previous other time interval. 2 . The communication device according to claim 1 , wherein the threshold comprises at least one of a cross-correlation threshold and an energy threshold.

3. The communication device according to claim 1, wherein the decoding circuit determines whether the packet is a packet transmitted to the communication device to calculate a false alarm rate; and the threshold determination circuit further adjusts the threshold according to the false alarm rate. 4 . The communication device according to claim 1 , wherein the predetermined packet is a broadcast packet or a packet periodically transmitted by a specific device. The communication device according to claim 1 , wherein the predetermined packet is a beacon packet transmitted by a specific device. 6 . The communication device according to claim 1 , wherein the threshold determination circuit further obtains a signal strength indicator of the received signal, and further adjusts the threshold according to the signal strength indicator.

7. The communication device according to claim 6, wherein the threshold determination circuit determines a first setting value according to the signal strength indicator, determines a second setting value according to the number of the predetermined groups, and determines the threshold according to a sum of the first setting value and the second setting value.

8. A method for dynamically adjusting at least one threshold value, the threshold value being used by a communication device when performing packet detection, the method comprising: Performing packet detection according to the threshold to determine whether a received signal contains a packet; When it is determined that the received signal includes a packet, decoding the packet to determine whether the packet is a predetermined packet and obtaining a determination result; Calculating a number of the predetermined packets received by the communication device within a time interval according to the determination result obtained within the time interval; as well as adjusting the threshold value according to the number of the predetermined groups, Wherein adjusting the threshold according to the number of the predetermined groups comprises: When it is determined that the number of the predetermined packets received by the communication device in the time interval is less than another number of the predetermined packets received by the communication device in another previous time interval, lowering the threshold, and When it is determined that the number of the predetermined packets received by the communication device in the time interval is greater than the other number of the predetermined packets received by the communication device in the previous other time interval, the threshold is increased.

9. The method according to claim 8, further comprising: A signal strength indicator of the received signal is obtained, wherein in the step of adjusting the threshold, the threshold is also adjusted according to the signal strength indicator.

10. The method according to claim 9, wherein the step of adjusting the threshold further comprises: Determine a first setting value according to the signal strength indicator; Determine a second setting value according to the number of the predetermined groups; as well as The threshold is determined according to a sum of the first setting value and the second setting value.