IoT device with distance measuring function and distance measuring method for IoT device

The IoT device with a channel hopping mechanism and filtering algorithms enhances distance measurement accuracy by mitigating interference, ensuring precise distance calculations across multiple channels.

JP2026185819APending Publication Date: 2026-11-27XIAMEN PVTECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
JP2026079264
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Priority Date
2025-05-15
Filing Date
2026-05-09
Publication Date
2026-11-27

AI Technical Summary

Technical Problem

Existing RSSI-based ranging methods for IoT devices are prone to inaccuracies due to channel interference and obstruction from other Bluetooth devices and electromagnetic waves, leading to unreliable distance measurements.

Method used

An IoT device with a Bluetooth module and control module that switches communication channels using a hopping mechanism, applies filtering algorithms to multiple broadcast signals, and calculates distance based on optimized received signal strength indicators.

Benefits of technology

The solution significantly reduces interference effects, enabling accurate distance calculations and improving IoT device performance without increasing costs, applicable to various smart applications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2026185819000001_ABST
    Figure 2026185819000001_ABST
Patent Text Reader

Abstract

This invention solves the problem of inaccurate measurement of received signal strength indications due to serious interference and jamming in Bluetooth communication channels, and provides an IoT device with a distance measuring function that enables highly accurate distance measurement without being affected by interference in the communication channel. [Solution] The IoT device 11 having a distance measuring function of the present invention includes a Bluetooth module 111 and a control module 112. The control module 112 is connected to the Bluetooth module 111 and switches communication channels based on a Bluetooth channel hopping mechanism, causing the Bluetooth module 111 to receive multiple broadcast signals transmitted by another IoT device on multiple communication channels. The control module 112 calculates the received signal strength indicator value for each signal, executes a filtering algorithm based on these values ​​to obtain updated values, and calculates the distance between the control module 112 and the other IoT device based on these updated values.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to an IoT device, and more particularly to an IoT device having a ranging function. The present invention also relates to a ranging method for the IoT device.

Background Art

[0002] Existing Received Signal Strength Indication (RSSI)-based ranging methods mainly rely on a Bluetooth device periodically transmitting broadcast signals containing its own device information to the outside. During the propagation of these broadcast signals, the signal strength received by the receiving side gradually attenuates. The receiving side can attempt to estimate the distance between itself and the Bluetooth device by analyzing the change in signal strength.

Summary of the Invention

Problems to be Solved by the Invention

[0003] However, existing ranging methods still have many problems that need improvement. That is, Bluetooth communication channels are susceptible to severe channel interference and obstruction. If there are many other Bluetooth devices or other interference sources in the same channel, the normal reception of broadcast signals may be affected, resulting in inaccurate measurement of the received signal strength indication value. The above-mentioned interference sources may originate from electromagnetic waves of other electronic devices. The present invention aims to solve such problems of the prior art, and to provide an IoT device and a ranging method thereof that can perform high-precision ranging without being affected by communication channel interference or obstruction.

Means for Solving the Problems

[0004] The present invention provides an IoT device having a distance measuring function, the device including a Bluetooth module and a control module. The control module is connected to the Bluetooth module and switches the communication channel of the Bluetooth module based on a Bluetooth channel hopping mechanism, causing the Bluetooth module to receive multiple broadcast signals transmitted by another IoT device on multiple communication channels.

[0005] Here, the control module calculates the received signal strength indicator value for each broadcast signal, executes a filtering algorithm based on the received signal strength indicator values ​​of the multiple broadcast signals mentioned above to obtain updated received signal strength indicator values, and further calculates the distance between the control module and another IoT device based on the updated received signal strength indicator values.

[0006] In one preferred embodiment of the present invention, the filtering algorithm is a moving average filtering algorithm, a median filtering algorithm, or a Kalman filtering algorithm.

[0007] In one preferred embodiment of the present invention, the control module executes a filtering algorithm to establish a filtering window and a sampling window larger than the filtering window, processes the received signal strength indicators of the plurality of broadcast signals based on the filtering window and the sampling window, and obtains updated received signal strength indicators.

[0008] In one preferred embodiment of the present invention, if the received signal strength indicators of the multiple broadcast signals described above do not meet the sampling window, the control module calculates the average value of the received signal strength indicators of the multiple broadcast signals described above, and further calculates the distance between the control module and another IoT device based on the average value.

[0009] In one preferred embodiment of the present invention, if the received signal strength indicators of the multiple broadcast signals described above satisfy the sampling window, the control module removes the maximum and minimum values ​​of the received signal strength indicators of the multiple broadcast signals described above to obtain updated data, calculates the average value of the updated data, and further calculates the distance between the control module and another IoT device based on the average value.

[0010] The present invention further provides a method for measuring the distance of an IoT device, the method comprising the following steps: A control module switches the communication channel of a Bluetooth module based on a Bluetooth channel hopping mechanism, causes the Bluetooth module to receive multiple broadcast signals transmitted by another IoT device on multiple communication channels, and calculates the received signal strength indicator value for each broadcast signal via the control module.

[0011] Next, the control module executes a filtering algorithm based on the received signal strength indicators of the multiple broadcast signals mentioned above to obtain updated received signal strength indicators. Then, the control module calculates the distance between the control module and another IoT device based on the updated received signal strength indicators.

[0012] In one preferred embodiment of the present invention, the filtering algorithm is a moving average filtering algorithm, a median filtering algorithm, or a Kalman filtering algorithm.

