Community discussions

MikroTik App
 
MrJakub2000
just joined
Topic Author
Posts: 3
Joined: Sun Dec 01, 2024 10:25 pm

Improving Localization Accuracy with MikroTik RouterBOARD

Sun Dec 01, 2024 10:57 pm

Hello everyone!

I am working on a mini-project using MikroTik RouterBOARD devices to create an efficient localization application. My approach involves utilizing the signal_strength parameter from MikroTik routers and Python for distance calculations. Currently, I am able to estimate distances with an average error of about 8 meters.

I conducted several tests in an open field spanning 60 meters. After gathering samples, I computed the best polynomial function to fit the given data. The results are promising, but I’m wondering if there’s a way to further minimize the error. (I attached results as png)

The router was configured as described in the WDS repeater example, where it acts as the main gateway. In the future, I plan to set up a simple triangular configuration for triangulation to calculate the receiver’s position. (https://wiki.mikrotik.com/WDS_repeater_ ... pB825zob6Q)

I also tried modifying the tx_power value to [-20, 20, 40], but I didn’t notice any significant difference in accuracy.

Do you have any ideas on how I could improve my setup or reduce the error further? Any suggestions or advice would be greatly appreciated!

Thanks in advance! All ideas and advice are appreciated. <3
You do not have the required permissions to view the files attached to this post.
 
jaclaz
Forum Guru
Forum Guru
Posts: 1981
Joined: Tue Oct 03, 2023 4:21 pm

Re: Improving Localization Accuracy with MikroTik RouterBOARD

Mon Dec 02, 2024 2:30 am

Which Routerboard device?
With which antenna?
On which frequency range (2.4 or 5 GHz)?
On which Channel in the range?

Any change in any of the above may modify - slightly or sensibly - the result.

If you are looking for measuring distances, you might want to have a very directional antenna to minimize interferences, if you are going for triangulation you might want a perfectly omnidirectional antenna instead.

8 m sounds anyway like a very good result, in line with the usual approximation expected from wi-fi, around 10 meters, for higher precision the newish Wi-Fi Round-Trip-Time features seem to be needed.
 
User avatar
mkx
Forum Guru
Forum Guru
Posts: 12978
Joined: Thu Mar 03, 2016 10:23 pm

Re: Improving Localization Accuracy with MikroTik RouterBOARD

Mon Dec 02, 2024 9:17 am

Since your "project" involves some calculations ... just for comparison: when calculating signal coverage of mobile networks using professional RF propagation tools and then comparing it to reality (measured on the field using professional measurement equipment, such as PN scanners and what not), getting differences with standard deviation of less than around 6dB means a very good prediction tool. It's not about models calculating path loss wrong, it's about space which in reality tends to be way more complex than normal tools can model (reflection surfaces not modelled correctly, reflectivity not set correctly, "live" objects not modelled correctly, antenna pattern not modelled accurately, etc.). Even if you do 'reference measurements" and then try to track station ... environment changes (e.g. people moving around disturb RF field).
And 6dB in WiFi world is much more than 8 meters, so I agree with @jaclaz: your results are very good already.
 
MrJakub2000
just joined
Topic Author
Posts: 3
Joined: Sun Dec 01, 2024 10:25 pm

Re: Improving Localization Accuracy with MikroTik RouterBOARD

Tue Dec 03, 2024 2:34 am

Which Routerboard device?
With which antenna?
On which frequency range (2.4 or 5 GHz)?
On which Channel in the range?

Any change in any of the above may modify - slightly or sensibly - the result.

If you are looking for measuring distances, you might want to have a very directional antenna to minimize interferences, if you are going for triangulation you might want a perfectly omnidirectional antenna instead.

8 m sounds anyway like a very good result, in line with the usual approximation expected from wi-fi, around 10 meters, for higher precision the newish Wi-Fi Round-Trip-Time features seem to be needed.
Thanks for your reply!
I am using a MikroTik RB2011UiAS-2HnD-IN, operating at 2.4 GHz on the first channel (2412 MHz). I don’t have any knowledge about antennas. My router looks the same as the one in the following links:
https://www.cyberbajt.pl/produkt/5004/m ... nd-in.html
or
https://www.cyberteam.pl/produkt/2387_m ... as-2hnd-in


These routers were given to me by my teacher, and I don’t have access to any others.

I’ve noticed that in some locations, my algorithm performs worse. For instance, it struggles near my home in a small estate of single-family houses. However, I observed better signal stability on the pavement in a large block housing estate or in open fields. Could this be due to noise from TV antennas or other routers in nearby homes?

If you have any suggestions, I’d be more than pleased to hear them!

Regarding my future triangle configuration, it’s easier for me to use the same channel for all routers due to how my algorithm is implemented. Is this approach feasible, or would using different channels offer significant benefits?
 
MrJakub2000
just joined
Topic Author
Posts: 3
Joined: Sun Dec 01, 2024 10:25 pm

Re: Improving Localization Accuracy with MikroTik RouterBOARD

Tue Dec 03, 2024 2:47 am

Since your "project" involves some calculations ... just for comparison: when calculating signal coverage of mobile networks using professional RF propagation tools and then comparing it to reality (measured on the field using professional measurement equipment, such as PN scanners and what not), getting differences with standard deviation of less than around 6dB means a very good prediction tool. It's not about models calculating path loss wrong, it's about space which in reality tends to be way more complex than normal tools can model (reflection surfaces not modelled correctly, reflectivity not set correctly, "live" objects not modelled correctly, antenna pattern not modelled accurately, etc.). Even if you do 'reference measurements" and then try to track station ... environment changes (e.g. people moving around disturb RF field).
And 6dB in WiFi world is much more than 8 meters, so I agree with @jaclaz: your results are very good already.
Thanks for your opinion!

In that case, I will continue using my approach of creating an interpolated function based on gathered samples. The results seem promising to me. Initially, I wanted to use a more professional mathematical formula, but none of them worked for me.

Some of the formulas I tried were based on referenced RSSI, while others included logarithmic correlations between distance, frequency, signal gain, noise, etc. Unfortunately, none of them provided good enough results for my application.

Do you have any alternative ideas for calculating the signal based on highly fluctuating RSSI that I could test as well? I’d be thankful for any advice! :)
 
