简体   繁体   English

蓝牙RSSI值波动

[英]Bluetooth RSSI value fluctuation

I'm trying to use RSSI values to create a positioning system in my home.我正在尝试使用 RSSI 值在家中创建定位系统。

I'm using the neXenio library as a base, the only changes I have made from this have been implementing logging to a database: https://github.com/neXenio/BLE-Indoor-Positioning我使用 neXenio 库作为基础,我所做的唯一更改是实现对数据库的日志记录: https://github.com/neXenio/BLE-Indoor-Positioning

I'm using 4 Minew I7's for the beacons and they are currently set to broadcast just iBeacon type adverts at 300ms.我正在使用 4 个 Minew I7 作为信标,它们目前设置为仅以 300 毫秒的速度播放 iBeacon 类型的广告。 They are positioned in a square shaped room and a cross type layout and each beacon is around 2.2m apart.它们位于方形房间内,呈十字型布局,每个信标相距约 2.2m。 There are no obvious obstructions other than normal living room furntiure.除了正常的客厅家具外,没有明显的障碍物。 For each test run I do I place my phone in the centre of the room and gather data for around 10-15 minutes at a time.对于每次测试运行,我都会将手机放在房间中央,一次收集大约 10-15 分钟的数据。 Data gets sent to a database for me to look at after.数据被发送到数据库供我查看。

The issue I'm having is the singal strength fluctuates massively all the time, to the point the data is basically unusable.我遇到的问题是信号强度一直在大幅波动,以至于数据基本上无法使用。 Graphs from a typical test run .来自典型测试运行的图表

Should there be that much difference when the phone is completely still?手机完全静止时应该有那么大的区别吗? I'd expect there to be some slight differences from just the nature of signal propagation but not this much.我希望信号传播的性质会有一些细微的差别,但不会太大。

Is this to be expected or can these be improved upon somehow?这是可以预料的还是可以以某种方式改进这些? If this is expected then I will have to look at combining some other sensor data to help improve accuracy.如果这是预期的,那么我将不得不考虑结合一些其他传感器数据来帮助提高准确性。

Thanks谢谢

Edit:编辑:

After running some more tests, I compared values over time (I had previously only compared rssi,distance and mac address).运行更多测试后,我比较了一段时间内的值(我之前只比较了 rssi、距离和 mac 地址)。 This has led to find a consitant osscilation pattern Newest test run .这导致找到一个持续的振荡模式最新的测试运行

This has also led me to this overstack question: Is there an explanation for the regular oscillation experienced in Bluetooth RSSI这也让我想到了这个 overstack 问题: Is there there an explanation for the regular oscillation experienced in Bluetooth RSSI

If I am only advertising iBeacon type adverts then this wouldn't apply?如果我只宣传 iBeacon 类型的广告,那么这不适用吗? But it seems strange how it matches me issue.但它如何匹配我的问题似乎很奇怪。

RSSI values fluctuate a lot and there is not much you can do about that. RSSI 值波动很大,对此您无能为力。 That's why the new features in Bluetooth 5.1 were created that use other techniques than signal strength for positioning.这就是为什么蓝牙 5.1 中创建的新功能使用信号强度以外的其他技术进行定位的原因。 Unfortunately the adoption has been slow.不幸的是,采用速度很慢。

You can't do much with currently used devices.您无法使用当前使用的设备做很多事情。 Even if you stabilize the signal statically, there will be a lot of noise during movement.即使你静态地稳定信号,在运动过程中也会有很多噪音。 You can try to:您可以尝试:

  • thicken the signal to 100 ms.将信号加厚到 100 毫秒。 Urfotunately, this will affect battery consumption,不幸的是,这会影响电池消耗,

  • BLE transmits packets on 3 channels (37, 38, 39). BLE 在 3 个通道(37、38、39)上传输数据包。 The antenna probalby isn't tuned to all 3 the same.天线 probalby 没有调谐到所有 3 个相同。 If you have the option to change the advertising channels, try to test on different settings.如果您可以选择更改广告渠道,请尝试在不同的设置上进行测试。

  • if you have option of soldering or connecting an external anntena, direcational antennas may be helpful for indoor positioning system.如果您可以选择焊接或连接外部天线,定向天线可能有助于室内定位系统。

There are many methods to stabilize the rssi signal.稳定rssi信号的方法有很多。 If you are interested in this topic, I recommend looking at the articles:如果您对此主题感兴趣,我建议您查看以下文章:

https://scholar.google.com/scholar?hl=pl&as_sdt=0%2C5&q=stabilization+rssi+method&btnG= https://scholar.google.com/scholar?hl=pl&as_sdt=0%2C5&q=stabilization+rssi+method&btnG=

