A 3D tag localization and prediction method and device based on machine learning PPO algorithm
By constructing a Jacobi matrix and error function based on the PPO algorithm of machine learning for 3D tag localization, and performing data smoothing, the uncertainty problem of trilateration algorithm under noise and measurement error is solved, and higher accuracy localization and data tracking are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-06
- Publication Date
- 2026-04-03
AI Technical Summary
Existing trilateration algorithms suffer from high uncertainty in positioning results due to noise, environmental factors, and measurement errors, which affects ranging accuracy.
A 3D tag localization method based on the PPO algorithm of machine learning is adopted. By constructing the Jacobian matrix, setting the error function, and performing data smoothing, machine learning is used to find the local error minimum and perform minimum error search within a unit sphere to improve the local positioning accuracy.
It improves the positioning accuracy of the label's 3D coordinates and the accuracy of data tracking, and reduces the uncertainty caused by noise and measurement errors.
Smart Images

Figure CN116482604B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of 3D ranging technology, and in particular to a 3D tag localization prediction method, apparatus, device, and storage medium based on the machine learning PPO algorithm. Background Technology
[0002] Trilateration positioning (TRP) is computationally inexpensive and easy to implement, making it the most commonly used method for ranging and positioning. An ideal TRP algorithm involves drawing circles with the base station as the center and the distance from the tag to the base station as the radius, solving a system of equations, and the intersection of the three circles represents the tag's position coordinates. However, due to non-line-of-sight (LOS) conditions, ranging measurements generally introduce errors, causing the three circles to intersect pairwise rather than as a single point, resulting in small areas. This negatively impacts positioning accuracy. Furthermore, factors such as noise, environmental conditions, and measurement errors can lead to significant errors in communication distance estimation, resulting in considerable uncertainty in the TRP calculations and posing challenges to subsequent applications such as ranging. Summary of the Invention
[0003] This invention provides a 3D tag localization prediction method, apparatus, device, and storage medium based on the PPO algorithm of machine learning, which aims to predict the 3D coordinates of the tag based on the distance measurement from the tag to the base station and perform data smoothing processing to improve the accuracy of tracking data.
[0004] Therefore, the first objective of this invention is to propose a 3D tag localization and prediction method based on the machine learning PPO algorithm, comprising:
[0005] Based on the trilateration positioning method, a Jacobian matrix is constructed to determine the initial values of the tag's 3D coordinates relative to the base station;
[0006] Set the 3D coordinate error function for the predicted labels and the corresponding acceptable error range, and filter the predicted 3D coordinate values of the labels that meet the error function from the initial 3D coordinate values;
[0007] Based on the machine learning PPO algorithm, the predicted label 3D coordinates with the minimum local error are sought from the predicted 3D coordinates of the label that conform to the error function.
[0008] The predicted label 3D coordinates are searched for the minimum error within a unit sphere for the corresponding local error minimum value to obtain the final predicted label 3D coordinates.
[0009] Among them, the trilateration positioning method involves setting up a series of continuous triangles on the ground, using an electromagnetic wave rangefinder or a laser rangefinder to directly measure the side length of each triangle in the triangular network, and calculating the interior angles of each triangle according to the principles of trigonometry, thereby calculating the azimuth of each side and the coordinates of each triangle point; wherein, the vertices of the triangles are base stations and, or tags.
[0010] The Jacobian matrix is a matrix of first-order partial derivatives arranged in a certain way. The Jacobian matrix represents the optimal linear approximation of a differentiable equation to a given point as the 3D coordinates of the base station and / or tag.
[0011] In the step of selecting the tag predicted 3D coordinate values that conform to the error function from the initial 3D coordinate values, considering the error in the ranging from each base station to the tag, the ranging data from any base station to the tag is simulated and input, and the tag predicted 3D coordinates that meet the minimum error value are searched within the area and used as the tag predicted 3D coordinate values that conform to the error function.
[0012] In the step of seeking the predicted label 3D coordinates with the minimum local error from the predicted 3D coordinates of the label based on the error function, the machine learning PPO algorithm is constructed. The predicted 3D coordinates of the label based on the error function at the selected point are used as the algorithm input. The algorithm is iterated multiple times and verified with the input distance measurement to find the predicted label 3D coordinates with the minimum local error.
[0013] After obtaining the final predicted 3D coordinate values of the label, data processing is performed on the final predicted 3D coordinate values of the label to improve the accuracy of the tracking data.
[0014] The data processing method is as follows:
[0015] For the predicted 3D coordinates of the corresponding local error minimum value, the velocity and acceleration are calculated. Based on the spline interpolation method and the trend surface smoothing interpolation principle, interpolation (interpolation and extrapolation) analysis is performed to smooth the label trajectory and avoid abrupt changes in the predicted 3D coordinates of the label.
[0016] The second objective of this invention is to provide a 3D tag localization and prediction device based on the machine learning PPO algorithm, comprising:
[0017] The first calculation module is used to construct the Jacobian matrix based on the trilateration positioning method and determine the initial value of the tag's 3D coordinates relative to the base station;
[0018] The filtering module is used to set the 3D coordinate error function of the predicted labels and the corresponding acceptable error range, and to filter the predicted 3D coordinate values of the labels that meet the error function from the initial 3D coordinate values;
[0019] The second calculation module is used to seek the predicted label 3D coordinate value corresponding to the local error minimum from the predicted label 3D coordinate values that conform to the error function based on the machine learning PPO algorithm.
[0020] The third calculation module is used to perform a minimum error search within a unit sphere on the predicted label 3D coordinates corresponding to the minimum local error, and obtain the final predicted label 3D coordinates.
[0021] A third objective of the present invention is to provide an electronic device comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the steps of the method described above.
[0022] A fourth objective of this invention is to provide a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause a computer to perform the steps of the method according to the foregoing technical solution.
[0023] Unlike existing technologies, this invention provides a 3D tag localization and prediction method based on the machine learning PPO algorithm. Based on trilateration positioning, it constructs a Jacobian matrix to determine the initial 3D coordinates of the tag relative to the base station. It sets a 3D coordinate prediction error function and a corresponding acceptable error range, and filters tag prediction 3D coordinate values that conform to the error function. Based on the machine learning PPO algorithm, it seeks the predicted tag 3D coordinate values corresponding to the minimum local error. Finally, it performs a minimum error search within a unit sphere to obtain the final tag prediction 3D coordinate values. This invention enables the prediction of tag 3D coordinates based on the distance measured from the tag to the base station and performs data smoothing processing to improve the accuracy of tracking data. Attached Figure Description
[0024] The present invention and / or its additional aspects and advantages will become apparent and readily understood from the following description of the embodiments taken in conjunction with the accompanying drawings, in which:
[0025] Figure 1 This is a flowchart illustrating a 3D tag localization and prediction method based on the PPO algorithm of machine learning provided by the present invention.
[0026] Figure 2 This is a schematic diagram of the structure of a 3D tag localization and prediction device based on the PPO algorithm of machine learning provided by the present invention.
[0027] Figure 3 This is a schematic diagram of the structure of a non-transitory computer-readable storage medium provided by the present invention. Detailed Implementation
[0028] Embodiments of the present invention are described in detail below. Examples of these embodiments are illustrated in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain the present invention, and should not be construed as limiting the present invention.
[0029] like Figure 1 As shown in the figure, a 3D label localization and prediction method based on the machine learning PPO algorithm provided in an embodiment of the present invention includes:
[0030] S110: Based on the trilateration positioning method, construct the Jacobian matrix to determine the initial 3D coordinates of the tag relative to the base station.
[0031] Among them, the trilateration positioning method involves setting up a series of continuous triangles on the ground, using an electromagnetic wave rangefinder or a laser rangefinder to directly measure the side length of each triangle in the triangular network, and calculating the interior angles of each triangle according to the principles of trigonometry, thereby calculating the azimuth of each side and the coordinates of each triangle point; wherein, the vertices of the triangles are base stations and, or tags.
[0032] The Jacobian matrix is a matrix of first-order partial derivatives arranged in a certain way. The Jacobian matrix represents the best linear approximation of a differentiable equation to a given point as the 3D coordinates of a base station and / or tag.
[0033] Basic Principles of Trilateration Positioning Algorithm (2D)
[0034] Given the positions of three points (x1, y1), (x2, y2), and (x3, y3);
[0035] Given the distances d1, d2, and d3 from the unknown point (x0, y0) to three points;
[0036] Draw three circles with radii d1, d2, and d3. Using the Pythagorean theorem, derive the formula for calculating the position of the intersection point, i.e., the unknown point:
[0037] (x1-x0) 2 +(y1-y0) 2 =d1 2
[0038] (x2-x0) 2 +(y2-y0) 2 =d2 2
[0039] (x3-x0) 2 +(y3-y0) 2 =d3 2
[0040] To extend this to 3D, we need to know the 3D coordinates of four points (x, y, z) and the distances from the unknown point to the four points.
[0041] In actual construction site tracking, multiple (>=4) base stations are installed. These base stations contain known point locations and distances from unknown points to known points (UWB ranging), forming multiple systems of equations. Based on these equations, a Jacobin Matrix is constructed to calculate the 3D coordinates of the tags.
[0042] S120: Set the 3D coordinate error function and the corresponding acceptable error range for the predicted labels, and select the predicted 3D coordinate values of the labels that meet the error function from the initial 3D coordinate values.
[0043] In this invention, a prediction tag 3D coordinate error function and an acceptable error range are defined. Considering the error in ranging from each base station to the tag, each input ranging data is simulated and input, and the tag prediction 3D coordinates that meet the minimum error value are searched within the region.
[0044] Error function: Based on the predicted 3D coordinates (x, y, z), calculate the distances to each effective base station (coordinates (x0, y0, z0), (x1, y1, z1), etc.), and then calculate the sum of the differences between these distances and the distances actually measured by the corresponding UWB technology.
[0045] Distance0*Distance0=(x-x0)*(x-x0)+(y-y0)*(y-y0)+(z-z0)*(z-z0)
[0046] Distance1*Distance1=(x-x1)*(x-x1)+(y-y1)*(y-y1)+(z-z1)*(z-z1) ...
[0048] Error = ABS(Distance0 - Measured Distance) + ABS(Distance0 - Absolute Value of Measured Distance) + ...
[0049] Acceptable error range: 0-0.1 meters (adjustable);
[0050] Each input distance measurement data is simulated: with the actual distance measurement as the center, it is iterated within the range of (-0.5, +0.5) meters (adjustable) with an interval of 0.01 meters (adjustable).
[0051] S130: Based on the machine learning PPO algorithm, the predicted label 3D coordinates value with the minimum local error is sought from the predicted 3D coordinates value of the label that conforms to the error function.
[0052] Considering the computational error in the numerical solution of the Jacobin Matrix, based on the error range and referring to the principle in the PPO algorithm of machine learning, multiple iterations are performed to find the label 3D coordinates corresponding to the local minimum error value.
[0053] To avoid getting stuck in a local minimum error, the currently found 3D coordinates of the label are verified against the input distance measurement. This process is repeated iteratively to find the accurate 3D coordinates of the label with the local minimum error.
[0054] S140: Perform a minimum error search within a unit sphere on the predicted label 3D coordinates corresponding to the minimum local error value to obtain the final predicted label 3D coordinates.
[0055] After obtaining the final predicted 3D coordinate values of the label, data processing is performed on the final predicted 3D coordinate values of the label to improve the accuracy of the tracking data.
[0056] The data processing method is as follows:
[0057] For the predicted 3D coordinates of the corresponding local error minimum value, the velocity and acceleration are calculated. Based on the spline interpolation method and the trend surface smoothing interpolation principle, interpolation (interpolation and extrapolation) analysis is performed to smooth the label trajectory and avoid abrupt changes in the predicted 3D coordinates of the label.
[0058] Minimum error search within the distance sphere: This is because when solving the Jacobian matrix, sometimes we get 3D coordinates with large errors. We use a search within the distance sphere to quickly obtain the predicted coordinates within the region, and then continue the iteration.
[0059] Principle: Using the effective base station as the center and the measured distance as the radius, calculate the intersection of the predicted coordinate points on the sphere, and use the error function to calculate the error; then perform this calculation for the next effective base station until the last effective base station, and take the tag coordinates corresponding to the minimum value of the error function.
[0060] like Figure 2 As shown, the present invention also provides a 3D tag localization and prediction device based on the machine learning PPO algorithm, comprising:
[0061] The first calculation module 310 is used to construct the Jacobian matrix based on the trilateration positioning method and determine the initial value of the 3D coordinates of the tag relative to the base station;
[0062] The filtering module 320 is used to set the 3D coordinate error function of the predicted label and the corresponding acceptable error range, and to filter the predicted 3D coordinate values of the label that meet the error function from the initial 3D coordinate values;
[0063] The second calculation module 330 is used to seek the predicted label 3D coordinate value corresponding to the local error minimum from the predicted label 3D coordinate values that conform to the error function based on the machine learning PPO algorithm.
[0064] The third calculation module 340 is used to perform a minimum error search within a unit sphere on the predicted label 3D coordinates corresponding to the minimum local error, and obtain the final predicted label 3D coordinates.
[0065] To implement the embodiments, the present invention also proposes an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the steps in the 3D tag localization prediction method of the aforementioned technical solution.
[0066] like Figure 3 As shown, the non-transitory computer-readable storage medium includes a memory 810 for instructions and an interface 830, the instructions of which can be executed by a 3D tag-based localization prediction processor 820 to complete the method. Optionally, the storage medium can be a non-transitory computer-readable storage medium, such as a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device.
[0067] To implement the embodiments, the present invention also proposes a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements 3D tag localization prediction as described in the embodiments of the present invention.
[0068] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., refer to specific features, structures, materials, or characteristics described in connection with that embodiment or example, which are included in at least one embodiment or example of the invention. In this specification, illustrative expressions of the terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.
[0069] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this invention, "a plurality of" means at least two, such as two, three, etc., unless otherwise explicitly specified.
[0070] Any process or method description in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or more executable instructions for implementing custom logic functions or processes, and the scope of preferred embodiments of the invention includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the functions involved, as should be understood by those skilled in the art to which embodiments of the invention pertain.
[0071] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of computer-readable media include: an electrical connection having one or more wires (electronic device), a portable computer disk drive (magnetic device), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Alternatively, the computer-readable medium may be paper or other suitable media on which the program can be printed, since the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in a computer memory.
[0072] It should be understood that various parts of the present invention can be implemented in hardware, software, firmware, or a combination thereof. In the described embodiments, multiple steps or methods can be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware as in another embodiment, it can be implemented using any of the following techniques known in the art, or a combination thereof: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.
[0073] Those skilled in the art will understand that all or part of the steps of the method described in the embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, the program includes one or a combination of the steps of the method embodiments.
[0074] Furthermore, the functional units in the various embodiments of the present invention can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into a module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium.
[0075] The storage medium mentioned may be a read-only memory, a disk, or an optical disk, etc. Although embodiments of the present invention have been shown and described above, it is to be understood that the embodiments are exemplary and should not be construed as limiting the present invention. Those skilled in the art can make changes, modifications, substitutions, and variations to the embodiments within the scope of the present invention.
Claims
1. A 3D tag localization and prediction method based on the PPO algorithm of machine learning, characterized in that, include: Based on the trilateration positioning method, a Jacobian matrix is constructed to determine the initial values of the tag's 3D coordinates relative to the base station; Set the 3D coordinate error function of the predicted label and the corresponding acceptable error range, and filter the predicted 3D coordinate values of the label that conform to the error function from the initial 3D coordinate values; Based on the machine learning PPO algorithm, the predicted label 3D coordinate value with the corresponding local error minimum is sought from the predicted 3D coordinate values of the label that conform to the error function. The predicted 3D coordinates of the label corresponding to the minimum local error are searched for the minimum error within a unit sphere to obtain the final predicted 3D coordinates of the label. After obtaining the final predicted 3D coordinate values of the label, data processing is performed on the final predicted 3D coordinate values of the label to improve the accuracy of the tracking data. The data processing method is as follows: For the predicted 3D coordinates of the corresponding local error minimum value, the velocity and acceleration are calculated. Based on the spline interpolation method and the trend surface smoothing interpolation principle, interpolation analysis is performed to smooth the label trajectory.
2. The 3D tag localization and prediction method based on the machine learning PPO algorithm according to claim 1, characterized in that, The triangular measurement and positioning method involves laying out a series of continuous triangles on the ground, directly measuring the side length of each triangle in the triangular network using an electromagnetic wave rangefinder or a laser rangefinder, and calculating the interior angles of each triangle according to the principles of trigonometry, thereby calculating the azimuth angle of each side and the coordinates of each triangle point; wherein, the vertices of the triangles are the base station and / or the tag.
3. The 3D tag localization and prediction method based on the machine learning PPO algorithm according to claim 1, characterized in that, In the step of selecting the predicted 3D coordinate values of the tag that conform to the error function from the initial 3D coordinate values, considering that there are errors in the ranging from each base station to the tag, the ranging data from any base station to the tag is simulated and input, and the predicted 3D coordinates of the tag that meet the minimum error value are searched within the area and used as the predicted 3D coordinate values of the tag that conform to the error function.
4. The 3D tag localization and prediction method based on the machine learning PPO algorithm according to claim 1, characterized in that, In the step of seeking the predicted label 3D coordinate value corresponding to the minimum local error from the predicted label 3D coordinate values that conform to the error function based on the machine learning PPO algorithm, the machine learning PPO algorithm is constructed. The predicted label 3D coordinate values that conform to the error function at the selected point are used as the algorithm input, and multiple iterations are performed. The results are verified with the input distance measurement to seek the predicted label 3D coordinate value corresponding to the minimum local error.
5. A 3D tag localization and prediction device based on the machine learning PPO algorithm, characterized in that, include: The first calculation module is used to construct the Jacobian matrix based on the trilateration positioning method and determine the initial value of the tag's 3D coordinates relative to the base station; The filtering module is used to set the 3D coordinate error function of the predicted label and the corresponding acceptable error range, and to filter the predicted 3D coordinate values of the label that conform to the error function from the initial 3D coordinate values. The second calculation module is used to seek the predicted label 3D coordinate value corresponding to the minimum local error from the predicted label 3D coordinate values that conform to the error function based on the machine learning PPO algorithm. The third calculation module is used to perform a minimum error search within a unit sphere on the predicted label 3D coordinates of the corresponding local error minimum value to obtain the final predicted label 3D coordinates. After obtaining the final predicted 3D coordinate values of the label, data processing is performed on the final predicted 3D coordinate values of the label to improve the accuracy of the tracking data. The data processing method is as follows: For the predicted 3D coordinates of the corresponding local error minimum value, the velocity and acceleration are calculated. Based on the spline interpolation method and the trend surface smoothing interpolation principle, interpolation analysis is performed to smooth the label trajectory.
6. An electronic device, comprising: At least one processor; And a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the steps of the method according to any one of claims 1-4.
7. A non-transitory computer-readable storage medium storing computer instructions, wherein, The computer instructions are used to cause the computer to perform each step of the method according to any one of claims 1-4.
Citation Information
Patent Citations
Distance measurement positioning method and device
CN111381209A