jaclaz
Forum Guru
Forum Guru
Posts: 1981
Joined: Tue Oct 03, 2023 4:21 pm

Re: Improving Localization Accuracy with MikroTik RouterBOARD

Tue Dec 03, 2024 12:03 pm

The antennas that come with the RB2011 are (in theory) omnidirectional ones, their emission shape is loosely a doughnut, which is fatter for lower antenna gains and slimmer for higher gain antennas, see this picture:
https://www.radiolabs.com/images/omni-a ... attern.png

And this thread for some context:
viewtopic.php?t=158134

The normal antennas coming with that should be 4-5 dBi gain.

Being omnidirectional it likely gets more interference/noise in crowded areas from different sources (including - besides access points - cordless phones, microwave ovens, bluetooth devices, and even USB 3 devices, as they are all emitting around 2.4 GHz):
https://en.wikipedia.org/wiki/2.4_GHz_radio_use

I know nothing about the kind of calculations involved, but I have seen several projects on github about this, among them several are Python based, you should probably check what others have come out with, I will cite Mikhail Kalashnikov (the designer of the AK-47) :shock: :
"A lot of Russian Army soldiers ask me how one can become a constructor, and how new weaponry is designed. These are very difficult questions. Each designer seems to have his own paths, his own successes and failures. But one thing is clear: before attempting to create something new, it is vital to have a good appreciation of everything that already exists in this field. I myself have had many experiences confirming this to be so."

Who is online

Users browsing this forum: No registered users and 7 guests