In my opinion, this mothod will be most useful to you:在我看来,这种方法对你最有用:

https://www.wouterbulten.nl/blog/tech/kalman-filters-explained-removing-noise-from-rssi-signals/ https://www.ncbi.nlm.nih.gov/pmc/articles/PMC5461075/ https://www.wouterbulten.nl/blog/tech/kalman-filters-explained-removing-noise-from-rssi-signals/ https://www.ncbi.nlm.nih.gov/pmc/articles/PMC5461075/

AoA and AoD methods may also interest you: AoA 和 AoD 方法也可能让您感兴趣:

https://www.bluetooth.com/blog/new-aoa-aod-bluetooth-capabilities/ https://www.bluetooth.com/blog/new-aoa-aod-bluetooth-capabilities/

I hope this will be useful我希望这会有用

Its practice approach, I tried and implemented.I got the proper results, so that`s why writing the solution.它的实践方法,我尝试并实施了。我得到了正确的结果,所以这就是编写解决方案的原因。 If possible try the same.如果可能,请尝试相同的方法。 I implemented it on one BLE router and one Beacon tag.我在一台 BLE 路由器和一个 Beacon 标签上实现了它。 I need to do the calculation for up to 3 meter means 3*3.2 foot.我需要计算最多 3 米意味着 3*3.2 英尺。 I minimized the fluctuation with out using the kalman filter.我在不使用卡尔曼滤波器的情况下将波动最小化。

For above implementation we need to go through the steps as follows,对于上述实现,我们需要通过以下步骤 go,

Step 1. Keep Beacon tag at 1M of distance and take 10 [Max] number of readings of rssi & store it in one excel.第 1 步。将 Beacon 标签保持在 1M 的距离,并读取 10 [Max] 个 rssi 读数并将其存储在一个 excel 中。

Step 2. Keep Beacon tag at 2M of distance and take 10 [Max] number of readings of rssi & store it in second excel.第 2 步。将 Beacon 标签保持在 2M 的距离,并读取 10 [最大] 个 rssi 读数并将其存储在秒 excel 中。

Step 3. Keep Beacon tag at 3M of distance and take 10 [Max] number of readings of rssi & store it in third excel.第 3 步. 将 Beacon 标签保持在 3M 的距离,并读取 10 [Max] 的 rssi 读数并将其存储在第三个 excel 中。

Now you have 3 excel. Take one excel and observe the rssi value, compute the median for the same.现在你有 3 个 excel。取一个 excel 并观察 rssi 值,计算相同值的中值。 Same thing need to calculate for other two excels.同样的事情需要为其他两个 excel 计算。

My Becon tag freq is 4 dbm.我的 Becon 标签频率是 4 dbm。 I got the readings of RSSI from above excel as listed below:我从 excel 上面得到了 RSSI 的读数,如下所示:

From one excel: -58来自一个 excel:-58
From two excel: -64 From third excel: -70来自两个 excel:-64 来自第三个 excel:-70

As you see, there is difference of 6 as I change the meter .正如你所看到的,当我改变仪表时有 6 的差异

Now I written logic by using above results like if value is fluctuating between -58 to -64 then it is represented as 1 m.现在我使用上面的结果编写逻辑,比如如果值在 -58 到 -64 之间波动,那么它表示为 1 m。 same for 2m & 3m. 2m 和 3m 也一样。 But this is not the proper way to do the calculation.但这不是进行计算的正确方法。

So I used the log for the所以我用日志来

calculation like for the value between -58 to -64计算类似于 -58 到 -64 之间的值

result = log(rssi*-1,58).结果 = 日志 (rssi*-1,58)。 ie 58 as base.即 58 作为基础。

actual distance = result *1(meter)*3.2(ft)实际距离=结果*1(米)*3.2(英尺)

Same for 2 meter, but for 2 m base of log is 64 2 米相同,但 2 米的原木基数为 64

result = log(rssi*-1,64).结果 = 日志 (rssi*-1,64)。 ie 64 as base.即 64 作为基础。

actual distance = result *2(meter)*3.2(ft)实际距离=结果*2(米)*3.2(英尺)

Same for 3 meter, but for 3 m base of log is 70 3 米相同,但 3 米的原木基数为 70

result = log(rssi*-1,70).结果 = 日志 (rssi*-1,70)。 ie 70 as base.即以 70 为基数。

actual distance = result *3(meter)*3.2(ft)实际距离=结果*3(米)*3.2(英尺)

This can be done by programming.这可以通过编程来完成。 I got the proper results with stability of rssi signal.我通过 rssi 信号的稳定性得到了正确的结果。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM