Help with Plotting - TXPower etc.

Posted on
Tue Jul 03, 2018 4:15 am
AndyVirus offline
Posts: 257
Joined: Mar 18, 2014
Location: Newport Pagnell, UK

Help with Plotting - TXPower etc.

Hello,

I am finally testing plotting of beacons after a false start a year or so ago after buying 10 TrackR's which turned out to be a pointless waste of money all round, both for this and for its own app (battery terrible or all just stop working after a day or 2, yay).

I have some cheap iTag ones now for £2 each. Work great . Battery lasts 6 months (had them a year now but never done anything with them) and they broadcast constantly and reliably.
The one thing is their TXPower is 0dbm so very loud. Maybe part of my issue.
I have 10 Pis' mainly Pi Zero W's, 1 original B and 2 Pi 3s. All working fine in a grid reasonably equally spaced.

What i am finding is, my X and Y positions are all over the place, one second it looks good say X =21 Y = 15... then the next second X = -3456 Y = 70 which is of course not plot-able on my image.

So, is my wild locations down to:

a) TX Power of these cheap iTags too high causing interference with the others
b) Should i be setting the TXPower of the RPis themself (they state TXPowerRecieved = -59 but is that used when TXPowerSet = 999 is set?)
b1) Does changing the TX Power settings of a Pi alter the calculation of the beacons? Is this used at all in that?
c) Should i be playing with TXPower on the beacons in the pibeacon devices? I seem to have it a bit better by setting TXPower to -50 on the beacon devices but still wild
d) Any ideas how to stabilise location?

Posted on
Tue Jul 03, 2018 5:46 am
kw123 offline
User avatar
Posts: 8333
Joined: May 12, 2013
Location: Dallas, TX

Re: Help with Plotting - TXPower etc.

The tx power is used in calculating the distance.
distance= sqrt( 10**( (txpower-signal)/10 ) ) . --- if txpower == signal it is 10**0 = 1 ( meter )

txxPower received from the iBeacon is replaced by TXpower from device edit if it is < txpower from ibeacon. So if it is 999 the ibeacon txpower is used.
if you set it to -60 and txpower from the ibeacon is -40 , -60 is used.

Here how to set it correctly, set TX to signal at 1 meter received: To do this hold the iBeacon 1 meter away from the RPI. Then use THAT signal of the ibeacon from THAT RPi as TXpower in device edit.

How many RPi do you have? if the ibeacon is too far away from the receiving RPI the closest rpi can switch frequently, and hence the distance calculation

I have almost 1 RPI in each room, then it works well. If the signal has to go through walls it is not accurate.
Ideally one should measure the signal strength at every place in the house and use that signal map to determine the position, but that would be really cumbersome and difficult to manage.


Karl
there are many papers about it, and a major issue are walls, reflections etc..
https://www.quora.com/How-do-I-calculate-distance-in-meters-km-yards-from-rssi-values-in-dBm-of-BLE-in-android

Posted on
Wed Jul 04, 2018 8:28 am
AndyVirus offline
Posts: 257
Joined: Mar 18, 2014
Location: Newport Pagnell, UK

Re: Help with Plotting - TXPower etc.

Thankyou! I have done this now and i have set TX power to -69 for these and the accuracy has dramatically improved.

I have 10 Raspery Pis. 8 indoors and 2 at eather corner of the garden outside.

Being a 2 story building, i have 12 rooms so if i want a pi in each corner and one in each room split across 2 floors, 10 is not enough :-) Its a long building so not square and the rooms upstairs are not the same config as downstairs. If you can support more than 10, then ill order more Pis :-)

Internal walls are a mix of solid brick (some with metal backing due to open fire) and plasterboard/draywall with wood studs. External are breezeblock and brick external. Standard UK building materials really.

Does your plot take an average of the rssi before each plot is generated at x mins or just what ever the last was? So plot the average of rssi in last 2 mins (dependant on the drop down)? Also does it drop the insane extreemes of the average? Just curious.

Posted on
Wed Jul 04, 2018 9:48 am
kw123 offline
User avatar
Posts: 8333
Joined: May 12, 2013
Location: Dallas, TX

Re: Help with Plotting - TXPower etc.

A) increasing to more than 10 is a bit of work. I will check when I am back home.

B) calculation. The rpi sends the average over 1 minute of rssi - normally 5+ measurements. Then the plugin takes that value
It then finds the RPI with the highest rssi in the last 2 minutes ( I believe) and uses that distance. adjusts direction towards the rpi with the second highest rssi.

I was playing around with various averages, calculations but they do not improve accuracy because the absorption through the walls that are not taken into account.



Sent from my iPhone using Tapatalk

Posted on
Wed Jul 04, 2018 10:19 am
AndyVirus offline
Posts: 257
Joined: Mar 18, 2014
Location: Newport Pagnell, UK

Re: Help with Plotting - TXPower etc.

Dont worry too much about increasing the number of pi’s, ill have a play with the location of the 10 i have and see what is possible. If its trivial to increase then brilliant but don’t commit too much time to it. It will take me a while to get more zero w’s as i can only seem to buy them one at a time due to stock levels still.

Thanks for the clarification, always good to understand the logic behind something, helps with any troubleshooting.



Sent from my iPhone using Tapatalk

Posted on
Wed Jul 04, 2018 10:43 am
kw123 offline
User avatar
Posts: 8333
Joined: May 12, 2013
Location: Dallas, TX

Re: Help with Plotting - TXPower etc.

the time window to accept valid RSSI values:
currentTime- piTime(rssi) < max(90.,expirationTime)

where expirationTime is the ibeacon expiration time for THAT iBeacon: either general exptime or the one defined in device edit for that iBeacon

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 3 guests