[0013] In one preferred embodiment of the present invention, the step of obtaining updated received signal strength indicators by having a control module execute a filtering algorithm based on the received signal strength indicators of the plurality of broadcast signals described above includes having the control module establish a filtering window and a sampling window larger than the filtering window, and processing the received signal strength indicators of the plurality of broadcast signals described above based on the filtering window and the sampling window via the control module to obtain updated received signal strength indicators.

[0014] In one preferred embodiment of the present invention, the step of processing the received signal strength indicators of the above-mentioned plurality of broadcast signals based on a filtering window and a sampling window via a control module to obtain updated received signal strength indicators includes, when the received signal strength indicators of the above-mentioned plurality of broadcast signals do not satisfy the sampling window, calculating the average value of the received signal strength indicators of the above-mentioned plurality of broadcast signals via the control module, and the control module calculating the distance between the control module and another IoT device based on the average value.

[0015] In one preferred embodiment of the present invention, the step of processing the received signal strength indicators of the above-mentioned plurality of broadcast signals based on a filtering window and a sampling window via a control module to obtain updated received signal strength indicators includes, when the received signal strength indicators of the above-mentioned plurality of broadcast signals satisfy the sampling window, the control module deleting the maximum and minimum values ​​of the received signal strength indicators of the above-mentioned plurality of broadcast signals to obtain updated data.

[0016] Furthermore, the step includes calculating the average value of the updated data via the control module, and the control module calculating the distance between the control module and another IoT device based on the average value. [Effects of the Invention]

[0017] As described above, the IoT device and method having a distance measuring function according to the embodiments of the present invention can have one or more of the following advantages.

[0018] (1) According to the disclosure of the present invention, an IoT device includes a Bluetooth module and a control module. The control module is connected to the Bluetooth module and switches the communication channel of the Bluetooth module based on a Bluetooth channel hopping mechanism, causing the Bluetooth module to receive multiple broadcast signals transmitted by another IoT device on multiple communication channels.

[0019] Here, the control module calculates the received signal strength indicator value for each broadcast signal, executes a filtering algorithm based on the received signal strength indicator values ​​of multiple broadcast signals to obtain updated received signal strength indicator values, and then calculates the distance between the control module and another IoT device based on the updated received signal strength indicator values. Thanks to the optimized received signal strength indicator calculation mechanism described above, the IoT device can quickly calculate the distance to another IoT device. Therefore, the IoT device can meet practical needs.

[0020] As described above, according to the present invention, the control module receives broadcast signals on multiple communication channels based on a Bluetooth channel hopping mechanism. As a result, even if a particular communication channel is affected by interference sources such as electromagnetic waves from other Bluetooth devices or electronic devices, the effect of interference on the particular channel is leveled out by executing a filtering algorithm based on the received signal strength indicators obtained from multiple different communication channels. Therefore, compared to conventional distance measurement methods that use only a single communication channel, the effects of interference and disruption on communication channels can be significantly reduced, and distance measurement accuracy can be improved.

[0021] (2) According to the present invention, the IoT device has an optimized received signal strength indicator calculation mechanism. Here, the control module executes a filtering algorithm to establish a filtering window and a sampling window larger than the filtering window, processes the received signal strength indicators of the multiple broadcast signals mentioned above based on the filtering window and the sampling window, and obtains updated received signal strength indicators.

[0022] If the received signal strength indicators of the multiple broadcast signals mentioned above do not meet the sampling window, the control module calculates the average value of the received signal strength indicators of the multiple broadcast signals mentioned above, and then calculates the distance between the control module and another IoT device based on the average value.

[0023] If the received signal strength indicators of the multiple broadcast signals mentioned above meet the sampling window, the control module removes the maximum and minimum values ​​of the received signal strength indicators of the multiple broadcast signals mentioned above to obtain updated data, calculates the average value of the updated data, and then calculates the distance between the control module and another IoT device based on the average value.

[0024] The optimized received signal strength indication calculation mechanism described above can significantly improve calculation accuracy, enabling IoT devices to accurately calculate the distance to other IoT devices without affecting calculation accuracy even when the Bluetooth communication channel is subjected to interference or jamming. Therefore, it can significantly improve the performance of IoT devices and meet various practical needs.

[0025] (3) According to the present invention, the control module continuously receives new broadcast signals and adds the received signal strength indicator of the new broadcast signal to the sampling window. At the same time, the control module removes the oldest received signal strength indicator in time within the sampling window and repeats the same calculation procedure. In this way, the control module can continuously optimize the accuracy of the calculation.

[0026] (4) According to the present invention, the IoT device is not limited to a lighting device, and may also be a sensing device (microwave induction device, infrared induction device), various home appliances, or any other type of device with different functions. Therefore, the IoT device can be applied to various different smart applications, such as smart homes, smart factories, smart parking lots, etc., to provide various different functions. Accordingly, the IoT device has a wider range of applications and greater flexibility in use.

[0027] (5) According to the disclosure of the present invention, the IoT device has a simple design and can achieve desired effects without increasing costs. Thus, the IoT device achieves high practicality and can be applied to various different smart applications. Therefore, the IoT device can adapt to future development trends. [Brief Description of the Drawings]

[0028] [Figure 1] It is a block diagram of a lighting system including the IoT device according to the first embodiment of the present invention. [Figure 2] It is a block diagram of an IoT device with a distance measurement function according to the first embodiment of the present invention. [Figure 3] It is a first schematic diagram of a filtering algorithm of an IoT device with a distance measurement function according to the first embodiment of the present invention. [Figure 4] It is a second schematic diagram of a filtering algorithm of an IoT device with a distance measurement function according to the first embodiment of the present invention. [Figure 5] It is a third schematic diagram of a filtering algorithm of an IoT device with a distance measurement function according to the first embodiment of the present invention. [Figure 6] It is a flowchart of a distance measurement method for an IoT device according to a second embodiment of the present invention. [Figure 7] It is a flowchart of a distance measurement method for an IoT device according to a third embodiment of the present invention. [Figure 8]This is a flowchart of a distance measurement method for an IoT device according to a fourth embodiment of the present invention. [Modes for carrying out the invention]

[0029] The detailed features and advantages of the present invention will be described below in detail in embodiments. The content will be sufficient for a person skilled in the relevant art to understand the technical content of the present invention and implement it thereunder, and a person skilled in the relevant art will be able to easily understand the objectives and advantages related to the present invention based on the disclosures, claims and drawings of this specification.

[0030] Embodiments of the IoT device and method having a distance measuring function according to the present invention will be described below with reference to the relevant drawings. For clarity and convenience in the drawing description, the size and proportions of each component in the drawings may be exaggerated or reduced. Where a component is referred to as being "connected" or "joined" to another component in the following description and / or claims, it may be directly connected or joined to that other component, or there may be an intervening component.

[0031] On the other hand, when a component is referred to as being "directly connected" or "directly coupled" to another component, there is no intervening component. Other terms used to describe relationships between components or layers should be interpreted similarly. For ease of understanding, the same components in the following embodiments are denoted by the same reference numerals.

[0032] Referring to Figure 1, which is a block diagram of a lighting system including the IoT device of a first embodiment of the present invention. As shown, the lighting system 1 includes a plurality of IoT devices 11, and these IoT devices 11 can communicate with each other. In this embodiment, the IoT device 11 may be a lighting device. In another embodiment, the IoT device 11 may be a sensing device (microwave induction device, infrared induction device) or various home appliances.

[0033] Naturally, this embodiment is for illustrative purposes only and does not limit the scope of the invention. Equivalent modifications or changes made based on the lighting system 1 of this embodiment should still be included within the claims of the invention.

[0034] Referring to Figure 2, which is a block diagram of an IoT device having a distance measuring function according to a first embodiment of the present invention, the IoT device 11 includes a Bluetooth module 111, a control module 112, and a light-emitting module 113. The control module 112 is connected to the Bluetooth module 111 and the light-emitting module 113. In one embodiment, the control module 112 may be a microcontroller (MCU).

[0035] In another embodiment, the control module 112 may be a central processing unit (CPU), an application-specific integrated circuit chip (ASIC), a field-programmable gate array (FPGA), or other similar component. In one embodiment, the light-emitting module 113 may be a light-emitting diode (LED). In another embodiment, the light-emitting module 113 may be a light bulb, a fluorescent lamp, or the like.

[0036] The control module 112 switches the communication channel of the Bluetooth module 111 based on a Bluetooth channel hopping mechanism, allowing the Bluetooth module 111 to receive multiple broadcast signals Bs1 to Bsn transmitted by another IoT device 11 on multiple communication channels (any two IoT devices 11 can both perform the same mechanism).

[0037] Subsequently, the control module 112 calculates the Received Signal Strength Indicator (RSSI) value for each of the broadcast signals Bs1 to Bsn, executes a filtering algorithm based on the above-mentioned Received Signal Strength Indicator values ​​for the multiple broadcast signals Bs1 to Bsn to obtain updated Received Signal Strength Indicator values, and further calculates the distance between the control module and another IoT device based on the updated Received Signal Strength Indicator values. The filtering algorithm is a moving average filtering algorithm, a median filtering algorithm, or a Kalman filtering algorithm.

[0038] The optimized received signal strength indication calculation mechanism described above allows IoT device 11 to quickly calculate the distance to another IoT device 11. Therefore, IoT device 11 can meet practical needs.

[0039] Furthermore, after calculating the distance to another IoT device 11, the control module 112 can dynamically adjust the distance measurement period and hopping speed based on that distance. The control module 112 can perform this adjustment based on multiple distance thresholds. For example, if the distance is less than the first threshold (3 meters), the control module 112 sets the distance measurement period to 100 ms and runs the Bluetooth channel hopping mechanism at the highest hopping speed. If the distance is between the first threshold (3 meters) and the second threshold (10 meters), the control module 112 sets the distance measurement period to 300 ms and runs the Bluetooth channel hopping mechanism at an intermediate hopping speed. If the distance exceeds the second threshold (10 meters), the control module 112 sets the distance measurement period to 500 ms and runs the Bluetooth channel hopping mechanism at the lowest hopping speed. This allows for high-frequency sampling to improve accuracy when the distance between the control module 112 and another IoT device 11 is relatively short, and low-frequency sampling to reduce power consumption when the distance is relatively long.

[0040] Furthermore, the control module 112 can further calculate the variance of the received signal strength indicators for each communication channel's broadcast signal. If the variance of the received signal strength indicators for any communication channel's broadcast signal is greater than or equal to the first variance threshold, the control module 112 excludes the received signal strength indicator for that communication channel's broadcast signal. For example, let's assume the variance threshold is 6 dB. If the received signal strength indicators for the broadcast signal Bs1 of the first communication channel are -40, -60, and -45, the control module 112 calculates the variance of the received signal strength indicators for broadcast signal Bs1 as 68.89, which exceeds the first variance threshold. In this case, the control module 112 excludes the received signal strength indicator for broadcast signal Bs1 of the first communication channel and does not use that received signal strength indicator in the filtering algorithm. If the received signal strength indicators for the broadcast signal Bs2 of the second communication channel are -50, -51, and -52, the control module 112 calculates the variance of the received signal strength indicator for broadcast signal Bs2 as 0.67, which is less than the first variance threshold. At this time, the control module 112 holds the received signal strength indicator value of the broadcast signal Bs2 of the second communication channel. The first dispersion threshold can be adjusted according to the actual requirements. The above mechanism makes it possible to effectively exclude communication channels affected by interference and improve calculation accuracy.

[0041] Naturally, this embodiment is for illustrative purposes only and does not limit the scope of the present invention. Equivalent modifications or changes made based on the IoT device 11 having distance measuring function of this embodiment should still be included within the scope of the present invention.

[0042] Referring to Figures 3, 4, and 5, Figure 3 is a first schematic diagram of the filtering algorithm for an IoT device having a distance measuring function according to the first embodiment of the present invention. Figure 4 is a second schematic diagram of the filtering algorithm for an IoT device having a distance measuring function according to the first embodiment of the present invention. Figure 5 is a third schematic diagram of the filtering algorithm for an IoT device having a distance measuring function according to the first embodiment of the present invention.

[0043] In this embodiment, a moving average filtering algorithm is described as an example. As shown in Figure 3, the control module 112 executes a filtering algorithm (moving average filtering algorithm) to establish a filtering window W1 and a sampling window W2 that is larger than the filtering window W1. Based on the filtering window W1 and the sampling window W2, it processes the received signal strength indicators of the above-mentioned multiple broadcast signals Bs1 to Bsn and obtains updated received signal strength indicators. The sizes of the filtering window W1 and the sampling window W2 are appropriately adjustable and are not limited to those disclosed in this embodiment.

[0044] As shown in Figure 4, if the received signal strength indicators S1 to Sn of the above-mentioned multiple broadcast signals Bs1 to Bsn do not satisfy the sampling window W2, the control module 112 calculates the average value of the received signal strength indicators of the above-mentioned multiple broadcast signals Bs1 to Bsn, and further calculates the distance between the control module 112 and another IoT device 11 based on the average value.

[0045] For example, if the number of the multiple broadcast signals Bs1 to Bs4 described above is four, the multiple broadcast signals Bs1 to Bs4 cannot satisfy the sampling window W2. In this case, the control module 112 calculates the average value of the received signal strength indicators S1 to S4 of the multiple broadcast signals Bs1 to Bsn described above, and further calculates the distance between the control module 112 and another IoT device 11 based on the average value.

[0046] As shown in Figure 5, when the number of the multiple broadcast signals Bs1 to Bs7 described above is seven, the multiple broadcast signals Bs1 to Bs7 can satisfy the sampling window W2. At this time, the control module 112 removes the maximum value S1 and minimum value S7 of the received signal strength indicator values ​​S1 to S7 of the multiple broadcast signals Bs1 to Bs7 described above to obtain updated data, calculates the average value of the updated data, and further calculates the distance between the control module 112 and another IoT device 11 based on the average value.

[0047] Furthermore, the control module 112 can calculate the above-mentioned average value using a weighted averaging algorithm. The control module 112 can assign corresponding weights according to the variance of the received signal strength indicators of the broadcast signals for each communication channel and a plurality of variance thresholds. Subsequently, the control module 112 calculates the above-mentioned average value based on the received signal strength indicators of these communication channels and the corresponding weights using a weighted averaging algorithm.

[0048] For example, the control module 112 can assign weights to each communication channel according to the variance of the received signal strength indicator of the broadcast signal for the communication channel, the first variance threshold, and the second variance threshold. The first variance threshold is greater than the second variance threshold. For example, let the first variance threshold be 6 dB and the second variance threshold be 3 dB. If the variance of the received signal strength indicator of the broadcast signal Bs1 of the first communication channel is 5 dB and is between the first and second variance thresholds (3 to 6 dB), the control module 112 sets the weight of the first communication channel as the first weight. If the variance of the received signal strength indicator of the broadcast signal Bs2 of the second communication channel is 2 dB and is less than or equal to the second variance threshold (≤ 3 dB), the control module 112 sets the weight of the second communication channel as the second weight. The second weight is greater than the first weight. For example, let the first weight be 0.6 and the second weight be 1. The control module 112 obtains a first calculated value by multiplying the received signal strength indication value of each communication channel by a weight corresponding to that value, obtains a second calculated value by summing the first calculated values ​​of all communication channels, and obtains a third calculated value by summing the weights of all communication channels. Finally, the control module 112 obtains the average value by dividing the second calculated value by the third calculated value. For example, if the received signal strength indication value of the broadcast signal Bs1 of the first communication channel is -55 and the received signal strength indication value of the broadcast signal Bs2 of the second communication channel is -58, the average value will be -56.125 ((-55 × 1.0 + (-58) × 0.6) ÷ 1.6). The above mechanism improves calculation accuracy by effectively increasing the weight of stable communication channels and decreasing the weight of less stable communication channels. The first variance threshold, the second variance threshold, and the weights are adjustable according to actual requirements.

[0049] Furthermore, the control module 112 can determine whether multiple consecutive distance measurement results satisfy the adaptive adjustment conditions based on the adaptive adjustment window. If it is determined that consecutive distance measurement results satisfy the adaptive adjustment conditions based on the adaptive adjustment window, the control module 112 dynamically adjusts the size of the sampling window W2 according to the variation threshold, a predetermined number of consecutive variations, and a predetermined multiplier. For example, if the variation between any two adjacent distance measurement results within the adaptive adjustment window exceeds the variation threshold (adaptive adjustment condition), the control module 112 can dynamically increase the size of the sampling window W2 according to the variation threshold, a predetermined number of consecutive variations, and a predetermined multiplier. If the variation between any two adjacent distance measurement results within the adaptive adjustment window exceeds the variation threshold, it indicates that environmental noise interference is severe. In this case, the control module 112 can increase the size of the sampling window W2 to improve accuracy. For example, the adaptive adjustment window is set to 3, the size of the sampling window W2 to 5 (5 received signal strength indicator values), the variation threshold to 1.5 meters, the predetermined number of consecutive variations to 1, and the predetermined multiplier to 2. If the control module 112 calculates the distance between itself and another IoT device 11 as 2 meters in the first calculation, 3.3 meters in the second calculation, and 1 meter in the third calculation, the difference between the second measurement result and the first measurement result is 1.3 meters, which is within the variation threshold (1.5 meters). However, the difference between the third measurement result and the second measurement result is 2.3 meters, which exceeds the variation threshold (1.5 meters). At this time, the control module 112 increases the sampling window W2 to 10 (10 received signal strength indicator values). The above mechanism enables an adaptive adjustment effect that makes distance measurement more accurate without requiring manual adjustment by the user. Therefore, the robustness of the IoT device 11 can be effectively improved. The adaptive adjustment window, adaptive adjustment conditions, variation threshold, predetermined number of continuous variations, and predetermined multiplier can be adjusted according to actual requirements.

[0050] Here, the adaptive adjustment window is a parameter that defines the number of most recent consecutive distance measurement results used to determine whether or not the adaptive adjustment conditions are met. For example, if the size of the adaptive adjustment window is 3, the control module 112 uses the most recent three distance measurement results as the basis for determination. The size of the adaptive adjustment window can be set independently of the size of the sampling window and can be adjusted according to actual requirements. Note that the adaptive adjustment conditions are not limited to the examples described above. In another embodiment, the adaptive adjustment conditions may be when the standard deviation of consecutive distance measurement results within the adaptive adjustment window exceeds a predetermined value, or when the difference between the maximum and minimum values ​​exceeds a predetermined value.

[0051] The "predetermined number of consecutive fluctuations" mentioned above is a parameter used to determine the adaptive adjustment condition. The adaptive adjustment condition may be determined to be satisfied if the fluctuation between two adjacent distance measurement results exceeds the fluctuation threshold for a "predetermined number" consecutive times within the adaptive adjustment window. For example, if the predetermined number of consecutive fluctuations is 3, the control module dynamically adjusts the size of the sampling window by a predetermined multiplier when the fluctuation exceeds the threshold 3 times consecutively within the adaptive adjustment window. In another embodiment, the adaptive adjustment condition may be determined to be satisfied when the cumulative number of fluctuations exceeding the threshold within the adaptive adjustment window reaches the predetermined number of consecutive fluctuations, and the present invention is not limited to a specific determination method. Furthermore, the predetermined multiplier is a multiplier for the size of the sampling window before adjustment, and the size of the sampling window after adjustment is calculated as "size before adjustment × predetermined multiplier".

[0052] Furthermore, the adaptive adjustment mechanism described above and the exclusion mechanism based on the variance of the received signal strength indicators for each communication channel may be implemented individually or in combination. When both are implemented in combination, the control module may first exclude the received signal strength indicators of communication channels whose variance exceeds the variance threshold from the filtering algorithm, execute the filtering algorithm based on the excluded received signal strength indicators, and simultaneously determine the adaptive adjustment conditions and dynamically adjust the sampling window based on the obtained distance measurement results. This makes it possible to achieve higher distance measurement accuracy and robustness against both instantaneous interference and environmental noise.

[0053] The optimized received signal strength indication calculation mechanism described above can significantly improve the accuracy of calculations, enabling IoT device 11 to accurately calculate the distance to another IoT device 11 without affecting calculation accuracy even if the Bluetooth communication channel is subjected to interference or jamming. Therefore, the performance of IoT device 11 can be significantly improved, and various practical needs can be met.

[0054] Furthermore, the control module 112 continuously receives new broadcast signals and adds the received signal strength indicator value of the new broadcast signal to the sampling window W2. At the same time, the control module 112 deletes the oldest received signal strength indicator value in time within the sampling window W2 and repeats the same calculation procedure. In this way, the control module 112 can continuously optimize the accuracy of the calculation.

[0055] As mentioned above, the IoT device 11 is not only a lighting device, but may also be a sensing device (microwave induction device, infrared induction device), various home appliances, or other devices with various different functions. Therefore, the IoT device 11 can be applied to various different smart applications such as smart homes, smart factories, and smart parking lots, and can provide various different functions. Thus, the IoT device 11 has a wider range of applications and greater flexibility in use.

