Dynamic Path Planning Method Based on Fuzzy Logic and Fuzzy Petri Net

CN119779327APending Publication Date: 2025-04-08HUNAN HANGTIAN CHENGYUAN PRECISION MACHINERY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411795657.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-09
Publication Date
2025-04-08

Smart Images

  • Figure CN119779327A_ABST
    Figure CN119779327A_ABST
Patent Text Reader

Abstract

The present invention discloses a dynamic path planning method based on fuzzy logic and fuzzy Petri net, comprising: collecting sensor data, including the position, speed, direction of other vehicles and the position of pedestrians; detecting and classifying obstacles in real time through fuzzy C-means clustering algorithm; establishing a fuzzy logic system according to the sensor data and the classified obstacles; optimizing through fuzzy Petri net; generating a real-time path according to the results of the fuzzy logic system and fuzzy Petri net. The present invention solves the problem that the flexibility, real-time performance and safety of path planning need to be strengthened.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of autonomous driving technology, and in particular to a dynamic path planning method based on fuzzy logic and fuzzy Petri nets. Background Art

[0002] With the development of autonomous driving technology, path planning has become one of the key technologies for achieving autonomous driving. Traditional path planning methods, such as Dijkstra algorithm and A algorithm, have the following problems: (1) They are limited in dealing with dynamic obstacles and uncertainty. Traditional path planning methods usually assume that the road environment is static, that is, the position and state of all obstacles are known. However, in practical applications, the position and speed of obstacles on the road (such as other vehicles, pedestrians, etc.) are often uncertain. These uncertainties bring great challenges to path planning. Suppose that on a busy city street, there is a slow-moving truck in front, and the vehicle in the lane next to it is trying to overtake. The traditional path planning algorithm may only consider the existence of the truck in front, but ignore the possibility that the vehicle in the lane next to it may suddenly cut in, which will result in the planned path lacking sufficient safety margin. (2) Insufficient real-time performance in the face of emergencies; when faced with emergencies, such as the sudden appearance of pedestrians or obstacles, the response speed of existing path planning methods is relatively slow. This delay may cause the autonomous vehicle to be unable to take evasive measures in time, thereby increasing the risk of accidents; especially when driving at high speeds, a response delay of milliseconds may have serious consequences. (3) Poor adaptability to complex and changing road environments; for complex and changing road environments, especially mixed traffic flows in cities (i.e., scenarios where motor vehicles, non-motor vehicles, and pedestrians coexist), existing path planning methods often find it difficult to make reasonable plans. This is because traditional planning methods find it difficult to simultaneously consider the behavior patterns and mutual influences of multiple types of vehicles, which leads to the possibility that the planned paths may have defects in actual applications. Summary of the Invention

[0003] (1) Technical issues to be resolved

[0004] In view of the above problems, the present invention provides a dynamic path planning method based on fuzzy logic and fuzzy Petri nets to solve the problem that the flexibility, real-time performance and security of path planning need to be enhanced.

[0005] (2) Technical solution

[0006] In view of the above technical problems, the present invention provides a dynamic path planning method based on fuzzy logic and fuzzy Petri nets, comprising the following steps:

[0007] S1, collect sensor data, including the position, speed, direction of other vehicles and the position of pedestrians;

[0008] S2, real-time detection and classification of obstacles through fuzzy C-means clustering algorithm;

[0009] S3. Establish a fuzzy logic system based on the sensor data and the classified obstacles:

[0010] S31. Define input variables: The input variables include obstacle distance, obstacle type, and relative speed. The obstacle distance represents the distance between the vehicle and the obstacle, and the quantization levels include "very far," "relatively far," "near," and "very close," where "very far" indicates a distance greater than 100 meters, "relatively far" indicates a distance between 50 and 100 meters, "near" indicates a distance between 20 and 50 meters, and "very close" indicates a distance less than 20 meters. The obstacle types include pedestrians, bicycles, and cars. The relative speed represents the relative speed between the vehicle and the obstacle, and the quantization levels include "very fast," "relatively fast," and "slow," where "very fast" indicates a relative speed greater than 60 km / h, "relatively fast" indicates a relative speed between 30 and 60 km / h, and "slow" indicates a relative speed between 0 and 30 km / h.

[0011] S32. Define output variables: The output variables include the steering angle and acceleration of the vehicle. The quantization levels of the steering angle include "substantial left turn," "slight left turn," "keep straight," "slight right turn," and "substantial right turn." "Substantial left turn" indicates a steering angle of 25° to 45°, "slight left turn" indicates a steering angle of 5° to 15°, "keep straight" indicates a steering angle of 0°, "slight right turn" indicates a steering angle of 5° to 15°, and "substantial right turn" indicates a steering angle of 25° to 45°.

[0012] S33, converting the input variables into fuzzy sets;

[0013] S34. Define fuzzy rules: Establish the relationship between input variables and output variables:

[0014] Rule 1: If the obstacle type is a pedestrian, the obstacle is very close and the relative speed is very fast, the vehicle should slow down, the steering angle remains unchanged, and the acceleration is -4m / s 2 ;

[0015] Rule 2: If the obstacle type is a pedestrian, the obstacle is very close and the relative speed is slow, the vehicle should turn sharply to the right with a steering angle of 60°;

[0016] Rule 3: If the obstacle type is a bicycle, the obstacle is far away and the relative speed is fast, the vehicle should turn slightly to the left with a steering angle of 30°;

[0017] Rule 4: If the obstacle type is a car, the obstacle is far away and the relative speed is slow, the vehicle should maintain a straight line with an acceleration of 0m / s 2 ;

[0018] S35, fuzzy reasoning: calculating the fuzzy value of the output variable according to the fuzzy rules and the actual value of the input variable;

[0019] S36, defuzzification: converting the fuzzy value of the output variable into an actual value;

[0020] S4, optimization through fuzzy Petri net;

[0021] S41. Define the states in the fuzzy Petri net, including: "normal driving", "slow down", "accelerate", "keep straight", "turn left" and "turn right".

[0022] S42. Define transitions in fuzzy Petri nets:

[0023] When the output acceleration a of the fuzzy logic system is less than -1m / s 2 , the transition is triggered: from "normal driving" to "slowing down";

[0024] When the output acceleration a of the fuzzy logic system is equal to -1m / s 2 When , the current state remains unchanged;

[0025] When the output acceleration a of the fuzzy logic system is greater than -1m / s 2 And less than 1m / s 2 , the transition is triggered: from "slow down" to "normal driving";

[0026] When the output acceleration a of the fuzzy logic system is greater than or equal to 1m / s 2 If the vehicle is not in the "deceleration" state, a transition is triggered: from "normal driving" to "acceleration". If the vehicle is already in the "deceleration" state, a transition is triggered: maintain the "deceleration" state.

[0027] When the output steering angle θ of the fuzzy logic system is greater than 15° and less than 75°, the transition is triggered:

[0028] From "Normal Drive" to "Turn Left";

[0029] When the output steering angle θ of the fuzzy logic system is less than or equal to 15° and greater than or equal to -15°, if the vehicle is not in the "turn left" or "turn right" state, a transition is triggered: from "normal driving" to "keep straight". If the vehicle is already in the "turn left" or "turn right" state, a transition is triggered: back to the "normal driving" state.

[0030] When the output steering angle θ of the fuzzy logic system is greater than -75° and less than -15°, the transition is triggered: from "normal driving" to "turn right";

[0031] S43, applying the output variables obtained from the fuzzy logic system to the fuzzy Petri net;

[0032] S44. Apply fuzzy Petri nets to optimize the decision-making process according to actual conditions;

[0033] S5. Generate a real-time path according to the results of the fuzzy logic system and the fuzzy Petri net.

[0034] Furthermore, the S1 also includes data preprocessing, which includes noise filtering, data fusion and coordinate conversion.

[0035] Furthermore, the S2 includes:

[0036] S21, Initialization: Set the number of fuzzy sets and the center of the initial fuzzy set;

[0037] S22, fuzzification: fuzzifying the sensor detection data;

[0038] S23. Clustering: Use the fuzzy C-means clustering algorithm to detect and classify obstacles in real time. The formula of the fuzzy C-means clustering algorithm is:

[0039]

[0040] Among them, U ij Indicates the degree to which the i-th sample belongs to the j-th fuzzy set; d(xi,cj) indicates the distance between the sample xi and the center of the fuzzy set cj; m is the fuzziness parameter, ranging from 1 <m<∞;

[0041] S24. Cluster center update: Continuously iteratively update the fuzzy set center cj and membership matrix U until the convergence condition is reached.

[0042] Furthermore, in S33, converting the input variables into fuzzy sets includes:

[0043] The distance of obstacles includes four fuzzy sets: "very far", "far", "near", and "very close", and the membership functions used in the conversion include triangular or trapezoidal functions;

[0044] The types of obstacles include three fuzzy sets: “pedestrian”, “bicycle”, and “car”. The membership functions used in the conversion include step functions.

[0045] The relative speed includes three fuzzy sets: “very fast”, “faster”, and “slow”. The membership functions used in the conversion include triangular or trapezoidal functions.

[0046] Furthermore, the "very far" triangle function:

[0047]

[0048] The "farther" triangle function:

[0049]

[0050] "Near" triangular functions:

[0051]

[0052] "Very close" triangular functions:

[0053]

[0054] Step function for "pedestrian":

[0055]

[0056] The step function of a bicycle:

[0057]

[0058] The step function for "car":

[0059]

[0060] "Very fast" trigonometric functions:

[0061]

[0062] "Fast" trigonometric functions:

[0063]

[0064] "Slow" trigonometric functions:

[0065]

[0066] Furthermore, in S35, when multiple fuzzy rules are met, the activation degree corresponding to each fuzzy rule is calculated respectively, and then the fuzzy value of the output variable is obtained through a synthesis operation. The activation degree is the minimum value of the fuzzy value corresponding to the condition of the fuzzy rule, and the synthesis operation includes a maximum value operation.

[0067] Furthermore, in S36, for the steering angle θ, the defuzzification formula is:

[0068]

[0069] For acceleration a, the defuzzification formula is:

[0070]

[0071] Among them, μ i () represents the membership function, θ i represents the value of the i-th possible steering angle, a i Represents the value of the i-th possible acceleration.

[0072] The present invention also discloses a vehicle dynamic path planning system based on fuzzy logic and fuzzy Petri net, comprising:

[0073] at least one processor; and at least one memory communicatively coupled to the processor, wherein:

[0074] The memory stores program instructions that can be executed by the processor, and the processor can execute the method by calling the program instructions.

[0075] The present invention also discloses a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions enable the computer to execute the method.

[0076] (3) Beneficial effects

[0077] The above technical solution of the present invention has the following advantages:

[0078] (1) The present invention generates a real-time path based on the results of a fuzzy logic system and a fuzzy Petri net. The fuzzy logic system automatically adjusts the vehicle's steering angle and acceleration driving decisions based on multiple factors such as the distance to the obstacle, the type of obstacle, and the relative speed. Combined with the fuzzy Petri net optimization technology, it achieves more precise and reasonable path planning, improves the obstacle avoidance capability for dynamic obstacles and uncertain factors, and thus significantly improves the driving safety, real-time response capability, and path planning flexibility of autonomous vehicles in complex and changing traffic environments.

[0079] (2) The present invention enhances environmental perception capabilities and uses the fuzzy C-means clustering algorithm to more accurately detect and classify obstacles, which helps the fuzzy logic system adopt more appropriate obstacle avoidance strategies;

[0080] (3) The present invention also improves driving efficiency, reduces maintenance costs, and provides a better user experience, thereby significantly improving the overall performance and applicability of autonomous driving vehicles. BRIEF DESCRIPTION OF THE DRAWINGS

[0081] The features and advantages of the present invention will be more clearly understood by referring to the accompanying drawings, which are schematic and should not be construed as limiting the present invention in any way. In the accompanying drawings:

[0082] Figure 1 This is an overall flow chart of a dynamic path planning method based on fuzzy logic and fuzzy Petri nets according to an embodiment of the present invention;

[0083] Figure 2 This is a flow chart of establishing a fuzzy logic system according to an embodiment of the present invention. DETAILED DESCRIPTION

[0084] The following embodiments of the present invention are described in further detail with reference to the accompanying drawings and examples. The following examples are used to illustrate the present invention but are not intended to limit the scope of the present invention.

[0085] The embodiment of the present invention is a dynamic path planning method based on fuzzy logic and fuzzy Petri nets. Figure 1 As shown, the following steps are included:

[0086] S1. Collect sensor data and preprocess data

[0087] Use on-board sensors to obtain information about the surrounding environment; there are many types of on-board sensors installed, including laser radar (LiDAR), millimeter-wave radar, cameras, etc.; the surrounding environment information obtained includes the position, speed, direction of other vehicles and the position of pedestrians.

[0088] And preprocess the acquired raw data; preprocessing includes noise filtering, data fusion and coordinate transformation;

[0089] Noise filtering: Use filters (such as Kalman filtering) to remove noise from sensor data.

[0090] Data fusion: Fuse data from different sensors to improve data accuracy and completeness.

[0091] Coordinate transformation: transform sensor data into a unified coordinate system for subsequent processing. S2. Real-time detection and classification of obstacles using the fuzzy C-means clustering algorithm;

[0092] The specific steps include:

[0093] S21. Initialization: Set the number of fuzzy sets and the center of the initial fuzzy set.

[0094] S22, fuzzification: fuzzifying the object features (such as position, speed, etc.) detected by the sensor.

[0095] S23. Clustering: Use the fuzzy C-means clustering algorithm to detect and classify obstacles in real time. The formula of the fuzzy C-means clustering algorithm is:

[0096]

[0097] Among them, U ij Indicates the degree to which the i-th sample belongs to the j-th fuzzy set; d(xi,cj) indicates the distance between the sample xi and the center of the fuzzy set cj; m is the fuzziness parameter, ranging from 1 <m<∞。

[0098] S24. Cluster center update: Continuously iteratively update the fuzzy set center cj and membership matrix U until the convergence condition is reached.

[0099] S3, establishing a fuzzy logic system based on the sensor data and the classified obstacles; Figure 2 As shown, the following steps are included:

[0100] S31. Define input variables:

[0101] The selected input variables include: obstacle distance: measuring the distance between the vehicle and the obstacle; obstacle type: identifying whether the obstacle is a pedestrian, bicycle or car; relative speed: calculating the relative speed between the vehicle and the obstacle.

[0102] Define the quantization level of the input variables:

[0103] The quantization levels of obstacle distance definition include: "Very Far" (VF), "Far" (F), "Near" (N), and "Very Near" (VN); among them, "Very Far" (VF) means the distance is greater than 100 meters; "Far" (F) means the distance is between 50-100 meters; "Near" (N) means the distance is between 20-50 meters; "Very Near" (VN) means the distance is less than 20 meters.

[0104] The quantization levels of obstacle type definitions are: “Pedestrian” (Pedestrian, P), “Bicycle” (Bicycle, B), and “Car” (Car, C).

[0105] The quantization levels of relative speed definition are: "Very Fast" (VF), "Fast" (Fast, F), and "Slow" (S); the quantization level defined by "Very Fast" (VF) is: the relative speed is greater than 60 km / h; the quantization level defined by "Fast" (F) is: the relative speed is between 30-60 km / h; the quantization level defined by "Slow" (S) is: the relative speed is between 0-30 km / h.

[0106] S32. Define output variables.

[0107] The selected output variables include: the vehicle's steering angle: determines the direction and angle the vehicle needs to turn; acceleration: determines whether the vehicle needs to accelerate or decelerate.

[0108] Define the output variable at a quantized level:

[0109] The vehicle's steering angle is defined in quantitative levels, including "Large Left Turn" (LL), "Small Left Turn" (SL), "Straight" (S), "Small Right Turn" (SR), and "Large Right Turn" (LR). "Large Left Turn" (LL): Steering angle is 25° to 45°; "Slight Left Turn" (SL): Steering angle is 5° to 15°; "Straight" (S): Steering angle is 0°; "Slight Right Turn" (SR): Steering angle is 5° to 15°; "Large Right Turn" (LR): Steering angle is 25° to 45°. This regulation ensures that steering operations are operational and consistent in different situations.

[0110] The quantization levels defined by acceleration quantization include: "Accelerate" (A) and "Decelerate" (D).

[0111] S33. Fuzzification: Convert input variables into fuzzy sets.

[0112] Fuzzy set definition:

[0113] Distance of obstacles: Four fuzzy sets are defined: "very far" (VF), "far" (F), "near" (N), and "very close" (VN). The membership function uses a triangular or trapezoidal function. Taking the trigonometric function as an example, we get:

[0114] Triangular functions for "very far" (VF):

[0115]

[0116] Triangular functions for "farther" (F):

[0117]

[0118] Triangular functions of "near" (N):

[0119]

[0120] Triangular functions of "very close" (VN):

[0121]

[0122] Obstacle type: Define three fuzzy sets: "pedestrian" (P), "bicycle" (B), "car" (C); the membership function uses a step function, and we get:

[0123] Step function for “pedestrian” (P):

[0124]

[0125] The step function of the "bicycle" (B):

[0126]

[0127] The step function for "car" (C):

[0128]

[0129] Relative speed: Define three fuzzy sets: "very fast" (VF), "fast" (F), and "slow" (S). The membership function uses triangular or trapezoidal functions. Taking trigonometric functions as an example, we get:

[0130] "Very Fast" (VF) trigonometric functions:

[0131]

[0132] "Fast" (F) trigonometric functions:

[0133]

[0134] "Slow" (S) triangular functions:

[0135]

[0136] S34. Define fuzzy rules: establish the relationship between input variables and output variables.

