Our UWB project was originally a supporting sub-project of another project of Guiyang Jinglin Company. As the project progressed, we separated UWB as a separate product, initially called "Jinglin Real-time Location System". Later, the company adjusted and put the UWB project under the name of "Guiyang Lianchuang Intelligent Network Technology Co., Ltd." and the product name was changed to "Lianchuang Real-time Location System".

The UWB project started at the end of 2015 and stopped in October 2021, lasting for nearly 6 years.

Using DecaWave DW1000 as the UWB transceiver and location using the TDOA method, the accuracy reaches about 10~30cm, and there are actual application cases.

1. Project Overview

The minimum system consists of 3 (or 4) Anchors and some tags. The tags send out location signals. After receiving the location signals, the anchors send them to the location engine. The location engine calculates the coordinates of the tags based on the time difference of the location signals. One of the anchors also serves as a clock source and is responsible for providing clock synchronization signals to other anchors.

Multiple location areas can be combined into one large location area to increase coverage.

1.1.  Hardware

Location Anchor: POE power supply, Ethernet network connection, DW1000 with LNA/PA, STM32 main control, a full set of SCH/PCB files for the anchor, as well as PCBA samples and finished anchor products can be provided

Location Tag: STM32 main control, DW1000 with LNA, charging circuit, MPU 6050 three-dimensional accelerometer, brightness detection, power detection, alarm switch, low power consumption design (standby current 15uA), two styles of bracelet and namecard are available A complete set of SCH/PCB files, as well as PCBA samples, finished products, and bracelet molds

1.2.  Software

1.2.1.  Firmware

The bootloader and application source code(C Language) of The Anchor, Can update the firmware through the network. The firmware uses AES encryption.

The Tag's bootloader and application source code (C language), can update the firmware via USB, and the firmware uses AES encryption.

1.2.2.  RealTime Location Engine(RTLE)

RTLE source code(C++),Interface protocol and Java interface program, and interfaces in other languages can be developed according to the protocol

1.2.3.  Desktop configuration Program

The Dephi code of the Anchor configuration program and the Delphi code of the Tag configuration program.

1.3.  Important Technology

(All developed independently and with full copyright):

  • The clock synchronization algorithm of the anchor keeps the clock error between anchors at the ps level.
  • TDOA location algorithm calculates coordinates based on time difference and can work in 1D, 2D, and 3D modes
  • Correction algorithm to correct fixed errors in specific scenarios
  • Multiple filter algorithms to filter interference to adapt to different use scenarios
  • Multi-region switching algorithm, integrating multiple factors (coordinates, signal strength, acceleration, etc.) for regional judgment switching

1.4.  Products under development

Wireless network connection Anchor (433M wireless, WiFi, 5V power supply, wirelessly transmits wireless location data to the server, convenient for anchor deployment in non-fixed environments such as tunnels and mines),

Hand-in-hand (cascade) POE Anchor(the anchor integrates POE power receiving, POE power supply, and network switches, and formally connects all anchors in series on a network cable to reduce construction costs) <— Completed and mass-produced. Cascadable anchors greatly reduce network cabling costs.

1.5.  Adaptable to harsh environments

In one of our actual cases, the user's location environment has metal walls. The six walls of the room are all metal plates. Some rooms have glass windows. Theoretically, such an environment is very harsh because metal walls have a negative impact on wireless signals. The reflection will cause great interference in location. We have made special optimizations for this, and the location accuracy is basically within 50cm.

2.  Important Technical Introduction

2.1.  Overview of Precise Location Technology

There are currently many location methods, which can basically be divided into three categories: signal strength, flight time, and direction angle.

Currently, WiFi location, Bluetooth location, and Zigbee location on the market all use signal strength location. They determine distance based on the signal strength emitted by the tag. Because there are many environmental factors that affect signal strength, using signal strength to locate is basically unreliable.

Time-of-flight (TOF) location uses the time it takes for radio waves to fly from the tag to the anchor to calculate the distance from the tag to the anchor. All current precise ranging or location uses this technology, such as laser location and UWB location.

Direction angle location is to determine the direction angle between the tag and the anchor based on the signal sent by the tag, and then use the angle to solve the equation to calculate the coordinates. Because the measurement of this direction angle is very difficult, there are no products using this technology on the market.

