A UWB double-anchor-point-based automobile key positioning method and device, an electronic device, and a storage medium

By employing a UWB dual-anchor-point positioning method, and using dual verification of distance and angle, along with dynamic weighted fusion, the problem of unstable positioning of UWB signals due to environmental interference in car key positioning is solved, achieving high-precision and high-reliability car key positioning.

CN120935762BActive Publication Date: 2025-12-30SHANGHAI DANDI COMM TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511470856.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-10-15
Publication Date
2025-12-30
Estimated Expiration
2045-10-15

AI Technical Summary

Technical Problem

UWB signals are susceptible to metal obstruction, multipath effects, and dynamic environmental interference in car key positioning, leading to range jumps, inaccurate angle measurements, and poor positioning consistency in different areas. Existing technologies lack effective multi-dimensional data verification and fusion mechanisms, making it difficult to maintain stable positioning accuracy.

Method used

A UWB-based dual-anchor-point positioning method is adopted. Through a dual verification mechanism of distance and angle, combined with dynamic weighted fusion, the UWB base stations at the first and second anchor points receive car key signals respectively, perform data validity verification and filtering, and output the final positioning result.

Benefits of technology

It significantly improves the reliability and accuracy of positioning data in complex environments, increasing the positioning success rate from 82% to 97%, and controlling the average positioning latency within 50ms, meeting the response time requirements of ISO 13407 for automotive user interaction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120935762B_ABST
    Figure CN120935762B_ABST
Patent Text Reader

Abstract

The application discloses a kind of based on UWB double anchor point's car key positioning method, device, electronic equipment and storage medium, belong to wireless positioning technical field.The method includes: by first and second anchor point UWB base station respectively real-time receiving UWB car key signal, obtains the original distance data and angle data of car key relative to vehicle body;Distance data is checked for validity, and effective value is output using filtering processing, including corresponding timestamp;According to the angle data of corresponding moment for the effectiveness of timestamp check, and angle effective value is output using filtering processing;According to angle effective value, judge the position area of car key relative to vehicle body, dynamically weighted fusion distance effective value and angle effective value of front and rear anchor points, output the final output distance and output angle of car key relative to vehicle body.The present application can solve the problem of key positioning data fluctuation in the prior art, insufficient precision, realize the reliability and precision of positioning data are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of wireless positioning technology, and more specifically to a method, apparatus, electronic device, and storage medium for locating car keys based on UWB dual anchor points. Background Technology

[0002] UWB technology is widely used in indoor and outdoor positioning scenarios due to its advantages such as high precision and low power consumption. However, in car key positioning applications, UWB signals are susceptible to factors such as metal obstruction, multipath effects, and dynamic environmental interference, leading to problems such as ranging value jumps, inaccurate angle measurements, and poor positioning consistency in different areas.

[0003] Existing technologies lack effective multi-dimensional data verification and fusion mechanisms, making it difficult to maintain stable positioning accuracy in complex environments. Summary of the Invention

[0004] In view of this, the present invention provides a car key positioning method, device, electronic device and storage medium based on UWB dual anchor points. By introducing a dual verification mechanism of distance and angle, dynamic weighted fusion and other methods, the invention solves the problems of large fluctuations and insufficient accuracy of key positioning data in the prior art, and can improve the reliability and accuracy of positioning data.

[0005] To achieve the above objectives, the present invention adopts the following technical solution:

[0006] In a first aspect, embodiments of the present invention provide a car key positioning method based on UWB dual anchor points, comprising the following steps:

[0007] S1. Receive UWB car key signals in real time through the first and second anchor point UWB base stations respectively, and obtain the original distance and angle data of the car key relative to the car body;

[0008] S2. The distance data is validated, and a filtering process is used to output a valid distance value; the valid distance value includes the corresponding timestamp.

[0009] S3. Based on the timestamp, the angle data at the corresponding time is validated, and the valid angle value is output after filtering.

[0010] S4. Determine the position area of ​​the car key relative to the vehicle body based on the effective angle value, and dynamically weight and fuse the effective distance and effective angle values ​​of the front and rear anchor points based on the position area to output the final positioning result of the car key relative to the vehicle body; the final positioning result includes: final output distance and final output angle.

[0011] Furthermore, in step S1, the first anchor point UWB base station is located at the front of the vehicle body, and the second anchor point UWB base station is located at the rear of the vehicle body.

[0012] Alternatively, in step S1, the first anchor point UWB base station may be located at the rear of the vehicle body, and the second anchor point UWB base station may be located at the front of the vehicle body.

[0013] Further, step S2 specifically includes:

[0014] Calculate the difference between the current distance data and the previous valid distance value;

[0015] If the difference is greater than the threshold or the current distance data is zero, the current distance data is determined to be invalid data and is discarded along with the angle data at the same time.

[0016] Otherwise, if the current distance data is valid, the current distance data is stored in the distance buffer; when the amount of data in the distance buffer reaches a set amount, the sliding average is calculated and the valid distance value is output; the valid distance value includes the corresponding timestamp.

