Uwb ranging data processing method, device, controller, system and medium

By analyzing the strength of UWB signals and ranging values, and using a pre-defined classification model to determine the obstacle environment and relative angles, the ranging deviation problem of the UWB positioning system in complex indoor environments is solved, improving ranging accuracy and positioning effect, and reducing costs.

CN119031321BActive Publication Date: 2026-08-04BYD CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BYD CO LTD
Filing Date
2023-05-26
Publication Date
2026-08-04

AI Technical Summary

Technical Problem

In complex indoor environments, the ranging results of UWB positioning systems are easily affected by obstacles and deviations caused by different relative angles, resulting in inaccurate positioning and increased maintenance and construction costs.

Method used

The UWB positioning system uses tag devices and query devices to acquire real-time UWB signals, analyzes signal strength and distance values ​​using a preset classification model, determines the obstacle environment and relative angle, obtains classification tags, and corrects the actual distance based on the distance deviation value.

Benefits of technology

It improves UWB ranging accuracy, reduces ranging error, enhances positioning performance, reduces the need for a larger number of query units, and lowers costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119031321B_ABST
    Figure CN119031321B_ABST
Patent Text Reader

Abstract

The application discloses a kind of UWB ranging data processing method, device, controller, system and medium, the method includes: through the label equipment and inquirer of UWB positioning system, real-time UWB signal is acquired;UWB signal intensity in real-time UWB signal and real-time ranging value are input into preset classification model, and the classification label output by preset classification model is acquired;Classification label is used to represent the obstacle environment between inquirer and label equipment and relative angle;The ranging deviation value associated with classification label is acquired, and according to ranging deviation value and real-time ranging value, the actual distance value between inquirer and label equipment is determined.The application reduces ranging error, improves UWB ranging precision, and the positioning effect of UWB positioning in indoor environment with obstacle.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of positioning technology, and in particular to a UWB ranging data processing method, apparatus, controller, system, and medium. Background Technology

[0002] Currently, UWB (Ultra Wide Band) is increasingly being used for positioning in indoor environments. However, in complex indoor environments, interference from obstacles such as walls or objects can cause UWB signal attenuation between the query device and the tag device, leading to significant errors in ranging results and inaccurate positioning. Adding more query devices to avoid interference from obstacles would obviously increase maintenance and construction costs considerably. Furthermore, differences in the relative angle between the query device and the tag device (i.e., their relative positions) can also cause varying degrees of deviation in ranging results, further contributing to inaccurate positioning. Summary of the Invention

[0003] This invention provides a UWB ranging data processing method, apparatus, controller, system, and medium to solve problems such as inaccurate ranging results in existing UWB positioning technologies.

[0004] A UWB ranging data processing method, comprising:

[0005] Real-time UWB signals are obtained through tag devices and query devices of the UWB positioning system; the real-time UWB signals include the real-time ranging value between the query device and the tag device, as well as the UWB signal strength value.

[0006] The UWB signal strength value and the real-time ranging value are input into a preset classification model, and the classification label output by the preset classification model is obtained; the classification label is used to characterize the obstacle environment and relative angle between the query device and the label device;

[0007] Obtain the ranging deviation value associated with the classification label, and determine the actual distance between the query device and the label device based on the ranging deviation value and the real-time ranging value.

[0008] A UWB ranging data processing device, comprising:

[0009] The acquisition module is used to acquire real-time UWB signals through the tag device and query device of the UWB positioning system; the real-time UWB signal includes the real-time ranging value between the query device and the tag device and the UWB signal strength value.

[0010] The classification module is used to input the UWB signal strength value and the real-time ranging value into a preset classification model, and obtain the classification label output by the preset classification model; the classification label is used to characterize the obstacle environment and relative angle between the query device and the label device;

[0011] The determination module is used to obtain the ranging deviation value associated with the classification label, and determine the actual distance between the query device and the label device based on the ranging deviation value and the real-time ranging value.

[0012] A controller for performing the above-described UWB ranging data processing method.

[0013] A UWB positioning system includes a tag device, a query device, and a controller. The query device is communicatively connected to the tag device. The controller is communicatively connected to both the query device and the tag device. The controller is used to execute the UWB ranging data processing method.

[0014] A computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described UWB ranging data processing method.

[0015] The aforementioned UWB ranging data processing method, apparatus, controller, system, and medium include the following steps: acquiring real-time UWB signals through a tag device and a query device of a UWB positioning system; the real-time UWB signals include real-time ranging values ​​between the query device and the tag device, as well as UWB signal strength values; inputting the UWB signal strength values ​​and the real-time ranging values ​​into a preset classification model, and acquiring classification labels output by the preset classification model; the classification labels are used to characterize the obstacle environment and relative angle between the query device and the tag device; acquiring a ranging deviation value associated with the classification labels; and determining the actual distance between the query device and the tag device based on the ranging deviation value and the real-time ranging values.

[0016] In this invention, a pre-defined classification model is used to determine a classification label based on the real-time ranging value between the query device and the tag device in the UWB positioning system, as well as the UWB signal strength. This classification label characterizes the obstacle environment (including the number of obstacles between the query device and the tag device) and the relative angle (the different relative angles corresponding to different relative positions of the query device and the tag device). Furthermore, a ranging deviation value pre-set to correspond to this classification label can be determined. Based on the ranging deviation value and the real-time ranging value, the actual distance between the query device and the tag device can be accurately determined. This invention considers the influence of obstacles and relative angles on UWB ranging results, reducing ranging errors and improving UWB ranging accuracy, thus significantly improving the positioning effect of UWB positioning in indoor environments with obstacles. Moreover, this invention eliminates the need to increase the number of query devices to avoid obstacle interference in complex indoor environments, reducing costs. Attached Figure Description

[0017] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0018] Figure 1 This is a flowchart of a UWB ranging data processing method in one embodiment of the present invention;

[0019] Figure 2 This is a schematic diagram of the layout of a UWB positioning system in one embodiment of the present invention;