Another category is existence detection. For example, RFID location deploys a large number of RFID readers in the location area, and the system determines the coordinates of the tag based on the position of the reader that last read the information. Some Bluetooth location also uses signal strength and similar massive deployment of anchors to increase location accuracy.

Time of flight (TOF) location is divided into two types: two-way ranging (TWR) and time of flight difference (TDOA).

TWR sends a location signal through the tag. After the anchor receives it, it sends a reply. After the tag receives the reply from the anchor, it calculates the distance from the tag to the anchor based on the time it takes for the signal to travel back and forth in the air. Then solve the equation to calculate the coordinates of the tag based on the distance from the tag to each anchor. This technology requires that the tag cannot be in a dormant state most of the time. For example: assuming there are 3 anchors, the tag must measure the distance to these 3 anchors each time it is positioned, that is, 3 ranging measurements must be performed; each ranging measurement sends a data packet and waits for a response from the designated anchor, that is There are at least 2 data packets for each range measurement. Each location requires at least 6 data packets. Moreover, if there are more tags, signal collisions will occur, and more data packets will need to be sent. Because each ranging, the tag cannot go to sleep after sending the data packet, and must wait for a reply from the anchor. In this way, it takes a long time to complete a location. During this period, the tags are in working state, which is a big problem in terms of power consumption.

The principle of time-of-flight TDOA location is that the tag sends a location signal. After each anchor receives this signal, the system calculates the coordinates of the tag based on the time difference between each anchor receiving the signal. This process seems very simple. Each location only requires the tag to send a data packet. The tag is usually in a dormant state. It wakes up regularly to send a location signal and then goes to sleep again, which is very power-saving. TDOA is currently the most practical precision location solution.

TDOA has at least two thresholds: clock synchronization and algorithm for calculating coordinates.

Because in order to obtain the time difference, it is necessary to ensure that the starting point of time of each anchor is the same, which requires clock synchronization.

There are many algorithm theories for calculating coordinates, but it is difficult to turn them into programs.

There are many companies that want to engage in TDOA location, but are blocked by these two thresholds.


2.2.  Clock Synchronization

To ensure that each anchor has a unified time standard, time synchronization is required.

We can roughly calculate the required accuracy based on the relationship between frequency and time.

The propagation speed of radio waves in the air is equal to that of light beams, and the speed of light is 299702547 m/s.

The distance traveled by light in 1ms is 299702.547m

The distance traveled by light in 1us is 299.702547m

The distance traveled by light in 1ns is 0.299702547m=29.97cm

The distance traveled by light in 1ps is 0.000299702547m=0.02997cm

To ensure that the location accuracy is within 30cm, we must at least ensure that the time error of the base station is less than 1ns/2, that is, 500ps.

Due to technical and experimental environment limitations, it is difficult to directly test the time error between anchors. The technical indicator that our time synchronization technology can achieve is that within 250ms, the time difference between the anchor and the standard clock is less than 10ppm.

We set synchronization every 250ms. During each synchronization, the time difference between the anchor and the standard clock is within 10 parts per million. In fact, most anchors can reach within 5ppm.

The clock of the anchor is provided by the crystal oscillator used by DW1000. The crystal oscillator itself has manufacturing differences and will have a difference in oscillation frequency, that is, there is a difference between its nominal frequency and the frequency it outputs when it is working. The crystal oscillator itself also has stability problems. Temperature, voltage, physical vibration, air pressure, etc. will all affect the frequency of the crystal oscillator.

We have done an experiment. When the anchor is not installed in the chassis and works as a bare PCBA board, when someone passes by the anchor, the crystal oscillator frequency of the anchor changes greatly. The performance is that the clock synchronization difference during normal operation is about 5ppm. When someone passes by, the difference suddenly reaches tens of ppm.

We use wireless clock synchronization. Use a standard clock to send out synchronization signals periodically (can be configured within 50ms~1000ms), and the anchor synchronizes its own clock based on the received clock synchronization signal.

