newrudeman

Multi-base station collaborative indoor positioning system based on ultra-wideband

 
Overview

team introduction

Our team is mainly composed of junior students, and the team members are from the Nizhou Laboratory of Shenzhen University. Shenzhen University Nizhou Laboratory is a highly autonomous laboratory with competition as its core and is active in major electronic competitions. Its team members have won many first and second prizes in provincial and national electronic competitions. We divide our work. It is clearly divided into hardware circuit design, GUI development, algorithm design, embedded software development, and host computer development. They coordinate tasks with each other and develop together efficiently.

1. Introduction to project functions

1. Project background

With the emergence of more and more large indoor spaces, the demand for indoor positioning functions is gradually expanding. Since the indoor accuracy of satellite navigation is very limited, various indoor positioning solutions continue to emerge. One of the more well-known implementation solutions is ultra-wideband wireless communication. Ultra-wideband technology is a new type of wireless communication technology. Its wireless signal has a bandwidth of GHz and is insensitive to channel fading, low power spectral density of the transmitted signal, low interception capability, low system complexity, and can provide positioning of several centimeters. Accuracy and other advantages.

2. Positioning principle

Using the sub-nanosecond ultra-narrow pulses emitted by the ultra-wideband chip, the flight time of the wireless signal in the air can be obtained, and then the flight distance can be calculated. In other words, two ultra-wideband chips can obtain information about each other by sending wireless signals to each other. distance between. Therefore, if a unit can obtain distance data from at least three other units, the relative position between the unit and other units can be calculated through a geometric mathematical model. If we fix the position of other cells, we can get the specific position of this cell.

3. Actual positioning algorithm model

In geometric mathematics, if we can know the center coordinates and radii of three circles in the coordinate system, we can calculate the coordinates of their intersection points, but this only exists in an ideal model. In fact, due to errors in various links, the calculated radius value and circle center coordinates cannot be completely consistent with the actual position, and this does not take into account the interference problem. Therefore, it is most likely that the distance measured using ultra-wideband (that is, the radius of each circle) cannot directly obtain the intersection coordinates (the equation has no solution). Therefore, when solving the coordinates of the target unit in the actual process, it is necessary to perform multi-step operations on the measured data to obtain a coordinate value that meets expectations and the calculation method is scientific.

4. Disadvantages and defects in the first generation positioning system

The first-generation system uses three base stations for positioning by default, so its usage scenarios are very limited by ultra-wideband antenna performance. And because it does not have the scalability of a base station, it is not suitable for various scenarios with very large indoor spaces, further limiting its application. In addition, since there are only three base stations in the system for positioning processing, the number of tags that the entire system can carry is also very limited, which does not meet the needs of practical applications.

There is a master-slave relationship between multiple tags and they are not independent of each other. In order to avoid the signal conflict problem caused by simultaneous positioning of multiple tags, a mechanism is designed for the master tag to coordinate the slave tags: there must be a master tag in the system for sending semaphore data packets with a specified ID (that is, the corresponding ID Passes assigned to positioning from labels). In other words, although the system supports multi-label positioning, in fact, the labels are highly correlated, cannot operate independently, and cannot be positioned simultaneously. This results in a decrease in label performance as the number of labels increases.

5. Introduction to the functions of multi-base station coordinated indoor positioning system

System Block Diagram:

e73fcc023d4a0c4a64d078900439ae9.png

The system has the following units:

  • Base station: automatic frequency selection, multi-tag ranging;
  • Tags: automatic scanning of base stations, positioning, UI interaction (LVGL implementation), magnetometer guidance;
  • Terminal base station: scan and capture system unit information and upload it to the host computer;
  • Host computer: monitors system unit status and information to facilitate system debugging;