[0020] Figure 3 This is a schematic diagram illustrating the cross-validation of actual distance values ​​in a UWB ranging data processing method according to an embodiment of the present invention;

[0021] Figure 4 This is a flowchart of step S20 of the UWB ranging data processing method in one embodiment of the present invention;

[0022] Figure 5 This is a flowchart of step S202 of the UWB ranging data processing method in one embodiment of the present invention;

[0023] Figure 6 This is a schematic diagram of a computer device according to an embodiment of the present invention. Detailed Implementation

[0024] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0025] In one embodiment, such as Figure 1 As shown, a UWB ranging data processing method is provided, including the following steps:

[0026] S10: Obtain real-time UWB signals through the tag device and query device of the UWB positioning system; the real-time UWB signals include the real-time ranging value between the query device and the tag device, and the UWB signal strength value; understandably, in this invention, the UWB positioning system includes a tag device and a query device communicatively connected to the tag device; the tag device can be worn on a movable subject, and the UWB positioning system includes multiple query devices, wherein the real-time ranging value refers to the real-time distance information between the query device and the tag device measured when any query device in the UWB positioning system communicates with the tag device (i.e., the two transmit UWB signals). The UWB signal strength value refers to the strength of the UWB signal received by the query device. Understandably, the UWB ranging data processing method in this invention can be executed by a controller, which can be a processor communicatively connected to the tag device and the query device in the UWB positioning system, or it can be a controller independent of the UWB positioning system.

[0027] S20: Input the UWB signal strength value and the real-time ranging value into a preset classification model, and obtain the classification label output by the preset classification model; the classification label is used to characterize the obstacle environment and relative angle between the query device and the label device.