[0056] Furthermore, the design of the IoT device 11 is simple, and the desired effect can be achieved without increasing costs. Thus, the IoT device 11 achieves high practicality and can be applied to various different smart applications. Therefore, the IoT device 11 can adapt to future development trends.

[0057] It is worth noting that existing ranging methods still have many issues that need improvement. Specifically, Bluetooth communication channels are susceptible to serious channel interference and disruption. When many other Bluetooth devices or other sources of interference are present on the same channel, the proper reception of broadcast signals may be affected, resulting in inaccurate measurements of received signal strength indicators.

[0058] In contrast, according to a first embodiment of the present invention, the IoT device includes a Bluetooth module and a control module. The control module is connected to the Bluetooth module and switches the communication channels of the Bluetooth module based on a Bluetooth channel hopping mechanism, causing the Bluetooth module to receive multiple broadcast signals transmitted by another IoT device on multiple communication channels. The control module calculates the received signal strength indicator value for each broadcast signal and executes a filtering algorithm based on the received signal strength indicator values ​​of the multiple broadcast signals to obtain updated received signal strength indicator values.

[0059] According to the first embodiment of the present invention, the control module receives broadcast signals on multiple communication channels based on a Bluetooth channel hopping mechanism. As a result, even if a particular communication channel is affected by interference sources such as electromagnetic waves from other Bluetooth devices or electronic devices, the effect of interference on the particular channel is leveled out by executing a filtering algorithm based on the received signal strength indicators obtained from multiple different communication channels. Therefore, compared to conventional ranging methods that use only a single communication channel, the effects of interference and disruption on communication channels can be significantly reduced, and ranging accuracy can be improved.

[0060] Furthermore, the control module calculates the distance between itself and another IoT device based on the updated received signal strength indicator. Thanks to the optimized received signal strength indicator calculation mechanism described above, the IoT device can quickly calculate the distance to another IoT device. Therefore, the IoT device can meet practical needs.

[0061] Furthermore, according to the first embodiment of the present invention, the IoT device has an optimized received signal strength indication calculation mechanism. Here, the control module executes a filtering algorithm to establish a filtering window and a sampling window larger than the filtering window, and processes the received signal strength indication values ​​of the above-mentioned multiple broadcast signals based on the filtering window and the sampling window to obtain updated received signal strength indication values.

[0062] If the received signal strength indicators of the multiple broadcast signals mentioned above do not meet the sampling window, the control module calculates the average value of the received signal strength indicators of the multiple broadcast signals and calculates the distance between the control module and another IoT device based on the average value. If the received signal strength indicators of the multiple broadcast signals mentioned above meet the sampling window, the control module removes the maximum and minimum values ​​to obtain updated data, calculates the average value of the updated data, and calculates the distance between the control module and another IoT device based on the average value.

[0063] The optimized received signal strength indication calculation mechanism described above can significantly improve calculation accuracy, enabling IoT devices to accurately calculate the distance to other IoT devices without affecting calculation accuracy even when the Bluetooth communication channel is subjected to interference or jamming. Therefore, it can significantly improve the performance of IoT devices and meet various practical needs.

[0064] Furthermore, according to the first embodiment of the present invention, the control module continuously receives new broadcast signals and adds the received signal strength indicator of the new broadcast signal to the sampling window. At the same time, the control module removes the oldest received signal strength indicator in time within the sampling window and repeats the same calculation procedure. In this way, the control module can continuously optimize the accuracy of the calculation.

[0065] Furthermore, according to the first embodiment of the present invention, the IoT device may be not only a lighting device, but also a sensing device (microwave induction device, infrared induction device), various home appliances, or other devices with various different functions. Therefore, the IoT device can be applied to various different smart applications such as smart homes, smart factories, and smart parking lots, and can provide various different functions. Thus, the IoT device has a wider range of applications and greater flexibility in use.

[0066] Furthermore, according to the first embodiment of the present invention, the design of the IoT device is simple, and the desired effect can be achieved without increasing costs. Thus, the IoT device achieves high practicality and can be applied to various different smart applications. Therefore, the IoT device can adapt to future development trends. From the above, it can be seen that the IoT device having a distance measuring function according to the embodiment of the present invention can reliably achieve extremely excellent technical effects.

[0067] Referring to Figure 6, which is a flowchart of a distance measurement method for an IoT device according to a second embodiment of the present invention, the distance measurement method for the IoT device according to this embodiment includes the following steps.

[0068] Step S61: The control module switches the communication channel of the Bluetooth module based on the Bluetooth channel hopping mechanism, causing the Bluetooth module to receive multiple broadcast signals transmitted by another IoT device on multiple communication channels. Step S62: The received signal strength indicator value for each broadcast signal is calculated via the control module. Step S63: The control module executes a filtering algorithm based on the received signal strength indicators of the multiple broadcast signals described above to obtain updated received signal strength indicators. Step S64: The control module calculates the distance between the control module and another IoT device based on the updated received signal strength indicator.

[0069] Naturally, this embodiment is for illustrative purposes only and does not limit the scope of the present invention. Equivalent modifications or changes made based on the distance measurement method of the IoT device of this embodiment should still be included within the scope of the present invention.

[0070] Although the steps of the methods described in this invention are shown and explained in a specific order, the order of operation of each method can be changed, and it is possible to perform certain steps in reverse order, or to perform certain steps simultaneously with other steps. In another embodiment, different steps may be performed in an intermittent and / or alternating manner.