[0017] Furthermore, step S3 specifically includes:

[0018] If the current distance data is valid, select the angle data corresponding to the timestamp;

[0019] Calculate the difference between the current angle data and the previous valid angle value, as well as the difference between their respective sliding average values;

[0020] If any difference exceeds the corresponding preset threshold, the current angle data is determined to be invalid data and is discarded along with the distance data at the same time.

[0021] Otherwise, if the current angle data is valid, the current angle data is stored in the angle buffer; when the amount of data in the angle buffer reaches a set amount, the sliding average value is calculated and the valid angle value is output; the valid angle value includes the corresponding timestamp.

[0022] Furthermore, step S4 specifically includes:

[0023] Unify the first and second anchor points, the UWB base station, and the vehicle body into the same coordinate system;

[0024] 1) If the effective value of the angle is within the range of 0°~30° or 330°~360°, then the car key is determined to be located in the area directly in front of the vehicle body.

[0025] The final output distance L is calculated using the formula: L = α * L1 + (1 - α) * L2;

[0026] The final output angle θ is calculated using the formula: θ = α * θ1 + (1 - α) * θ2;

[0027] Where α is the weighting coefficient; L1 is the effective distance value of the first anchor point; L2 is the effective distance value of the second anchor point; θ1 is the effective angle value of the first anchor point; θ2 is the effective angle value of the second anchor point;

[0028] 2) If the effective value of the angle is within the range of 150° to 210°, then it is determined that the car key is located in the area directly behind the vehicle body.

[0029] The final output distance L is calculated using the formula: L = α * L² + (1 - α) * L¹;

[0030] The final output angle θ is calculated using the formula: θ = α * θ² + (1 - α) * θ¹;

[0031] 3) If the effective angle value is within the range of 30° to 150°, the car key is determined to be located in the left side of the vehicle body; if the effective angle value is within the range of 210° to 330°, the car key is determined to be located in the right side of the vehicle body.

[0032] The final output distance L is calculated using the formula: L = λ * L1 + (1 - λ) * L2;

[0033] The final output angle θ is calculated using the formula: θ = λ * θ1 + (1 - λ) * θ2;

[0034] Where λ is a weighting coefficient, and it is not equal to α;

[0035] 4) The final output distance L and the final output angle θ are used as the final positioning results of the car key relative to the car body.

[0036] In a second aspect, embodiments of the present invention also provide a car key positioning device based on UWB dual anchor points, employing the method described in any one of the embodiments of the first aspect, the device comprising:

[0037] The first and second anchor point UWB base stations respectively receive UWB car key signals in real time to obtain the original distance and angle data of the car key relative to the car body;

[0038] The distance calculation module is used to verify the validity of the distance data and output a valid distance value by filtering; the valid distance value includes a corresponding timestamp.

[0039] An angle calculation module is used to perform validity verification on the angle data at the corresponding time based on the timestamp, and output the valid angle value by filtering.

[0040] The fusion positioning module is used to determine the position area of ​​the car key relative to the vehicle body based on the effective angle value, and dynamically weight and fuse the effective distance and effective angle values ​​of the front and rear anchor points based on the position area to output the final positioning result of the car key relative to the vehicle body; the final positioning result includes: final output distance and final output angle.

[0041] Thirdly, embodiments of the present invention provide an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the method as described in any one of the embodiments of the first aspect.

[0042] Fourthly, embodiments of the present invention also provide a storage medium having a computer program stored thereon, which, when executed by a processor, implements the method as described in any one of the embodiments of the first aspect.

[0043] The descriptions of the second and third aspects of this invention can be referred to the detailed description of the first aspect; and the beneficial effects described in the second and third aspects can be referred to the analysis of the beneficial effects of the first aspect, which will not be repeated here.

[0044] As can be seen from the above technical solution, compared with the prior art, the present invention has the following technical advantages:

[0045] By employing a dual verification mechanism of distance and angle, and using multi-dimensional threshold judgment to remove abnormal data, the reliability of positioning data in complex environments is significantly improved.

[0046] The moving average filter is applied to the data at the front and rear anchor points respectively, and the fusion weight is dynamically adjusted in combination with the spatial location to take into account the positioning accuracy requirements of different regions.

[0047] Angle calculation relies on the validity of distance data to form a data closed-loop verification, avoiding the impact of single-dimensional errors on positioning results, which is especially suitable for high-frequency dynamic positioning scenarios of car keys.

[0048] Compared with existing single-anchor-point positioning methods, the dual-anchor-point collaborative verification mechanism of this invention increases the positioning success rate from 82% to 97%, and controls the average positioning delay to within 50ms, meeting the response time requirements of ISO 13407 for automotive user interaction. Attached Figure Description

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

[0050] Figure 1 The flowchart of the UWB dual-anchor point-based car key positioning method provided by the present invention is shown.

[0051] Figure 2 This is a schematic diagram of the car key positioning device based on UWB dual anchor points provided by the present invention.

[0052] Figure 3 The flowchart of the distance calculation module provided by this invention.