[0028] In one embodiment, the obstacle environment between the queryer and the tag device includes, but is not limited to, one of the following obstacle environments: LOS (line-of-sight), NLOS (non-line-of-sight)-Soft, and NLOS-Hard; wherein, as Figure 2 As shown, 1, 2, 3, and 4 represent different rooms; Z represents a corridor; Q represents a wall obstacle; the circular black dot D represents tag device D in the UWB positioning system; and triangles A, B, and C represent query devices A, B, and C in the UWB positioning system, respectively; LOS refers to the environment in which UWB signals can be transmitted with high quality (e.g., Figure 2In the context of an obstacle environment (where the query device B is located relative to the tag device D), if there are no obstacles between the query device B and the tag device D, the UWB signal between them can be transmitted in a straight line. NLOS-Soft, on the other hand, refers to an environment with multiple obstacles between the query device and the tag device (e.g., [example environment]). Figure 2 The obstacle environment relative to the tag device D (as seen in the context of the obstacle environment surrounding the interrogator A) causes a significant attenuation or even complete blockage of the received signal strength (RSS) along the main transmission path between the interrogator and the tag device. In this case, the RSS does not correspond to the real-time ranging value, resulting in a large deviation in the real-time ranging value. NLOS-Soft (e.g.) Figure 2 The obstacle environment (the location of the query device C relative to the tag device D) refers to the presence of an obstacle (or a standard obstacle, such as a wall) between the query device and the tag device, leading to RSS attenuation and a discrepancy between the RSS and the real-time ranging value. In this case, the real-time ranging value will also be inaccurate. Understandably, since the number and attributes of obstacles (obstacle environments are classified as LOS or NLOS based on obstacle attributes; and NLOS is further divided into NLOS-Soft and NLOS-Hard based on the number of obstacles) all affect UWB ranging performance to varying degrees, this invention does not directly classify the obstacle environment into LOS and NLOS categories based on their attributes. Instead, it further divides it into three categories—LOS, NLOS-Soft, and NLOS-Hard—based on the number and attributes of obstacles. This simultaneously considers the interference of the number and attributes of obstacles on UWB signal transmission, significantly improving UWB ranging accuracy.

[0029] Further, the relative angle refers to the angle between the line connecting the query device and the tag device and a preset baseline, wherein the preset baseline and the connecting line are located on the same plane; the relative angle ranges from 0° to 360°; the number of relative angles can be set according to requirements (e.g., based on the distance measurement error between the query device and the tag device itself). The classification tag includes any one of the obstacle environments and any one of the relative angles within the angle range. The preset baseline can be pre-set, and each query device can be placed at a position with a different angle relative to the tag device. The relative angle is the angle between the line connecting the query device and the tag device and the preset baseline when the tag device intersects the preset baseline. Specifically, as shown... Figure 2As shown, if BD is taken as the preset baseline, the relative angle corresponding to query device B is 0°; the relative angle corresponding to query device A is the acute angle between AD and BD; and the relative angle corresponding to query device C is the angle greater than 180° between CD and BD. Understandably, different relative angles between the query device and the tag device will lead to different degrees of deviation in the real-time ranging value. This invention uses the relative angle as one of the parameters of the classification tag, and then takes into account the deviation caused by the relative angle during classification and deviation processing, thereby improving the accuracy of UWB ranging.

[0030] Understandably, classification labels need to be determined based on both the obstacle environment and the relative angle. If the obstacle environment is categorized into three types: LOS, NLOS-Soft, and NLOS-Hard; and the relative angles into eight types: 0°, 45°, 90°, 135°, 180°, 225°, 270°, and 315°, then the number of classification labels will be 24, and the classification type will be a combination of each obstacle environment and different relative angles (e.g., 0° LOS, 45° NLOS-Soft, etc.). Understandably, if the number of obstacle environment categories and the number of relative angles change, the number of classification labels and the classification types will also change accordingly. For example, if the obstacle environment remains at three categories, but the relative angles are divided into 16 categories, then the number of classification labels will be 48, and the classification types will change accordingly, which will not be elaborated further here.

[0031] Understandably, after the query device measures the real-time ranging value and the UWB signal strength value, the relative positional relationship between the query device and the tag position is unknown, as is the classification tag it corresponds to. However, in this invention, a preset classification model has been pre-trained based on the KNN (K-Nearest Neighbor) algorithm. At this point, it is only necessary to input the real-time ranging value and the UWB signal strength value into the preset classification model to obtain the classification tag calculated and output by the preset classification model. This allows the determination of the obstacle environment and relative angle (i.e., the classification tag) corresponding to the relative positional relationship between the query device and the tag position. Subsequently, the ranging error caused by obstacle interference is corrected based on the classification tag in subsequent steps to obtain the actual distance value between the query device and the tag device.

[0032] S30: Obtain the ranging deviation value associated with the classification label, and determine the actual distance between the query device and the label device based on the ranging deviation value and the real-time ranging value. Understandably, the ranging deviation value will vary depending on the obstacle environment and relative angle corresponding to the classification label. Therefore, it is necessary to first determine the ranging deviation value associated with the classification label, and then determine the actual distance between the query device and the label device based on the ranging deviation value and the real-time ranging value.

[0033] In one embodiment, step S30, namely obtaining the ranging deviation value associated with the classification label, and determining the actual distance between the query device and the label device based on the ranging deviation value and the real-time ranging value, includes:

[0034] When the obstacle environment corresponding to the classification label is LOS, the ranging deviation value is confirmed as a first deviation value, which is used to characterize the ranging deviation caused by the relative angle. That is, in this embodiment, after the classification label is determined, for the query device in the LOS obstacle environment, the ranging deviation value (i.e., the first deviation value) corresponding to the real-time ranging value it measures is actually only caused by the different relative angle settings (i.e., the ranging deviation value corresponding to the LOS obstacle environment is the deviation brought about by the hardware settings of the query device and tag device in the UWB positioning system).

[0035] The first deviation value corresponding to the relative angle in the classification label is obtained from the preset angle-deviation table, and the actual distance between the query device and the label device is determined based on the first deviation value and the real-time ranging value. That is, the first deviation value caused by different relative angles (the first deviation value is a constant) can be measured in advance, and then the first deviation value is associated with different relative angles and stored in the preset angle-deviation table for retrieval at any time; at this time, the actual distance value is the distance value obtained after correcting the first deviation value with the real-time ranging value. For example, if the current input UWB signal strength value of the preset classification model and the classification label corresponding to the real-time ranging value are 0° LOS; at this time, since there is no obstruction between the query device and the label device in the LOS obstacle environment, the real-time ranging value only needs to be adjusted according to the first deviation value.

[0036] In another embodiment, step S30, namely obtaining the ranging deviation value associated with the classification label and determining the actual distance between the query device and the label device based on the ranging deviation value and the real-time ranging value, includes:

[0037] When the obstacle environment corresponding to the classification label is NLOS-Soft or NLOS-Hard, the ranging deviation value is confirmed as a second deviation value. The second deviation value is used to characterize the ranging deviation caused by the obstacle environment and the relative angle. That is, in this embodiment, after the classification label is determined, for the query device in the NLOS-Soft and NLOS-Hard obstacle environment, the ranging deviation value corresponding to its measured real-time ranging value will be caused by the obstacles in the obstacle environment (including the number and attributes of obstacles) and the different relative angle settings.

[0038] From the preset label-deviation table, the second deviation value corresponding to the obstacle environment and the relative angle in the classification label is determined. Based on the second deviation value and the real-time ranging value, the actual distance between the query device and the label device is determined. That is, the second deviation value (the second deviation value is a constant) caused by different obstacle environments and different relative angles can be measured in advance, and then the second deviation value is associated with different classification labels (including obstacle environment and relative angle) and stored in the preset label-deviation table for retrieval at any time; at this time, the actual distance value is the distance value obtained after correcting the second deviation value with the real-time ranging value.

[0039] Because the transmission of UWB signals in a UWB positioning system is easily interfered with by obstacles, causing real-time ranging values ​​to fluctuate significantly or even lose ranging functionality, the UWB ranging results are inaccurate, leading to highly inaccurate positioning of the tag device. In this invention, a preset classification model is used to determine a classification label based on the real-time ranging value between the query device and the tag device in the UWB positioning system, as well as the UWB signal strength. This classification label characterizes the obstacle environment between the query device and the tag device (including information such as the number of obstacles between them) and the relative angle (i.e., the different relative angles corresponding to different relative positions of the query device and the tag device). Furthermore, a ranging deviation value pre-set with respect to this classification label can be determined. Based on the aforementioned ranging deviation value and the real-time ranging value, the actual distance between the query device and the tag device can be accurately determined. This invention considers both the effects of obstacles and relative angles on UWB ranging results, reducing ranging errors and improving UWB ranging accuracy. This significantly enhances the positioning performance of UWB in indoor environments with obstacles. Furthermore, in complex indoor environments, this invention eliminates the need to increase the number of query units to avoid obstacle interference, reducing costs and minimizing the impact of excessive query unit placement on the human body from room magnetic fields.

[0040] In one embodiment, such as Figure 4As shown, before step S20, that is, before inputting the UWB signal strength value and the real-time ranging value into the preset classification model, the method further includes:

[0041] S201, Obtain a signal dataset; the signal dataset includes multiple UWB signal samples collected by the UWB positioning system; each UWB signal sample is associated with a sample label; the sample label has the same number of classifications and classification types as the classification label; the UWB signal sample includes the sample distance value between the query device and the tag device and the sample signal strength value; specifically, the sample distance value refers to the distance information between the query device and the tag device measured when any query device in the UWB positioning system conducts UWB communication (i.e., UWB signal transmission between them) before training the preset classification model. The sample signal strength value refers to the strength of the UWB signal received by the query device during the aforementioned UWB communication process. The consistency of the number and type of categories between the sample labels and the classification labels means that the sample labels also include the sample environment and sample angle; the sample environment is consistent with the obstacle environment category in the above classification labels; the sample angle is consistent with the relative angle category in the above classification labels; and the number of categories of the sample labels is consistent, so the final sample labels correspond one-to-one with the classification labels.

[0042] S202, the preset classification model is trained based on the signal dataset and the KNN algorithm. That is, the preset classification model needs to be trained based on the aforementioned signal dataset, and this training process is based on the KNN algorithm.

[0043] In one specific embodiment, such as Figure 5 As shown, step S202, namely, training the preset classification model based on the signal dataset and the KNN algorithm, includes:

[0044] S2021, the signal dataset is split into a training set, a test set, and a trial set; specifically, the signal dataset is first split into a training set (B data points), a test set (N data points), and a trial set (P data points). The training set is used to train the KNN model, the test set is used to select an appropriate K value, and the trial set is used to verify the accuracy of the KNN model. Understandably, the specific proportions of B, N, and P can be set according to requirements. For example, when dividing a small-scale signal dataset, 60% of the UWB signal samples in the entire signal dataset can be allocated to the training set, 20% to the trial set, and 20% to the experimental set. When partitioning a signal dataset of millions of samples, 98% of the UWB signal samples can be allocated to the training set, and 1% to the test set (assuming the signal dataset contains 1 million UWB signal samples, and 10,000 data points in each set fully meet the testing and verification requirements). The signal dataset used in this invention is preferably a small-scale dataset. The above partitioning ratio can also be adjusted according to needs. For example, when partitioning a small-scale signal dataset, the training set can be set to account for 2 / 3 or 4 / 5 of the entire dataset. When partitioning a signal dataset of millions of samples, the training set can be set to account for 99 / 100 of the entire dataset.

[0045] Furthermore, the ratio between the number of UWB signal samples in the signal dataset corresponding to different sample labels (or sample environments) is a specific ratio. Therefore, after dividing the training set, test set, and experimental set, the ratio between the number of UWB signal samples in the training set, test set, and experimental set corresponding to different sample labels (or sample environments) will also be equal to this specific ratio. For example, if the ratio between the number of UWB signal samples in the collected signal dataset corresponding to different sample environments (LOS, NLOS-Soft, NLOS-Hard) is 10:2:5, then after dividing the training set, test set, and experimental set, the ratio between the number of UWB signal samples in the training set, test set, and experimental set corresponding to different sample environments should also remain at 10:2:5.

[0046] S2022, A KNN model is trained based on the training set and the KNN algorithm. Specifically, the process of training a KNN model based on the training set is roughly as follows: UWB signal samples from the training set are input into an initial KNN model, and the initial KNN model is used to predict the input UWB signal samples to obtain predicted labels; the prediction loss value of the initial KNN model is determined based on the sample label corresponding to the same UWB signal sample and the predicted label; when the prediction loss value does not reach the preset convergence condition, the initial parameters in the initial KNN model are iteratively updated until the prediction loss value reaches the convergence condition, and the converged initial KNN model is recorded as the trained KNN model.

[0047] Understandably, the prediction loss is generated during the prediction of the predicted labels for UWB signal samples and is used to characterize the difference between the sample label and the predicted label. Specifically, after obtaining the predicted labels, all sample labels corresponding to the UWB signal samples are arranged according to the order of the UWB signal samples in the UWB signal sample set. Then, the predicted label associated with the UWB signal sample is compared with the sample labels of UWB signal samples in the same sequence; that is, according to the UWB signal samples, the sample label corresponding to the first UWB signal sample is compared with the predicted label corresponding to the first UWB signal sample, and the loss value between the sample label and the predicted label is determined by the loss function. Then, the sample label corresponding to the second UWB signal sample is compared with the predicted label corresponding to the second UWB signal sample, until all sample labels and predicted labels have been compared, and the prediction loss value of the initial KNN model can be determined. Understandably, the convergence condition can be the condition that the predicted loss value is less than a set threshold, that is, when the predicted loss value is less than the set threshold, training stops; the convergence condition can also be the condition that the predicted loss value is very small after 500 calculations and will not decrease further, at which point training stops.

[0048] Specifically, after determining the prediction loss value of the initial KNN model, if the prediction loss value does not reach the preset convergence condition, the initial parameters of the initial KNN model are adjusted based on the prediction loss value. All UWB signal samples are then re-inputted into the adjusted initial KNN model, and the model is trained using these UWB signal samples to obtain the corresponding prediction loss value. If this prediction loss value does not reach the preset convergence condition, the initial parameters of the initial KNN model are adjusted again based on this value until the prediction loss value of the re-adjusted initial KNN model reaches the preset convergence condition. In this way, the output of the initial KNN model continuously approaches the accurate result, increasing the prediction accuracy, until all prediction loss values ​​of the initial KNN model reach the preset convergence condition. The converged initial KNN model is then recorded as the successfully trained KNN model.

[0049] Furthermore, the KNN model trained using the KNN algorithm and the aforementioned training set will contain several redundant samples. These redundant samples will lead to longer computation times when using the KNN model subsequently. Therefore, in a further embodiment, redundant samples need to be removed before the KNN model can be considered to have been completely trained. Specifically, a UWB signal sample can be randomly selected from the training set and classified using the KNN model to obtain a matching label corresponding to the UWB signal sample. If the matching label of the UWB signal sample matches its sample label, then the matching sample is considered to be representable by other UWB signal samples, and this matching sample is considered redundant and removed. Understandably, after removing all redundant samples, the remaining UWB signal samples will be recorded as target samples, and the number of target samples is M (M refers to the number of UWB signal samples B in the training set minus the number of redundant samples).

[0050] S2023, determine the K value of the KNN model based on the test set; wherein, a current K value can be selected for the KNN model (selected from smallest to largest), and the UWB signal samples in the test set are sequentially input into the KNN model to obtain the test labels output by the KNN model corresponding to the current K value. The test label and sample label corresponding to the same UWB signal sample are compared. If they are not the same, the test result corresponding to the UWB signal sample is confirmed as a classification error. The ratio of the number of misclassified UWB signal samples to the total number of UWB signal samples in the test set is determined as the error rate corresponding to the current K value; compare the error rates corresponding to all current K values ​​selected from smallest to largest. As the K value gradually increases, the error rate will show a trend of first decreasing and then increasing. The current K value corresponding to the minimum error rate (the current K value corresponding to the inflection point of the error rate change) is the optimal K value, and this optimal K value is the K value of the KNN model determined based on the test set.

[0051] S2024, perform error verification on the KNN model with a determined K value based on the test set, and determine the KNN model that passes the error verification as the preset classification model.

[0052] In one embodiment, step S2024, namely, performing error verification on the KNN model based on the test set and determining the KNN model that passes the error verification as the preset classification model, includes:

[0053] The UWB signal samples in the test set are divided into multiple sample groups; specifically, all UWB signal samples in the test set are first divided into several sample groups, and the total number of UWB signal samples in each sample group after division can be recorded as w.

[0054] Each UWB signal sample in the sample group is sequentially input into the KNN model with a determined K value, and the verification labels output by the KNN model corresponding to each UWB signal sample are obtained respectively; that is, the UWB signal samples in the same sample group are sequentially input into the KNN model with a determined K value, and then the verification labels output by the KNN model corresponding to each UWB signal sample are counted.

[0055] When the verification label and sample label corresponding to the same UWB signal sample are consistent, the verification result of the UWB signal sample is confirmed to be accurate; that is, if the verification label and sample label corresponding to the same UWB signal sample are consistent, the verification result corresponding to the UWB signal sample is considered to be accurate; then the number q of accurate verification results corresponding to all UWB signal samples in each sample group is counted.

[0056] The accuracy value of the KNN model obtained by validating the sample group is obtained by dividing the number of all accurate verification results corresponding to the same sample group by the total number of UWB signal samples in the sample group; that is, the accuracy value obtained by validating the KNN model by each sample group is the ratio between the number of accurate verification results q corresponding to the sample group and the total number of UWB signal samples w in the sample group.

[0057] The mean squared error of the accuracy values ​​corresponding to each sample group is determined as the validation error of the KNN model. If the validation error is less than a preset error, the KNN model is considered to have passed error validation, and the KNN model is recorded as the preset classification model. That is, the mean squared error of the accuracy values ​​corresponding to all sample groups is the validation error of the KNN model. If the validation error is less than the preset error, the KNN model has passed validation, and at this point, the KNN model is the trained preset classification model. However, if the validation error is greater than or equal to the preset error, the KNN model has not passed error validation (the KNN model has not yet reached the expected value), and further training of the KNN model is required.

[0058] In one embodiment, the preset classification model includes multiple target samples. The target samples refer to the samples remaining after removing redundant samples from the UWB signal samples in the training set. That is, the preset classification model is obtained by training a KNN model using the KNN algorithm and a training set, determining the K value using a test set, and verifying the error using an experimental set. After training the KNN model using the KNN algorithm and a training set, the KNN model still contains several redundant samples. These redundant samples will cause subsequent calculations using the KNN model to be time-consuming. Therefore, redundant samples need to be removed before the KNN model can be considered to have been completely trained. Therefore, a UWB signal sample can be randomly selected from the training set, and the KNN model can be used to classify the UWB signal sample to obtain a matching label corresponding to the UWB signal sample. If the matching label of the UWB signal sample matches its sample label, then the matching sample is considered to be representable by other UWB signal samples, and the matching sample is considered redundant and removed. Understandably, after removing all redundant samples, the remaining UWB signal samples will be recorded as target samples, and the number of target samples is M (M refers to the number of UWB signal samples B in the training set minus the number of redundant samples).

[0059] Understandably, each target sample is a UWB signal sample. Each UWB signal sample is associated with a sample label; the sample label has the same number of classifications and classification type as the classification label; the UWB signal sample includes the sample distance value between the query device and the tag device, as well as the sample signal strength value; therefore, each target sample is also associated with a sample label; the target sample also includes the sample distance value between the query device and the tag device, as well as the sample signal strength value; wherein, the sample distance value refers to the distance information between the query device and the tag device measured when any query device in the UWB positioning system conducts UWB communication (i.e., UWB signal transmission) before training the preset classification model. The sample signal strength value refers to the strength of the UWB signal received by the query device during the aforementioned UWB communication process. The consistency of the number and type of categories between the sample labels and the classification labels means that the sample labels also include the sample environment and sample angle; the sample environment is consistent with the obstacle environment category in the above classification labels; the sample angle is consistent with the relative angle category in the above classification labels; and the number of categories of the sample labels is consistent, so the final sample labels correspond one-to-one with the classification labels.

[0060] Furthermore, step S20, namely, inputting the UWB signal strength value and the real-time ranging value into a preset classification model and obtaining the classification label output by the preset classification model, includes:

[0061] The UWB signal strength value and the real-time ranging value are input into a preset classification model, so that the preset classification model calculates the Euclidean distance between the real-time UWB signal and each of the target samples based on the UWB signal strength value, the real-time ranging value, the sample ranging value, and the sample signal strength value; the preset classification model is trained based on the KNN algorithm; specifically, the Euclidean distance is calculated according to the following formula:

[0062]

[0063] in:

[0064] The Euclidean distance between the real-time UWB signal and the i-th target sample;

[0065] The strength value of the real-time UWB signal;

[0066] The real-time ranging value of the real-time UWB signal;

[0067] The sample ranging value of the i-th target sample;

[0068] The sample signal strength value of the i-th target sample;

[0069] The preset classification model inserts the Euclidean distances corresponding to all target samples into the classification array in ascending order; that is, the number of Euclidean distances in the classification array is K, where K is equal to the K value determined for the KNN model in step S2023 above. In other words, the Euclidean distance between the input real-time UWB signal and each target sample is calculated. However, the smaller the Euclidean distance, the higher the reliability of the corresponding real-time UWB signal. Therefore, in one embodiment, all Euclidean distances can be stored in the classification array r, but the classification label is determined only based on the sample labels corresponding to the K relatively smaller Euclidean distances in the classification array r. In another embodiment, however, not all Euclidean distances can be inserted into the classification array, but only the K relatively smaller Euclidean distances can be inserted into the classification array for use in subsequent steps to determine the classification label. Here, K is equal to the K value determined for the KNN model in step S2023 above.

[0070] The classification labels output by the preset classification model are obtained. These labels are determined based on the sample labels corresponding to the first K Euclidean distances in the classification array. In other words, the sample labels corresponding to the first K Euclidean distances in the classification array can be statistically analyzed and calculated to further determine the classification labels.

[0071] In one embodiment, obtaining the classification labels output by the preset classification model includes:

[0072] The preset classification model counts the occurrences of the sample labels corresponding to the first K Euclidean distances in the classification array, and outputs the sample label with the highest occurrences as the classification label. In other words, in this embodiment, the preset classification model only needs to count which category of sample label appears most frequently among the sample labels corresponding to the first K Euclidean distances, and then record and output the sample label with the highest occurrences as the classification label.

[0073] In another embodiment, step S20, obtaining the classification labels output by the preset classification model, includes:

[0074] The preset classification model assigns weights to the sample labels corresponding to the first K Euclidean distances in the classification array. Specifically, after determining the sample labels corresponding to the first K Euclidean distances in the classification array, there may be two or more sample labels that appear most frequently. In this case, in this embodiment, different weights are assigned to the sample labels corresponding to each Euclidean distance in the classification array. That is, the earlier the Euclidean distance (higher confidence) in the classification array, the greater its weight; the later the Euclidean distance (relatively lower confidence), the smaller its weight. For example, the weight corresponding to the first Euclidean distance in the classification array can be set to K / K=1, the weight corresponding to the second Euclidean distance to (K-1) / K, and so on, with the weight corresponding to the Kth Euclidean distance being 1 / K.

[0075] The preset classification model sums all the weights of the sample labels of the same class to obtain the classification coefficient corresponding to each class of sample labels. Specifically, for example, the classification array is Arr=[1.2, 4, 5.7, 8.2,……], where the sample label corresponding to the 1st, 2nd, 6th, …th Euclidean distance is 0°LOS; the sample label corresponding to the 3rd, 4th, 10th, …th Euclidean distance is 45°NLOS-Soft; and so on. Finally, the classification coefficient corresponding to the sample label 0°LOS is x=1+(k-1) / k+(k-5) / k+……, and the classification coefficient corresponding to the sample label 45°NLOS-Soft is y=(k-2) / k+(k-3) / k+(k-9) / k…….

[0076] Obtain the classification label output by the preset classification model. The classification label refers to the sample label corresponding to the largest classification coefficient. That is, as described in the above embodiment, if the classification coefficient x corresponding to the sample label 0°LOS, the classification coefficient y corresponding to the sample label 45°NLOS-Soft, and other classification coefficients are obtained; then, if it is determined that x>y, and x is the largest among all classification coefficients, the classification label can be determined to be 0°LOS, and the preset classification model outputs the classification label 0°LOS.

[0077] In one embodiment, the UWB positioning system includes at least four query devices; that is, in a complex indoor environment, it is necessary to perform three-dimensional positioning of the object being detected (such as moving objects, robots, and pedestrians) with tagged devices. Therefore, based on the actual measurable range of the UWB positioning system and the actual positioning environment, at least four query devices can be deployed in a fixed scene (since the space is three-dimensional, at least four query devices are needed to obtain different real-time UWB signals, and then the deviation of the real-time ranging values ​​is corrected to obtain at least four actual distance values. Finally, the three-dimensional coordinate position of the object being detected by the tagged devices is monitored based on at least four qualified actual distance values).

[0078] Furthermore, after step S30, that is, after determining the actual distance value between the query device and the tag device, the method further includes:

[0079] Median filtering is applied to all actual distance values ​​corresponding to a preset positioning time point (e.g., the current time point). Specifically, median filtering smooths the actual distance values. The median filtering process involves obtaining the actual distance values ​​corresponding to N real-time UWB signals measured by the same query device before the preset positioning time point, arranging them in descending order, and then finding the actual distance value corresponding to the middle position of the queue. This is the actual distance value corresponding to the query device at the preset positioning time point. Understandably, the value of N can be set according to requirements. A larger value of N results in a smoother actual distance value output after median filtering, ultimately leading to better positioning of the tag device's coordinates. However, a larger value of N also reduces the hardware processing speed.

[0080] Cross-validation is performed on all the actual distance values ​​after median filtering to remove outliers. The number of actual distance values ​​after median filtering is equal to the number of query machines (one for each query machine). Outliers can be identified through cross-validation, specifically, as follows: Figure 3As shown, query devices E, F, G, and H are arranged in a fixed scene, while tag device I is placed on the target device. To determine whether the actual distance value corresponding to query device H is an outlier, cross-validation can be performed on all the actual distance values ​​after median filtering. Specifically, first, the fixed distance p1 between H and F is obtained. Then, the actual distance value d1 corresponding to query device E after median filtering and the actual distance value d2 corresponding to query device E after median filtering are obtained. If d1 + d2 > p1, the actual distance value d2 is considered a valid normal distance value; conversely, if d1 + d2 ≤ p1, the actual distance value d2 is considered an invalid (abnormal three-way relationship) outlier. The remaining actual distance values ​​can be verified using the same cross-validation method, which will not be elaborated further here.

[0081] When the number of normal distance values ​​is greater than or equal to four, the coordinate position of the tag device at the preset positioning time point is determined based on all the normal distance values; the normal distance value refers to the actual distance value after removing outliers. Since all normal distance values ​​correspond to the preset positioning time point, the three-dimensional coordinate position of the tag device at the preset positioning time point can be determined based on the above four or more normal distance values ​​using positioning calculation methods such as the least squares method. Understandably, when the number of normal distance values ​​is less than four, the three-dimensional coordinate position of the tag device at the preset positioning time point cannot be calculated, therefore no positioning calculation is performed, and a message indicating that the coordinate position cannot be obtained is displayed.

[0082] Understandably, in this embodiment, even with the influence of obstacles and different relative angles, the positioning accuracy is already very high, and the positioning is very accurate and stable, after determining the actual distance value through the preset classification model trained based on the KNN algorithm and processing the actual distance value through median filtering, the positioning of the tag device at the preset positioning time point is based on the actual distance value. Furthermore, compared to algorithms that are computationally complex and computationally intensive, such as SVM, deep neural networks, particle filtering, and Kalman filtering, the KNN algorithm in this invention is simple to implement and more suitable for multi-class classification problems.

[0083] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.

[0084] In one embodiment, a UWB ranging data processing device is provided, which corresponds one-to-one with the UWB ranging data processing method in the above embodiments. The UWB ranging data processing device includes:

[0085] The acquisition module is used to acquire real-time UWB signals collected by a UWB positioning system; the UWB positioning system includes a tag device and a query device that is communicatively connected to the tag device; the real-time UWB signal includes the real-time ranging value between the query device and the tag device and the UWB signal strength value;

[0086] The classification module is used to input the UWB signal strength value and the real-time ranging value into a preset classification model, and obtain the classification label output by the preset classification model; the classification label is used to characterize the obstacle environment and relative angle between the query device and the label device;

[0087] The determination module is used to obtain the ranging deviation value associated with the classification label, and determine the actual distance between the query device and the label device based on the ranging deviation value and the real-time ranging value.

[0088] Specific limitations regarding the UWB ranging data processing device can be found in the limitations of the UWB ranging data processing method described above, and will not be repeated here. Each module in the aforementioned UWB ranging data processing device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the corresponding operations of each module.

[0089] This invention also provides a controller for executing the aforementioned UWB ranging data processing method. Specific limitations of the controller can be found in the above-described limitations of the UWB ranging data processing method, and will not be repeated here. Understandably, the controller can be a processor communicating with the tag device and the query device in a UWB positioning system, or it can refer to a controller independent of the UWB positioning system. Each module in the controller can be implemented entirely or partially through software, hardware, or a combination thereof. Each module can be embedded in hardware or independently of the processor in a computer device, or it can be stored in software in the memory of a computer device, so that the processor can call and execute the operations corresponding to each module. Understandably, the controller can be considered as one or more computer devices, such as... Figure 6As shown, the computer device includes a processor, memory, network interface, and database connected via a system bus. The processor provides computing and control capabilities. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores the operating system, computer programs, and the database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The database stores the data used in the UWB ranging data processing method described in the above embodiment. The network interface communicates with external terminals via a network connection. When the computer program is executed by the processor, it implements a UWB ranging data processing method.

[0090] This invention also provides a UWB positioning system, including a tag device, a query device, and a controller. The query device is communicatively connected to the tag device; the controller is communicatively connected to both the query device and the tag device; the controller is used to execute the aforementioned UWB ranging data processing method. Specific limitations regarding the controller and other components in the UWB positioning system can be found in the above-described limitations of the UWB ranging data processing method, and will not be repeated here. Each module in the controller can be implemented entirely or partially through software, hardware, or a combination thereof.

[0091] In one embodiment, a computer-readable storage medium is provided, the computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described UWB ranging data processing method.

[0092] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0093] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is used as an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.