[0137] Fuzzy rules are expressed in the form of IF-THEN statements, including:

[0138] Rule 1: If the obstacle type is a pedestrian, the obstacle is very close and the relative speed is very fast, the vehicle should slow down, the steering angle remains unchanged, and the acceleration is -4m / s 2 .

[0139] IF(μP(t)ANDμVN(d)ANDμVF(v))THENμD(a)

[0140] Rule 2: If the obstacle type is a pedestrian, the obstacle is very close and the relative speed is slow, the vehicle should turn sharply to the right with a steering angle of 60°.

[0141] IF(μP(t)ANDμVN(d)ANDμS(v))THENμLR(θ)

[0142] Rule 3: If the obstacle type is a bicycle, the obstacle is far away and the relative speed is fast, the vehicle should turn slightly to the left with a steering angle of 30°.

[0143] IF(μB(t)ANDμF(d)ANDμF(v))THENμSL(θ)

[0144] Rule 4: If the obstacle type is a car, the obstacle is far away and the relative speed is slow, the vehicle should maintain a straight line with an acceleration of 0m / s 2 .

[0145] IF(μC(t)ANDμVF(d)ANDμS(v))THENμS(θ)

[0146] Expressed in a table:

[0147]

[0148] The steering angle θ and acceleration a are typically determined through experimentation or experience, and these values ​​are subject to change. For example, if the fuzzy logic system outputs "turn sharply right," the 60° setting for θ can be adjusted to another value, while the acceleration a setting remains unchanged.

[0149] S35, fuzzy reasoning: Calculate the fuzzy value of the output variable according to the fuzzy rules and the actual value of the input variable.

[0150] The Mamdani reasoning method is used to perform fuzzy reasoning, and the fuzzy value of the output variable is calculated based on the defined fuzzy rules and the actual value of the input variable.

[0151] When multiple fuzzy rules are met, the activation degree corresponding to each fuzzy rule is calculated separately, and then the fuzzy value of the output variable is obtained through synthesis operation;

[0152] Calculate the activation degree respectively, which is the minimum value of the membership function value corresponding to the rule condition:

[0153] For rule 1, the activation degree is min(μP(t),μVN(d),μVF(v));

[0154] For rule 2, the activation level is min(μP(t),μVN(d),μS(v));

[0155] For rule 3, the activation level is min(μB(t),μF(d),μF(v));

[0156] For rule 4, the activation level is min(μC(t),μVF(d),μS(v));

[0157] Synthesis operation: The outputs of all rules are synthesized. This embodiment uses the maximum value operation (MAX).

[0158] S36. Defuzzification: Convert the fuzzy value of the output variable into an accurate numerical value.

[0159] Defuzzification uses the center of gravity (COG) method to convert the fuzzy value of the output variable into an actual numerical value.

[0161] For the steering angle θ, the defuzzification formula is: For acceleration a, the defuzzification formula is: Among them, μ i () represents the membership function, θ i Indicates the value of the i-th possible steering angle, such as 60° in rule 2, 30° in rule 3, μ i (θ i ) represents the i-th steering angle θ i The membership function value of θ i The degree of belonging to its corresponding fuzzy set, ∑ i μ i (θ i ) represents the sum of the membership function values ​​of all possible accelerations, which is used for normalization to ensure that the defuzzified value is the weighted average of all fuzzy sets; a i Indicates the value of the i-th possible acceleration, such as -4m / s in rule 1 2 , 0m / s in Rule 4 2 , μ i (a i ) represents the i-th acceleration a i The membership function value of a i The degree of belonging to its corresponding fuzzy set; ∑ i μi (a i ) represents the sum of the membership function values ​​of all possible accelerations and is used for normalization to ensure that the defuzzified value is the weighted average of all fuzzy sets.

[0162] According to the above steps S31-S36 example: Assume that the current situation is: the obstacle distance is 15 meters (very close), the obstacle type is pedestrian (pedestrian), and the relative speed is 0 km / h (slow); fuzzification:

[0163] The obstacle distance d = 15 meters is mapped to the fuzzy set of "very close" (VN): μ VN (15) = 0.25;

[0164] Obstacle type t = pedestrian, mapped to the fuzzy set of “pedestrian” (P): μ P (pedestrian) = 1;

[0165] Relative speed v = 0 km / h, mapped to the fuzzy set of "slow" (S): μ S (0) = 1;

[0166] Fuzzy rules:

[0167] Apply Rule 2: If the obstacle type is a pedestrian AND the obstacle is very close and the relative speed is slow, THEN the vehicle should significantly slow down and turn right with a steering angle of 60°.

