ISSN:2321-6212

All submissions of the EM system will be redirected to Online Manuscript Submission System. Authors are requested to submit articles directly to Online Manuscript Submission System of respective journal.

A Study of Bluetooth Range-Based Trilateral Localisation by DA14695 Device

Visit for more related articles at Research & Reviews: Journal of Material Sciences

Abstract

With the development of indoor positioning space, the demand for indoor positioning is increasing day by day. Indoor positioning solutions have been applied in many scenarios, such as in telligent business super intelligent buildings intelligent hospitals and so on. Low power consumption of bluetooth can be seen everywhere in life. Compared with other technologies, it has obvious advantages such as high availability, high positioning accuracy and low power consumption In this paper we focus on a bluetooth ranging solution by studying the Phase Based Distance Estimation (PSDE) principle, establishing multiple connections between the base station and the tag, then solving for the tag coordinates based on the Trilateral Ranging (TR) principle, and also proposing a data error handling approach for range error solving. Through trilateral positioning, we can obtain the tag’s position and visualise the map using the drawing display. According to the data results, the absolute distance between the tag’s calculated position and the actual position is no more than 1 m. Applying the above solution approach, bluetooth ranging can effectively improve the positioning accuracy and provide new ideas for the application of ranging solutions in positioning.

Keywords

Indoor positioning solutions; BLE; Phase based distance estimation; Multiple connections; Trilateral ranging

INTRODUCTION

In recent years, with the increase of people’s demand for indoor positioning, indoor positioning has become the focus of current research. At present, indoor positioning mainly includes a variety of technologies such as UWB, Bluetooth, RFID, SLAM, etc. [1]. According to the technical perspective, positioning can be generally divided into two schemes: ranging and direction finding. Orientation finding mainly includes bluetooth ranging UWB ranging and WiFi-based RSSI, DecaWave is a company focusing on UWB technology [2]. Its chips DW1000 and DW3000 can be used for ranging. The ranging principle is mainly ToF, which can be divided into TOA and TDOA technology according to the technical principle In essence, they use the time between electromagnetic wave to reach the device, and the speed of light is used instead to solve the RSSI of distance WIFI for a long time [3]. The signal will gradually weaken with the increase of distance, and the formula of path loss model can be directly calculated, but due to the large error, the effect is not ideal. Positioning technology has attracted a large number of scholars at home and abroad for research. Now, great progress has been made in UWB and bluetooth RSSI. Juthatip Wisanmongkol, et al. proposed iterative path loss factor and weighted solution, thus eliminating the multi-path influence of bluetooth RSSI and improving the solution accuracy Konstantinos Kotrotsios, et al. used machine learning to propose the IW-KNN algorithm, which made full use of data and extracted the correct RSSI value [4,5]. Jia Wang, et al. preliminarily explored the UWB positioning kits of DecaWave and BeSpoon, and found that their positioning accuracy could reach 20 cm, which brought a new research approach for UWB positioning [6]. Daquan Feng, et al. adopted the fusion positioning of IMU and UWB and deduced the IMU navigation through Kalman filter, which really applied the positioning scene to the real life and greatly improved the accuracy [7]. This paper makes a preliminary exploration of bluetooth ranging, and builds a blue-tooth positioning system based on the three-sided positioning of bluetooth ranging. This work provides a new way and idea for future research on bluetooth ranging involves bluetooth multi-connection, which is a complex work. Through bluetooth technology, we can better serve human beings with the technology, which also plays a certain role in promoting the development of positioning technology under the background of the project combining theory and practical engineering application, we have carried out the research of trilateral ranging and obtained preliminary results, which provides a certain basis for the later work.

This article takes ranging technology as the background, and introduces bluetooth ranging technology through UWB ranging and RSSI technology. The structure of the article is carried out as follows: Section 2 introduces the basic information of the experimental equipment DA14695 development board and bluetooth connection. In section 3, the principle of ranging and three-sided positioning is deduced in detail, and the error optimization model is proposed. In section 4, we do the three-sided positioning experiment, build the three-sided positioning system and analyze the results. Finally, we draw the conclusion through the previous content in section 5 [8].

MATERIALS AND METHODS

Experimental equipment and bluetooth connectivity

Introduction of DA14695 board: The DA14695 development board is part of the SmartBondTM DA1469 family of products, whose models mainly include the 14691/5/7/9, etc. and is manufactured by Dialog, a French-based company which has now been acquired by Renesas as a wholly owned subsidiary [9]. As shown in Table 1, it is the feature of DA1469x product. The DA1469x is the first mass-produced wireless MCU based on the Arm Cortex-M33 processor, providing enhanced processing power for compute-intensive applications such as high-end fitness trackers, advanced smart home devices and virtual reality game controllers. In addition, this wireless MCU family features a configurable MAC that helps manufacturers deploy proprietary 2.4 GHz and the latest low-power bluetooth protocols, opening up new application possibilities such as precise positioning for Real-Time Location Systems (RTLS).

