Complex environment path planning optimization system and method based on artificial potential field algorithm
Through the path planning method based on artificial potential field algorithm and neural network, the travel path in complex environments is predicted and optimized, and the problem of time-varying factors is solved, and the path optimization and stability are achieved, ensuring that the travel device is in complex environments. The smooth driving in.
Patent Information
- Application Number
- CN202410868643.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-01
- Publication Date
- 2024-11-12
- Estimated Expiration
- 2044-07-01
AI Technical Summary
In complex environments, existing path planning technologies are difficult to effectively predict and deal with time-varying external influencing factors, resulting in path planning being inflexible and stable enough.
Using an artificial potential field algorithm method, by constructing gravitational field, repulsive field and combined force field functions, we model static obstacles, and combined with BP neural network and seagull algorithm, we predict and optimize the influencing factors of the travel to ensure the path Optimality and stability.
It improves the flexibility and stability of path planning, ensures that the traveling device can drive smoothly in complex environments, and improves efficiency and safety.
Smart Images

Figure CN118408554B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of three-dimensional channel control, and in particular, relates to a complex environment path planning optimization system and method based on an artificial potential field algorithm. Background Art
[0002] Path planning in complex environments refers to the process of determining an effective path for autonomous navigation systems such as mobile robots or drones in a changing environment with uncertainties and obstacles. Complex environments may include crowded city streets, irregular indoor spaces, unknown terrain, or other areas with restrictions on navigation. The goal of path planning is to find a path from the starting point to the destination while minimizing costs (such as time, energy consumption, or path length) and ensuring safety on the path to avoid collisions or getting stuck in infeasible areas.
[0003] Chinese patent CN115686068A discloses a collaborative path planning method in a multi-threat environment, which includes: planning all feasible threat avoidance paths according to the starting position and the end position of each drone in the drone cluster; determining the basic path in the feasible threat avoidance path of each drone according to the expected path length, and optimizing and adjusting the determined basic path so that the length of the optimized basic path and the optimized length error of the expected path length are minimized, and the first n optimized basic paths arranged from low to high in the optimized length error are used as the optimized path set; performing collision detection on the optimized path set of each drone, and using the detected collision-free optimized path as the collaborative path. In this way, the drone cluster can generate collaborative paths of almost equal length under the condition of threat avoidance function, so that the drone cluster meets certain time and space constraints at the end of cruise penetration.
[0004] Regarding the path planning problem in complex environments, due to the complexity of the environment, the factors affecting path planning have greatly increased. Currently, only some existing obstacles are often considered during path planning. However, the external factors in complex environments change over time. If these impending factors cannot be predicted in advance, the moving device will be affected on the planned path. Summary of the invention
[0005] In view of the problems in the related art, the present invention proposes a complex environment path planning optimization system and method based on an artificial potential field algorithm to overcome the above-mentioned technical problems existing in the existing related art.
[0006] In order to solve the above technical problems, the present invention is achieved through the following technical solutions:
[0007] The present invention is a complex environment path planning optimization method based on an artificial potential field algorithm, comprising the following steps:
[0008] S1. Set the total path planning area, the coordinates of the path starting point and the path end point, and collect the coordinates of all stationary obstacles in the total path planning area to obtain a stationary obstacle coordinate set; set the current motion position coordinates and construct a gravitational field function according to the current motion position coordinates and the path end point coordinates; then construct a repulsive field function according to the current motion position coordinates and the stationary obstacle coordinate set; finally, construct a resultant force function according to the repulsive field function and the gravitational field function;
[0009] S2, dividing the total path planning area into sub-areas to obtain a path planning sub-area set; and setting a travel influencing factor set and a collection time point set; collecting the travel influencing factor data in the travel influencing factor set appearing in each path planning sub-area according to the travel influencing factor set and the collection time point set to obtain a travel influencing factor historical data matrix; and then predicting the data of the travel influencing factors appearing at future time points according to the travel influencing factor historical data matrix to obtain a travel influencing factor prediction data matrix;
[0010] S3, optimizing the candidate path between the path starting point coordinates and the path ending point coordinates, and finally obtaining the optimal path;
[0011] By setting the total path planning area, the coordinates of the path starting point and the path ending point and collecting the coordinates of all the stationary obstacles in the total path planning area, the distribution of obstacles in the path planning area can be obtained, and artificial potential field modeling can be performed on each stationary obstacle in the area, that is, the attraction function, repulsion function and resultant force function of each obstacle on the traveling device are constructed. By adopting the artificial potential field algorithm to model the obstacles on the path, only the single factor of the resultant force on the traveling device needs to be considered, so as to determine the subsequent optimization target of the traveling path of the traveling device; making the subsequent analysis process of the optimal path simpler and more convenient; at the same time, since the traveling device is affected by various influencing factors in addition to the obstacles on the road when traveling in the path planning area, the present solution comprehensively analyzes various influencing factors other than the stationary obstacles, predicts the occurrence state of these dynamic influencing factors when the traveling device is traveling in the future, and thus predicts the occurrence of these influencing factors in advance, thereby providing another basis for the selection of the optimal path, making the traveling device travel more smoothly on the optimal path, and ensuring the efficiency and stability of the travel.
[0012] Preferably, the S1 comprises the following steps:
[0013] S11, set the total area of path planning and the coordinates of the path starting point The coordinates of the end point of the path are ; , and Respectively represent the longitude, latitude and altitude of the starting point of the path; , and Respectively represent the longitude, latitude and altitude of the end point of the path;
[0014] The monitoring equipment is then used to collect the coordinates of all stationary obstacles in the path planning area to obtain a stationary obstacle coordinate set. ; , and Respectively represent the first The longitude, latitude and altitude of the location of each stationary obstacle. represents the total number of stationary obstacles in the total area of the path planning;
[0015] S12, set the current motion position coordinates to , , and Respectively represent the longitude, latitude and altitude of the current motion position;
[0016] According to the current motion position coordinates , path end point coordinates Construct the gravitational field function; as follows,
[0017] ;
[0018] In the formula, Indicates the magnitude of the attraction at the current moving position; represents the gravitational scale factor; Indicates the distance between the current motion position and the end point of the path;
[0019] According to the current motion position coordinates And the stationary obstacle coordinate set Construct the repulsive field function; as follows,
[0020] ;
[0021] In the formula, Indicates the current motion position and the path planning area The distance between the locations of the stationary obstacles; Indicates the magnitude of the repulsive force at the current moving position; represents the repulsion scale factor; It is expressed as the minimum safe distance between the obstacle and the current motion position;
[0022] The resultant force function is constructed according to the repulsive field function and the gravitational field function as follows:
[0023] ;
[0024] In the formula, Indicates the magnitude of the resultant force at the current motion position;
[0025] By artificially modeling the potential field of each stationary obstacle in the area, that is, constructing the attraction function, repulsion function and resultant force function of each obstacle on the moving device, and using the artificial potential field algorithm to model and calculate the obstacles on the path, a basis is provided for the subsequent optimization of the moving path of the moving device.
[0026] Preferably, S2 comprises the following steps:
[0027] S21, dividing the total path planning area into sub-areas to obtain a path planning sub-area set , Indicates the divided sub-regions, Indicates the total number of sub-areas at the division; then set the travel influencing factor set , Indicates the setting Factors that influence progress, Indicates the total number of set travel influencing factors;
[0028] Set a historical travel influencing factor data collection cycle, divide the historical travel influencing factor data collection cycle into time points, and obtain a collection time point set , It represents the first division of the data collection period of the historical travel influencing factors A point in time, Indicates the total number of divided acquisition time points;
[0029] S22, at the collection time point The set of travel influencing factors that appear in each path planning sub-area at each time point The data of the travel influencing factors in the data are collected to obtain the historical data matrix of the travel influencing factors ;as follows,
[0030] ;
[0031] in, Indicated in Time point for A dataset of travel influencing factors that appear in each path planning sub-area; , express The Data corresponding to the factors affecting the movement;
[0032] S23, set the training data ratio to And the test data ratio is ; According to the training data ratio And the test data ratio Historical data matrix of factors affecting the progress Divide the data to obtain the historical training data matrix , historical test data matrix And the historical data matrix to be predicted ; They are as follows,
[0033] ; ; ;
[0034] in, Represents the historical training data matrix In the Time point for A dataset of travel influencing factors that appear in each path planning sub-area; Represents the historical test data matrix In the Time point for A dataset of travel influencing factors that appear in each path planning sub-area; Represents the historical data matrix to be predicted In the Time point for A dataset of travel influencing factors that appear in each path planning sub-area; , and Respectively represent the historical training data matrix , historical test data matrix And the historical data matrix to be predicted The total number of time points divided in ;
[0035] S24. Setting future prediction time point set , Indicates the future prediction set A point in time, Represents the total number of future prediction time points set; according to the historical training data matrix , historical test data matrix And the historical data matrix to be predicted Predict the data of the factors affecting travel at future time points to obtain the predicted data matrix of the factors affecting travel ;as follows,
[0036] ;
[0037] in, The predicted future At the time point A dataset of travel influencing factors that appear in each path planning sub-area; , express The Data corresponding to the factors affecting the movement;
[0038] By setting the collection time point and the set of travel influencing factors, not only are the various factors that may affect the travel of the traveling device fully considered, but it also provides a basis for the subsequent collection of travel influencing factor data; and by collecting travel influencing factor data, it provides data support for the subsequent prediction of future travel influencing factor data.
[0039] Preferably, the S24 comprises the following steps:
[0040] S241, constructing an initial BP neural network model; converting the historical training data matrix Inputting into the initial BP neural network model to perform training operation on the initial BP neural network model to obtain a trained BP neural network model;
[0041] S242, using historical test data matrix Testing the trained BP neural network model, and obtaining the final BP neural network model after the testing is completed;
[0042] S243, using the final BP neural network model according to the historical data matrix to be predicted Predict the future travel influencing factor data to obtain the travel influencing factor prediction data matrix ;
[0043] The BP neural network model is used to predict the data of travel influencing factors at future moments, so as to facilitate the subsequent path optimization.
[0044] Preferably, the S241 comprises the following steps:
[0045] S2411, construct an initial BP neural network model, and set the number of input nodes of the initial BP neural network model to The number of hidden nodes is And the number of output nodes is ;
[0046] At the same time, the initial weight of the initial BP neural network model is set to And the initial threshold is ;
[0047] S2412, set the training error threshold to ; The historical training data matrix Input into the initial BP neural network model to perform training operation on the initial BP neural network model, and the initial weight and the initial threshold Tuning; when the training error during training is less than or equal to When , stop training and obtain the trained BP neural network model;
[0048] The S242 comprises the following steps:
[0049] S2421, the historical test data matrix Divide into two equal parts to obtain the first historical test data matrix and the second historical test data matrix ;
[0050] S2422, the first historical test data matrix Input into the trained BP neural network model for prediction to obtain the historical test prediction data matrix ;
[0051] Set an accuracy threshold; transform the historical test prediction data matrix With the second historical test data matrix Comparing and calculating the accuracy; when the accuracy is greater than or equal to the accuracy threshold, taking the trained BP neural network model as the final BP neural network model;
[0052] Otherwise, repeat S2421 and S2422 until the calculated accuracy is greater than or equal to the accuracy threshold;
[0053] By training and testing the initial BP neural network model, the BP neural network model has good prediction effect and accuracy on the travel influencing factor data, thereby improving the accuracy of subsequent optimization of the travel path.
[0054] Preferably, S3 comprises the following steps:
[0055] S31, construct a seagull population, and set the size of the seagull population to , the seagull population is represented by , represents the first seagulls; set the seagull population The maximum number of iterations is , the current number of iterations is And the initial step size is ;
[0056] S32, according to the starting point coordinates of the path , stationary obstacle coordinate set The coordinates of the end point of the path are And the initial step length Set the first initial path position point matrix ;as follows,
[0057] ;
[0058] in, , and Respectively represent The first The longitude, latitude and altitude of each location point; Indicates The total number of position points on the initial path excluding the position point and the path end point; the first initial path position point matrix The Euclidean distance between two adjacent position points in each row is less than the initial step size ;
[0059] The first initial path position matrix The coordinate data of each row of location points is used as the seagull population The initial position of each seagull in;
[0060] S33, predicting a data matrix based on the travel influencing factors For the first initial path position point matrix Replace the points in ; get the second initial path position point matrix ;as follows,
[0061] ;
[0062] in, , and Respectively represent the first The first The longitude, latitude and altitude of each location point;
[0063] S34, according to the second initial path position point matrix , constructing the seagull population using the combined force function The fitness function ;
[0064] S35, start iterative operation, in each round of iteration, according to the fitness function Seagull population The position of each seagull is updated, and the global optimal seagull individual is calculated in each iteration and used as the optimal position for updating the position of each seagull in the next iteration;
[0065] when When , output the optimal path;
[0066] The Seagull algorithm is used to optimize and adjust the position points on the path. At the same time, the attraction, repulsion and resultant force function models of the obstacles on the path are established according to the artificial potential field algorithm. Before the optimization, the initial randomly selected points are screened and replaced according to the predicted results of the travel influencing factor data, and the total length of the path is considered. By optimizing the path from these three aspects, the optimization of the path is more accurate.
[0067] Preferably, the S33 comprises the following steps:
[0068] S331, according to the travel influencing factor set Set the corresponding travel influencing factor weight value to obtain the travel influencing factor weight data matrix , Indicates Weight data corresponding to the factors affecting the movement;
[0069] According to the weight data matrix of the travel influencing factors And the travel influencing factor prediction data matrix Calculate the travel influencing factors and predict the impact data matrix ;as follows,
[0070] ;
[0071] in, The predicted future At the time point Influence data corresponding to the data set of travel influencing factors appearing in each path planning sub-area; ;
[0072] S332, setting travel impact data threshold ; For the first initial path position point matrix Traverse the position points of each row in the future Go to the time point The path planning sub-areas are within the range of , then the first initial path position matrix In this row, it is located at The position points in the path planning sub-area are deleted, and then other position points are randomly selected to replace them; after the traversal is completed, the second initial path position point matrix is obtained ;
[0073] By calculating the impact data, a basis is provided for excluding and replacing location points on the path.
[0074] Preferably, the S34 comprises the following steps:
[0075] S341, using the resultant force function to calculate the second initial path position point matrix The resultant force at each position point in the resultant force data matrix is obtained ;as follows,
[0076] ;
[0077] in, Indicates the first The first The resultant force data of each position point;
[0078] Then according to the second initial path position point matrix Calculate the total length of each initial path to obtain the initial total length data set , Indicates The total length of the initial paths;
[0079] S342, according to the initial total length data set And the resultant data matrix Constructing the fitness function ;as follows,
[0080] ;
[0081] By determining the fitness function and the optimization target, the optimization is made more directional.
[0082] A complex environment path planning optimization system based on an artificial potential field algorithm, comprising a stationary obstacle coordinate acquisition module, a resultant force function construction module, a travel influencing factor data acquisition module, a travel influencing factor data prediction module and a path optimization module;
[0083] The stationary obstacle coordinate collection module is used to collect the coordinates of all stationary obstacles in the path planning total area to obtain a stationary obstacle coordinate set;
[0084] The resultant force function construction module is used to construct a gravitational field function according to the current motion position coordinates and the path end point coordinates; then construct a repulsive field function according to the current motion position coordinates and the stationary obstacle coordinate set; and finally construct a resultant force function according to the repulsive field function and the gravitational field function;
[0085] The travel influencing factor data collection module is used to collect the travel influencing factor data in the travel influencing factor set appearing in each path planning sub-area according to the travel influencing factor set and the collection time point set, so as to obtain a travel influencing factor historical data matrix;
[0086] The travel influencing factor data prediction module is used to predict the data of travel influencing factors appearing at future time points based on the travel influencing factor historical data matrix to obtain a travel influencing factor prediction data matrix;
[0087] The path optimization module is used to optimize the candidate paths between the path starting point coordinates and the path ending point coordinates by using the seagull population and cooperating with the resultant force function, and finally obtain the optimal path.
[0088] The present invention has the following beneficial effects:
[0089] 1. In the present invention, a stationary obstacle coordinate collection module, a resultant force function construction module, a travel influencing factor data collection module, a travel influencing factor data prediction module and a path optimization module are set; by setting the total path planning area, the path starting point coordinates and the path ending point coordinates and collecting the coordinates of all stationary obstacles in the total path planning area, the distribution of obstacles in the path planning area can be obtained, and artificial potential field modeling can be performed on each stationary obstacle in the area, that is, the attraction function, repulsion function and resultant force function of each obstacle on the traveling device are constructed. By adopting the artificial potential field algorithm to model the obstacles on the path, only the single factor of the resultant force on the traveling device needs to be calculated. factors are taken into consideration, so as to determine the subsequent optimization target of the travel path of the traveling device; making the subsequent analysis process of the optimal path simpler and more convenient; at the same time, since the traveling device is affected by various factors in addition to the obstacles on the road when traveling in the path planning area, this scheme comprehensively analyzes various factors except static obstacles, and predicts the occurrence status of these dynamic factors when the traveling device is traveling in the future, so as to predict the occurrence of these factors in advance, thereby providing another basis for the selection of the optimal path, making the traveling device travel more smoothly on the optimal path, and ensuring the travel efficiency and stability.
[0090] 2. In the present invention, by setting the collection time point and the set of travel influencing factors, not only the various factors that may affect the travel of the traveling device are fully considered, but also a basis is provided for the subsequent collection of travel influencing factor data; and by collecting the travel influencing factor data, data support is provided for the subsequent prediction of future travel influencing factor data.
[0091] 3. The present invention adopts the BP neural network model to predict the travel influencing factor data at future moments, so as to facilitate the subsequent optimization of the path. Among them, by training and testing the initial BP neural network model, the BP neural network model has good prediction effect and accuracy for the travel influencing factor data, thereby improving the accuracy of the subsequent optimization of the travel path; secondly, the Seagull algorithm is used to optimize and adjust the position points on the travel path, and at the same time, the attraction, repulsion and resultant force function models of the obstacles on the path are established according to the artificial potential field algorithm. At the same time, before the optimization, the initial randomly selected points are screened and replaced according to the prediction results of the travel influencing factor data, and the total length of the path is considered. By optimizing the path from these three aspects, the optimization of the path is more accurate.
[0092] Of course, any product implementing the present invention does not necessarily need to achieve all of the advantages described above at the same time. BRIEF DESCRIPTION OF THE DRAWINGS
[0093] In order to more clearly illustrate the technical solutions of the embodiments of the invention, the drawings required for describing the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the invention. For ordinary technicians in this field, they can also obtain drawings based on these drawings without paying creative work.
[0094] Figure 1 The present invention is a flow chart of a complex environment path planning and optimization system based on an artificial potential field algorithm for planning and optimizing a complex environment path. DETAILED DESCRIPTION
[0095] The following will be combined with the drawings in the embodiments of the invention to clearly and completely describe the technical solutions in the embodiments of the invention. Obviously, the described embodiments are only part of the embodiments of the invention, not all of the embodiments. Based on the embodiments in the invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the invention.
[0096] In the description of the present invention, it is necessary to understand that the terms "opening", "upper", "lower", "top", "middle", "inside" and the like indicating orientation or positional relationship are only for the convenience of describing the invention and simplifying the description, and do not indicate or imply that the components or elements referred to must have a specific orientation, be constructed and operate in a specific orientation, and therefore cannot be understood as limiting the invention.
[0097] The present invention is a complex environment path planning optimization method based on an artificial potential field algorithm, comprising the following steps:
[0098] S1. Set the total path planning area, the coordinates of the path starting point and the path end point, and collect the coordinates of all stationary obstacles in the total path planning area to obtain a stationary obstacle coordinate set; set the current motion position coordinates and construct a gravitational field function according to the current motion position coordinates and the path end point coordinates; then construct a repulsive field function according to the current motion position coordinates and the stationary obstacle coordinate set; finally, construct a resultant force function according to the repulsive field function and the gravitational field function;
[0099] The S1 comprises the following steps:
[0100] S11, set the total area of path planning and the coordinates of the path starting point The coordinates of the end point of the path are ; , and Respectively represent the longitude, latitude and altitude of the starting point of the path; , and Respectively represent the longitude, latitude and altitude of the end point of the path;
[0101] The monitoring equipment is then used to collect the coordinates of all stationary obstacles in the path planning area to obtain a stationary obstacle coordinate set. ; , and Respectively represent the first The longitude, latitude and altitude of the location of each stationary obstacle. represents the total number of stationary obstacles in the total area of the path planning;
[0102] S12, set the current motion position coordinates to , , and Respectively represent the longitude, latitude and altitude of the current motion position;
[0103] According to the current motion position coordinates , path end point coordinates Construct the gravitational field function; as follows,
[0104] ;
[0105] In the formula, Indicates the magnitude of the attraction at the current moving position; represents the gravitational scale factor; Indicates the distance between the current motion position and the end point of the path;
[0106] According to the current motion position coordinates And the stationary obstacle coordinate set Construct the repulsive field function; as follows,
[0107] ;
[0108] In the formula, Indicates the current motion position and the path planning area The distance between the locations of the stationary obstacles; Indicates the magnitude of the repulsive force at the current moving position; represents the repulsion scale factor; It is expressed as the minimum safe distance between the obstacle and the current motion position;
[0109] The resultant force function is constructed according to the repulsive field function and the gravitational field function as follows:
[0110] ;
[0111] In the formula, Indicates the magnitude of the resultant force at the current motion position;
[0112] S2, dividing the total path planning area into sub-areas to obtain a path planning sub-area set; and setting a travel influencing factor set and a collection time point set; collecting the travel influencing factor data in the travel influencing factor set appearing in each path planning sub-area according to the travel influencing factor set and the collection time point set to obtain a travel influencing factor historical data matrix; and then predicting the data of the travel influencing factors appearing at future time points according to the travel influencing factor historical data matrix to obtain a travel influencing factor prediction data matrix;
[0113] The S2 comprises the following steps:
[0114] S21, dividing the total path planning area into sub-areas to obtain a path planning sub-area set , Indicates the divided sub-regions, Indicates the total number of sub-areas at the division; then set the travel influencing factor set , Indicates the setting Factors that influence progress, Indicates the total number of set travel influencing factors;
[0115] Set a historical travel influencing factor data collection cycle, divide the historical travel influencing factor data collection cycle into time points, and obtain a collection time point set , It represents the first division of the data collection period of the historical travel influencing factors A point in time, Indicates the total number of divided acquisition time points;
[0116] S22, at the collection time point The set of travel influencing factors that appear in each path planning sub-area at each time point The data of the travel influencing factors in the data are collected to obtain the historical data matrix of the travel influencing factors ;as follows,
[0117] ;
[0118] in, Indicated in Time point for A dataset of travel influencing factors that appear in each path planning sub-area; , express The Data corresponding to the factors affecting the movement;
[0119] S23, set the training data ratio to And the test data ratio is ; According to the training data ratio And the test data ratio Historical data matrix of factors affecting the progress Perform data partitioning to obtain the historical training data matrix , historical test data matrix And the historical data matrix to be predicted ; They are as follows,
[0120] ; ; ;
[0121] in, Represents the historical training data matrix In the Time point for A dataset of travel influencing factors that appear in each path planning sub-area; Represents the historical test data matrix In the Time point for A dataset of travel influencing factors that appear in each path planning sub-area; Represents the historical data matrix to be predicted In the Time point for A dataset of travel influencing factors that appear in each path planning sub-area; , and Respectively represent the historical training data matrix , historical test data matrix And the historical data matrix to be predicted The total number of time points divided in ;
[0122] S24. Setting future prediction time point set , Indicates the future prediction set A point in time, Represents the total number of future prediction time points set; according to the historical training data matrix , historical test data matrix And the historical data matrix to be predicted Predict the data of the factors affecting travel at future time points to obtain the predicted data matrix of the factors affecting travel ;as follows,
[0123] ;
[0124] in, The predicted future At the time point A dataset of travel influencing factors that appear in each path planning sub-area; , express The Data corresponding to the factors affecting the movement;
[0125] The S24 comprises the following steps:
[0126] S241, constructing an initial BP neural network model; converting the historical training data matrix Inputting into the initial BP neural network model to perform training operation on the initial BP neural network model to obtain a trained BP neural network model;
[0127] S242, using historical test data matrix Testing the trained BP neural network model, and obtaining the final BP neural network model after the testing is completed;
[0128] The S241 comprises the following steps:
[0129] S2411, construct an initial BP neural network model, and set the number of input nodes of the initial BP neural network model to The number of hidden nodes is And the number of output nodes is ;
[0130] At the same time, the initial weight of the initial BP neural network model is set to And the initial threshold is ;
[0131] S2412, set the training error threshold to ; The historical training data matrix Input into the initial BP neural network model to perform training operation on the initial BP neural network model, and the initial weight and the initial threshold Tuning; when the training error during training is less than or equal to When , stop training and obtain the trained BP neural network model;
[0132] The S242 comprises the following steps:
[0133] S2421, the historical test data matrix Divide into two equal parts to obtain the first historical test data matrix and the second historical test data matrix ;
[0134] S2422, the first historical test data matrix Input into the trained BP neural network model for prediction to obtain the historical test prediction data matrix ;
[0135] Set an accuracy threshold; transform the historical test prediction data matrix With the second historical test data matrix Comparing and calculating the accuracy; when the accuracy is greater than or equal to the accuracy threshold, taking the trained BP neural network model as the final BP neural network model;
[0136] Otherwise, repeat S2421 and S2422 until the calculated accuracy is greater than or equal to the accuracy threshold;
[0137] S243, using the final BP neural network model according to the historical data matrix to be predicted Predict the future travel influencing factor data to obtain the travel influencing factor prediction data matrix ;
[0138] S3, optimizing the candidate path between the path starting point coordinates and the path ending point coordinates, and finally obtaining the optimal path;
[0139] The S3 comprises the following steps:
[0140] S31, construct a seagull population, and set the size of the seagull population to , the seagull population is represented by , represents the first seagulls; set the seagull population The maximum number of iterations is , the current number of iterations is And the initial step size is ;
[0141] S32, according to the starting point coordinates of the path , stationary obstacle coordinate set The coordinates of the end point of the path are And the initial step length Set the first initial path position point matrix ;as follows,
[0142] ;
[0143] in, , and Respectively represent The first The longitude, latitude and altitude of each location point; Indicates The total number of position points on the initial path excluding the position point and the path end point; the first initial path position point matrix The Euclidean distance between two adjacent position points in each row is less than the initial step size ;
[0144] The first initial path position matrix The coordinate data of each row of location points is used as the seagull population The initial position of each seagull in;
[0145] S33, predicting a data matrix based on the travel influencing factors For the first initial path position point matrix Replace the points in ; get the second initial path position point matrix ;as follows,
[0146] ;
[0147] in, , and Respectively represent the first The first The longitude, latitude and altitude of each location point;
[0148] The S33 comprises the following steps:
[0149] S331, according to the travel influencing factor set Set the corresponding travel influencing factor weight value to obtain the travel influencing factor weight data matrix , Indicates Weight data corresponding to the factors affecting the movement;
[0150] According to the weight data matrix of the travel influencing factors And the travel influencing factor prediction data matrix Calculate the travel influencing factors and predict the impact data matrix ;as follows,
[0151] ;
[0152] in, The predicted future At the time point Influence data corresponding to the data set of travel influencing factors appearing in each path planning sub-area; ;
[0153] S332, setting travel impact data threshold ; For the first initial path position point matrix Traverse the position points of each row in the future Go to the time point The path planning sub-areas are within the range of , then the first initial path position matrix In this row, it is located at The position points in the path planning sub-area are deleted, and then other position points are randomly selected to replace them; after the traversal is completed, the second initial path position point matrix is obtained ;
[0154] S34, according to the second initial path position point matrix , constructing the seagull population using the combined force function The fitness function ;
[0155] The S34 comprises the following steps:
[0156] S341, using the resultant force function to calculate the second initial path position point matrix The resultant force at each position point in the resultant force data matrix is obtained ;as follows,
[0157] ;
[0158] in, Indicates the first The first The resultant force data of each position point;
[0159] Then according to the second initial path position point matrix Calculate the total length of each initial path to obtain the initial total length data set , Indicates The total length of the initial paths;
[0160] S342, according to the initial total length data set And the resultant data matrix Constructing the fitness function ;as follows,
[0161] ;
[0162] S35, start iterative operation, in each round of iteration, according to the fitness function Seagull population The position of each seagull is updated, and the global optimal seagull individual is calculated in each iteration and used as the optimal position for updating the position of each seagull in the next iteration;
[0163] when When , the optimal path is output.
[0164] A complex environment path planning optimization system based on an artificial potential field algorithm, comprising a stationary obstacle coordinate acquisition module, a resultant force function construction module, a travel influencing factor data acquisition module, a travel influencing factor data prediction module and a path optimization module;
[0165] The stationary obstacle coordinate collection module is used to collect the coordinates of all stationary obstacles in the path planning total area to obtain a stationary obstacle coordinate set;
[0166] The resultant force function construction module is used to construct a gravitational field function according to the current motion position coordinates and the path end point coordinates; then construct a repulsive field function according to the current motion position coordinates and the stationary obstacle coordinate set; and finally construct a resultant force function according to the repulsive field function and the gravitational field function;
[0167] The travel influencing factor data collection module is used to collect the travel influencing factor data in the travel influencing factor set appearing in each path planning sub-area according to the travel influencing factor set and the collection time point set, so as to obtain a travel influencing factor historical data matrix;
[0168] The travel influencing factor data prediction module is used to predict the data of travel influencing factors appearing at future time points based on the travel influencing factor historical data matrix to obtain a travel influencing factor prediction data matrix;
[0169] The path optimization module is used to optimize the candidate paths between the path starting point coordinates and the path ending point coordinates by using the seagull population and cooperating with the resultant force function, and finally obtain the optimal path.
[0170] In the description of this specification, the description with reference to the terms "one embodiment", "example", "specific example", etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner.
[0171] The preferred embodiments of the invention disclosed above are only used to help explain the invention. The preferred embodiments do not describe all the details in detail, nor do they limit the invention to the specific implementation methods described. Obviously, many modifications and changes can be made according to the content of this specification. This specification selects and specifically describes these embodiments in order to better explain the principles and practical applications of the invention, so that those skilled in the art can understand and use the invention well.
Claims
1. A complex environment path planning optimization method based on an artificial potential field algorithm, characterized in that: The following steps are involved: S1. Set the total path planning area, the coordinates of the path starting point and the path ending point, and collect the coordinates of all stationary obstacles in the total path planning area to obtain a stationary obstacle coordinate set; Set the current motion position coordinates and construct a gravitational field function according to the current motion position coordinates and the path end point coordinates; then construct a repulsive field function according to the current motion position coordinates and the stationary obstacle coordinate set; finally, construct a resultant force function according to the repulsive field function and the gravitational field function; S2, dividing the total path planning area into sub-areas to obtain a path planning sub-area set; and setting a travel influencing factor set and a collection time point set; According to the travel influencing factor set and the collection time point set, the travel influencing factor data in the travel influencing factor set appearing in each path planning sub-area is collected to obtain a travel influencing factor historical data matrix; then, according to the travel influencing factor historical data matrix, the data appearing at the travel influencing factor at a future time point is predicted to obtain a travel influencing factor prediction data matrix; S3, optimizing the candidate path between the path starting point coordinates and the path ending point coordinates, and finally obtaining the optimal path; The S1 comprises the following steps: S11, set the total area of path planning and the coordinates of the path starting point The coordinates of the end point of the path are ; , and Respectively represent the longitude, latitude and altitude of the starting point of the path; , and Respectively represent the longitude, latitude and altitude of the end point of the path; The monitoring equipment is then used to collect the coordinates of all stationary obstacles in the path planning area to obtain a stationary obstacle coordinate set. ; , and Respectively represent the first The longitude, latitude and altitude of the location of each stationary obstacle. represents the total number of stationary obstacles in the total area of the path planning; S12, set the current motion position coordinates to , , and Respectively represent the longitude, latitude and altitude of the current motion position; According to the current motion position coordinates , path end point coordinates Construct the gravitational field function; as follows, ; In the formula, Indicates the magnitude of the attraction at the current moving position; represents the gravitational scale factor; Indicates the distance between the current motion position and the end point of the path; According to the current motion position coordinates And the stationary obstacle coordinate set Construct the repulsive field function; as follows, ; In the formula, Indicates the current motion position and the path planning area The distance between the locations of the stationary obstacles; Indicates the magnitude of the repulsive force at the current moving position; represents the repulsion scale factor; It is expressed as the minimum safe distance between the obstacle and the current motion position; The resultant force function is constructed according to the repulsive field function and the gravitational field function as follows: ; In the formula, Indicates the magnitude of the resultant force at the current motion position; The S2 comprises the following steps: S21, dividing the total path planning area into sub-areas to obtain a path planning sub-area set , Indicates the divided sub-regions, Indicates the total number of sub-areas at the division; then set the travel influencing factor set , Indicates the setting Factors that influence progress, Indicates the total number of set travel influencing factors; Set a historical travel influencing factor data collection cycle, divide the historical travel influencing factor data collection cycle into time points, and obtain a collection time point set , It represents the first division of the data collection period of the historical travel influencing factors A point in time, Indicates the total number of divided acquisition time points; S22, at the collection time point The set of travel influencing factors that appear in each path planning sub-area at each time point The data of the travel influencing factors in the data are collected to obtain the historical data matrix of the travel influencing factors ;as follows, ; in, Indicated in Time point for A dataset of travel influencing factors that appear in each path planning sub-area; , express The Data corresponding to the factors affecting the movement; S23, set the training data ratio to And the test data ratio is ; According to the training data ratio And the test data ratio Historical data matrix of factors affecting the progress Perform data partitioning to obtain the historical training data matrix , historical test data matrix And the historical data matrix to be predicted ; They are as follows, ; ; ; in, Represents the historical training data matrix In the Time point for A dataset of travel influencing factors that appear in each path planning sub-area; Represents the historical test data matrix In the Time point for A dataset of travel influencing factors that appear in each path planning sub-area; Represents the historical data matrix to be predicted In the Time point for A dataset of travel influencing factors that appear in each path planning sub-area; , and Respectively represent the historical training data matrix , historical test data matrix And the historical data matrix to be predicted The total number of time points divided in ; S24. Setting future prediction time point set , Indicates the future prediction set A point in time, Represents the total number of future prediction time points set; according to the historical training data matrix , historical test data matrix And the historical data matrix to be predicted Predict the data of the factors affecting travel at future time points to obtain the predicted data matrix of the factors affecting travel ;as follows, ; in, The predicted future At the time point A dataset of travel influencing factors that appear in each path planning sub-area; , express The Data corresponding to the factors affecting the movement; The S24 comprises the following steps: S241, constructing an initial BP neural network model; converting the historical training data matrix Inputting into the initial BP neural network model to perform training operation on the initial BP neural network model to obtain a trained BP neural network model; S242, using historical test data matrix Testing the trained BP neural network model, and obtaining the final BP neural network model after the testing is completed; S243, using the final BP neural network model according to the historical data matrix to be predicted Predict the future travel influencing factor data to obtain the travel influencing factor prediction data matrix ; The S241 comprises the following steps: S2411, construct an initial BP neural network model, and set the number of input nodes of the initial BP neural network model to The number of hidden nodes is And the number of output nodes is ; At the same time, the initial weight of the initial BP neural network model is set to And the initial threshold is ; S2412, set the training error threshold to ; The historical training data matrix Input into the initial BP neural network model to perform training operation on the initial BP neural network model, and the initial weight and the initial threshold Tuning; when the training error during training is less than or equal to When , stop training and obtain the trained BP neural network model; The S242 comprises the following steps: S2421, the historical test data matrix Divide into two equal parts to obtain the first historical test data matrix and the second historical test data matrix ; S2422, the first historical test data matrix Input into the trained BP neural network model for prediction to obtain the historical test prediction data matrix ; Set an accuracy threshold; transform the historical test prediction data matrix With the second historical test data matrix Comparing and calculating the accuracy; when the accuracy is greater than or equal to the accuracy threshold, taking the trained BP neural network model as the final BP neural network model; Otherwise, repeat S2421 and S2422 until the calculated accuracy is greater than or equal to the accuracy threshold; The S3 comprises the following steps: S31, construct a seagull population, and set the size of the seagull population to , the seagull population is represented by , represents the first seagulls; set the seagull population The maximum number of iterations is , the current number of iterations is And the initial step size is ; S32, according to the starting point coordinates of the path , stationary obstacle coordinate set The coordinates of the end point of the path are And the initial step length Set the first initial path position point matrix ;as follows, ; in, , and Respectively represent The first The longitude, latitude and altitude of each location point; Indicates The total number of position points on the initial path excluding the position point and the path end point; the first initial path position point matrix The Euclidean distance between two adjacent position points in each row is less than the initial step size ; The first initial path position matrix The coordinate data of each row of location points is used as the seagull population The initial position of each seagull in; S33, predicting a data matrix based on the travel influencing factors For the first initial path position point matrix Replace the points in; get the second initial path position point matrix ;as follows, ; in, , and Respectively represent the first The first The longitude, latitude and altitude of each location point; S34, according to the second initial path position point matrix , constructing the seagull population using the combined force function The fitness function ; S35, start iterative operation, in each round of iteration, according to the fitness function Seagull population The position of each seagull is updated, and the global optimal seagull individual is calculated in each iteration and used as the optimal position for updating the position of each seagull in the next iteration; when When , output the optimal path; The S33 comprises the following steps: S331, according to the travel influencing factor set Set the corresponding travel influencing factor weight value to obtain the travel influencing factor weight data matrix , Indicates Weight data corresponding to the factors affecting the movement; According to the weight data matrix of the travel influencing factors And the travel influencing factor prediction data matrix Calculate the travel influencing factors and predict the impact data matrix ;as follows, ; in, The predicted future At the time point Influence data corresponding to the data set of travel influencing factors appearing in each path planning sub-area; ; S332, setting travel impact data threshold ; For the first initial path position point matrix Traverse the position points of each row in the future Go to the time point The path planning sub-areas are within the range of , then the first initial path position point matrix In this row, it is located at The position points in the path planning sub-area are deleted, and then other position points are randomly selected to replace them; after the traversal is completed, the second initial path position point matrix is obtained ; The S34 comprises the following steps: S341, using the resultant force function to calculate the second initial path position point matrix The resultant force at each position point in the resultant force data matrix is obtained ;as follows, ; in, Indicates the first The first The resultant force data of each position point; Then according to the second initial path position point matrix Calculate the total length of each initial path to obtain the initial total length data set , Indicates The total length of the initial paths; S342, according to the initial total length data set And the resultant data matrix Constructing the fitness function ;as follows, 。 2. A system for implementing the complex environment path planning optimization method based on artificial potential field algorithm as claimed in claim 1, characterized in that: It includes a stationary obstacle coordinate acquisition module, a resultant force function construction module, a travel influencing factor data acquisition module, a travel influencing factor data prediction module and a path optimization module; The stationary obstacle coordinate collection module is used to collect the coordinates of all stationary obstacles in the path planning total area to obtain a stationary obstacle coordinate set; The resultant force function construction module is used to construct a gravitational field function according to the current motion position coordinates and the path end point coordinates; then construct a repulsive field function according to the current motion position coordinates and the stationary obstacle coordinate set; and finally construct a resultant force function according to the repulsive field function and the gravitational field function; The travel influencing factor data collection module is used to collect the travel influencing factor data in the travel influencing factor set appearing in each path planning sub-area according to the travel influencing factor set and the collection time point set, so as to obtain a travel influencing factor historical data matrix; The travel influencing factor data prediction module is used to predict the data of travel influencing factors appearing at future time points based on the travel influencing factor historical data matrix to obtain a travel influencing factor prediction data matrix; The path optimization module is used to optimize the candidate paths between the path starting point coordinates and the path ending point coordinates by using the seagull population and cooperating with the resultant force function, and finally obtain the optimal path.