[0168] The activation level is min(1,0.25)=0.25

[0169] Fuzzy reasoning: Calculate the output fuzzy value: For the steering angle θ, the synthesized fuzzy value is 0.25 (because only rule 2 is activated).

[0170] Defuzzification: Use the center of gravity method to calculate the specific steering angle value:

[0171]

[0172] That is, the car decelerates significantly and turns right with a steering angle of 60 degrees. This completes the process from environmental perception to output of specific control signals.

[0173] S4. Optimization through fuzzy Petri nets

[0174] S41. State definition: define the state in the fuzzy Petri net.

[0175] The states in the fuzzy Petri net are defined as: "normal driving", "deceleration", "acceleration", "keeping a straight line", "turn left", "turn right", etc. "Normal driving" means driving in a straight line at a constant speed.

[0176] S42. Fuzzy transition definition: Define the transitions in fuzzy Petri nets.

[0177] When the output acceleration a of the fuzzy logic system is less than -1m / s 2 , the transition is triggered: from "normal driving" to "slowing down";

[0178] When the output acceleration a of the fuzzy logic system is equal to -1m / s 2 When , the current state remains unchanged;

[0179] When the output acceleration a of the fuzzy logic system is greater than -1m / s 2 And less than 1m / s 2 , the transition is triggered: from "slow down" to "normal driving";

[0180] When the output acceleration a of the fuzzy logic system is greater than or equal to 1m / s 2 If the vehicle is not in the "deceleration" state, a transition is triggered: from "normal driving" to "acceleration", or if the vehicle is already in the "deceleration" state, a transition is triggered: maintain the "deceleration" state;

[0181] When the output steering angle θ of the fuzzy logic system is greater than 15° and less than 75°, the transition is triggered: from "normal driving" to "turn left";

[0182] When the output steering angle θ of the fuzzy logic system is less than or equal to 15° and greater than or equal to -15°, it can be considered that the vehicle is maintaining a straight line or making slight adjustments. If it is not in the "turn left" or "turn right" state, a transition is triggered: from "normal driving" to "maintaining a straight line", or if it is already in the "turn left" or "turn right" state, a transition is triggered: back to the "normal driving" state;

[0183] When the output steering angle θ of the fuzzy logic system is greater than -75° and less than -15°, the transition is triggered: from "normal driving" to "turn right";

[0184] S43. Application of fuzzy rules: Apply the results obtained from the fuzzy logic system to the fuzzy Petri net.

[0185] Rule integration: The results obtained by the fuzzy logic system are used as the state transition conditions of the fuzzy Petri net.

[0186] S44. Fuzzy Petri Net Example: Apply fuzzy Petri Net to optimize the decision-making process according to actual conditions.

[0187] Decision optimization: Fuzzy Petri nets are used to achieve more refined decision optimization and ensure the rationality of path planning.

[0188] Assume there is a static obstacle ahead.

[0189] Initial state: "Normal driving".

[0190] Fuzzy logic output: The vehicle needs to turn sharply to the right.

[0191] Triggering transition: "Turn sharply right".

[0192] New state: "Turn right".

[0193] Subsequent actions: Adjust the vehicle's direction according to the new state.

[0194] S5. Generate a real-time path based on the results of the fuzzy logic system and the fuzzy Petri net;

[0195] Path generation: Based on the results of fuzzy logic system and fuzzy Petri net, real-time path is generated with comprehensive consideration of security and efficiency.

[0196] Path execution: Adjust vehicle status, such as steering angle and acceleration, to ensure that the vehicle follows the optimal path.

[0197] A real-time path is generated based on the results of the fuzzy logic system and the fuzzy Petri net. For the combination of fuzzy Petri net and fuzzy obstacle avoidance, a decision model based on fuzzy logic output can be constructed. Specifically, each transition trigger condition of the fuzzy Petri net can be defined as the satisfaction of one or more rules output by the fuzzy logic system. For example, if the fuzzy logic system outputs "turn sharply right", then a transition from "normal driving" to "turn sharply right" can be defined in the fuzzy Petri net, and the trigger condition for this transition is the "turn sharply right" signal output by the fuzzy logic system. In addition, the priorities of multiple transitions can be defined to deal with the situation where multiple rules are satisfied at the same time.

[0198] Finally, it should be noted that the above-mentioned dynamic path planning method can be converted into software program instructions, which can be implemented by using a dynamic path planning system including a processor and a memory, or by computer instructions stored in a non-transitory computer-readable storage medium. The above-mentioned integrated unit implemented in the form of a software functional unit can be stored in a computer-readable storage medium. The above-mentioned software functional unit is stored in a storage medium, including a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to perform some steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, and other media that can store program code.