Table 1. The property of DA14695 USB board and DA14695 pro board.

The Figure 1 below shows the structure of the DA14695 development board which consists of two main parts, one is the base board of the system, also known as the mother board, and the other part is an OLED screen, also known as the daughter board, which communicates with the mother board through the Inter Integrated Circuit (IIC) protocol and can print out the measured distances. The USB port on the motherboard can be connected directly to the computer host and the distance and other information can be read through the serial software on the computer host. The board development software is developed by the SmartSnippets IDE, which has an eclipse-like software style and is very easy to compile and burn.

Figure 1. The construction of DA14695 USB board. The board consists of two pasrt: Daughter board and mainboard.

Bluetooth multi-connection

There are two roles in bluetooth device connection, in BLE4.0, generally for the master and slave, and after BLE5.0, it is generally changed to central device and peripheral device.

Figure 2. The schematic diagram of bluetooth connection. The connection devices are made of the central and peripheral devices, which have four processes in connection.

Device role in connection: Bluetooth connection is a series of event processes initiated by peripheral devices and responded to by central devices, as shown in the Figure 2, which represents the process of bluetooth connection [10]. The central device is the listener of the bluetooth broadcast, which acts as a scanning of the bluetooth broadcast in the early stage, and once the bluetooth broadcast is monitored, it immediately sends a bluetooth connection request to request the connection of peripheral devices; The peripheral device is the initiator of bluetooth broadcasting, as a broadcaster, it sends a broadcast to the outside, after the central device listens to the broadcast, the peripheral device will receive a connection request from the central device, at this time, then send a request response to establish a bluetooth connection.

Figure 3. The block diagram of bluetooth one-to-many connection. Multiple connections are composed of a single connection, which do not interfere with each other, and after exchanging data, the connection will enter the next connection.

Multi-connection: Bluetooth multi-connection is a series connection established by the bluetooth central device to multiple devices, as shown in the Figure 3, which is a schematic diagram of bluetooth multi-connection. The specific connection process is as follows: Bluetooth single connection is the same as previously mentioned, but multi-connection involves multiple peripheral devices, so the connection has a certain time sequence when it is connected, it has to turn to the next device, which must be disconnected, the connection process before the exchange of data connection is a cyclic process, its cycle depends on the number of connected devices, data volume exchange, which will be used in the following three side positioning.

Fundamentals and error optimization

There are two ways to measure the distance of this product, one is the Inverse Fast Fourier Transform (IFFT) ranging principle, and the other adopts the principle of distance estimation based on phase. The default calculation method is the previous one, and both calculations can quickly calculate the distance between anchor points and labels.’ Nevertheless, both calculations are processed the same way in these algorithms. First, for the preprocessing of the data, the IQ value is extracted from the bus to 8 MS/s, and when downsampled, the sampling rate becomes 4 MS/s. Finally, the frequency offset calculation and the exchange of frequency preprocessing data from mutual devices are performed.

Figure 4. Based on IFFT ranging schematic. This ranging is divided into two parts, first converting the channel file into the time domain, and then using the peak spectrum to find the corresponding distance.

Ranging principle

Distance measuremant based on IFFT: The IFFT algorithm mainly uses the principle of fast Fourier inverse transform to convert the signal processing from the frequency domain to the time domain, and then compares the size of the distance with the peak value in the time domain to estimate the distance. Therefore, this algorithm is mainly divided into two steps, and the specific implementation scheme can be shown in the Figure 4 above. The first step is to merge the device multi-channel frequency file into a single channel file, which is converted to the time domain, and the second step is to detect the peak of the channel impulse response and determine the distance based on the response time. The Nordic company is also exploring, having experimented with the NCS SDK [11].

Distance measurement based on phase difference: Phase difference calculation principle is mainly based on the device distance and the size of the phase difference Its calculation steps are mainly divided into three parts: First, the phase data between the two devices per sample is converted into a channel frequency profile; then, the phase difference of the data is established in the phase data, and then the phase value is averaged to obtain the slope of the channel frequency file; finally, the estimated distance is matched by phase difference. The formula Equation 1 is a principle of phase difference calculation.

equation