[0053] Figure 4 The flowchart of the angle calculation module provided by this invention.

[0054] Figure 5 The flowchart of the fusion positioning module provided by the present invention.

[0055] Figure 6 This is a schematic diagram of the vehicle body coordinate system provided by the present invention.

[0056] Figure 7 This is a structural diagram of the electronic device provided by the present invention. Detailed Implementation

[0057] 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 embodiments of the present invention, and not all embodiments. 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.

[0058] Example 1:

[0059] Reference Figure 1 As shown, this embodiment of the invention discloses a car key positioning method based on UWB dual anchor points, including the following steps S1~S4:

[0060] S1. Receive UWB car key signals in real time through the first and second anchor point UWB base stations respectively, and obtain the original distance and angle data of the car key relative to the car body;

[0061] In the field of car key positioning, a dual-anchor UWB base station system (front and rear) is used for collaborative positioning to improve coverage and accuracy. Two UWB base stations are installed in the vehicle, one at the front and one at the rear, to jointly locate the UWB car key in the user's pocket. The first anchor UWB base station is located at the front of the vehicle, and the second anchor UWB base station is located at the rear; or the first anchor UWB base station is located at the rear of the vehicle, and the second anchor UWB base station is located at the front. For ease of understanding, the following instructions will use "front anchor point" and "rear anchor point" in the description.

[0062] Within a certain detection range, the front and rear anchor points acquire real-time raw distance and angle data between the car key and the vehicle body. The UWB chip used in the UWB base station, for example, with a data output frequency of 20Hz, can acquire 20 sets of data per second. The buffer size is dynamically set to 1-2 times the UWB chip's data output frequency. For a 20Hz UWB chip, the buffer stores the most recent 20-40 valid data points; for a 15Hz chip, it stores 15-30 valid data points. This adaptive mechanism ensures that the moving average filtering time window remains stable at approximately 1 second, balancing real-time performance and anti-interference capabilities.

[0063] S2. The distance data is validated, and a filtering process is used to output a valid distance value; the valid distance value includes the corresponding timestamp.

[0064] Step S2 specifically includes:

[0065] S21. Calculate the difference between the current distance data and the previous valid distance value;

[0066] S22. If the difference is greater than the threshold or the current distance data is zero, the current distance data is determined to be invalid data and discarded along with the angle data at the same time.

[0067] S23. Otherwise, if the current distance data is valid, the current distance data is stored in the distance buffer; when the amount of data in the distance buffer reaches a set number, the sliding average is calculated and the valid distance value is output; the valid distance value includes the corresponding timestamp.

[0068] For example, the distance calculation during implementation is as follows:

[0069] 1) Initialization parameters: Set the distance buffer for the previous and next anchor points, for example, to store the 20 most recent valid distance data; initialize VALUE_LAST to the first non-zero distance data.

[0070] 2) Receive the current distance data VALUE_NEW in real time and calculate the difference between it and VALUE_LAST: GAP = |VALUE_NEW - VALUE_LAST|.

[0071] 3) Data validity assessment:

[0072] If GAP > 2 or VALUE_NEW == 0, the current distance data is determined to be invalid, the distance and angle data at that moment are deleted, and the process jumps to step 2) to receive the data at the next moment.

[0073] Otherwise, store VALUE_NEW in the distance cache. When the cache data reaches 20, calculate the average value Value = (current distance + the previous 19 distance data) / 20, update VALUE_LAST to VALUE_NEW, and save the average value Value and its corresponding timestamp.

[0074] During the distance validity assessment process, if a newly measured distance differs significantly from the previous reliable distance (e.g., >2 meters; the preferred threshold is 2 meters, but can be adjusted within the range of 1 to 4 meters depending on environmental requirements), or if a value of 0 is found (usually indicating that the original observation data output by the UWB chip at that moment is incorrect), the measurement is immediately deemed invalid and discarded; this is to prevent sudden changes. Conversely, if the change is small (≤ 2 meters and not 0), considered a reasonable fluctuation, it is recorded to prevent random fluctuations. Finally, an averaging process is implemented: for each anchor point, it remembers the most recent 20 valid distance measurements and calculates an average. This average is more representative of the true distance because random fluctuations are averaged out.

[0075] Data processing for front and rear anchor points: Repeat steps 1)-3) for the front anchor point and the rear anchor point respectively, and store the results into their respective storage areas.

[0076] The GAP threshold value 2 in the above preferred embodiment is the result of verification and optimization based on actual measurement data, while ensuring the accuracy and usability of the distance data processing results.

[0077] S3. The angle data at the corresponding time is validated based on the timestamp, and a filtering process is used to output the valid angle value. Even if the distance data has passed the validity check, if the corresponding angle data is determined to be invalid, the distance data will be discarded synchronously. Experimental data shows that the bidirectional discarding mechanism can reduce positioning errors by 15%-20%, especially in complex environments with significant multipath effects.

[0078] Step S3 specifically includes:

[0079] S31. If the current distance data is valid, select the angle data corresponding to the timestamp;