[0199] In summary, the above-mentioned dynamic path planning method based on fuzzy logic and fuzzy Petri net has the following advantages:

[0200] (1) The present invention generates a real-time path based on the results of a fuzzy logic system and a fuzzy Petri net. The fuzzy logic system automatically adjusts the vehicle's steering angle and acceleration driving decisions based on multiple factors such as the distance to the obstacle, the type of obstacle, and the relative speed. Combined with the fuzzy Petri net optimization technology, it achieves more precise and reasonable path planning, improves the obstacle avoidance capability for dynamic obstacles and uncertain factors, and thus significantly improves the driving safety, real-time response capability, and path planning flexibility of autonomous vehicles in complex and changing traffic environments.

[0201] (2) The present invention enhances environmental perception capabilities and uses the fuzzy C-means clustering algorithm to more accurately detect and classify obstacles, which helps the fuzzy logic system adopt more appropriate obstacle avoidance strategies;

[0202] (3) The present invention also improves driving efficiency, reduces maintenance costs, and provides a better user experience, thereby significantly improving the overall performance and applicability of autonomous driving vehicles.

[0203] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit the present invention. Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations shall fall within the scope defined by the appended claims.

Claims

1. A dynamic path planning method based on fuzzy logic and fuzzy Petri net, characterized in that: The following steps are involved: S1, collect sensor data, including the position, speed, direction of other vehicles and the position of pedestrians; S2, real-time detection and classification of obstacles through fuzzy C-means clustering algorithm; S3. Establish a fuzzy logic system based on the sensor data and the classified obstacles: S31. Define input variables: The input variables include the distance of the obstacle, the type of obstacle and the relative speed; the distance of the obstacle indicates the distance between the vehicle and the obstacle, and the quantization levels include "very far", "relatively far", "near" and "very near", where "very far" indicates that the distance is greater than 100 meters, "relatively far" indicates that the distance is between 50-100 meters, "near" indicates that the distance is between 20-50 meters, and "very near" indicates that the distance is less than 20 meters; the types of obstacles include pedestrians, bicycles and cars; the relative speed indicates the relative speed between the vehicle and the obstacle, and the quantization levels include "very fast", "relatively fast" and "slow", where "very fast" indicates that the relative speed is greater than 60 kilometers per hour, "relatively fast" indicates that the relative speed is between 30-60 kilometers per hour, and "slow" indicates that the relative speed is between 0-30 kilometers per hour; S32. Define output variables: The output variables include the steering angle and acceleration of the vehicle; the quantization levels of the steering angle include "turn left substantially", "turn left slightly", "keep straight", "turn right slightly" and "turn right substantially"; wherein "turn left substantially" indicates a steering angle of 25° to 45°, "turn left slightly" indicates a steering angle of 5° to 15°, "keep straight" indicates a steering angle of 0°, "turn right slightly" indicates a steering angle of 5° to 15°, and "turn right substantially" indicates a steering angle of 25° to 45°; S33, converting the input variables into fuzzy sets; S34. Define fuzzy rules: Establish the relationship between input variables and output variables: Rule 1: If the obstacle type is a pedestrian, the obstacle is very close and the relative speed is very fast, the vehicle should slow down, the steering angle remains unchanged, and the acceleration is -4m / s 2 ; Rule 2: If the obstacle type is a pedestrian, the obstacle is very close and the relative speed is slow, the vehicle should turn right sharply with a steering angle of 60°; Rule 3: If the obstacle type is a bicycle, the obstacle is far away and the relative speed is fast, the vehicle should turn slightly to the left with a steering angle of 30°; Rule 4: If the obstacle type is a car, the obstacle is far away and the relative speed is slow, the vehicle should maintain a straight line with an acceleration of 0m / s 2 ; S35, fuzzy reasoning: calculating the fuzzy value of the output variable according to the fuzzy rules and the actual value of the input variable; S36, defuzzification: converting the fuzzy value of the output variable into an actual value; S4, optimization through fuzzy Petri net; S41. Define the states in the fuzzy Petri net, including: "normal driving", "deceleration", "acceleration", "keeping straight", "turn left" and "turn right"; S42. Define transitions in fuzzy Petri nets: When the output acceleration a of the fuzzy logic system is less than -1m / s 2 , a transition is triggered: from "normal driving" to "deceleration"; When the output acceleration a of the fuzzy logic system is equal to -1m / s 2 When , the current state remains unchanged; When the output acceleration a of the fuzzy logic system is greater than -1m / s 2 And less than 1m / s 2 , it triggers the transition from "deceleration" to "normal driving"; When the output acceleration a of the fuzzy logic system is greater than or equal to 1m / s 2 If the vehicle is not in the "deceleration" state, a transition is triggered: from "normal driving" to "acceleration". If the vehicle is already in the "deceleration" state, a transition is triggered: maintain the "deceleration" state. When the output steering angle θ of the fuzzy logic system is greater than 15° and less than 75°, the transition is triggered: from "normal driving" to "turn left"; When the output steering angle θ of the fuzzy logic system is less than or equal to 15° and greater than or equal to -15°, if it is not in the "turn left" or "turn right" state, the transition is triggered: from "normal driving" to "keeping straight line". If it is already in the "turn left" or "turn right" state, the transition is triggered: return to the "normal driving" state; When the output steering angle θ of the fuzzy logic system is greater than -75° and less than -15°, the transition is triggered: from "normal driving" to "turn right"; S43, applying the output variables obtained from the fuzzy logic system to the fuzzy Petri net; S44. Apply fuzzy Petri nets to optimize the decision-making process according to actual conditions; S5. Generate a real-time path according to the results of the fuzzy logic system and the fuzzy Petri net.