The system works as follows:

  1. Compared with the original indoor positioning system implementation scheme, the base station in this system uses scanning channels to select appropriate channels as working channels to stagger the working frequency bands of adjacent base stations, which is beneficial to preventing wireless data from interfering with each other in the same channel. Resulting in reduced communication and positioning efficiency. After powering on and selecting a channel, the base station starts working in this channel. Its working mechanism is a receive-response mechanism, which is conducive to processing multiple tags and wireless data packets from other base stations.
  2. Based on the working mode of the base station, during the positioning process, the tag will first scan each channel through the ping packet and obtain the relevant information of the base station, including the address and coordinate position of the base station, and store it in the relevant data linked list. Before the tag starts positioning, what needs to be done is to perform ranging with nearby base stations. Using the distance and coordinates from each base station, and passing them into the designed mathematical model interface, the coordinate position of the tag can be solved. It is worth mentioning that due to the working mechanism of base stations and tags, when a base station fails and cannot work, the tag will automatically update the list of nearby normally working base stations and restart the ranging and positioning function. This has a very great role and value in improving system robustness in practical applications. In addition, this system supports multiple tags to exist in the system at the same time, and its maximum load capacity is affected by the hardware performance of the base station and the quality of air signals.
  3. A flowchart of how tags and base stations work is shown below:

3b8eac1e508b4cc6a564ee5efe83a67.png

  1. In addition, the system makes full use of various functional modules in the DW1000 chip to improve the efficiency of overall system communication. Using frame filtering and automatic retransmission mechanisms to realize the point-to-point path of the positioning process not only improves the processing efficiency of the MCU, but also improves the independence of the positioning process between different tags, thereby improving the work efficiency of the entire system.
  2. A host computer is designed in the system, which uses terminal base stations to monitor the status of units in the entire system, thereby achieving the purpose of terminal management. The terminal base station is different from ordinary base stations in that it does not need to respond to tag positioning requests. It only needs to capture the status of the base stations in the system, and then use the tag information stored in the base station to achieve the purpose of supervising all base stations and tags.
  3. The tag has a UI interface that displays coordinates in real time, and can display the tag's position through a map. The tag has a built-in magnetometer chip and a calculation algorithm that can obtain the absolute heading angle, which is used to obtain the direction of the tag carrier. Create basic conditions for more applications.

6. System application scenarios and case introduction

Hand movement recognition enables lightweight virtual scene interaction

  1. Basic static indoor positioning function is realized through UWB base station network scanning.
  2. By adding IMU sensors and vibration motors, a space (three-dimensional) host computer was created using Unity 3D, and two lightweight somatosensory interactive mini-games (tank shooting) were designed to achieve the combination of indoor positioning and somatosensory interaction.

image.png

  1. Qt Creator is used to independently design the UI interface and create a flat (two-dimensional) host computer to visually display the collected data and expand the host computer's electronic fence, route tracking and recording and other functions.

image.png

Indoor positioning people flow analysis system in supermarket scene

image.png

image.png

7. Project advantages

  1. The positioning system can be assembled according to actual application needs, and multiple base stations can be used to cooperate with each other to cover large sites.
  2. It can accommodate multiple tags, and their positioning processes are independent of each other and do not interfere with each other.
  3. The hardware composition is not complicated and is easy to expand and develop. The hardware circuits of the base station and tags are small, only about the size of a coin.
  4. The software design structure is flexible, easy to transplant and compatible with different platforms, and different functional modules can be expanded according to actual needs, and the execution efficiency of each unit is high.

8. System performance indicators

  1. Ranging distance range: 0.2m~66m (using ceramic antenna, no operational amplifier circuit)
  2. Positioning error range radius 0.5m~1m
  3. Positioning update frequency: 30hz (exceeding this frequency will cause serious frame drops in the UI interface and obvious lag)
  4. Maximum number of load tags in the system: 3 (only three tags left...)
  5. UI display frame number FPS: 24
  6. Base station circuit board power consumption--5V-0.77w, label circuit board power consumption--4.1V-0.44w.

2. Project attributes

Competitions that the first-generation positioning system participated in:

  1. Shenzhen University Electronic Design Competition (sponsored by Shenzhen Lichuang Software Development Co., Ltd.) ---- won the first prize in the school competition
  2. Guangdong Province Computer Design Competition----Third Prize in the Provincial Competition
  3. The 5th National College Student Integrated Circuit Innovation and Entrepreneurship Competition (Aerospace Microelectronics Cup) ---- First Prize (Enterprise Award)