Where c represents the speed of electromagnetic wave propagation, here the speed of 130 light is used instead; the distance to be sought is represented by D; the phase difference 131 between the devices is â??φn and the frequency difference is â??f; π is a constant.

Trilateral positioning: Trilateral positioning is application range positioning method, in order to come up with this algorithm, we imagine in the plane, there are three base station and a tag, as shown in the Figure 5 below [12]. Setting di is the distance between the ith base station to the label, base station 1, 2, 3 is known, the coordinates of the base station respectively are(x1, y1), (x2, y2) and (x1, y1), the co-ordinates of the label location is unknown, let its co-ordinates is (X, Y) as according to the two point distance formula, we can get the following equation 2.

Figure 5. Schematic diagram of the spatial structure of the trilateral positioning. The three base stations can uniquely determine an intersection point by drawing a circle. The intersection point is the label position, which can be solved by the least square method.

equation

In the above equation, we bring the coordinates of the base station into the equation 3.

Since its equation is a nonlinear equation, we use the classical least squares method to solve it, Subtract the first equation from the next two equations of the above equation, we can get:

equation

In the equation, the corresponding parameters are defined as follows:

equation

Therefore, η can be obtained by LS solution, η is

equation

In the LS method, we use the same weights. However, in practice, the closer the label is to the origin, the less weight it gets, and the reciprocal of the distance is used as its measure. Based on this, we propose the Weighted Least Squares (WLS) algorithm to solve this problem. Let its weight is γ, bring the weight into the original form, and you can get the accurate label coordinates.

equation

So, the WLS solution of η˜ is expressed as

Error optimization algorithm: According to the trilateral positioning calculation, the coordinates of the label depend on the accuracy of the measured distance. The measured distance mainly comes from the bounce value when the bluetooth instantaneous connection, resulting in inaccurate measurement distance, and in the process of sending packets, it is also possible that the measured value is not a real-time value, so we take filtering on the distance value first. From the perspective of calculating coordinates, inaccurate distance will cause negative numbers and excessive runout values in coordinates, so the calculated values should also be processed by corresponding algorithms in Table 2.

Table 2. Error model algorithm flowchart.

The above algorithm is a processing method for the error model. We consider the speed of label movement, the size of the measurement error, and the setting range to consider the error model processing.

RESULTS

Experiments and results

One-to-one ranging: One-to-one ranging is carried out by the device based on bluetooth connection. The device in it generally has two roles: The broadcaster, the responder, and the scanner, the initiator. Below Figure 6 is the result of the bilateral ranging between the two devices. The ranging process is composed of the beginning calculation stage and the end stage A measurement is determined by a period of time, when the period is over, it will move to the next stage. Ranging is developed from SmartBondTM wireless ranging SDK. It is compiled and burned with reference to eclipse, which will not be detailed here.

Figure 6. The two boards communicate and measure the distance. The peripheral device initiates the broadcast, the central device scans, and when the two establish a connection, the ranging principle is used for ranging.

In addition to directly calling the OLED screen to display the results, you can also use the computer serial port to display the serial port software can choose putty or other serial port debugging software, the default baud rate is 115200 in the Figure 7, we can see the distance displayed by the serial port. The first distance shows the real-time distance, and the second distance shows the average distance. The calculation is effective only when dqf is 100.

Figure 7. The distance is displayed on the serial port. The USB board communicates directly through the serial port and displays the measured distance value in the serial port.

Trilateral positioning system construction: When trilateral positioning is to be carried out, the development board software must be configured first. Trilateral positioning is based on the establishment of multiple connections. We can set the role of the device and the number of connections through the Dialog Tone Exchange (DTE) mode, as shown in the Figure 8 below DTE mode is controlled by K2 key and K1 key on the USB development board. When K2 button is pressed down, press K1 button again to enter the DTE mode. The configuration can be set by letters and numbers.

Figure 8. The the graphical interface of DTE. The role of device and mutilink connection numbers can be configured by this, the more detail is introduced by DIALOG handbook.

After setting the role of the device and the number of connections, we carried out experimental model construction in the laboratory in Figure 9. We placed the three base stations on the laboratory plane, about 2 m above the ground, and the label was 1.6 m from the ground. We build a xoy plane coordinate system based on base station 1 and base station 2 and place them on (1.5, 0), (1.5, 0), (3.0, 3.0). Firstly, we use the trilateral algorithm to calculate the coordinates of different positions of the label, and compare it with the unoptimized model and the optimized model, and secondly, we use the optimization model to test the position of the label and compare it with the actual position to verify the 188 improvement of the algorithm for positioning accuracy.