[0094] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included within the protection scope of the present invention.

Claims

1. A UWB ranging data processing method, characterized in that, include: Real-time UWB signals are obtained through tag devices and query devices of the UWB positioning system; the real-time UWB signals include the real-time ranging value between the query device and the tag device, as well as the UWB signal strength value. The UWB signal strength value and the real-time ranging value are input into a preset classification model, and the classification label output by the preset classification model is obtained; the classification label is used to characterize the obstacle environment and relative angle between the query device and the label device; The obstacle environment between the query device and the tagging device includes: LOS, NLOS-Soft, and NLOS-Hard; the relative angle refers to the angle between the line connecting the query device and the tagging device and a preset baseline, wherein the preset baseline and the connecting line are located in the same plane; the classification tag includes any one of the obstacle environments and any one of the relative angles within the angle range; Obtain the ranging deviation value associated with the classification label, and determine the actual distance between the query device and the label device based on the ranging deviation value and the real-time ranging value; The step of obtaining the ranging deviation value associated with the classification label, and determining the actual distance between the query device and the label device based on the ranging deviation value and the real-time ranging value, includes: When the obstacle environment corresponding to the classification label is NLOS-Soft or NLOS-Hard, the ranging deviation value is confirmed to be a second deviation value, which is used to characterize the ranging deviation caused by the obstacle environment and the relative angle. From the preset label-deviation table, determine the second deviation value corresponding to the obstacle environment and the relative angle in the classification label, and determine the actual distance between the query device and the label device based on the second deviation value and the real-time distance measurement value.