[0080] S32. Calculate the difference between the current angle data and the previous valid angle value, as well as the difference between their respective sliding average values;

[0081] S33. If any difference exceeds the corresponding preset threshold, the current angle data is determined to be invalid data and is discarded along with the distance data at the same time.

[0082] S34. Otherwise, if the current angle data is valid, the current angle data is stored in the angle buffer; when the amount of data in the angle buffer reaches a set number, the sliding average value is calculated and the valid angle value is output; the valid angle value includes the corresponding timestamp.

[0083] For example, the angle calculation during implementation is as follows:

[0084] When calculating the angle of the front anchor point, first determine whether the distance calculation data of the front anchor point is valid based on the time information. If it is valid, execute the following steps (1)-(4); otherwise, delete the angle data of the front anchor point and calculate the angle of the rear anchor point:

[0085] (1). Initialize parameters: Set the angle buffer to store the most recent 20 valid angle data; collect the first 20 angle data, calculate the average value, save it as VALUE_ANG_AVA_LAST, and assign it to VALUE_ANG_LAST.

[0086] (2) Receive the current angle data VALUE_ANG_NEW in real time, store it in the angle buffer, and calculate the average value of 20 data in the buffer VALUE_ANG_AVA_NEW.

[0087] (3). Calculate the angle difference:

[0088] GAP_ANG_AVA=|VALUE_ANG_AVA_NEW-VALUE_ANG_AVA_LAST|;

[0089] GAP_ANG = |VALUE_ANG_NEW - VALUE_ANG_LAST|.

[0090] (4). Validity judgment of angle data:

[0091] If GAP_ANG_AVA > 0.5 or GAP_ANG > 40, the current angle data is deemed invalid, and the distance and angle data at that moment are deleted.

[0092] Otherwise, update VALUE_ANG_AVA_LAST = VALUE_ANG_AVA_NEW and VALUE_ANG_LAST = VALUE_ANG_NEW, while saving the average value VALUE_ANG_AVA_NEW and its corresponding timestamp.

[0093] After the front anchor point angle data is processed, the validity of the corresponding distance data of the back anchor point also needs to be determined. The processing is carried out according to the above process (1)-(4), and the average angle and timestamp after processing are saved.

[0094] Among them, the GAP_ANG_AVA threshold value of 0.5 and the GAP_ANG threshold value of 40 are the results of optimization after verification with actual measurement data, which at the same time ensures the accuracy and usability of the angle data processing results.

[0095] During the angle validity assessment process, to prevent slow drift, the average of the current 20 valid angles is calculated. If this average differs significantly from the previous average (>0.5 degrees), the angle is considered to be slowly drifting and unreliable, thus invalidating the measurement. It also needs to prevent drastic fluctuations: for example, if a newly measured single angle differs significantly from the previous reliable angle (>40 degrees), it is also invalidated. If the changes are within a reasonable range, the record is updated to prepare for the next check.

[0096] Furthermore, in step S3, the validity checks for angle and distance are linked: if the angle data is invalid at any point in time, the corresponding distance data for that moment will be discarded, even if the distance was previously calculated as valid. Conversely, if the distance data is invalid, the angle does not need to be calculated. This ensures that the final fused data is "valid data" where both "distance" and "angle" have undergone double verification. Additionally, for example, if the data from both the first and second anchor points are invalid, the system skips this calculation and starts a timeout counter. If it skips 10 times consecutively, a hardware self-test process is triggered to check the power supply and communication status of the anchor points. This mechanism can effectively identify anchor point faults and improve system reliability.

[0097] S4. Determine the position area of ​​the car key relative to the vehicle body based on the effective angle value, and dynamically weight and fuse the effective distance and effective angle values ​​of the front and rear anchor points based on the position area to output the final positioning result of the car key relative to the vehicle body; the final positioning result includes: final output distance and final output angle.

[0098] Step S4 specifically includes: unifying the first anchor point, the second anchor point UWB base station, and the vehicle body into the same coordinate system;

[0099] 1) If the effective value of the angle is within the range of 0°~30° and 330°~360°, then it is determined that the car key is located in the area directly in front of the vehicle body.

[0100] The final output distance L is calculated using the formula: L = α * L1 + (1 - α) * L2;

[0101] The final output angle θ is calculated using the formula: θ = α * θ1 + (1 - α) * θ2;

[0102] Where α is the weighting coefficient; L1 is the effective distance value of the first anchor point; L2 is the effective distance value of the second anchor point; θ1 is the effective angle value of the first anchor point; θ2 is the effective angle value of the second anchor point;

[0103] 2) If the effective value of the angle is within the range of 150° to 210°, then it is determined that the car key is located in the area directly behind the vehicle body.

[0104] The final output distance L is calculated using the formula: L = α * L² + (1 - α) * L¹;

[0105] The final output angle θ is calculated using the formula: θ = α * θ² + (1 - α) * θ¹;

