^{1}

^{1}

^{1}

^{1}

In order to enhance the positioning accuracy, a UWB positioning system based on genetic algorithm is proposed. Firstly, it uses the DW1000 module to measure the distance, and preprocesses the measured data to remove noise. Then, a positioning equation is established according to the processed distance information, and the genetic algorithm is used to solve the equation to obtain the coordinates of the unknown node. The experimental results show that the measured positioning accuracy is within 30 cm, which means that the system can obtain a good positioning effect and meet the need for precise positioning.

At present, people’s demand for precise positioning technology is becoming more and more urgent. For example, many applications such as smart agriculture [

The positioning system takes STM32F103C8T6 as the main control. The control program is written into the hardware to control the sending and receiving of data through Keil5 software. The hardware uses TTL serial port to connect to the upper computer, and the upper computer displays specific data information through the software written in VS2012. As shown in

The UWB positioning system uses a bilateral ranging algorithm based on the TOA technology [

request, and Device B sends back a response after receiving the request. After receiving the response, Device A sends a second ranging request, and Device B receives this request and completes a ranging process.

When the device processes data each time, it records the timestamp of the current processing. In this way, the transmission time difference can be obtained through the relationship of the timestamp:

T prop = T round1 × T round2 − T reply1 × T reply2 T round1 + T round2 + T reply1 + T reply2 (1)

Thus, the measured distance is equal to the transmission time T prop / 2 multiplied by the speed of light c. The error introduced by the bilateral ranging method：

error = T ^ prop × ( 1 − k a + k b 2 ) (2)

where k a represents the ratio of the actual frequency and the expected frequency of device A’s clock, and k b represents the ratio of the actual frequency and the expected frequency of device B’s clock. Assuming that the clock accuracy of device B or device A is 10 parts per million, k a = 0.99999 , k b = 1.00001 , the distance between the devices is 100 m. Thus, the error is 10 × 333 × 10 − 9 seconds, and the corresponding ranging error is 1.1 mm, which is completely negligible. Therefore, the bilateral ranging method is widely used. Using the above ranging algorithm, the ranging information can be obtained for positioning.

This system obtains the distance data of the unknown tag ( x , y ) to different base stations through the UWB ranging technology, and uses software to preprocess the distance data. According to the preprocessed distance data, a positioning equation set can be established:

{ d 1 = ( x − u 1 ) 2 + ( y − v 1 ) 2 + e 1 ⋮ d k = ( x − u k ) 2 + ( y − v k ) 2 + e k ⋮ d K = ( x − u K ) 2 + ( y − v K ) 2 + e K (3)

where ( u k , v k ) denotes the k-th base station’s position; d k and ( x − u k ) 2 + ( y − v k ) 2 denote the measured distance and actual distance between the k-th base station and the unknown tag respectively; e k denotes the ranging error. Finally, the genetic algorithm is used to solve the positioning equation, and the precise position of the unknown label is given. The specific positioning process is as follows:

Step 1. Preprocess the distance data.

As shown in

Step 2. Initial population.

Suppose the population size is N, and the generation group is { X 1 g , ⋯ , X n g , ⋯ , X N g } , where X n g = ( x n g , y n g ) is the n-th individual in the g-th generation population, n = 1 , 2 , ⋯ , N , g = 1 , 2 , ⋯ , G .

Step 3. Calculate fitness value.

The fitness value is used to evaluate the quality of an individual. The smaller the fitness value, the better the individual, and the larger the fitness value, the worse the individual. According to Formula (3), the fitness function value is defined as

f ( X n g ) = 1 K ∑ k = 1 K ( ( x n g − u k ) 2 + ( y n g − v k ) 2 − d k ) 2 (4)

Step 4. Selection.

The selection operator is applied to the group. The selection operation uses a roulette operator, which is realized by accumulating the probability.

Step 5. Crossover.

The crossover operator is applied to the group, and the two selected individuals are generated according to the single-point crossover method.

Step 6. Variation.

The mutation operator is applied to the group, and the selected individual generates a new individual through the basic position mutation method.

Step 7. The next generation group g = g + 1 is obtained, after the group g undergoes selection, crossover, and mutation operations.

Step 8. Repeat steps 3 to 6 until the maximum evolution number is reached, and the final result is the estimated location of the unknown tag.

The actual measurement environment of UWB positioning system based on the genetic algorithm is shown in

The root mean square error (RMS) of positioning is defined as:

error = ( x ^ − x ) 2 + ( y ^ − y ) 2 (5)

Parameter | Set up |
---|---|

Scenes | 12 m × 12 m rectangular positioning area |

Population size | 30 |

The maximum iteration number | 200 |

Cross probability | 0.7 |

Mutation probability | 0.01 |

where ( x , y ) is the estimated location of the unknown tag. During the test, the unknown tag is placed in different positions. The different estimated positions and the corresponding RMS errors are shown in

Actual coordinates (m) | Estimated coordinates (m) | RMS | ||
---|---|---|---|---|

x | y | x | y | |

0.0 | 4.8 | 0.0235 | 4.7742 | 0.0349 |

1.2 | 3.6 | 1.2082 | 3.5777 | 0.0238 |

2.4 | 7.2 | 2.4164 | 7.2375 | 0.0410 |

3.6 | 3.6 | 3.6246 | 3.6364 | 0.0439 |

4.8 | 4.8 | 4.8563 | 4.8563 | 0.0796 |

6.0 | 9.6 | 5.9707 | 9.5718 | 0.0407 |

9.6 | 10.8 | 9.5953 | 10.792 | 0.0095 |

10.8 | 10.8 | 10.827 | 10.827 | 0.0382 |

This paper designs a UWB positioning system that is based on genetic algorithm, which can solve the precise position of the unknown tag. The positioning experiment test shows that the positioning accuracy of the system is within 30 cm, which can well meet the positioning requirements. However, the system only considers the situation under the line-of-sight environment, and the situation under the non-line-of-sight environment needs further study.

The authors declare no conflicts of interest regarding the publication of this paper.

Xia, B., Zheng, X.Z., Zhang, L.Y. and Zhao, L. (2021) UWB Positioning System Based on Genetic Algorithm. Journal of Computer and Communications, 9, 110-118. https://doi.org/10.4236/jcc.2021.94008