[0071] Referring to Figure 7, which is a flowchart of a distance measurement method for an IoT device according to a third embodiment of the present invention, the distance measurement method for an IoT device according to this embodiment includes the following steps.

[0072] Step S71: The control module switches the communication channel of the Bluetooth module based on the Bluetooth channel hopping mechanism, causing the Bluetooth module to receive multiple broadcast signals transmitted by another IoT device on multiple communication channels. Step S72: The received signal strength indicator value for each broadcast signal is calculated via the control module. Step S73: The control module executes a filtering algorithm based on the received signal strength indicators of the multiple broadcast signals described above to establish a filtering window and a sampling window larger than the filtering window. Step S74: The control module processes the received signal strength indicators of the multiple broadcast signals mentioned above based on the filtering window and sampling window, and obtains updated received signal strength indicators. Step S75: The control module calculates the distance between the control module and another IoT device based on the updated received signal strength indicator.

[0073] Naturally, this embodiment is for illustrative purposes only and does not limit the scope of the present invention. Equivalent modifications or changes made based on the distance measurement method of the IoT device of this embodiment should still be included within the scope of the present invention.

[0074] Although the steps of the methods described in this invention are shown and explained in a specific order, the order of operation of each method can be changed, and it is possible to perform certain steps in reverse order, or to perform certain steps simultaneously with other steps. In another embodiment, different steps may be performed in an intermittent and / or alternating manner.

[0075] Referring to Figure 8, which is a flowchart of a distance measurement method for an IoT device according to a fourth embodiment of the present invention, the distance measurement method for an IoT device according to this embodiment includes the following steps.

[0076] Step S81: The control module switches the communication channel of the Bluetooth module based on the Bluetooth channel hopping mechanism, causing the Bluetooth module to receive multiple broadcast signals transmitted by another IoT device on multiple communication channels. Step S82: The received signal strength indicator value for each broadcast signal is calculated via the control module. Step S83: The control module executes a filtering algorithm based on the received signal strength indicators of the multiple broadcast signals described above to establish a filtering window and a sampling window larger than the filtering window. Step S84: When the received signal strength indicators of the multiple broadcast signals described above do not meet the sampling window, the average value of the received signal strength indicators of the multiple broadcast signals described above is calculated via the control module. Step S85: The control module calculates the distance between the control module and another IoT device based on the average value. Step S86: The control module deletes the maximum and minimum values ​​of the received signal strength indicators of the multiple broadcast signals mentioned above when the received signal strength indicators of the multiple broadcast signals mentioned above satisfy the sampling window, and obtains updated data. Step S87: Calculate the average value of the updated data via the control module. Step S88: The control module calculates the distance between the control module and another IoT device based on the average value.

[0077] In summary, according to the first, second, third, and fourth embodiments of the present invention, the IoT device includes a Bluetooth module and a control module. The control module is connected to the Bluetooth module and switches communication channels based on a Bluetooth channel hopping mechanism, causing the Bluetooth module to receive multiple broadcast signals transmitted by another IoT device on multiple communication channels. The control module calculates a received signal strength indicator value, executes a filtering algorithm to obtain an updated value, and calculates the distance to the other IoT device. This optimized mechanism allows the IoT device to quickly calculate distance and meet practical needs.

[0078] Furthermore, according to each embodiment of the present invention, the IoT device has an optimized received signal strength indication calculation mechanism. The control module establishes a filtering window and a sampling window and processes values ​​based on these. If the sampling window is not filled, the average value is calculated; if it is filled, the maximum and minimum values ​​are removed and the average value of the updated data is calculated to derive the distance. This significantly improves the accuracy of the calculation, enabling accurate calculations unaffected by interference in the communication channel, and improving the performance of the device.

[0079] Furthermore, according to each embodiment of the present invention, the control module continuously receives new broadcast signals, adds values ​​to the sampling window, and removes the oldest values, repeating the same calculation procedure. This continuously optimizes the calculation accuracy.

[0080] Furthermore, according to each embodiment of the present invention, the IoT device may be not only a lighting device but also a sensing device, a home appliance, or a device with various other functions. Therefore, it can be applied to a wide range of smart applications such as smart homes, factories, and parking lots, offering broad applicability and flexibility.

[0081] Furthermore, according to each embodiment of the present invention, the design of the IoT device is simple, and the desired effect can be achieved without increasing costs. Therefore, it has high practicality and can adapt to future development trends.

[0082] It should be noted that while the embodiments described above have already been explained in this specification, this does not limit the scope of the claims of the present invention. Therefore, any changes or modifications made to the embodiments described herein, or equivalent structures or flow transformations utilizing the contents of this specification and drawings, and direct or indirect applications to other related technical fields, based on the technical concept of the present invention, are all included within the scope of the claims of the present invention. [Explanation of Symbols]

[0083] 1. Lighting System 11 IoT device 111 Bluetooth Module 112 Control Module 113 Light-emitting module Bs1~Bsn Broadcast Signals W1 Filtering Window W2 Sampling Window S61-S64 Step S71~S75 Step S81~S88 Step

Claims

1. Bluetooth module and The system includes a control module connected to the Bluetooth module, which switches the communication channel of the Bluetooth module based on a Bluetooth channel hopping mechanism and causes the Bluetooth module to receive multiple broadcast signals transmitted by another IoT device on multiple communication channels, The control module is an IoT device having a distance measuring function, which calculates the received signal strength indicator value for each of the broadcast signals, executes a filtering algorithm based on the received signal strength indicator values ​​of the plurality of broadcast signals to obtain updated received signal strength indicator values, and further calculates the distance between the control module and the other IoT device based on the updated received signal strength indicator values.