(Before the start of this project, we contacted Decawave. The manufacturer also has a wireless clock synchronization solution, but it requires payment. The manufacturer's business representative quoted a price of US$200,000, and only provided a text description of the solution and part of the code, without the complete code)


2.3. Location Algorithm

There are many theories on TDOA's location algorithm. If you search casually, you can find at least 100 or more papers. These papers will all say that their algorithms are better than other people's algorithms, and there will be various charts to prove that they are very powerful. Then bring a bunch of incomprehensible mathematical formulas.

We have studied many papers and written multiple location algorithms. After a lot of testing, the algorithm we finally adopted may not be optimal, but it is the fastest and most accurate we can currently achieve.

In short, we currently have a practical algorithm for calculating coordinates with completely independent intellectual property rights, and every line of code is written by us.

2.4. Correction Algorithm

Many times, the calculated coordinates have errors. There are many factors that affect errors, and errors can be divided into two categories: fixed errors and dynamic errors.

Fixed error. For example, there are some large metal objects in the location area, which will affect location. One of our customers' site is a metal shielded room, with four walls and ceiling made of metal panels, and one wall with glass windows. The location is accurate in other locations in the room, but there is a deviation near the glass window, and this deviation is fixed. When the tag moves along the parallel line of the glass window, the calculated line connecting the coordinate points is a straight line at points far away from the glass window, but will form a concave shape near the glass window.

For fixed errors, we have corresponding correction algorithms. By setting some reference points, the coordinates are corrected by these reference points. In principle, coordinates that are close to the reference point are greatly affected by the reference point; coordinates that are far from the reference point are less affected by the reference point. Similar to how the surface of an elastic balloon changes under the influence of force.

In actual field testing, this algorithm has a very good correction effect.

dynamic error. For example, due to air flow, changes in temperature and humidity, other radio wave interference, obstruction when people move around, etc., these influencing factors change at any time, and the interference is not continuous. We use a variety of filters to exclude these interferences.

2.5.  Filter Algorithm

We have developed several filter algorithms.

Average filter, Kalman filter, acceleration filter, etc.

These filters have only one purpose, which is to eliminate dynamic error effects. For different usage scenarios, different filters or filter combinations can be used, and different filter parameters can be configured.

2.6.  Multi-Area Switching Algorithm

Because of the characteristics of ultra-wideband, the national radio management department limits the transmission power of signals, which makes it impossible for a single location area to be too large. Therefore, there is rarely a single area location at the customer site. Generally, the area that the customer needs to locate is divided into multiple location areas according to the on-site conditions, and multiple small location areas are eventually merged into one large area. This involves switching the location area.

The switching of the location area is similar to the WIFI coverage in a large area, and the WIFI client switches between multiple APs.

For example, each room is divided into a location area, and the corridor is divided into a location area. Then the tag comes out of one room, passes through the corridor, and then enters another room, which involves switching between three areas.

Because of the characteristics of UWB, when the tag is outside the location area (the polygon surrounded by the anchor), the location accuracy will decrease. If there is a wall blocking it, the signal may even be interrupted, making location impossible.

If the wall is made of metal, it will also cause reflection and refraction of radio waves. These factors will lead to location errors. For example, there are two adjacent rooms with metal walls and a glass window in the middle. When the tag is near the glass, due to the refraction of radio waves, the next room will also receive the location signal, and the calculated coordinates will be the next room. At this time, both rooms think that the tag is in their own room. The system needs to determine which area the tag is in and which coordinates are correct.

Our multi-area switching algorithm incorporates multiple indicators, such as signal strength, historical coordinates, acceleration, etc., to achieve the best switching effect.

3.  Technological Evolution

The following technical evolution is introduced. Due to confidentiality reasons, more technical details cannot be introduced.

3.1.  Clock Synchronization

Possible technical developments of clock synchronization technology include:

Selection of DW1000 crystal oscillator (voltage control, temperature compensation, constant temperature, voltage-controlled crystal oscillator control voltage and clock synchronization algorithm linkage)

Wired synchronization, using coaxial cable, each anchor uses the same crystal oscillator as the clock source

3.2.  Location Algorithm

Further optimization to increase calculation speed and reduce memory consumption

3.3.  Correction Algorithm

Further optimization to increase calculation speed

3.4.  Multi-Area Switching

Add more reference factors to achieve more accurate judgments

4.  Introduction to Important System Components and Functions

4.1.  Clock Source

The clock source is responsible for providing clock synchronization signals to anchors in the area. It periodically transmits clock synchronization signals and does not receive them.

In the current mass-produced version, the clock source is exactly the same as the anchor hardware. It can be configured to act as a clock source or anchor. Some models in the future will be different from the anchor in that a PA will be added to the wireless output part to enhance the output power and be used in special scenarios.

In early systems, we used separate time source hardware. Because the hardware of the clock source and the anchor are exactly the same, in the current version, we support the anchor to be used as a clock source at the same time, which can save one anchor hardware in each location area.

4.2.  Anchor

The anchor is the core of the system. It is responsible for receiving the clock synchronization signal from the clock source and keeping the clock consistent with the clock source.

The anchor receives the location signal sent by the tag and transmits the time when the location signal is received to the server (RealTime Location Engine, RTLE) through the network.

The anchor only receives signals, not sends them. The current mass-produced version of the anchor has exactly the same hardware as the clock source, and can be configured to function as a anchor or as a clock source.

The main control chip of the anchor is STM32, which is powered by POE and connected to Ethernet through the W5500 chip.

The anchor program has two parts: Bootloader and Firmware. Firmware can be updated via the configuration program.

The anchor or clock is a standard TCP/IP device in the network. It can assign an IP address through a DHCP server or specify an IP address.

The anchor has the function of automatically discovering servers (RTLE). In complex network structures, the IP address of the server can also be specified.

In a simple application scenario, the anchor can be used without configuration and power on. It applies for an IP address and discovers servers by itself.

There is a desktop program that allows customers or field engineers to configure various functions of the anchor and upgrade the anchor firmware through the network.

Before the anchor leaves the factory, we have two procedures to process it:

One is the anchor initialization program, which assigns EUI64 addresses, MAC addresses, etc. to it.

The other is the anchor calibration program, which calibrates certain parameters of the anchor.

4.3.  Tag

Tags are locations targeted by the system. It usually sleeps, wakes up periodically to send location signals, and then goes to sleep again.

There are currently two types of tags in mass production: name-card and bracelets. The tag circuits of these two styles are almost the same, but the PCB is different due to structure and volume. The only difference in the circuit is that the name-card style tag has an extra wireless charging circuit.

The tag also uses STM32 as the main control MCU, DW1000 as the wireless transceiver, lithium battery power supply, with MPU6050 three-dimensional accelerometer, a button as an alarm or anti-tamper, brightness detection, battery voltage, charging voltage detection, and charging indication LED. . There is a USB port for charging or configuration.

The USB interface of the bracelets style tag uses magnetic terminals to connect and does not have wireless charging function.

The work style USB interface uses standard MicroUSB and has a standard QI wireless charging receiving circuit.

The minimum power consumption of the tag when sleeping is 15uA.

We provide a desktop version of the configuration program, and customers or on-site engineers can configure the tag parameters.

Before the tag leaves the factory, there is an initialization program that assigns the EUI64 address to the tag. and recorded in the company's database.

4.4.  RealTime Location Engine

The location engine runs on the server and is coded in Java.

The released version is compiled into EXE using ExcelsiorJET and is compatible with Windows/Linux platforms. The latest version of the RTLE is written in C++17 and can run on Windows as a command line program or installed as a Windows service. The program can be slightly modified to run on Linux.

The main task of the location engine is to receive the location data packet sent by the anchor and calculate the coordinates of the tag.

The area to be positioned is divided into multiple location areas according to on-site conditions, and a package location system (1 clock source, 3 or 4 or 5 anchors) is deployed in each location area.

The location engine will calculate the time when a certain number of location data packets sent by each tag are received by each anchor, calculate the time difference, and solve the equation according to the location algorithm to calculate the coordinates of the tag. According to the correction algorithm, more accurate coordinates of the tag are obtained, and then according to the multi-region switching algorithm, the calculated coordinates of the correct area are selected.

During the above processing, the data is processed by applying the corresponding filter appropriately according to the configuration.

There are two types of final output data: location coordinates and location messages.

Location coordinates: The final calculated label coordinates after the complete processing process. For each tag, wireless location data packets are periodically sent to the air, and each data packet has an ID. After the coordinates are calculated, the interface program will be notified internally by the system. The units of the output coordinate data can be configured as meters (x/y/z coordinate meters relative to the coordinate origin), longitude and latitude (the longitude and latitude of the coordinate origin need to be configured in advance).

Location message: After the anchor receives the location data packet from the tag, it will be sent to the engine. The engine will immediately generate an event and notify the interface program. Sometimes, for some reason, the location data packet sent by the tag is not received by every anchor. When the data is incomplete, the coordinates cannot be calculated. But these location data packets are also meaningful. They contain some information about the tag, such as the signal strength when the corresponding anchor receives the signal (which can roughly determine how far the tag is from the anchor), the battery voltage/charging voltage of the tag, Three-dimensional accelerometer data, etc.

4.5. Client Program

In order to facilitate customer integration, we provide a client program (Java program based on the Web).

The client program uses Tomcat as the container on the server side, and the user uses a browser to access it.

There are two ways to express location results: two-dimensional and three-dimensional.

Two-dimensional method: We provide Openlayers (an open source standard GIS front-end) as the map front-end. Customers can load their own maps as base maps, and users can see the coordinates of labels on the map in real time.

Three-dimensional method: We provide Cesium as a 3D front-end, which can load the 3D model of the customer's site and display the positioning target in the 3D scene in real time.

Because the Z coordinate calculation of 3D is inaccurate and the practical value of 3D is not great, we have canceled the 3D display.

4.6.  Interface (Protocol) Program

Because the final release of the location engine is a separate program, we use a TCP port to communicate with the external application.

The interface protocol includes two-way synchronization of configuration data such as engine parameters, anchors, tags, areas, and clock sources. It also includes location data notifications, message notifications, etc.

At present, we have implemented a Java client (application) and open source it to customers.

If customers need it, they can also write their own client interface programs using their favorite languages, such as Delphi, C, Python, etc.


5.  A Note on Accuracy

Some one advertise that their systems have cm-level accuracy and can be within 10cm, which looks very impressive.

In fact, simply talking about accuracy is meaningless.

Assume that under normal circumstances, the coordinates we calculate for each location have an error of 50cm. This error can be to the left, right, front, or back. In any case, it is always normally distributed near the correct coordinates. If we directly output this coordinate, we will find an error of 0cm~50cm. But if we calculate 1000 times and then average the coordinates of these 1000 times, the error will become about 50/1000 cm (the calculation here is not rigorous, because there are always cases of deviation in a certain direction), completely within 1cm Within.

Therefore, when talking about accuracy, there must be limitations.

6.  Cost Analysis

As far as we know, many companies have plans to enter this field. However, due to technical threshold restrictions, not many companies actually entered this field.

Let's analyze how much it costs to invest in this project.

The minimum staffing of the project team is approximately as follows: 4 software engineers (1 embedded development, 1 server engine development, 1 client program development, 1 desktop program development), 2 hardware engineers, 1 technical director principal. 7 people in total.

Assume that the average salary is RMB10,000 yuan per person, and the annual salary is RMB 840,000 yuan. If the speed is fast, results may be produced within 2 years; if the speed is slow, results may be produced in 3 years. In any case, with such staffing, it will take at least 3 years to reach a finished product that can be delivered to customers. The staff salary for three years is RMB 2.52 million.

If other expenses are added, such as shared management expenses (manager, finance, associate salary expenses), rent, water and electricity, social security and medical insurance, etc., it will at least double, that is, RMB 5.04 million.

The components and samples required for development only cost tens of thousands of yuan, which can basically be ignored.

Please note that after you pay RMB 5 million yuan, this project may not be successful. Maybe you will get stuck by a technical obstacle and it will take more time, which means you will spend more money.

We calculated this figure of RMB 5 million yuan because we spent so much money.

By selling the UWB technology we own, we do not expect to recover all of our investment. We just don't want these gains to go to waste.

7.  What You Will Get

What we handed over includes the following:

Product introduction documentation. Including our external publicity documents, videos, etc.

Product development documentation. Documents related to product development.

Product Source Code. All software codes related to the product, ensuring that you can compile the final executable program based on these codes.

Hardware schematic diagram and PCB diagram. Ensure that you can directly produce PCB and SMT according to the PCB diagram.

Hardware procurement channels. Make sure you can purchase the relevant components.

Relevant factory handover. Including manufacturers involved in housing production, PCB production, SMT, etc. to ensure that you can quickly enter production status.

Production process description. Including product testing, initialization, calibration, etc., to ensure that you can deliver qualified products to customers.

If necessary, we can provide technical support for a certain period of time to ensure that your team can get started in time. If you have other needs, we can discuss them in detail.

Contact  Email: This email address is being protected from spambots. You need JavaScript enabled to view it.



The articles on this site are all original and the copyright belongs to Zhang Xiaolong.

Anyone can reprint, but the source and author information must be indicated.