2. The UWB ranging data processing method of claim 1, wherein, The step of obtaining the ranging deviation value associated with the classification label, and determining the actual distance between the query device and the label device based on the ranging deviation value and the real-time ranging value, includes: When the obstacle environment corresponding to the classification label is LOS, the ranging deviation value is confirmed to be a first deviation value, which is used to characterize the ranging deviation caused by the relative angle. The first deviation value corresponding to the relative angle in the classification label is obtained from the preset angle-deviation table, and the actual distance between the query device and the label device is determined based on the first deviation value and the real-time distance measurement value.

3. The UWB ranging data processing method of claim 1, wherein, Before inputting the UWB signal strength value and the real-time ranging value into the preset classification model, the method further includes: Acquire a signal dataset; the signal dataset includes multiple UWB signal samples collected by the UWB positioning system; each UWB signal sample is associated with a sample tag; the sample tag has the same number of categories and category type as the classification tag; the UWB signal sample includes the sample ranging value between the query device and the tag device and the sample signal strength value; The preset classification model is obtained by training the signal dataset and the KNN algorithm.

4. The UWB ranging data processing method of claim 3, wherein, The step of training the preset classification model based on the signal dataset and the KNN algorithm includes: The signal dataset is split into a training set, a test set, and an experimental set; The KNN model is trained based on the training set and the KNN algorithm. The K value of the KNN model is determined based on the test set. The KNN model with a determined K value is subjected to error verification based on the test set, and the KNN model that passes the error verification is determined as the preset classification model.