Figure 9. Physical construction of the trilateral positioning system. The system consists of three base stations and a label, and the distance between the three base stations can form three circles, and the intersection of the three circles is solved to be the coordinates of the label.

In the process of solving tag position, we mainly use python programming to carry out python has a particularly good serial port library pyserial, which is also developed with c language, through reading serial port data, to provide the algorithm calculation in addition, we also use numpy and scipy library was used to solve the algorithm process, and finally the Matplotlib library was used to draw drawings to visualize the solution results.

DISCUSSION

In the experiment, we mainly did the following two things:

  • We selected the positions of some points of the labels and calculated the coordinate positions respectively through the original algorithm and the optimization algorithm, as shown in Figure 10 below.
  • By selecting the optimization model, we selected two different points for testing, and compared the coordinates of the actual measured points with those calculated by the optimization model, as shown in Figure 11 below.

Figure 10. The difference of non-optimized versus optimized model calculations. (a): Non-optimized model with data results scattered; (b): The calculation results tend to be centralized and closer to the true value.

By comparing the three-sided positioning optimization algorithm with the unoptimized algorithm, it can be found that the calculation without optimization algorithm generally contains wrong calculation, which is meaningless for the actual calculation, and these values should be discarded. In addition, from the perspective of the image of computing, after the optimization algorithm of calculating the value of the beating more slowly, its value is only within a certain range, and these values are exactly the actual location of the forecast. In a word, using the optimization model, the accuracy of the algorithm for computing had improved, but also slows down the fluctuation of data, the effective use of data.

Figure 11. Two calculations for the actual label position. (a): The tags are placed in the middle range of the three base stations, making the calculation easie; (b): The label is far away from the base station, and the calculation results diverge.

In addition to theoretical calculations, we selected two practical tag position points to evaluate the accuracy of the algorithm. The following table shows the calculated positions and actual label positions. The label is placed at (2.8, 2.6) for the first time and (3.0, 1.2) for the second time. From the results of calculation, the first calculation is better than the second calculation. Generally speaking, the error of the two calculations is less than 1 m, which is also very exploitative for practical engineering applications.

Table 3. The label actually measures the calculation data twice.

Although we have made some progress in the system construction and location calculation of trilateral ranging, there are still many problems to be solved. In the process of multi-connection between the label and the base station, there will be connection errors, and the exchange of data is not accurate, which will bring errors to the ranging. In addition, our current ranging is that the tag is static, while the positioning needs dynamic ranging, so these two problems need to wait for further research, how to solve these two problems, is also worth studying, later we will further explore this problem.

CONCLUSION

For indoor positioning, people have to explore, from the traditional bluetooth become positioning to WIFI based fingerprint orientation, then to later UWB positioning, the development of indoor positioning is faster and faster, and its technology is also various compared to other bluetooth low energy technology, its technical advantage obviously, at present, most of the smart devices (such as mobile phones computers, etc.) support bluetooth technology, the cost of direct use is very low, can quickly develop new devices In this article, we first of all, based on the principle of bluetooth communication, exploring the trilateral positioning connection process, at the same time, on the basis of the principle of phase difference and IFFT ranging the bluetooth range of theory and practice, finally using the trilateral positioning principle, combined with least square method and weighting factor, combined with the optimization model, the label location for practical application. Based on the connection principle of bluetooth, we use the DA14695 device for single-connection to multi-connection communication. The distance measurement accuracy is about 50 cm, and the distance measurement time is about 200 ms for a positioning, which takes about 1 s. This also meets the basic requirements of the real-time positioning system at the same time, based on the least square method, we can quickly solve the position of table labels, and use the error model to reduce the uncertainty of the data fluctuations. We also use the principle to build the three-side positioning system, through the combination of theory and practice, our absolute error of label position is no more than 1 m.

Indoor environment is closely related to people, and it is believed that in the near future, indoor positioning technology will be more convenient for people’s lives. Before trilateral positioning, research was carried out with the combination of UWB technology. This project, combined with bluetooth technology, is an exploration of trilateral positioning and an application of new positioning methods using bluetooth ranging, we will carry out a deeper exploration of the trilateral location, but also the real application of the trilateral positioning in practical engineering.

FUNDING

This research was funded by The KEY Laboratory of Robotics and Intelligent Equipment of Guangdong Regular Institutions of Higher Education (Grant No.2017KSYS009) and The DGUT Innovation Center of Robotics and Intelligent Equipment (Grant No. KCYCXPT2017006) and The Dongguan Social Science and Technology Development (Key) Project (Grant No.20185071021602) and Shen-zhen Science and Technology Plan Project (No. KCXFZ20201221173202007).