2. The dynamic path planning method based on fuzzy logic and fuzzy Petri net according to claim 1 is characterized in that: The S1 also includes data preprocessing, which includes noise filtering, data fusion and coordinate conversion.

3. The dynamic path planning method based on fuzzy logic and fuzzy Petri net according to claim 1 is characterized in that: The S2 includes: S21, Initialization: Set the number of fuzzy sets and the center of the initial fuzzy set; S22, fuzzification: fuzzifying the sensor detection data; S23, Clustering: Use the fuzzy C-means clustering algorithm to detect and classify obstacles in real time. The formula of the fuzzy C-means clustering algorithm is: Among them, U ij Indicates the degree to which the i-th sample belongs to the j-th fuzzy set; d(xi,cj) indicates the distance between the sample xi and the center of the fuzzy set cj; m is the fuzziness parameter, ranging from 1 <m<∞; S24, cluster center update: continuously iteratively update the fuzzy set center cj and the membership matrix U until the convergence condition is reached.

4. The dynamic path planning method based on fuzzy logic and fuzzy Petri net according to claim 1, characterized in that: In S33, converting the input variables into fuzzy sets includes: The distance of obstacles includes four fuzzy sets: "very far", "fairly far", "near", "very near", and the membership functions used for conversion include triangular or trapezoidal functions; The types of obstacles include three fuzzy sets: "pedestrians", "bicycles", and "cars", and the membership functions used in the conversion include step functions; The relative speed includes three fuzzy sets: "very fast", "faster", and "slower", and the membership functions used for the conversion include triangular or trapezoidal functions.

5. The dynamic path planning method based on fuzzy logic and fuzzy Petri net according to claim 4 is characterized in that: The "very far" triangle function: "Far away" triangular functions: "Near" triangular functions: "Very close" triangular functions: Step function for "pedestrian": Step function for "bicycle": Step function for "car": "Very fast" trigonometric functions: "Fast" trigonometric functions: "Slow" trigonometric functions:

6. The dynamic path planning method based on fuzzy logic and fuzzy Petri net according to claim 1, characterized in that: In S35, when multiple fuzzy rules are met, the activation degree corresponding to each fuzzy rule is calculated respectively, and then the fuzzy value of the output variable is obtained through a synthesis operation. The activation degree is the minimum value of the fuzzy value corresponding to the condition of the fuzzy rule, and the synthesis operation includes a maximum value operation.

7. The dynamic path planning method based on fuzzy logic and fuzzy Petri net according to claim 1, characterized in that: In S36, for the steering angle θ, the defuzzification formula is: For acceleration a, the defuzzification formula is: Among them, μ i () represents the i-th membership function, θ i represents the value of the i-th steering angle, a i Represents the value of the i-th acceleration.

8. A vehicle dynamic path planning system based on fuzzy logic and fuzzy Petri net, characterized in that: include: at least one processor; and at least one memory in communication with the processor, wherein: The memory stores program instructions executable by the processor, and the processor can execute the method according to any one of claims 1 to 7 by calling the program instructions.

9. A non-transitory computer-readable storage medium, characterized in that: The non-transitory computer-readable storage medium stores computer instructions, which cause the computer to execute the method according to any one of claims 1 to 7.