5. The UWB ranging data processing method of claim 4, wherein, The step of performing error verification on the KNN model based on the test set, and determining the KNN model that passes the error verification as the preset classification model, includes: The UWB signal samples in the test set are divided into multiple sample groups; Each UWB signal sample in the sample group is sequentially input into the KNN model with a determined K value, and the verification labels output by the KNN model corresponding to each UWB signal sample are obtained respectively. When the verification label and sample label corresponding to the same UWB signal sample are consistent, the verification result of the UWB signal sample is confirmed to be accurate. The accuracy value of the KNN model obtained by validating the sample group is obtained by dividing the number of all accurate verification results corresponding to the same sample group by the total number of UWB signal samples in the sample group. The mean square error of the accuracy values ​​corresponding to each sample group is determined as the validation error of the KNN model. When the validation error is less than a preset error, the error validation of the KNN model is determined to be successful, and the KNN model is recorded as the preset classification model.

6. The UWB ranging data processing method of claim 1, wherein, The preset classification model includes multiple target samples; the target samples refer to the samples remaining after removing redundant samples from the UWB signal samples in the training set; each UWB signal sample is associated with a sample label; the sample label has the same number and type of classification as the classification label; the UWB signal sample includes the sample ranging value between the query device and the label device and the sample signal strength value; The step of inputting the UWB signal strength value and the real-time ranging value into a preset classification model and obtaining the classification label output by the preset classification model includes: The UWB signal strength value and the real-time ranging value are input into a preset classification model, so that the preset classification model calculates the Euclidean distance between the real-time UWB signal and each of the target samples based on the UWB signal strength value, the real-time ranging value, the sample ranging value, and the sample signal strength value; the preset classification model is trained based on the KNN algorithm. The preset classification model inserts the Euclidean distances corresponding to all the target samples into the classification array in ascending order; Obtain the classification labels output by the preset classification model. The classification labels are determined based on the sample labels corresponding to the first K Euclidean distances in the classification array.