[0106] 3) If the effective angle value is within the range of 30° to 150°, the car key is determined to be located in the left side of the vehicle body; if the effective angle value is within the range of 210° to 330°, the car key is determined to be located in the right side of the vehicle body.

[0107] The final output distance L is calculated using the formula: L = λ * L1 + (1 - λ) * L2;

[0108] The final output angle θ is calculated using the formula: θ = λ * θ1 + (1 - λ) * θ2;

[0109] Where λ is a weighting coefficient, and it is not equal to α;

[0110] In practical implementation, for example, the weighting coefficient α is preferably 0.8 and λ is preferably 0.5. Experimental verification shows that this range of values ​​can keep the positioning accuracy within ±10cm, which meets the safety requirements for car key positioning.

[0111] 4) The final output distance L and the final output angle θ are used as the final positioning results of the car key relative to the car body.

[0112] Step S4 achieves data fusion of distance and angle between front and rear anchor points:

[0113] After unifying the front and rear anchor points to the same vehicle coordinate system, the position of the car key relative to the car can be determined by the angle after smoothing and filtering.

[0114] 1. If the current angle data is within the range (0 degrees to 30 degrees or 330 degrees to 360 degrees), it is determined that the angle is directly in front of the vehicle.

[0115] For example, the final output distance VALUE = 80% × distance from the front anchor point VALUE + 20% × distance from the back anchor point VALUE;

[0116] The final output angle VALUE = 80% × front anchor point angle VALUE + 20% × rear anchor point angle VALUE;

[0117] 2. If the current angle data is within the range (150 degrees to 210 degrees), it is determined that the person is directly behind the vehicle.

[0118] The final output distance VALUE = 80% × distance from the rear anchor point VALUE + 20% × distance from the front anchor point VALUE;

[0119] The final output angle VALUE = 80% × rear anchor point angle VALUE + 20% × front anchor point angle VALUE;

[0120] 3. If the current angle data falls outside the above range, it is determined to be within the range to the side of the vehicle: left side (30 degrees ~ 150 degrees), right side (210 degrees ~ 330 degrees).

[0121] The final output distance VALUE = 50% × distance from the front anchor point VALUE + 50% × distance from the back anchor point VALUE;

[0122] The final output angle VALUE = 50% × front anchor point angle VALUE + 50% × rear anchor point angle VALUE;

[0123] If any anchor point data is invalid, the remaining valid anchor point data will be used; if all anchor points are invalid, the current calculation will be skipped and the next measurement will be performed.

[0124] In specific implementation, to clearly define the area division, the range of angle values ​​mentioned above only needs to be divided into one of the intervals. Of course, it can be any one of two adjacent intervals. This disclosure does not limit this.

[0125] For example, the area directly in front includes the 0° and 360° endpoints, while the remaining intervals are left-closed and right-open; that is, 30° belongs to the left side area, 150° to the rear area, 210° to the right side area, and 330° to the front area. This division method is consistent with the automotive industry's usual practice of defining areas, which can reduce user confusion.

[0126] For example, taking the scenario of locating the front of a vehicle as an example, the determination process is as follows:

[0127] The initial distance data of the previous anchor point is VALUE_LAST = 3.2m. The current distance data VALUE_NEW = 3.3m is received. The calculated GAP = 0.1 < 2, which is considered valid.

[0128] The front anchor point buffer accumulated 20 data points (data per second), with an average value of 3.25m; the rear anchor point synchronously calculated an average value of 3.4m.

[0129] The current position is determined to be in front of the vehicle, and the final distance = 0.8 × 3.25 + 0.2 × 3.4 = 3.28m;

[0130] In the angle calculation, VALUE_ANG_AVA_NEW = 10.2°, VALUE_ANG_AVA_LAST = 10.0°, GAP_ANG_AVA = 0.2 < 0.5; VALUE_ANG_NEW = 10.5°, VALUE_ANG_LAST = 10.3°, GAP_ANG = 0.2 < 40°, therefore the result is valid.

[0131] Final angle = 0.8 × 10.2 + 0.2 × 10.5 = 10.26°.

[0132] For example, in the scenario of handling abnormal data, the processing procedure is as follows:

[0133] The previous anchor point VALUE_LAST = 2.5m, and the current VALUE_NEW = 0. The distance data is directly determined to be invalid, and the corresponding angle data is deleted. Only the valid data of the previous anchor point is used to calculate the final positioning result.

[0134] In this embodiment of the invention, the distance and angle measurements of each anchor point undergo rigorous quality control to eliminate jumps and errors. Distance and angle calculations are linked through a "distance-first verification": angle calculation is initiated only when the distance data is valid; if the angle data is invalid, the distance data at the corresponding time is deleted simultaneously, ensuring that all distance and angle data involved in positioning pass dual verification. Finally, based on the approximate location of the key, the weight coefficients of different anchor points are intelligently determined, and when an anchor point's data is invalid, the system automatically switches to another anchor point.

