User Tools

Site Tools


doc:lps:tdoa3:implementation

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
doc:lps:tdoa3:implementation [2018-11-06 15:13]
kristoffer
doc:lps:tdoa3:implementation [2020-05-12 14:04]
kimberly
Line 1: Line 1:
 +<WRAP center round important 60%>
 +This page has deprecated and moved to the new documentation framework of the main Bitcraze website. Please go to [[https://www.bitcraze.io/documentation/system/]]
 +</WRAP>
 +
 ====== TDoA 3 implementation ====== ====== TDoA 3 implementation ======
  
-This page contains an overview of the TDoA 3 implementation. For details, please see the code in the Crazyflie firmware and the LPS node firmware.+This page contains an overview of some of the features in the TDoA 3 implementation. For details, please see the code in the Crazyflie firmware and the LPS node firmware.
  
 ==== Clock correction ==== ==== Clock correction ====
  
 The different clocks in the system are drifting and it is important to keep track of the drift of other clocks, we call this clock correction. The different clocks in the system are drifting and it is important to keep track of the drift of other clocks, we call this clock correction.
-The clock drift is caused by temperature changes in the clock crystals and is a slow process, and this is a property that we explore to handle errors.+The clock drift is caused by temperature changes in the clock crystals and is a slow process, and this is a property that we explore to detect errors.
  
 We try to measure the ratio of the frequency of the remote clock VS the local clock. This is done by looking at two packets from the remote anchor and dividing the delta of the We try to measure the ratio of the frequency of the remote clock VS the local clock. This is done by looking at two packets from the remote anchor and dividing the delta of the
 receive timestamps (local clock) with the delta of the transmit timestamps (the remote clock). The assumption is that the distance to the remote anchor has note changed and that the receive timestamps (local clock) with the delta of the transmit timestamps (the remote clock). The assumption is that the distance to the remote anchor has note changed and that the
-time of flight of the radio waves therefore is constant. This is not entirely true for a moving Tag, but if the packet rate is high enough, the error will be small enough.+time of flight of the radio waves therefore is constant. This is not entirely true for a moving Tag, but if the packet rate is high enough, the error will be small and can be ignored.
  
 There are many other error sources (packet loss, reflections, delays through objects and packet collisions for instance) that will effect the clock correction significantly though but since There are many other error sources (packet loss, reflections, delays through objects and packet collisions for instance) that will effect the clock correction significantly though but since
Line 16: Line 20:
 The accepted values are low pass filtered to smooth the estimated clock correction. The accepted values are low pass filtered to smooth the estimated clock correction.
  
-Finaly there is also a "leaky bucket" (a counter) that is used to reset the clock correction mechanism if there have been too many outliers lately. This might indicate that the current clock+Finally there is also a "leaky bucket" (a counter) that is used to reset the clock correction mechanism if there have been too many outliers lately. This might indicate that the current clock
 correction is wrong and we have to start over. correction is wrong and we have to start over.
  
Line 22: Line 26:
  
 TDoA 3 is designed to handle a dynamic number of anchors. Since we must store data about anchors in the system, both in the anchors as well as in the Tags, TDoA 3 is designed to handle a dynamic number of anchors. Since we must store data about anchors in the system, both in the anchors as well as in the Tags,
-there is dynamic storage functionality. There is a limited number of slots for anchor data and the anchor id is used as a key to access the data.+there is dynamic storage functionality. It has a limited number of slots for anchor data and the anchor id is used as a key to access the data.
 This sets a limit on how many remote anchors that can be handled by an Anchor or Tag. The assumption is that there should not be more than 15-20 anchors visible This sets a limit on how many remote anchors that can be handled by an Anchor or Tag. The assumption is that there should not be more than 15-20 anchors visible
 to a device at one time. to a device at one time.
Line 31: Line 35:
 ==== Error management ==== ==== Error management ====
  
-The first line of defence is the outlier detection in the clock correction step. It keeps the clock correction tidy but also indicates that the packets are suspicious, and +The first line of defence is the outlier detection in the clock correction step. It keeps the clock correction tidy but also indicates whether a packet is suspicious or not. Data in suspicious packets is not used in the system.
-data in these packets is not used in the system.+
  
 The second line of defence is to look at sequence numbers. If sequence numbers are not consecutive in received packets, special action has to be taken to handle it. It is for instance The second line of defence is to look at sequence numbers. If sequence numbers are not consecutive in received packets, special action has to be taken to handle it. It is for instance
 important when calculating TDoA to make sure we use timestamps from the same packets in all steps. important when calculating TDoA to make sure we use timestamps from the same packets in all steps.
  
-The third line of defence is to check that the TDoA value we got is physically possible. The TDoA value can never be greater than the distance between the two anchors +The third line of defence is to check that the TDoA value we have calculated is physically possible. The TDoA value can never be greater than the distance between the two anchors 
-used for the measurement. If the value is larger it is discarded.+used for the measurement and value that are larger are discarded.
  
-The Final check if TDoA value fits the current estimated position. If the TDoA value is too far away it is likely that there has been an error and the value is discarded,+The Final check is to verify that a TDoA value fits the current estimated position. If the TDoA value is too far away it is likely that there has been an error and the value is discarded,
 if it is deemed to be good it is fed into the position estimator for further processing. if it is deemed to be good it is fed into the position estimator for further processing.
 In this step there is also a mechanism that tries to determine if there are "too many" outliers, which could indicate that the estimated position is wrong. This makes the outlier In this step there is also a mechanism that tries to determine if there are "too many" outliers, which could indicate that the estimated position is wrong. This makes the outlier
-detector less picky (letting more TDoA samples through) and accepts larger errors to enable the position estimator to converge again.+detector less picky and accepts larger errors (letting more TDoA samples through) to enable the position estimator to converge again.
doc/lps/tdoa3/implementation.txt · Last modified: 2020-05-12 14:04 by kimberly