7. The UWB ranging data processing method of claim 6, wherein, The step of obtaining the classification labels output by the preset classification model includes: The preset classification model assigns weights to the sample labels corresponding to the first K Euclidean distances in the classification array; wherein the weight of the Euclidean distance that is ranked earlier in the classification array is greater than the weight of the Euclidean distance that is ranked later. The preset classification model sums all the weights of the sample labels of the same class to obtain the classification coefficient corresponding to each class of sample labels. Obtain the classification label output by the preset classification model, wherein the classification label refers to the sample label corresponding to the largest classification coefficient.

8. The UWB ranging data processing method of claim 6, wherein, The step of obtaining the classification labels output by the preset classification model includes: The preset classification model counts the occurrences of the sample labels corresponding to the first K Euclidean distances in the classification array, and outputs the sample label with the highest occurrences among all the sample labels as the classification label.

9. The UWB ranging data processing method of claim 1, wherein, The UWB positioning system includes at least four of the query devices; After determining the actual distance between the query device and the tag device, the method further includes: Median filtering is performed on all actual distance values ​​corresponding to the preset positioning time point; Cross-validation is performed on all the actual distance values ​​after median filtering to remove outliers from all the actual distance values; When the number of normal distance values ​​is greater than or equal to four, the coordinate position of the tag device at the preset positioning time point is determined based on all the normal distance values; the normal distance value refers to the actual distance value after removing abnormal values.