This project is a second-generation version that is iteratively improved based on the team’s first-generation project and is made public for the first time.

3. Open source agreement

GPL3.0
所有资料开源,欢迎交流指点!
禁止将项目任何资料放到任何平台以任何方式售卖!

4. Hardware part

First generation hardware version

For the first generation of hardware, we used STM32 to drive DWM1000 and used TI's CC1310 for positioning data transmission. Based on the actual use, we designed three base station tag two-in-one boards: image.pngModel 1 (STM32+CC1310+DWM1000)

能够完成基本的UWB定位功能,添加了CC1310,能够在898MHZ的频段下传输UWB定位数据,具有独立通讯能力

image.pngModel 2 (STM32+CC1310+DWM1000+ESP32+IMU+AP+MOTOR)

双层叠板设计,底板是一个单独的定位模组,顶板集成ESP32以及CC1310等,能够根据需求更换顶板,具有高可适用性

image.pngModel 3 (STM32+CC1310+DWM1000)

相比于Model1 UWB天线采用胶棒天线,CC1310采用IPEX外接天线,具有更强的射频性能,抗干扰能力强,适合长距离应用

These first-generation hardware versions are small in size, easy to install, and portable enough to be deployed in various applications. However, considering the upgradability, scalability, playability, and data visualization of the old hardware, they are not very good. Ideal, so I have the following second-generation hardware

Second generation hardware version (OneTag & Tag_HMI)

image.png

(1)OneTag

Inspired by APPLE's AirTag, we designed a UWB positioning board (base station/tag) that is only the size of a one-yuan coin. It has ultra-high integration, so it is named OneTag. It includes the following hardware modules and interfaces:

  • STM32F4
  • ESP32
  • UWB positioning module (DWM1000)
  • Motion sensor (BMI160)
  • Vibration motor
  • USB serial port (CH340E)
  • led
  • button
  • Expansion IO of ESP32 and STM32

In addition to being able to complete basic positioning functions, the provided ESP32 can use Bluetooth to interact with mobile phones, use WIFI to directly upload data to the Internet, the provided IMU can complete trajectory estimation and positioning navigation, and the provided buttons, LED, vibration The motor can provide a good non-visual interactive experience, and the two rows of expansion IO on the board can support the expansion of more functions, full of scalability!

PCB 3D simulation diagram:

image.png

Hardware physical picture:

image.png

image.png

Schematic:

Snipaste_2021-09-16_18-19-45.png

PCB:

Snipaste_2021-09-16_18-21-10.png

(2) Tag_HMI

In order to demonstrate our algorithm function and positioning algorithm, we designed a relatively small positioning tag, which is mainly used for data visualization and human-computer interaction, so it is named Tag_HMI, including the following hardware modules:

  • STM32F4
  • ESP32
  • UWB positioning module (DWM1000)
  • Motion sensor (MPU9250)
  • Vibration motor
  • USB serial port (CH340E)
  • led
  • button
  • Electronic compass (HMC5983)
  • 1.3-inch touch LCD screen
  • The lithium battery is charged through the LCD touch screen combined with the GUI produced by LVGL, which can display the online information of each base station and the map coordinate position.

PCB 3D simulation diagram:

image.png

Hardware physical picture:

image.png

LVGL-based GUI interface:

image.png

Schematic:

Snipaste_2021-09-16_18-21-57.png

PCB:

Snipaste_2021-09-16_19-41-17.png

5. Software part

1. System host computer

  • PC design block diagram:

1992ab7b69998df7d0b5703299be898.png

  • The design process is as follows:

image.png

The host computer was developed through QT5, which uses TabWidget as the core control and is divided into three sub-Tabs. TableWidget is used in Tab1 to record various parameters and status of the tags and base stations in this system to facilitate the control of this system. Real-time monitoring of operations. Tab2 draws a map, which includes tags and base stations. By default, the base station will be in red status (offline). When the base station is inserted, the corresponding base station will be in online status (blue). If the tag is scanned in the network , the relative position of the tag relative to each base station will be displayed, and the tag will be monitored at the same time. When the mouse is hovered, the status and coordinates of the tag will be displayed. It also integrates functions such as label trajectory drawing to improve the application of the system. Tab3 records the received data in TextEdit and displays some background log information.

