A pathfinding method, system and medium based on generalized UK method
Through the pathfinding method based on the generalized UK method, equality and inequality constraints are established, and the controller is designed to solve the pathfinding problem under continuity constraints that cannot be achieved with the existing technology, achieve more accurate and continuous path planning, and enhance Effectiveness of pathfinding methods.
Patent Information
- Application Number
- CN202211696870.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-28
- Publication Date
- 2024-08-30
- Estimated Expiration
- 2042-12-28
AI Technical Summary
Existing pathfinding methods cannot achieve pathfinding trajectory calculation under continuity constraints, mainly due to the use of discretization methods to solve maps and paths, which cannot meet the needs of continuity constraints.
A pathfinding method based on the generalized UK method is adopted to achieve continuity by determining the individual state quantities, establishing equality and inequality constraints, designing the controller, establishing pathfinding equations, initializing the state quantities and solving the pathfinding path under the constraints. Path computation under constraints.
It effectively adds a pathfinding method and can realize pathfinding trajectory calculation under continuity constraints. As an effective supplement to mainstream pathfinding methods, it provides more accurate and continuous path planning.
Smart Images

Figure SMS_9 
Figure SMS_14 
Figure SMS_15
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence, and in particular to a path-finding method, system and medium based on a generalized UK (Udwadia-Kalaba) method. Background Art
[0002] With the continuous development of computer technology, various artificial intelligence designs have emerged. Pathfinding is one of the most important and widely influential topics of artificial intelligence in application scenarios such as the metaverse, industrial Internet, and autonomous driving. The current mainstream pathfinding methods divide the map information on the plane into grids of varying sizes, traverse the given graph, and find the best solution to reach the destination area under obstacle constraints. However, the mainstream method uses a discretized method to solve the map and path, and cannot realize the calculation of pathfinding trajectories under continuity constraints. Summary of the invention
[0003] The technical problem to be solved by the present invention is: in response to the technical problems existing in the existing pathfinding technology, the present invention provides a pathfinding method, system and medium based on the generalized UK method. The present invention uses the ideas of control and constraints, and uses a continuity method to express obstacles, constraints and maps. It can realize the calculation of pathfinding trajectories under continuity constraints, and can serve as a supplement to the mainstream pathfinding method.
[0004] In order to solve the above technical problems, the technical solution proposed by the present invention is:
[0005] A pathfinding method based on the generalized UK method, comprising:
[0006] S101, determining the representation of the state quantity of the individual;
[0007] S102, establishing an equality constraint based on the state quantity of the individual, and designing a controller p1 for the equality constraint according to the generalized UK theory; establishing a local barrier function and a global inequality constraint based on the state quantity of the individual, and designing a controller p2 for the inequality constraint according to the generalized UK theory and the established local barrier function and global inequality constraint;
[0008] S103, establishing a pathfinding equation according to the controller p1 for the equality constraint and the controller p2 for the inequality constraint, initializing the state quantity of the individual and solving the pathfinding equation to calculate the pathfinding path of the individual under the constraint.
[0009] Optionally, when determining the representation of the state quantity of the individual in step S101, the state quantity of the individual includes position q, speed and acceleration And there are:
[0010] q=[q x qy ] T ,
[0011]
[0012]
[0013] In the above formula, q x ,q y are the position coordinates in the x and y directions respectively, are the velocities in the x and y directions respectively, are the accelerations in the x and y directions respectively.
[0014] Optionally, the function expression of the equality constraint established for the state quantity of the individual based on the generalized UK theory in step S102 is:
[0015]
[0016] In the above formula, A is the constraint matrix, b is the constraint vector of the equality constraint, is the acceleration of the state quantity.
[0017] Optionally, the function expression of the controller p1 for the equality constraint designed according to the generalized UK theory in step S102 is:
[0018] p1=a+M -1 / 2 (AM -1 / 2 ) + (b-Aa),
[0019] In the above formula, a=M -1 Q, M are the mass matrices, Q is the gravity term in the individual Lagrangian dynamics, I is the identity matrix, A is the constraint matrix, and b is the constraint vector of the equality constraint.
[0020] Optionally, in step S102, establishing a local barrier function and a global inequality constraint based on the state quantity of the individual includes:
[0021] S201, determine the function representation f of each obstacle i on the plane i (x) and the function representation of each obstacle external constraint j.g j (x);
[0022] S202, representing f according to the function of each obstacle i on the plane i (x) and the function representation g of each obstacle external constraint j j (x) Determine the functions F1(x) and F2 of the global inequality constraints ( x), and based on the generalized UK theory, the function expression of the global inequality constraint on the individual on the plane is established as follows:
[0023] F1(x)<φ(q)<F2(x),
[0024] In the above formula, F1(x) and F2(x) are the lower and upper boundaries of the global inequality constraint, φ(q) is the global inequality constraint, q is the position of the state quantity, and x is the position coordinate in the x direction;
[0025] S203, map the global inequality constraints imposed on the individual on the plane into continuous functions of all number axes:
[0026]
[0027] In the above formula, ξ is the constraint equation of the inequality constraint, and -∞∞<ξ<+∞;
[0028] S204, perform first-order differentiation on the constraint equation of the inequality constraint to obtain:
[0029]
[0030] In the above formula, is the first-order differential constraint equation with inequality constraints, are the first-order differentials of the position coordinates in the x direction, are the first-order differentials of the position coordinates in the y direction, G1 and G2 are intermediate variables, and:
[0031]
[0032]
[0033] S205, perform first-order differentiation on the constraint equation of the inequality constraint to obtain:
[0034]
[0035] In the above formula, is the second-order differential constraint equation of the inequality constraint, b is the constraint vector of the equality constraint, r1 is the intermediate variable, h1 represents the differential term that does not contain the inequality constraint, h2 represents the differential term of the inequality constraint, and there are:
[0036]
[0037] In the above formula, k1 and k2 are control parameters for constraining convergence.
[0038] Optionally, the function expressions of the functions F1(x) and F2(x) for determining the global inequality constraints in step S202 are:
[0039]
[0040]
[0041] In the above functions F1(x) and F2(x), k s1 and k s2 They represent the inclination degree of the two sides to the infinite constraints in the constraint design, s1 and s2 represent the displacement of the infinite constraints to the obstacle function, k p1 and k p2 They represent the tilt of the activation function, p1 and p2 represent the leftmost and rightmost coordinates of the obstacle, and k Fz1 , k Fy1 , k Fz2 , k Fy2 Represents the opening direction of the designed infinite function.
[0042] Optionally, the function expression of the controller p2 designed for the inequality constraint in step S102 is:
[0043] p2=(IA + A)r,
[0044] In the above formula, I is the identity matrix, A is the constraint matrix, and r is the constraint vector of the inequality constraint.
[0045] Optionally, step S103 includes:
[0046] S301, establishing a pathfinding equation according to the controller p1 for the equality constraint and the controller p2 for the inequality constraint:
[0047] τ=p1+p2,
[0048] In the above formula, τ represents the path-finding equation, p1 is the controller for equality constraints, and p2 is the controller for inequality constraints.
[0049] S302, initializing the position and speed of the state quantity of the individual, and calculating the individual's pathfinding path under constraints by solving the pathfinding equation using a differential equation solution method.
[0050] In addition, the present invention also provides a path-finding system based on the generalized UK method, comprising a microprocessor and a memory connected to each other, wherein the microprocessor is programmed or configured to execute the path-finding method based on the generalized UK method.
[0051] In addition, the present invention also provides a computer-readable storage medium, in which a computer program is stored. The computer program is used to be programmed or configured by a microprocessor to execute the path-finding method based on the generalized UK method.
[0052] Compared with the prior art, the present invention mainly has the following advantages:
[0053] 1. Based on the generalized UK theory, the present invention transforms obstacles and motion space into global constraint control, which can effectively increase the pathfinding methods and realize the pathfinding trajectory calculation under continuity constraints.
[0054] 2. The present invention uses the ideas of control and constraint and a continuity method to express obstacles, constraints and maps, which can serve as an effective supplement to the current mainstream path-finding methods. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] Figure 1 Schematic diagram of the basic flow of the method of the embodiment of the present invention.
[0056] Figure 2 Schematic diagram of a map in an embodiment of the present invention.
[0057] Figure 3 Schematic diagram of constraints in an embodiment of the present invention.
[0058] Figure 4 Schematic diagram of the path finding result solved in the embodiment of the present invention. DETAILED DESCRIPTION
[0059] The present invention is further described below in conjunction with the accompanying drawings and specific preferred embodiments, but the protection scope of the present invention is not limited thereby.
[0060] In order to solve the obstacle avoidance and path finding problems in the map and realize the path planning of the mechanical system under global constraints, for continuous scenarios, such as Figure 1 As shown, the path finding method based on the generalized UK method in this embodiment includes:
[0061] S101, determining the representation of the state quantity of the individual;
[0062] S102, establishing an equality constraint based on the state quantity of the individual, and designing a controller p1 for the equality constraint according to the generalized UK theory; establishing a local barrier function and a global inequality constraint based on the state quantity of the individual, and designing a controller p2 for the inequality constraint according to the generalized UK theory and the established local barrier function and global inequality constraint;
[0063] S103, establishing a pathfinding equation according to the controller p1 for the equality constraint and the controller p2 for the inequality constraint, initializing the state quantity of the individual and solving the pathfinding equation to calculate the pathfinding path of the individual under the constraint.
[0064] In this embodiment, when determining the representation of the state quantity of the individual in step S101, the state quantity of the individual includes position q, speed and acceleration And there are:
[0065] q=[qx q y ] T ,
[0066]
[0067]
[0068] In the above formula, q x ,q y are the position coordinates in the x and y directions respectively, are the velocities in the x and y directions respectively, are the accelerations in the x and y directions respectively.
[0069] The equality constraint γ(q) that the individual wants to reach on the plane is expressed as γ(q)=0, which can be expressed as the constraint equation in error form:
[0070] e=γ(q),
[0071]
[0072] In the above formula, e is the constraint equation of the equality constraint γ(q) that the individual needs to reach on the plane. is the second-order differential of e, is the first-order differential of e, k1 and k2 represent the control parameters of constraint convergence. Therefore, in this embodiment, the function expression of the equality constraint established for the state quantity of the individual based on the generalized UK theory in step S102 is:
[0073]
[0074] In the above formula, A is the constraint matrix, b is the constraint vector of the equality constraint, is the acceleration of the state quantity.
[0075] In this embodiment, the function expression of the controller p1 for the equality constraint designed according to the generalized UK theory in step S102 is:
[0076] p1=a+M -1 / 2 (AM -1 / 2 ) + (b-Aa),
[0077] In the above formula, a=M -1 Q, M are the mass matrices, Q is the gravity term in the individual Lagrangian dynamics, I is the identity matrix, A is the constraint matrix, and b is the constraint vector of the equality constraint.
[0078] In this embodiment, the establishment of a local barrier function and a global inequality constraint based on the state quantity of the individual in step S102 includes:
[0079] S201, determine the function representation f of each obstacle i on the plane i (x) and the function representation g of each obstacle external constraint j j (x);
[0080] In this embodiment, the obstacle on the plane is expressed in the form of a function as f j (x), the constraints that individuals on the plane need to follow in the area outside the obstacle are expressed as g j (x), i means there are i obstacles in total, and the form of each obstacle can be expressed as f i (x), j means there are j external obstacle constraints, and the form of each constraint can be expressed by g j (x). Figure 2 For example, the individual needs to start from the initial point (0, 0) and reach the line x = 11, and needs to pass x 2 -10<y<x 2 +10 area, so the barrier function is expressed as f1(x)=x 2 -10, f2(x)=x 2 +10; The constraints that individuals on the plane need to follow in the area outside the obstacles are expressed as --∞<g1(x), g2(x)<+∞.
[0081] S202, representing f according to the function of each obstacle i on the plane i (x) and the function representation g of each obstacle external constraint j j (x) Determine the functions F1(x) and F2(x) of the global inequality constraints, and establish the function expression of the global inequality constraints on the individual on the plane based on the generalized UK theory (generalized Woodwardia-Kalaba method):
[0082] F1(x)<φ(q)<F2(x),
[0083] In the above formula, F1(x) and F2(x) are the lower and upper boundaries of the global inequality constraint, φ(q) is the global inequality constraint, q is the position of the state quantity, and x is the position coordinate in the x direction. Figure 2 Taking the motion area in the actual space as an example, the lower and upper boundaries F1(x) and F2(x) of the global inequality constraints imposed on the actual individual in this embodiment are as follows: Figure 3 shown.
[0084] S203, map the global inequality constraints imposed on the individual on the plane into continuous functions of all number axes:
[0085]
[0086] In the above formula, ξ is the constraint equation of the inequality constraint, and -∞<ξ<+∞;
[0087] S204, perform first-order differentiation on the constraint equation of the inequality constraint to obtain:
[0088]
[0089] In the above formula, is the first-order differential constraint equation with inequality constraints, are the first-order differentials of the position coordinates in the x direction, are the first-order differentials of the position coordinates in the y direction, G1 and G2 are intermediate variables, and:
[0090]
[0091]
[0092] S205, perform first-order differentiation on the constraint equation of the inequality constraint to obtain:
[0093]
[0094] In the above formula, is the second-order differential constraint equation of the inequality constraint, b is the constraint vector of the equality constraint, r1 is the intermediate variable, h1 represents the differential term that does not contain the inequality constraint, h2 represents the differential term of the inequality constraint, and there are:
[0095]
[0096] In the above formula, k1 and k2 are control parameters for constraining convergence.
[0097] In this embodiment, the function expressions of the functions F1(x) and F2(x) for determining the global inequality constraints in step S202 are:
[0098]
[0099]
[0100] In the above functions F1(x) and F2(x), k s1 and k s2 They represent the inclination degree of the two sides to the infinite constraints in the constraint design, s1 and s2 represent the displacement of the infinite constraints to the obstacle function, k p1 and k p2 They represent the tilt of the activation function, p1 and p2 represent the leftmost and rightmost coordinates of the obstacle, and k Fz1 , k Fy1 , k Fz2 , k Fy2 Represents the opening direction of the infinite function of the design. The constraint design of the above formula is given by Infinite function constraints of the form, The activation function and f i (x) form of obstacle function. From the properties of the function, we can know that the established global constraint can achieve the property of being differentiable, which is the premise for the solvability of the generalized UK theory.
[0101] In this embodiment, the function expression of the controller p2 designed for the inequality constraint in step S102 is:
[0102] p2=(IA + A)r,
[0103] In the above formula, I is the identity matrix, A is the constraint matrix, and r is the constraint vector of the inequality constraint. Figure 2 and Figure 3 Taking the constraint as an example, the controller p2 designed for the inequality constraint in step S102 is:
[0104]
[0105] In the above formula, r1 is an intermediate variable, and there is:
[0106]
[0107] In the above formula, k1 and k2 are control parameters for constraining convergence.
[0108] In this embodiment, step S103 includes:
[0109] S301, establishing a pathfinding equation according to the controller p1 for the equality constraint and the controller p2 for the inequality constraint:
[0110] τ=p1+p2,
[0111] In the above formula, τ represents the path-finding equation, p1 is the controller for equality constraints, and p2 is the controller for inequality constraints.
[0112] S302, initialize the position and velocity of the individual state quantity (which can be expressed as q (t=0) and ), the initial acceleration is set to 0, and the pathfinding path of the individual under the constraints is calculated by solving the pathfinding equation using a differential equation solution method (this method is a well-known solution method, and a specific implementation method, such as the Runge-Kutta method, can be used as needed). Figure 2 and Figure 3 The pathfinding path obtained under the constraint form is as follows Figure 4 shown.
[0113] In summary, the pathfinding method based on the generalized UK method in this embodiment is based on the generalized UK theory, which transforms obstacles and motion space into global constraint control, can effectively increase the pathfinding methods, and can realize the pathfinding trajectory calculation under continuity constraints. The pathfinding method based on the generalized UK method in this embodiment uses the ideas of control and constraints, and uses the continuity method to express obstacles, constraints and maps, which can serve as an effective supplement to the current mainstream pathfinding methods.
[0114] In addition, the present embodiment further provides a pathfinding system based on the generalized UK method, comprising a microprocessor and a memory connected to each other, wherein the microprocessor is programmed or configured to execute the pathfinding method based on the generalized UK method. In addition, the present embodiment further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, wherein the computer program is used to be programmed or configured by the microprocessor to execute the pathfinding method based on the generalized UK method.
[0115] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application may take the form of a computer program product implemented on one or more computer-readable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes. The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, may be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the functions in the process. Figure 1 A process or multiple processes and / or boxes Figure 1 These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing device to work in a specific way, so that the instructions stored in the computer-readable memory produce a product including an instruction device, which implements the functions specified in the process. Figure 1 A process or multiple processes and / or boxes Figure 1These computer program instructions can also be loaded onto a computer or other programmable data processing device, so that a series of operation steps are executed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide for implementing the process in the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0116] The above is only a preferred embodiment of the present invention, and the protection scope of the present invention is not limited to the above embodiments. All technical solutions under the concept of the present invention belong to the protection scope of the present invention. It should be pointed out that for ordinary technicians in this technical field, some improvements and modifications without departing from the principle of the present invention should also be regarded as the protection scope of the present invention.
Claims
1. A pathfinding method based on the generalized UK method, characterized in that: include: S101, determine the representation of the state quantity of the individual, the state quantity of the individual includes position ,speed and acceleration , and there are: , , , In the above formula, They are x and y The position coordinates of the direction, They are x and y The speed of the direction, They are x and y Acceleration in direction; S102, establish equality constraints based on individual state quantities, and design a controller for equality constraints based on generalized UK theory ; Based on the individual state quantity, establish the local barrier function and global inequality constraints, and design the controller for the inequality constraints according to the generalized UK theory and the established local barrier function and global inequality constraints ; S103, according to the controller for the equality constraint and the controller for inequality constraints Establish a pathfinding equation, initialize the state of the individual and solve the pathfinding equation to calculate the individual's pathfinding path under constraints; In step S102, establishing a local barrier function and a global inequality constraint based on the state quantity of the individual includes: S201, determine each obstacle on the plane i Functional representation of and constraints outside each obstacle j Functional representation of ; S202, according to the various obstacles on the plane i Functional representation of and constraints outside each obstacle j Functional representation of Functions for determining global inequality constraints and , and based on the generalized UK theory, the function expression of the global inequality constraint on the individual on the plane is established as: , In the above formula, and are the lower and upper bounds of the global inequality constraint, is a global inequality constraint, is the position of the state quantity, for x Position coordinates of the direction; S203, map the global inequality constraints imposed on the individual on the plane into continuous functions of all number axes: , In the above formula, is the constraint equation of the inequality constraint, and ; S204, perform first-order differentiation on the constraint equation of the inequality constraint to obtain: , In the above formula, is the first-order differential constraint equation with inequality constraints, for x The first-order differential of the position coordinates of the direction, for y The first-order differential of the position coordinates of the direction, and is an intermediate variable, and there are: , , S205, perform second-order differentiation on the constraint equation of the inequality constraint to obtain: , , , In the above formula, is a second-order differential constraint equation with inequality constraints, b is the constraint vector of the equality constraint, is the intermediate variable, represents the differential term without inequality constraints, represents the differential term of the inequality constraint, and has: , In the above formula, and is the control parameter for constraining convergence.
2. The path-finding method based on the generalized UK method according to claim 1, characterized in that: The function expression of the equality constraint established for the state quantity of the individual based on the generalized UK theory in step S102 is: , In the above formula, A is the constraint matrix, b is the constraint vector of the equality constraint, is the acceleration of the state quantity.
3. The path-finding method based on the generalized UK method according to claim 2, characterized in that: The controller designed for equality constraints according to the generalized UK theory in step S102 The function expression is: , In the above formula, , M is the mass matrix, Q is the gravity term in the individual Lagrangian dynamics, A is the constraint matrix, b is the constraint vector for the equality constraint.
4. The path-finding method based on the generalized UK method according to claim 1, characterized in that: The function for determining the global inequality constraint in step S202 and The function expression is: , , The above function and middle, and They represent the inclination degree of the infinite constraints on both sides in the constraint design. and denote the displacement of the infinite constraint to the barrier function, and They represent the tilt of the activation function, and Indicates the leftmost and rightmost coordinates of the obstacle, Represents the opening direction of the designed infinite function.
5. The path-finding method based on the generalized UK method according to claim 1, characterized in that: The controller designed in step S102 for the inequality constraint The function expression is: , In the above formula, I is the identity matrix, A is the constraint matrix, is the constraint vector of the inequality constraint, is an intermediate variable.
6. The path-finding method based on the generalized UK method according to claim 1, characterized in that: Step S103 includes: S301, according to the controller for the equality constraint and the controller for inequality constraints Establish the pathfinding equation: , In the above formula, represents the pathfinding equation, is the controller for the equality constraint, is the controller for inequality constraints; S302, initializing the position and speed of the state quantity of the individual, and calculating the individual's pathfinding path under constraints by solving the pathfinding equation using a differential equation solution method.
7. A pathfinding system based on the generalized UK method, comprising a microprocessor and a memory connected to each other, characterized in that: The microprocessor is programmed or configured to execute the path finding method based on the generalized UK method as claimed in any one of claims 1 to 6.
8. A computer-readable storage medium having a computer program stored therein, characterized in that: The computer program is used to program or configure a microprocessor to execute the path finding method based on the generalized UK method as claimed in any one of claims 1 to 6.
Citation Information
Patent Citations
Self-driving automobile trajectory tracking control method and device based on hierarchical constraint
CN115268464A