10. A UWB ranging data processing apparatus, characterized by comprising: include: The acquisition module is used to acquire real-time UWB signals through the tag device and query device of the UWB positioning system; the real-time UWB signal includes the real-time ranging value between the query device and the tag device and the UWB signal strength value. The classification module is used to input the UWB signal strength value and the real-time ranging value into a preset classification model, and obtain the classification label output by the preset classification model; the classification label is used to characterize the obstacle environment and relative angle between the query device and the label device; The obstacle environment between the query device and the tagging device includes: LOS, NLOS-Soft, and NLOS-Hard; the relative angle refers to the angle between the line connecting the query device and the tagging device and a preset baseline, wherein the preset baseline and the connecting line are located in the same plane; the classification tag includes any one of the obstacle environments and any one of the relative angles within the angle range; The determination module is used to acquire a ranging deviation value associated with the classification label, and determine the actual distance between the query device and the label device based on the ranging deviation value and the real-time ranging value. The acquisition of the ranging deviation value associated with the classification label and the determination of the actual distance between the query device and the label device based on the ranging deviation value and the real-time ranging value includes: when the obstacle environment corresponding to the classification label is NLOS-Soft or NLOS-Hard, confirming that the ranging deviation value is a second deviation value, the second deviation value being used to characterize the ranging deviation caused by the obstacle environment and the relative angle; determining the second deviation value corresponding to the obstacle environment and the relative angle in the classification label from a preset label-deviation table, and determining the actual distance between the query device and the label device based on the second deviation value and the real-time ranging value.

11. A controller characterized by comprising: The controller is used to execute the UWB ranging data processing method as described in any one of claims 1 to 9.

12. A UWB positioning system, characterized by The device includes a tag device, a query device, and a controller, wherein the query device is communicatively connected to the tag device; the controller is communicatively connected to both the query device and the tag device; and the controller is used to execute the UWB ranging data processing method as described in any one of claims 1 to 9.

13. A computer-readable storage medium, the computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the UWB ranging data processing method as described in any one of claims 1 to 9.