Skip to main content
Skip table of contents

Quantifying Measurement Time and Latency in the ZeroKey System

Introduction to the ZeroKey Quantum RTLS

ZeroKey Quantum RTLS uses a combination of radio transmissions and ultrasonic pulses to produce highly accurate Mobile positions. This makes it ideal for applications such as industrial automation and asset tracking. However, like any positioning system, it is important to be aware of system timing and potential sources of latency.

Evaluating Latency Between ZeroKey and a Reference System with Sample Code

When conducting a detailed comparison between the ZeroKey Quantum RTLS and a third-party reference system, it is important to consider several factors. These include internal measurement latency, clock alignment, communication latency, and other timing variables. The following steps provide a technical approach to align these systems effectively, but the logic required to account for each of these factors will depend on how the third-party system functions and reports timestamped data.

Sources of Latency in ZeroKey Quantum RTLS

Signal Processing: The system involves complex signal processing algorithms to interpret the ultrasonic signals from each Mobile to calculate its precise position. This computation inevitably introduces latency, which can slightly vary depending on the environment. The time required for this end-to-end position calculation depends on the device’s settings and positioning method. In a typical use case, with Quantum RTLS 2.0 firmware and inertial fusion, this process takes between 20 to 50 milliseconds. You can view and adjust the exact settings through device profiles in the ZeroKey dashboard.

Data Transmission: Data collected by the system’s sensors must be transmitted to a central hub; for Quantum RTLS, this is the ZeroKey Gateway. Under typical conditions, this has a negligible impact on latency (less than a millisecond).

Network Latency: When the ZeroKey system is integrated with a broader network, such as a cloud-based system for data analytics and storage, additional latency can occur due to the time required for data to travel between the local network and remote servers. The latency will range from 5-10 microseconds per hop for unmanaged switches and 1-10 milliseconds per hop for routers in the network. Additional latency will be added for any external network services or cloud integration the system may be connected to.

Quantifying Measurement Time within the ZeroKey System

The ZeroKey system provides two main outputs with which you can see and quantify time: the time of localization and the time of the ultrasonic pulse.

Time of Localization: Each position update includes time and date information, indicating the exact moment the localization was received by the ECD, with a resolution of 0.1 milliseconds.

This entry is the very first piece of information presented in each position update.

Timestamp: 2024-07-17T16:07:57.7256Z

  • The Timestamp indicates that this localization was received by the ECD on July 17th, 2024, at 16:07 hours and 57.7256 seconds, Greenwich Mean Time (GMT).

Time of Ultrasonic Pulse: Each ultrasonic position update in the Gateway includes a value labelled as toffset.

This measures the time in microseconds from when the ultrasonic pulse was transmitted to when the Mobile calculated its current position and sent it to the Gateway.

ts represents the time in microseconds from when the system was first started.

toffset: 129450

  • Indicates that it took 129,450 microseconds, or approximately 129.5 milliseconds, for the Mobile to calculate its position after transmitting its ultrasonic pulse.

ts: 456779496 toffset: 129450

  • Determine the exact time that the Mobile transmitted its ultrasonic pulse by subtracting the toffset from the ts value.

  • In this case, it is 456,650,046 microseconds, or 456.650 seconds, after the system was first started.

Using the Sample Code

Test Setup Assumptions

Ensure that both the ZeroKey and third-party system capture positional data simultaneously and are referencing the transducer of the Mobile.

Reference data must be timestamped for accurate comparison.

Preparing Your ZeroKey and Reference Data

ZeroKey System Data: Create a connection to the ZeroKey API or MQTT with a PC that will be common for controlling both the ZeroKey and reference system. Ensure the data log that you are recording from the ZeroKey system includes the timing information from the common PC. The provided MatLab code will use this during initialization to align the two systems. An example of this timing information can be seen in the example data included in the sample code download.

Reference System Data: Ensure that the reference system can establish a data logging connection to the common PC that is also connecting with the ZeroKey system and that the timing information is being added to the logs of the reference system.

Determine the method that the reference system uses to display its timing information for use when setting up the parsing in the sample code.

Using the Example Octave/Matlab Code

Download the script using the link provided. To adapt this script for use with your dataset, the main modifications and elements you will need to check are:

  1. File Paths for Ground Truth and ZeroKey Data:

    1. Update the GTDataFileBase and ZeroKeyDataFileBase variables in the Settings section to reflect the directory and base filenames of your ground truth and ZeroKey data files. For example:

      • GTDataFileBase = 'YourPath\YourGTFileBase';

      • ZeroKeyDataFileBase = 'YourPath\YourZKFileBase';

  2. Static Points and Sample Count:

    1. Modify StaticPoints to match the number of static points in you wish to use from the dataset.

    2. Adjust SamplesToAverage based on the number of samples you want to use for averaging in each file.

  3. Ensure Parsing Functions are Compatible:

    1. Review the ParseGTDataFile and ParseZeroKeyDataFile functions to ensure the file format matches your data structure. These functions assume specific field order and format, which may differ for other datasets depending on the reference system used.

  4. Toolbox Availability:

    1. This script relies on the Image Processing and Computer Vision toolboxes for functions like estgeotform3d. If you lack these toolboxes, it is recommended that you use MATLAB Online.

  5. Optional Visual Adjustments:

    1. The script includes several plots for visualization, which you may modify for clarity or to adjust the title, labels, or point markers.

These configurations will ensure that the script functions correctly with your sample data.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.