2. The IoT device having a distance measuring function according to claim 1, wherein the filtering algorithm is a moving average filtering algorithm, a median filtering algorithm, or a Kalman filtering algorithm.

3. The IoT device having a distance measuring function according to claim 1, wherein the control module executes the filtering algorithm to establish a filtering window and a sampling window larger than the filtering window, processes the received signal strength indicators of the plurality of broadcast signals based on the filtering window and the sampling window, and obtains the updated received signal strength indicators.

4. The IoT device having a distance measuring function according to claim 3, wherein if the received signal strength indicator values ​​of the plurality of broadcast signals do not satisfy the sampling window, the control module calculates the average value of the received signal strength indicator values ​​of the plurality of broadcast signals, and further calculates the distance between the control module and the other IoT device based on the average value.

5. The IoT device having a distance measuring function according to claim 3, wherein if the received signal strength indicators of the plurality of broadcast signals satisfy the sampling window, the control module deletes the maximum and minimum values ​​of the received signal strength indicators of the plurality of broadcast signals to obtain updated data, calculates the average value of the updated data, and further calculates the distance between the control module and the other IoT device based on the average value.

6. The IoT device having a distance measurement function according to claim 3, wherein the control module determines whether a plurality of consecutive distance measurement results satisfy the adaptive adjustment conditions based on an adaptive adjustment window, and if the control module determines that the consecutive distance measurement results satisfy the adaptive adjustment conditions, it dynamically adjusts the size of the sampling window according to a variation threshold, a predetermined number of consecutive variations, and a predetermined multiplier.

7. The IoT device having a distance measuring function according to claim 1, wherein the control module adjusts the distance measuring period and hopping speed of the Bluetooth channel hopping mechanism according to a plurality of distance thresholds and the distance between the control module and the other IoT device.

8. The IoT device having a distance measuring function according to claim 1, wherein the control module excludes the received signal strength indicator of a broadcast signal of any one of the communication channels from the filtering algorithm when the variance of the received signal strength indicator of a broadcast signal of that communication channel is greater than or equal to a variance threshold.

9. The control module switches the communication channel of the Bluetooth module based on a Bluetooth channel hopping mechanism, causing the Bluetooth module to receive multiple broadcast signals transmitted by another IoT device on multiple communication channels. The steps include: calculating the received signal strength indicator value for each of the broadcast signals via the control module; The control module performs a filtering algorithm based on the received signal strength indicators of the plurality of broadcast signals and obtains updated received signal strength indicators. A method for measuring the distance of an IoT device, comprising the step of the control module calculating the distance between the control module and the other IoT device based on the updated received signal strength indicator value.

10. The method for measuring distance in an IoT device according to claim 9, wherein the filtering algorithm is a moving average filtering algorithm, a median filtering algorithm, or a Kalman filtering algorithm.

11. The control module executes the filtering algorithm based on the received signal strength indicator values ​​of the plurality of broadcast signals. The step of obtaining the updated received signal strength indicator value is: The control module establishes a filtering window and a sampling window larger than the filtering window, A method for measuring distance in an IoT device according to claim 9, comprising the steps of processing the received signal strength indicators of the plurality of broadcast signals based on the filtering window and the sampling window via the control module and obtaining the updated received signal strength indicators.

12. The control module processes the received signal intensity indicator values ​​of the plurality of broadcast signals based on the filtering window and the sampling window, The step of obtaining the updated received signal strength indicator value is: When the received signal strength indicators of the plurality of broadcast signals do not satisfy the sampling window, the control module calculates the average value of the received signal strength indicators of the plurality of broadcast signals. A method for measuring the distance of an IoT device according to claim 11, comprising the step of using the control module to calculate the distance between the control module and the other IoT device based on the average value.

13. The control module processes the received signal intensity indicator values ​​of the plurality of broadcast signals based on the filtering window and the sampling window, The step of obtaining the updated received signal strength indicator value is: When the received signal strength indicators of the plurality of broadcast signals satisfy the sampling window, the control module deletes the maximum and minimum values ​​of the received signal strength indicators of the plurality of broadcast signals to obtain updated data. The steps include: calculating the average value of the updated data via the control module; A method for measuring the distance of an IoT device according to claim 11, comprising the step of using the control module to calculate the distance between the control module and the other IoT device based on the average value.

14. The control module performs the steps of determining whether a plurality of consecutive distance measurement results satisfy the adaptive adjustment conditions based on the adaptive adjustment window, The distance measurement method for an IoT device according to claim 11, further comprising the step of dynamically adjusting the size of the sampling window in accordance with a fluctuation threshold, a predetermined number of consecutive fluctuations, and a predetermined multiplier by the control module when it is determined that the consecutive distance measurement results satisfy the adaptive adjustment conditions.

15. The distance measurement method for an IoT device according to claim 9, further comprising the step of adjusting the distance measurement period and hopping speed of the Bluetooth channel hopping mechanism according to a plurality of distance thresholds and the distance between the control module and the other IoT device, using the control module.

16. The distance measurement method for an IoT device according to claim 9, further comprising the step of the control module excluding the received signal strength indicator of a broadcast signal of any one of the communication channels from the filtering algorithm if the variance of the received signal strength indicator of a broadcast signal of that communication channel is greater than or equal to a variance threshold.