[0135] This method, through dynamic threshold verification and weighted fusion, ultimately solves the problems of distance jumps, inaccurate angles, and inconsistent results in different areas of the vehicle body that are easily encountered when using UWB positioning on a car, achieving more reliable and accurate car key positioning. Especially in complex environments, such as when obstructed by metal or in dynamic movement, it can make car UWB key positioning more accurate and stable; it can be widely used in scenarios such as keyless entry and automatic welcome systems.

[0136] Example 2:

[0137] Based on the same inventive concept, this invention also provides a car key positioning device based on UWB dual anchor points, employing the method described in Embodiment 1. The device includes:

[0138] The first and second anchor point UWB base stations respectively receive UWB car key signals in real time to obtain the original distance and angle data of the car key relative to the car body;

[0139] The distance calculation module is used to verify the validity of the distance data and output a valid distance value by filtering; the valid distance value includes a corresponding timestamp.

[0140] An angle calculation module is used to perform validity verification on the angle data at the corresponding time based on the timestamp, and output the valid angle value by filtering.

[0141] The fusion positioning module is used to determine the position area of ​​the car key relative to the vehicle body based on the effective angle value, and dynamically weight and fuse the effective distance and effective angle values ​​of the front and rear anchor points based on the position area to output the final positioning result of the car key relative to the vehicle body; the final positioning result includes: final output distance and final output angle.

[0142] In specific implementation, such as Figure 2 As shown, the car's MCU connects to two UWB anchor points (front anchor point processing module and rear anchor point processing module) via a CAN bus. Both anchor point processing modules utilize UWB RF front-end chips as fixed signal receiving base stations, installed at specific locations on the vehicle body (such as the front and rear bumpers) to receive signals emitted by the car key in real time. Furthermore, the UWB RF front-end chip includes a distance calculation module and an angle calculation module, which rigorously inspect the distance and angle measurements of each anchor point, eliminating jumps and errors. Distance and angle calculations are linked through a "distance-priority verification": angle calculation is initiated only when the distance data is valid. Finally, the MCU determines the car key's position relative to the vehicle body based on the valid angle value. Then, the fusion positioning module dynamically weights and fuses the valid distance and angle values ​​of the front and rear anchor points based on this position area, outputting the final positioning result of the car key relative to the vehicle body. This final positioning result includes the final output distance and the final output angle.

[0143] Reference Figure 3 The diagram shows the processing flow of the distance calculation module. The algorithm logic is based on real-time validity verification of the difference and moving average filtering.

[0144] The steps include the following:

[0145] (1) Initialize parameters and obtain the first non-zero distance data;

[0146] (2) Read new distance data:

[0147] (3) Calculate GAP: |VALUE_NEW - VALUE_LAST|, which is the key to determining whether the data has changed.

[0148] (4) Determine: GAP > 2 or VALUE_NEW == 0. Quickly remove obviously abnormal data by using the threshold (GAP>2, zero value) to prevent invalid data from entering the subsequent processing flow and polluting the cache area.

[0149] (5) Store in the buffer: Valid data is placed in a FIFO (first-in, first-out) queue with a capacity of 20 data items (corresponding to the amount of data per second).

[0150] (6) Calculate the average value output: When the buffer is full, calculate the moving average of 20 data points. This effectively smooths out random errors and small fluctuations, outputting a more stable distance data.

[0151] (7) Update VALUE_LAST: Output and save distance data; prepare for the arrival of the next data.

[0152] (8) Enter the angle calculation module.

[0153] Figure 4 This is a flowchart of the angle processing procedure, illustrating the algorithmic logic of the angle calculation module. Its key features include dual verification (verifying both instantaneous values ​​and average trends) and its integration with the distance processing module.

[0154] The steps include the following:

[0155] (1) Monitoring the validity of distance data: the core linkage mechanism. This reflects the "distance priority" principle, because the reliability of distance data is higher than that of angle data. If the corresponding distance data is invalid, the angle data is discarded directly, avoiding meaningless calculations based on errors.

[0156] (2) Calculate the two gaps:

[0157] GAP_ANG_AVA: The difference between the current 20-times average angle and the previous average angle. Used to determine if the angle trend has changed drastically.

[0158] GAP_ANG: The difference between the current instantaneous angle and the previous instantaneous angle. Used to determine whether the instantaneous value has changed abruptly.

[0159] Decision node (GAP_ANG_AVA > 0.5 or GAP_ANG > 40): Double checkpoint. If either condition is met, the result is invalid. The 0.5-degree threshold addresses slow drift, while the 40-degree threshold addresses instantaneous jumps, together ensuring the smoothness and reasonableness of the angle output.

[0160] (3) Update and output the average value: Update the cache with valid data and output the smoothed angle data. Finally, enter the fusion positioning module.

[0161] Figure 5 This is a flowchart of the data fusion process between the front and rear anchor points, demonstrating how the processing results of both anchor points are comprehensively utilized to generate the final optimal positioning result. Its core is a dynamic weighted fusion strategy based on spatial location.

[0162] The specific steps include the following:

[0163] (1) Input the filtered angle and distance data of the front and rear anchor points and convert them to the same vehicle body coordinate system;