image.png

The terminal base station communicates with the software host computer through UART, and the two have their own independent communication protocols. The host will issue a "device search package" to the terminal base station. After receiving the request packet, the terminal base station will conduct a search for all base stations and tags in the network. If a response is obtained, all data will be packaged into a "device response packet" and uploaded to Host computer. After receiving this packet of data, the host computer decodes the data packet and determines how many base stations have several tags at this time, as well as their respective coordinate information and channel information. Finally, it is visually presented in the form of a list through the Tablewidget control, and its channel, coordinates, address, whether it is online, etc. are recorded in real time. Manage each base station and tag in this system from an overall perspective. After solving the "device response packet", the host computer background will refresh and draw the current position of each tag in real time, display the relative distance between it and each base station, and convert the coordinate data into an image as a visual interface. In addition, the host computer integrates functions such as trajectory drawing and saving. After starting, the movement trajectories of each tag will be drawn and updated in real time. At the same time, if necessary, the coordinate data can be directly saved locally as a txt file.

2. Positioning algorithm

(1)TOA positioning algorithm

The principle of the TOA positioning algorithm is to obtain the distance from the tag to the base station by measuring the flight time of the electromagnetic wave between the tag and the base station. Then use this distance as the radius and the coordinates of the base station as the center of the circle to create a coordinate model, as shown in the figure below.

Figure 1.png

Ideally, all ranging data are accurate, and each circle created will have a common intersection point, and the coordinates of this point are the coordinates of the label. However, in practical applications, measurement errors will occur due to interference from various factors. This error will cause the results to be too large or too small. Therefore, in the model established using the actual measured data, the three circles will not have a common intersection point. , but the following situations are more likely.

Figure 2.png

In these cases, although the three circles do not strictly intersect at one point, they still contain the coordinate information of the label. We need to design an algorithm that can estimate the label coordinates from these data and be compatible with the above different situations.

(2) Algorithm design

The goal of the algorithm is to estimate the most likely coordinate point from the above situations. The steps are as follows:

Step 1: Find a reference point

For the three circles of the coordinate model, we first randomly select two for inspection. For two circles, there are four types of relationships between them: intersection, tangency, separation, and inclusion. In the case of two circles, no matter what the relationship between them is, we can get a reference point that we think is closest to the true coordinates of the label. The method is as follows:

When intersecting

When two circles intersect, there will be two intersection points, and we choose one of the intersection points as the reference point. The selection is based on the difference between the two intersection points to the center of another circle and the radius of this circle station. Whichever is smaller will be used as the reference point (red point in the picture)

Figure 3.png

When tangent

Select the tangent point as the reference point (the red point in the picture) (the same for both inner and outer cuts)

Figure 4.png

When separated

On the line connecting the center of the circle, select a point that can divide the line segment in proportion to the radius. This point is used as a reference point (the red point in the picture)

Figure 5.png

When included

Find the shortest line segment from arc to arc, and take its midpoint as the reference point (red point in the picture).

Figure 6.png

Step 2: Estimating label coordinates from reference points

Combine three circles in pairs and find their reference points respectively, so you can get three reference points. Using this strategy of finding reference points, three reference points (red dots in the figure) can be found for all situations.

Figure 7.png

The three reference points form a triangle, and the centroid of the triangle is used as the label coordinate (blue point in the figure).

6. BOM list

OneTag & Tag_HMI BOM List

Tag_HMI_1~29.pngTag_HMI_30~59.png

7. Contest LOGO verification

image.png

8. Demonstrate your project and record it as a video for uploading

参考设计图片
×
 
 
Search Datasheet?

Supported by EEWorld Datasheet

Forum More
Update:2025-06-23 19:26:58

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
community

Robot
development
community

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号