3D localization: Difference between revisions
(59 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
[[File:System close.jpg|thumb|right|600px|Full system with 6 anchors and 3 tags.]] | |||
This page gives an overview of a three dimensional localization system developed. The system can be used in every scenario where it is wanted to obtain some sort of position or velocity information about something, whether it is for ground-truth information, control feedback, surveillance or the like. A few examples of such places could be: | |||
* Robotic control position and velocity feedback, for autonomous usage | |||
* Ground-truth to test other approaches | |||
* Inventory tagging | |||
* Personnel location information | |||
* Intelligent transportation in regards to eg. smarter vehicles | |||
The position and velocity estimates are available wherever they are needed, whether that is onboard the host as data extraction from the tag itself or at a specific anchor for data logging purposes. <br /> | |||
Furthermore the system features extremely rapid deployment, as the anchors will be able to find their own position in a matter of seconds from first power. This means that the system can be set-up and ready to be used in a matter of minutes, without loss of accuracy. | |||
The developed system, is intended to be used as closed-environment system, meaning that it is intended to not require anything of the host carrying the tag. This means that the system is extremely versatile and can be used almost anywhere, as the host is not required to run any timing specific software. | |||
==Hardware== | ==Hardware== | ||
The localization system at hand consists of at least | The localization system at hand consists of at least four anchors and one tag. <br /> | ||
The hardware design considerations, descriptions and overviews can be found at the [[Localization Hardware]] page. <br /> | The hardware design considerations, descriptions and overviews can be found at the [[Localization Hardware]] page. <br /> | ||
Each device communicates and ranges with each other through an UWB ([https://en.wikipedia.org/wiki/Ultra-wideband Ultra-wideband]) radio. | Each device communicates and ranges with each other through an UWB ([https://en.wikipedia.org/wiki/Ultra-wideband Ultra-wideband]) radio. | ||
<br /> | |||
The system can be used by placing the anchors at fixed known positions in the room, preferably in different heights, after which the system will measure the distance from each anchor to the tag. These distances can then be combined with the known position of the associated anchor, in order to estimate the absolute position of the tag in three dimensions. The position will be calculated locally on the tag, and can as such be used to eg. control a robot carrying the tag. | |||
==Software download== | ==Software download== | ||
Line 13: | Line 29: | ||
A Github repository for the project is available at | A Github repository for the project is available at | ||
https://repos.gbar.dtu.dk/git/jcan/3d_wb_loc.git | |||
On a Linux computer this can be cloned as: | On a Linux computer this can be cloned as: | ||
git clone | git clone https://repos.gbar.dtu.dk/git/jcan/3d_wb_loc.git | ||
The softwares known bugs and issues can be found at [[3d Localization - Software issues]]. | |||
==Install software tools== | ==Install software tools== | ||
Line 27: | Line 45: | ||
==Network topology== | ==Network topology== | ||
[[File:Network flow.png|thumb|right|Network notification flowchart for anchor and tag]] | [[File:Network flow.png|350px|thumb|right|Network notification flowchart for anchor and tag]] | ||
The system is able to automatically register when new devices are joining the network, and as such automatically hand out network addresses to all new devices. This is done by having the tag issue a broadcast message once a second, in order to allow any new non-registered devices to answer back, letting the tag know there is an additional device available. The broadcast message is what's called a Blink message, which is actually just a very short message containing no info. | |||
The system is able to automatically register when new devices are joining the network, and as such automatically hand out network addresses to all new devices. This is done by having the tag issue a broadcast message once a second, in order to allow any new non-registered | |||
==Ranging== | ==Ranging== | ||
Line 49: | Line 66: | ||
[[File:Infrastructure-based-asset-tracking.png|800px|Infrastructure based asset tracking scheme based on asymmetric double-sided two way ranging (DS-TWR). Image taken from DW1000 User manual.]] | [[File:Infrastructure-based-asset-tracking.png|800px|Infrastructure based asset tracking scheme based on asymmetric double-sided two way ranging (DS-TWR). Image taken from DW1000 User manual.]] | ||
==Positioning== | ==Positioning== | ||
The 3d position of the tag can be estimated, through [https://en.wikipedia.org/wiki/ | [[File:trilat.png|300px|thumb|right|Trilateration example.]] | ||
The 3d position of the tag can be estimated, through [https://en.wikipedia.org/wiki/Multilateration multilateration] by using ranges to at least four different anchors. | |||
<br /> | <br /> | ||
Because there is noise in the distance estimations performed by the system, the multilateration has the issue of becoming an optimization problem. This is because there is no exact solution to the multilateration problem at hand, but there will exist a solution that minimizes the sum of the errors in the euclidean distances. Mathematically speaking that is a position solution (x,y,z) that will minimize the term (where r is the distance between the tag and the i'th anchor) | |||
[[File:Position-minimize.png]] | |||
Furthermore the complexity of the optimization tends to increase with more anchors being added into the system. | |||
There are a few ways to solve the optimization problem described above, some of which will be discussed here. | |||
====Nonlinear least squares optimization==== | |||
The direct way of solving the multilateration problem, would be through a least squares approximation. This is an iterative way of solving the problem in a purely non-statistical way, which means that it does not take into account what the previous solution was, and as such allows the tag to move an infinite distance between two consecutive samples. Another downside of the least squares method for solving the optimization problem, is that it is slightly harder to extend the system to provide more details, like velocity estimates. <br /> | |||
A nonlinear least squares implementation done in Matlab for the system, can be found in the ''Matlab'' folder in the github repository. Furthermore a paper on a non-iterative nonlinear least squares matrix solution to the multilateration problem can be found in ''Related papers/An Efficient Least-Squares Trilateration Algorithm for Mobile Robot Localization.pdf'' | |||
====Particle filter==== | |||
Another way of solving the optimization problem, is by utilizing a statistical particle filter, also known as a sequential Monte Carlo filter. The base idea of a particle filter, is that a number of "particles", containing a direction and a speed, is spawned in a distributed manner and is then perturbed, with the goal of having the particles converge towards the same point, with a unified direction and speed. <br /> | |||
The particle filter is a statistical filter, meaning that it takes into account the previous solutions found. <br /> | |||
The particle filter has '''not''' been implemented or tested for this project, but a sample implementation, in Python, of such filter for this specific use case can be found at [https://github.com/bitcraze/lps-ros https://github.com/bitcraze/lps-ros]. | |||
====Extended Kalman filter==== | |||
The last method of solving the optimization problem discussed here, will be the Extended Kalman filter. This way is, like the particle filter, a statistical filter capable of estimating a number of details about the system such as position, velocity and even accelerometer bias. | |||
As the Kalman filter is still not fully implemented, and thus not tested, this section still needs some information about the Kalman filter. | |||
===Sensor fusion=== | ===Sensor fusion=== | ||
Sensor fusion has still to be implemented in the project. The IMU on the tag is currently not used. | |||
==Limitations== | ==Limitations== | ||
Line 69: | Line 106: | ||
===Calibration=== | ===Calibration=== | ||
Because the system is based on time of flight measurements of radio waves, even a small change in the time stamps of the system will result in huge variations in distance (1 ns results in a change of 299 mm). This means that proper calibration of the system is crucial in order to obtain any usable performance. The main calibration property of the system is the antenna delay constants, a constant describing the delay from antenna through PCB. A detailed explanation of the antenna delay and how to calibrate it properly can be found in '''[http://www.decawave.com/support/download/file/nojs/552 APS014: Antennna Delay Calibration]''' | Because the system is based on time of flight measurements of radio waves, even a small change in the time stamps of the system will result in huge variations in distance (1 ns results in a change of 299 mm). This means that proper calibration of the system is crucial in order to obtain any usable performance. The main calibration property of the system is the antenna delay constants, a constant describing the delay from antenna through PCB. A detailed explanation of the antenna delay and how to calibrate it properly can be found in '''[http://www.decawave.com/support/download/file/nojs/552 APS014: Antennna Delay Calibration]''' | ||
===Range=== | |||
The range of the system varies tremendously, as a function of channel, header length, data rate, transmission power etc. A longer communication range usually means a lower data rate and a less accurate distance estimate of the system. With the configuration currently chosen for the system, the range is about 25 m, as the system is configured for the best distance approximation as possible. The relatively short range is however not a problem in this case, as the system is intended to be used indoors, where a room is seldom larger than 25 meters end-to-end. | |||
===Received signal strength bias=== | |||
The system seems to contain a ranging bias as a function of the received signal strength. The phenomena is discussed in '''[http://www.decawave.com/support/download/file/nojs/453 APS011: Sources of error in TWR schemes]''', where a proposed bias correction curve is given as well. Numerous measurements has been taken during this localization project, in order to see whether the antenna shielding of the anchors, changes the required correction curve. It has yet to be proved with absolute certainty, that the provided curve is in fact the best curve or the job, but for now it seems like the provided curve is accurate. The measurements for this conclusion can be found in ''Matlab/bias'' in the Github repository. | |||
==Results to date== | ==Results to date== | ||
Previous results can be found in the ''Related papers/Previous DTU projects'' folder in the Github repository. | |||
==Further work== | ==Further work== | ||
* Multiple tags | |||
*; The current implementation can only handle one tag in the system at a time. This limitation is due to the implemented ''infrastructure based asset tracking scheme'' seen in [[3D localization#Ranging]]. | |||
* Relative positioning | |||
*; It would be interesting to implement a way for tags to calculate relative positions, in order to allow robotic formations in an easy manner. | |||
* Peer-to-peer mesh ranging scheme | |||
*; Allow all of the devices to range to all other devices. | |||
* Message push-through option | |||
*; A structured way of utilizing the large data bandwidth of the system, in order to allow devices to exchange communication that is not ranging or position related. | |||
* Output API | |||
*; A proper API on how the host devices can acquire data from the tags, through I2C, USB, UART og SPI. Also allowing a data driven scheme with a physical interrupt pin. | |||
==Further reading== | ==Further reading== | ||
More resources on the subject can be found at: | |||
* [http://www.decawave.com/support http://www.decawave.com/support] (Requires free signup to download) | |||
* [https://groups.google.com/forum/#!forum/decawave_group https://groups.google.com/forum/#!forum/decawave_group] (Requires membership, everyone can obtain free membership) | |||
* The ''Related papers'' folder in github |
Latest revision as of 13:17, 20 July 2017
This page gives an overview of a three dimensional localization system developed. The system can be used in every scenario where it is wanted to obtain some sort of position or velocity information about something, whether it is for ground-truth information, control feedback, surveillance or the like. A few examples of such places could be:
- Robotic control position and velocity feedback, for autonomous usage
- Ground-truth to test other approaches
- Inventory tagging
- Personnel location information
- Intelligent transportation in regards to eg. smarter vehicles
The position and velocity estimates are available wherever they are needed, whether that is onboard the host as data extraction from the tag itself or at a specific anchor for data logging purposes.
Furthermore the system features extremely rapid deployment, as the anchors will be able to find their own position in a matter of seconds from first power. This means that the system can be set-up and ready to be used in a matter of minutes, without loss of accuracy.
The developed system, is intended to be used as closed-environment system, meaning that it is intended to not require anything of the host carrying the tag. This means that the system is extremely versatile and can be used almost anywhere, as the host is not required to run any timing specific software.
Hardware
The localization system at hand consists of at least four anchors and one tag.
The hardware design considerations, descriptions and overviews can be found at the Localization Hardware page.
Each device communicates and ranges with each other through an UWB (Ultra-wideband) radio.
The system can be used by placing the anchors at fixed known positions in the room, preferably in different heights, after which the system will measure the distance from each anchor to the tag. These distances can then be combined with the known position of the associated anchor, in order to estimate the absolute position of the tag in three dimensions. The position will be calculated locally on the tag, and can as such be used to eg. control a robot carrying the tag.
Software download
The source code for the system is available here. NB! the software source can not be compiled without the proper tool-chain (see Arm compiler environment for instructions on how to set this up)
A Github repository for the project is available at
https://repos.gbar.dtu.dk/git/jcan/3d_wb_loc.git
On a Linux computer this can be cloned as:
git clone https://repos.gbar.dtu.dk/git/jcan/3d_wb_loc.git
The softwares known bugs and issues can be found at 3d Localization - Software issues.
Install software tools
In order to modify the software, some tools are required.
- Arm compiler environment and tool-chain - Linux
- Localization Hardware
Network topology
The system is able to automatically register when new devices are joining the network, and as such automatically hand out network addresses to all new devices. This is done by having the tag issue a broadcast message once a second, in order to allow any new non-registered devices to answer back, letting the tag know there is an additional device available. The broadcast message is what's called a Blink message, which is actually just a very short message containing no info.
Ranging
In order to estimate the distance between an anchor and a tag, the system uses Time of Flight (TOF). There exists a number of ways to estimate a distance from exchanging packages with timestamps, all with different pros and cons, which has been discussed elaborately in the DW1000 User manual. In this project, it has been chosen to implement and use the double-sided two way ranging scheme as shown in the figure to the right. This method has the advantage that it is the best method for handling any clock skew between the two devices, this means that it will have a smaller impact on the range estimate, if the clock in one device is running slightly faster than the clock of the other device.
The average time of flight between the two devices can be calculated as
From this the distance can be calculated by multiplying the propagation time with the speed of light.
The DS-TWR ranging scheme mentioned above can then be extended through the use of broadcast messages, in order to minimize the required number of data exchanges between devices. One such way could be through the infrastructure based asset tracking scheme as implemented in this project. In this ranging scheme the tag sends a Poll message as a broadcast, which is received by a number of anchors (three in the following case) in the infrastructure. Each anchor then replies in successive responses with packets RespA, RespB & RespC after which the tag, sends the Final message as a broadcast again, received by all three anchors. This allows the tag to be located after sending only 2 messages and receiving 3 (including another 3 if the distances are needed on the tag).
This scheme is illustrated in the figure below. This represents a substantial saving in message traffic, thereby saving battery power and air-time, while increasing potential update rate.
Positioning
The 3d position of the tag can be estimated, through multilateration by using ranges to at least four different anchors.
Because there is noise in the distance estimations performed by the system, the multilateration has the issue of becoming an optimization problem. This is because there is no exact solution to the multilateration problem at hand, but there will exist a solution that minimizes the sum of the errors in the euclidean distances. Mathematically speaking that is a position solution (x,y,z) that will minimize the term (where r is the distance between the tag and the i'th anchor)
Furthermore the complexity of the optimization tends to increase with more anchors being added into the system.
There are a few ways to solve the optimization problem described above, some of which will be discussed here.
Nonlinear least squares optimization
The direct way of solving the multilateration problem, would be through a least squares approximation. This is an iterative way of solving the problem in a purely non-statistical way, which means that it does not take into account what the previous solution was, and as such allows the tag to move an infinite distance between two consecutive samples. Another downside of the least squares method for solving the optimization problem, is that it is slightly harder to extend the system to provide more details, like velocity estimates.
A nonlinear least squares implementation done in Matlab for the system, can be found in the Matlab folder in the github repository. Furthermore a paper on a non-iterative nonlinear least squares matrix solution to the multilateration problem can be found in Related papers/An Efficient Least-Squares Trilateration Algorithm for Mobile Robot Localization.pdf
Particle filter
Another way of solving the optimization problem, is by utilizing a statistical particle filter, also known as a sequential Monte Carlo filter. The base idea of a particle filter, is that a number of "particles", containing a direction and a speed, is spawned in a distributed manner and is then perturbed, with the goal of having the particles converge towards the same point, with a unified direction and speed.
The particle filter is a statistical filter, meaning that it takes into account the previous solutions found.
The particle filter has not been implemented or tested for this project, but a sample implementation, in Python, of such filter for this specific use case can be found at https://github.com/bitcraze/lps-ros.
Extended Kalman filter
The last method of solving the optimization problem discussed here, will be the Extended Kalman filter. This way is, like the particle filter, a statistical filter capable of estimating a number of details about the system such as position, velocity and even accelerometer bias.
As the Kalman filter is still not fully implemented, and thus not tested, this section still needs some information about the Kalman filter.
Sensor fusion
Sensor fusion has still to be implemented in the project. The IMU on the tag is currently not used.
Limitations
The system does come with a few limitations, which will be discussed below.
Line of sight (LOS)
The most important limitation is that it is very sensitive to line of sight (LOS). This means that the tag trying to localize itself, should always have pure line of sight to at least 4 anchors, which is why it is recommended to run the system with 6 or more anchors, as this would give the system redundancy. It is possible to get a clue about whether the most recent range measurement was taken in a line of sight situation or not, by looking at the quality of the measurement. This quality is a combination of the received power level and the first path power level, and is discussed further in the DW1000 User manual on page 45.
Calibration
Because the system is based on time of flight measurements of radio waves, even a small change in the time stamps of the system will result in huge variations in distance (1 ns results in a change of 299 mm). This means that proper calibration of the system is crucial in order to obtain any usable performance. The main calibration property of the system is the antenna delay constants, a constant describing the delay from antenna through PCB. A detailed explanation of the antenna delay and how to calibrate it properly can be found in APS014: Antennna Delay Calibration
Range
The range of the system varies tremendously, as a function of channel, header length, data rate, transmission power etc. A longer communication range usually means a lower data rate and a less accurate distance estimate of the system. With the configuration currently chosen for the system, the range is about 25 m, as the system is configured for the best distance approximation as possible. The relatively short range is however not a problem in this case, as the system is intended to be used indoors, where a room is seldom larger than 25 meters end-to-end.
Received signal strength bias
The system seems to contain a ranging bias as a function of the received signal strength. The phenomena is discussed in APS011: Sources of error in TWR schemes, where a proposed bias correction curve is given as well. Numerous measurements has been taken during this localization project, in order to see whether the antenna shielding of the anchors, changes the required correction curve. It has yet to be proved with absolute certainty, that the provided curve is in fact the best curve or the job, but for now it seems like the provided curve is accurate. The measurements for this conclusion can be found in Matlab/bias in the Github repository.
Results to date
Previous results can be found in the Related papers/Previous DTU projects folder in the Github repository.
Further work
- Multiple tags
- The current implementation can only handle one tag in the system at a time. This limitation is due to the implemented infrastructure based asset tracking scheme seen in 3D localization#Ranging.
- Relative positioning
- It would be interesting to implement a way for tags to calculate relative positions, in order to allow robotic formations in an easy manner.
- Peer-to-peer mesh ranging scheme
- Allow all of the devices to range to all other devices.
- Message push-through option
- A structured way of utilizing the large data bandwidth of the system, in order to allow devices to exchange communication that is not ranging or position related.
- Output API
- A proper API on how the host devices can acquire data from the tags, through I2C, USB, UART og SPI. Also allowing a data driven scheme with a physical interrupt pin.
Further reading
More resources on the subject can be found at:
- http://www.decawave.com/support (Requires free signup to download)
- https://groups.google.com/forum/#!forum/decawave_group (Requires membership, everyone can obtain free membership)
- The Related papers folder in github