[0164] (2) Determine the area where the key is located: Based on the effective angle values ​​after filtering the front and rear anchor points, divide the area around the vehicle into four main areas: front, rear, left, and right.

[0165] (3) Dynamic weight allocation:

[0166] Directly in front area: Assign the "primary" anchor point (front anchor point) of this area a high weight of 80%, and the "secondary" anchor point (back anchor point) a low weight of 20%.

[0167] The area directly behind: Assign the "main" anchor point (back anchor point) of this area a high weight of 80%, and the "secondary" anchor point (front anchor point) a low weight of 20%.

[0168] Because when the key is close to an anchor point, the measurement data at that anchor point is theoretically more reliable.

[0169] Lateral view: Assign equal weights of 50% to the two anchor points. Because the observation conditions of the two anchor points are similar when the key is in the middle of the vehicle, averaging the two can combine the information from both and improve accuracy.

[0170] (4) Anomaly handling: monitoring and fusion of the validity of the front and rear anchor point data; when an anchor point fails, the device can be downgraded to single anchor point working mode to continue to provide positioning services instead of completely failing.

[0171] (5) Output the final fused distance and angle results.

[0172] Figure 6 This is a schematic diagram of the vehicle body coordinate system. Figure 5 The fusion strategy provides a spatial and geometric basis for definition. Figure 6 In the vehicle coordinate system shown, the origin O is the geometric center of the vehicle body; the positive X-axis direction is the direction the vehicle is facing (0° reference direction), and the angle data increases counterclockwise until 360° coincides with 0°; the positive Y-axis direction is the left side of the vehicle body. The first anchor point is set at the position of the center rearview mirror inside the vehicle, and the second anchor point is set at the position of the rear reading light inside the vehicle. The two anchor points are symmetrical about the Y-axis.

[0173] Origin of the coordinate system: usually defined as the center of the vehicle.

[0174] Angle definition: The angle range is defined with the direction of the vehicle's front as 0° / 360°, and can be clockwise or counterclockwise (the example in the figure shows counterclockwise increase).

[0175] Regional division: Visually illustrated:

[0176] Frontal area: 0°~30° and 330°~360°;

[0177] Lateral area: 30°~150° (left side), 210°~330° (right side);

[0178] Rear area: 150°~210°.

[0179] The area directly in front includes the 0° and 360° endpoints. The remaining intervals are left-closed and right-open, meaning 30° belongs to the left side, 150° to the rear, 210° to the right, and 330° to the front. This division method is consistent with the automotive industry's usual area definition practices, reducing user confusion.

[0180] The UWB dual-anchor point-based car key positioning device provided in this embodiment of the invention offers a UWB car key positioning solution that is not only highly accurate but also stable, robust, and adaptive, achieving high-precision positioning of car keys.

[0181] Example 3:

[0182] Based on the same inventive concept, the present invention also provides an electronic device, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus;

[0183] Memory, used to store computer programs;

[0184] When the processor executes the program stored in the memory, it is able to implement the UWB dual-anchor point-based car key positioning method as described in any one of Embodiment 1.

[0185] like Figure 7 As shown, the electronic device may include: a processor 10, a communication interface 20, a memory 30, and a communication bus 40, wherein the processor 10, the communication interface 20, and the memory 30 communicate with each other via the communication bus 40. The processor 10 can call logical instructions in the memory 30 to execute precise positioning of the car key, the method including:

[0186] S1. Receive UWB car key signals in real time through the first and second anchor point UWB base stations respectively, and obtain the original distance and angle data of the car key relative to the car body;

[0187] S2. The distance data is validated, and a filtering process is used to output a valid distance value; the valid distance value includes the corresponding timestamp.

[0188] S3. Based on the timestamp, the angle data at the corresponding time is validated, and the valid angle value is output after filtering.

[0189] S4. Determine the position area of ​​the car key relative to the vehicle body based on the effective angle value, and dynamically weight and fuse the effective distance and effective angle values ​​of the front and rear anchor points based on the position area to output the final positioning result of the car key relative to the vehicle body; the final positioning result includes: final output distance and final output angle.

[0190] Example 4:

[0191] This invention also provides a computer-readable storage medium containing a program for executing the UWB dual-anchor point-based car key positioning method of Embodiment 1 described above. This program can be executed on a processor.

[0192] Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0193] The program stored on this medium is loaded into the processor's memory and executed to perform various functions. This storage medium, connected to hardware devices, enables the computer to perform the steps of Embodiment 1 described above.

[0194] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to the method section.

[0195] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A UWB double-anchor-point-based automobile key positioning method, characterized in that, The method comprises the following steps: S1, real-time receiving UWB car key signals through first and second anchor point UWB base stations respectively, to obtain original distance data and angle data of the car key relative to the vehicle body; wherein the first anchor point UWB base station is located at the front of the vehicle body, and the second anchor point UWB base station is located at the rear of the vehicle body; S2, validity checking is performed on the distance data, and a filtering process is adopted to output a distance valid value; the distance valid value comprises a corresponding time stamp; S3, validity checking is performed on the angle data at the corresponding moment according to the time stamp, and a filtering process is adopted to output an angle valid value; S4, judging the position region of the car key relative to the vehicle body according to the angle valid values filtered by the front and rear anchor points, and dynamically allocating the weights of the front and rear anchor points according to the position region, and weightedly fusing the distance valid values and the angle valid values of the front and rear anchor points to output a final positioning result of the car key relative to the vehicle body; the final positioning result comprises a final output distance and a final output angle.

2. The UWB double-anchor-based car key positioning method according to claim 1, wherein, The step S2 specifically comprises: calculating the difference between the current distance data and the last distance valid value; if the difference is greater than a threshold value or the current distance data is zero, determining that the current distance data is invalid data and discarding the current distance data together with the angle data at the same moment; otherwise, the current distance data is valid, and the current distance data is stored in a distance cache area; when the data amount of the distance cache area reaches a set amount, a sliding average value is calculated and a distance valid value is output; the distance valid value comprises a corresponding time stamp. 3.The UWB double-anchor-based automobile key positioning method according to claim 2, wherein, The step S3 specifically comprises: if the current distance data is valid, selecting the angle data at the corresponding moment according to the time stamp; calculating the difference between the current angle data and the last angle valid value, and the difference between the respective sliding average values; if any difference exceeds a corresponding preset threshold value, determining that the current angle data is invalid data and discarding the current angle data together with the distance data at the same moment; otherwise, the current angle data is valid, and the current angle data is stored in an angle cache area; when the data amount of the angle cache area reaches a set amount, a sliding average value is calculated and an angle valid value is output; the angle valid value comprises a corresponding time stamp.

4. The UWB double-anchor-based car key positioning method according to claim 3, characterized in that, The step S4 specifically comprises: unifying the first and second anchor point UWB base stations and the vehicle body to the same coordinate system; the origin O of the coordinate system is the geometric center of the vehicle body; the positive direction of the X axis is the direction of the vehicle head, the 0° reference direction, and the angle data increases in the counterclockwise direction until 360° coincides with 0°; the positive direction of the Y axis is the left direction of the vehicle body; the first and second anchor points are symmetrical about the Y axis; 1) if the angle valid value is in the region [0°, 30°) or [330°, 360°), it is determined that the car key is in the region in front of the vehicle body, the final output distance L is calculated by the formula: L=α*L1+(1-α)*L2; the final output angle θ is calculated by the formula: θ=α*θ1+(1-α)*θ2; Wherein, a is a weighting coefficient, a is greater than (1-a); L1 is the distance effective value of the first anchor point; L2 is the distance effective value of the second anchor point; θ1 is the angle effective value of the first anchor point; θ2 is the angle effective value of the second anchor point; 2) If the angle effective value is in the region [150°, 210°), it is determined that the car key is in the region directly behind the vehicle body, The final output distance L calculation formula is: L = a * L2 + (1-a) * L1; The final output angle θ calculation formula is: θ = a * θ2 + (1-a) * θ1; 3) If the angle effective value is in the region [30°, 150°), it is determined that the car key is in the region on the left side of the vehicle body; if the angle effective value is in the region [210°, 330°), it is determined that the car key is in the region on the right side of the vehicle body; The final output distance L calculation formula is: L = λ * L1 + (1-λ) * L2; The final output angle θ calculation formula is: θ = λ * θ1 + (1-λ) * θ2; Wherein, λ is a weighting coefficient; λ = 1-λ; 4) The final output distance L and the final output angle θ are taken as the final positioning result of the car key relative to the vehicle body.

5. A UWB double-anchor point based car key positioning device, characterized in that, The method of any one of claims 1-4 is adopted, and the device comprises: A first anchor point and a second anchor point UWB base station respectively receive UWB car key signals in real time, obtain original distance data and angle data of the car key relative to the vehicle body; wherein, the first anchor point UWB base station is located at the front of the vehicle body, and the second anchor point UWB base station is located at the rear of the vehicle body; A distance calculation module is used to check the validity of the distance data and output the distance effective value by filtering processing; the distance effective value includes a corresponding time stamp; An angle calculation module is used to check the validity of the angle data at the corresponding time according to the time stamp and output the angle effective value by filtering processing; A fusion positioning module is used to determine the position region of the car key relative to the vehicle body according to the filtered angle effective value of the front and rear anchor points, and dynamically allocate the weight of the front and rear anchor points according to the position region, and output the final positioning result of the car key relative to the vehicle body by weighted fusion of the distance effective value and the angle effective value of the front and rear anchor points; the final positioning result includes: final output distance and final output angle.

6. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The processor executes the program to implement the method of any one of claims 1 to 4.

7. A storage medium having stored thereon a computer program, characterized in that The program is executed by the processor to implement the method of any one of claims 1 to 4.

Citation Information

Patent Citations

  • TBOX BLE-RSSI positioning method

    CN114339597A

  • Dual-mode dual-anchor digital key positioning method and device, and positioning equipment

    CN120321767A