Mobile device path planning method and electronic device
By constructing a fitness function and a particle swarm optimization algorithm with dimension-wise optimization, the problems of local optima and high computational complexity in path planning of the PSO algorithm are solved, and efficient and real-time path planning is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- DALIAN UNIV OF TECH
- Filing Date
- 2026-05-09
- Publication Date
- 2026-06-05
AI Technical Summary
Existing particle swarm optimization (PSO) algorithms are prone to getting trapped in local optima in path planning, failing to effectively utilize the feature information of local path points, and high-dimensional path planning has high computational complexity, making it difficult to meet real-time requirements.
A fitness function is constructed, and particle velocity and position are updated through particle swarm optimization algorithm. After each update, dimension-wise optimization is performed. A coordinate descent strategy is introduced to extract high-fitness path points dimension by dimension and update the global optimal position.
Without increasing computational costs, it improves the accuracy and real-time performance of path planning, effectively utilizes the local feature information of low-fitness particles, and avoids redundant calculations in full path evaluation.
Smart Images

Figure CN122149498A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the technical field of mobile device path planning, and in particular to a mobile device path planning method, electronic device, storage medium, and computer program product. Background Technology
[0002] Global path planning for mobile devices aims to generate trajectories that satisfy safety constraints, optimize path length, and ensure smoothness in complex environments. Particle Swarm Optimization (PSO) is widely used in this field due to its simple computational process and strong global search capabilities. However, under complex constraints, the standard PSO algorithm still suffers from problems such as being prone to getting trapped in local optima and experiencing a decrease in population diversity.
[0003] Existing PSO improvement methods typically employ a strategy of direct elimination and random reconstruction for low-fitness particles (i.e., individuals with poor overall path quality). However, this strategy suffers from the following technical drawbacks: (1) Existing PSO determines the optimal path by comparing the overall fitness values of particles, failing to extract and utilize the effective positional features contained in individual local path points; even if the overall fitness values of some particles are poor, their local path points in a specific dimension may still have better guiding value. (2) Directly eliminating and recombining low-fitness particles may result in the loss of potentially valuable local feature information, leading to the omission of effective path point location information during the search process; (3) If existing coordinate descent methods are directly applied to high-dimensional path planning, they usually need to traverse each dimension and calculate the complete fitness of the new path, which will bring high computational overhead and make it difficult to meet real-time requirements. Summary of the Invention
[0004] Therefore, it is necessary to address the technical problems of existing PSO path planning methods, such as neglecting individual local path point features, resulting in the loss of effective features and high computational complexity of local reconstruction, by providing a mobile device path planning method, electronic device, storage medium, and computer program product.
[0005] This invention provides a mobile device path planning method, comprising: Construct a fitness function for mobile device path planning, wherein the fitness function is used to calculate the fitness value of the path; Initialize a particle swarm population, where each particle includes a particle position and a particle velocity. The particle position is used to encode a candidate path consisting of the coordinates of multiple intermediate path points. Multiple iterations of optimization are performed. In each iteration, based on the fitness value of the candidate path encoded by each particle position, the particle swarm optimization algorithm is executed to update the particle velocity and particle position, and to update the global optimal position and the individual optimal position of each particle. After each velocity and position update, a dimensional optimization operation is performed on the entire population. The dimensional optimization operation searches the path point coordinates of the candidate paths encoded by the positions of all particles in the population in each dimension, and optimizes the path point coordinates corresponding to the global optimal position. After the iteration is completed, the optimal path is determined based on the path encoded by the globally optimal position.
[0006] Furthermore, the fitness function for constructing the mobile device path planning includes: The fitness function for mobile device path planning is as follows: ,in, Let be the fitness value of the i-th path. The first fitness weight coefficient, This is the second fitness weighting coefficient. Let be the path length of the i-th path. Let i be the total energy consumption of the i-th path. Let be the collision violation index for the i-th path.
[0007] Furthermore, the mobile device is an unmanned surface vessel: The path length is: Where D is the number of intermediate path points included in the path. Let J be the coordinates of the j-th path point of the i-th path. Let be the coordinates of the (j+1)th path point of the i-th path, and , The coordinates of the starting path point. The coordinates of the termination point; The total energy consumption is Where G is the rated power of the unmanned surface vessel, introduced between adjacent path points. Equally spaced interpolation segments, This represents the number of interpolation segments between adjacent path points. The ground composite speed of the unmanned surface vessel located in the q-th interpolation segment between the j-th path point and the (j+1)-th path point on the i-th path is given. The length of the q-th interpolation segment between the j-th path point and the (j+1)-th path point of the i-th path; The collision violation index is: ,in The center point of the q-th interpolation segment between the j-th path point and the (j+1)-th path point of the i-th path is... The distance between the centers of the obstacles, P, is the number of obstacles.
[0008] Furthermore, the stepwise optimization operation performed on the entire population includes: Perform feature searches D times in sequence, where D is the number of intermediate path points included in the path. In the j-th feature search, perform the following steps: The baseline configuration is extracted from the guiding vector, which is a node sequence consisting of the coordinates of the starting path point, the coordinates of all path points of the globally optimal position encoded path, and the coordinates of the ending path point. Traverse all particles in the population, extract the path point coordinates of the j-th dimension of each particle's position, and construct the candidate configuration corresponding to each particle. Calculate the fitness value of the local path formed by the baseline configuration and the fitness value of the local path formed by each candidate configuration, respectively. The candidate configuration with the best fitness value is selected as the optimal candidate configuration. If the fitness value of the optimal candidate configuration is greater than the fitness value of the baseline configuration, the global optimal position is updated based on the optimal candidate configuration.
[0009] Furthermore, the extraction of the baseline configuration from the guiding vector includes: The coordinates of the j-th node, the (j+1)-th node, and the (j+2)-th node are extracted from the guiding vector to form the baseline configuration.
[0010] Furthermore, constructing the candidate configuration for each particle includes: Replace the center node of the baseline configuration with the coordinates of the j-th dimension path point of each particle position to construct a candidate configuration for the particle.
[0011] Furthermore, updating the globally optimal position based on the optimal candidate configuration includes: Update the j-th dimension path point coordinates of the globally optimal position to the j-th dimension path point coordinates of the particle position corresponding to the optimal candidate configuration.
[0012] This invention provides an electronic device, comprising: At least one processor; and, A memory communicatively connected to at least one of the processors; wherein, The memory stores instructions that are executed by at least one of the processors to enable the at least one of the processors to perform the mobile device path planning method as described above.
[0013] The present invention provides a storage medium that stores computer instructions, which, when executed by a computer, are used to perform all the steps of the mobile device path planning method as described above.
[0014] The present invention provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements the mobile device path planning method as described above.
[0015] This invention constructs a fitness function for mobile device path planning. It employs a particle swarm optimization (PSO) algorithm to encode candidate paths composed of multiple path points, updating particle velocities and positions, and updating the global optimum and the individual optimum position of each particle. After each velocity and position update, a dimensional optimization operation is performed on the entire population. This invention introduces a dimensional local reconstruction mechanism based on a coordinate descent strategy, extracting the coordinates of path points with high fitness from all particles in the entire population dimensionally to update the global optimum. This method overcomes the deficiency of existing PSO algorithms, which lose effective local features due to simply eliminating low-fitness particles. Furthermore, by calculating only the fitness increment of local paths to determine whether to replace them, it avoids redundant calculations of the entire path evaluation, effectively improving optimization accuracy while ensuring the real-time performance and efficiency of the algorithm. Attached Figure Description
[0016] Figure 1 This is a flowchart illustrating the process of a mobile device path planning method according to an embodiment of the present invention. Figure 2 This is a flowchart illustrating a mobile device path planning method according to another embodiment of the present invention. Figure 3 A flowchart illustrating the workflow of a mobile device path planning method according to the preferred embodiment of the present invention; Figure 4 This is a schematic diagram of a single feature search process; Figure 5 A schematic diagram illustrating the result of dispersing obstacles in conjunction with a uniform ocean current environment; Figure 6 A schematic diagram illustrating the results of using Lamb-Oseen eddy currents to disperse obstacles; Figure 7 This is a schematic diagram of the hardware structure of an electronic device according to the present invention. Detailed Implementation
[0017] The specific embodiments of the present invention will be further described below with reference to the accompanying drawings. Identical components are indicated by the same reference numerals. It should be noted that the terms "front," "rear," "left," "right," "upper," and "lower" used in the following description refer to directions in the drawings, while the terms "inner" and "outer" refer to directions toward or away from the geometric center of a specific component. These terms are used only for the convenience of describing this application and simplifying the description, and are not intended to indicate or imply that the device or element referred to has a specific orientation, or is constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on this application.
[0018] Unless the context otherwise requires, throughout the specification and claims, the term "comprising" is interpreted as open-ended and encompassing, meaning "including, but not limited to." In the description of the specification, terms such as "one embodiment," "some embodiments," "exemplary embodiment," "exemplary," or "some examples," etc., are intended to indicate that a particular feature, structure, material, or characteristic associated with that embodiment or example is included in at least one embodiment or example of this application. The illustrative representations of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics mentioned may be included in any suitable manner in any one or more embodiments or examples.
[0019] Hereinafter, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of embodiments of this application, unless otherwise stated, "a plurality of" means two or more.
[0020] In describing some embodiments, the term "connection" and its derivative expressions may be used. For example, the term "connection" may be used in describing some embodiments to indicate that two or more components have direct physical or electrical contact with each other. The embodiments claimed herein are not necessarily limited to the content of this document.
[0021] Furthermore, in the specification and claims, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following related objects are in an "or" relationship.
[0022] This invention provides a method for efficiently extracting valuable path point feature information from a population of particles, which can improve the quality of the global optimal solution without significantly increasing computational costs.
[0023] like Figure 1 The diagram shown is a flowchart of a mobile device path planning method according to an embodiment of the present invention, including: Step S101: Construct a fitness function for mobile device path planning, wherein the fitness function is used to calculate the fitness value of the path; Step S102: Initialize the particle swarm population. Each particle includes a particle position and a particle velocity. The particle position is used to encode a candidate path composed of the coordinates of multiple intermediate path points. Step S103: Perform multiple iterative optimizations. In each iteration, based on the fitness value of the candidate path encoded by each particle position, execute the particle swarm optimization algorithm to update the particle velocity and particle position, and update the global optimal position and the individual optimal position of each particle. Step S104: After each velocity and position update, perform a dimension-wise optimization operation on the entire population. The dimension-wise optimization operation searches the path point coordinates of the candidate paths encoded by the positions of all particles in the population in each dimension, and optimizes the path point coordinates corresponding to the global optimal position. Step S105: After the iteration is completed, the optimal path is determined based on the path encoded by the globally optimal position.
[0024] Specifically, the present invention can be applied to electronic devices with processing capabilities, such as computers.
[0025] First, step S101 is executed to construct a fitness function for mobile device path planning. The fitness function is used to calculate the fitness value of the path.
[0026] Specifically, a fitness function for mobile device path planning is constructed. Preferably, the fitness function is multi-objective, which comprehensively evaluates path length, energy consumption, and collision safety.
[0027] Mobile devices include, but are not limited to, unmanned surface vessels (USVs), drones, and mobile robots. Whether it's a USV, drone, or mobile robot, each mobile device can be simplified to a point mass, and the path is a line connecting multiple consecutive coordinates, representing the continuous movement of the point mass. Furthermore, all USVs, drones, and mobile robots consume energy during movement. Therefore, mobile devices such as USVs, drones, and mobile robots can be evaluated using a multi-objective fitness function that comprehensively assesses path length, energy consumption, and collision safety.
[0028] Then, step S102 is executed to initialize the particle swarm population, where each particle includes a particle position and a particle velocity. The particle position is used to encode a candidate path consisting of the coordinates of multiple intermediate path points.
[0029] Specifically, Particle Swarm Optimization (PSO) is a global stochastic search algorithm based on swarm intelligence, simulating the behavior of a flock of birds searching for food by finding the optimal solution through individual experience and group cooperation. In this algorithm, each possible solution is called a "particle," and all particles together form a "particle swarm." These particles fly in the solution space, adjusting their speed and position based on their own experience (individual extrema) and the collective experience of the swarm (global extrema), thereby gradually approaching the optimal solution.
[0030] The state of each particle is described by two parameters: its position and its velocity. In each iteration, the PSO algorithm updates the particle's velocity and position.
[0031] In this invention, the position of a particle represents the coordinates of the current solution in the search space, signifying a potential optimal solution. Each particle's position encodes a candidate path consisting of the coordinates of D intermediate path points, where D is the number of intermediate path points. A complete path includes the coordinates of the starting path point, the coordinates of D intermediate path points, and the coordinates of the ending path point. The particle's position only encodes the coordinates of the intermediate path points; the starting and ending path point coordinates remain unchanged. Different particle positions represent schemes to reach the same ending path point coordinates from the same starting path point coordinates through different intermediate path point coordinates.
[0032] The particle's velocity is a vector representing the direction and step size of its next move in the search space. During initialization, the position and velocity of each particle are randomly generated. Then, in each subsequent iteration, the particle's velocity is calculated first, and then its position is calculated based on the new velocity.
[0033] Then, step S103 is executed, and multiple iterations of optimization are performed. In each iteration, based on the fitness value of the candidate path encoded by each particle position, the particle swarm optimization algorithm is executed to update the particle velocity and particle position, and to update the global optimal position and the individual optimal position of each particle.
[0034] Specifically, multiple iterative optimizations are performed. In each iteration, the velocity and position update steps of the particle swarm optimization algorithm are executed, updating the individual optimal position and global optimal position of each particle. The individual optimal position (i.e., the individual optimal solution) is the position of the particle corresponding to the maximum fitness value among the candidate paths encoded by the fitness function over multiple iterations. The global optimal position is the position corresponding to the maximum fitness value among all individual optimal positions and the global optimal position obtained in the previous iteration. In the initial iteration, the global optimal position is the position corresponding to the maximum fitness value among all individual optimal positions at that time.
[0035] Then, step S104 is executed. After each velocity and position update, a dimensional optimization operation is performed on the entire population. The dimensional optimization operation searches the path point coordinates of the candidate paths encoded by the positions of all particles in the population in each dimension and optimizes the path point coordinates corresponding to the global optimal position.
[0036] Specifically, after each iteration update, a dimension-wise optimization operation is performed on the entire population based on the coordinate descent method. By searching the path point position information (i.e., path point coordinates) of all particles in the population dimension by dimension, the corresponding path point coordinates in the global optimal position are replaced to improve the quality of the global optimal position (i.e., the global optimal solution).
[0037] Finally, step S105 is executed. After the iteration is completed, the optimal path is determined based on the path encoded by the globally optimal position.
[0038] Specifically, the path of the globally optimal location encoding includes the coordinates of multiple intermediate path points. The optimal path is obtained by sequentially connecting the coordinates of the starting path point, the coordinates of the intermediate path points of the globally optimal location encoding path, and the coordinates of the ending path point.
[0039] This invention introduces a dimension-wise local reconstruction mechanism based on a coordinate descent strategy, extracting the coordinates of path points with high fitness from all particles in the entire population dimension-wise to update the global optimum. This invention overcomes the deficiency of existing PSO algorithms, which suffer from the loss of effective local features due to the simple elimination of low-fitness particles. Furthermore, by calculating only the fitness increment of local paths to determine whether to replace them, it avoids the redundant calculation of full path evaluation, effectively improving optimization accuracy while ensuring the real-time performance and efficiency of the algorithm.
[0040] like Figure 2 The diagram shown is a flowchart of a mobile device path planning method according to another embodiment of the present invention, including: Step S210, construct the fitness function for mobile device path planning as follows: ,in, Let be the fitness value of the i-th path. The first fitness weight coefficient, This is the second fitness weighting coefficient. Let be the path length of the i-th path. Let i be the total energy consumption of the i-th path. Let be the collision violation index for the i-th path.
[0041] Step S220: Initialize the particle swarm population. Each particle includes a particle position and a particle velocity. The particle position is used to encode a candidate path consisting of the coordinates of multiple intermediate path points.
[0042] Step S230: Perform multiple iterative optimizations. In each iteration, based on the fitness value of the candidate path encoded by each particle position, execute the particle swarm optimization algorithm to update the particle velocity and particle position, and update the global optimal position and the individual optimal position of each particle.
[0043] Step S240: After each velocity and position update, a dimensional optimization operation is performed on the entire population. This dimensional optimization operation searches the path point coordinates of candidate paths encoded by the positions of all particles in the population dimension-wise, and optimizes the path point coordinates corresponding to the globally optimal position. The dimensional optimization operation on the entire population includes: Perform feature searches D times in sequence, where D is the number of intermediate path points included in the path. In the j-th feature search, perform the following steps: Step S241: Extract the baseline configuration from the guiding vector, wherein the guiding vector is a node sequence consisting of the coordinates of the starting path point, the coordinates of all path points of the globally optimal position encoded path, and the coordinates of the ending path point. Step S242: Traverse all particles in the population, extract the path point coordinates of the j-th dimension of each particle's position, and construct the candidate configuration corresponding to each particle. Step S243: Calculate the fitness value of the local path formed by the baseline configuration and the fitness value of the local path formed by each candidate configuration. Step S244: Select the candidate configuration with the best fitness value as the optimal candidate configuration. If the fitness value of the optimal candidate configuration is greater than the fitness value of the baseline configuration, then update the global optimal position based on the optimal candidate configuration.
[0044] Step S250: After the iteration is completed, the optimal path is determined based on the path encoded by the globally optimal position.
[0045] Specifically, first, step S210 is executed to construct the fitness function for mobile device path planning: ,in, Let be the fitness value of the i-th path. The first fitness weight coefficient, This is the second fitness weighting coefficient. Let be the path length of the i-th path. Let i be the total energy consumption of the i-th path. Let be the collision violation index for the i-th path.
[0046] Specifically, a path planning environment model is constructed. A navigation environment incorporating obstacle information and an ocean current model is established. Obstacles are defined by their center coordinates. and radius It is stated that, based on the characteristic dimensions of unmanned vessels An expansion process is applied to simplify the unmanned vessel entity into a point mass. The ocean current model uses either a uniform flow model or a Lamb-Oseen eddy current model to calculate the flow field velocity and direction at any location within the environment.
[0047] Then, construct the multi-objective fitness function. Design the fitness function. Comprehensive assessment of path length Total energy consumption and collision violation indicators . in, Let be the fitness value of the i-th path. The first fitness weight coefficient, This is the second fitness weighting coefficient. Let be the path length of the i-th path. Let i be the total energy consumption of the i-th path. Let i be the collision violation index for the i-th path, and let the fitness function be used to calculate the fitness value of the path.
[0048] Given the coordinates of D intermediate path points The resulting path, combined with the coordinates of the starting path point. and the coordinates of the termination path point Construct a complete path point sequence ,in , And H1=X1, H2=X2,…,H D =X D . Preferably, the first fitness weight coefficient is set as follows: , used for normalization length; the second fitness weight coefficient is set to Used to normalize theoretical energy consumption, where For the still water speed of the unmanned vessel, Rated power. Total energy consumption. By introducing between adjacent path points The unmanned surface vessel (USV) ground composite velocity for each interpolated segment is calculated by combining the ocean current velocity field and the total travel time of each segment with the rated power. get.
[0049] In one embodiment, the mobile device is an unmanned surface vessel: The path length is: Where D is the number of intermediate path points included in the path. Let J be the coordinates of the j-th path point of the i-th path. Let be the coordinates of the (j+1)th path point of the i-th path, and , The coordinates of the starting path point. The coordinates of the termination point; The total energy consumption is Where G is the rated power of the unmanned surface vessel, introduced between adjacent path points. Equally spaced interpolation segments, This represents the number of interpolation segments between adjacent path points. The ground composite speed of the unmanned surface vessel located in the q-th interpolation segment between the j-th path point and the (j+1)-th path point on the i-th path is given. The length of the q-th interpolation segment between the j-th path point and the (j+1)-th path point of the i-th path; The collision violation index is: ,in The center point of the q-th interpolation segment between the j-th path point and the (j+1)-th path point of the i-th path is... The distance between the centers of the obstacles, P, is the number of obstacles.
[0050] Specifically, this embodiment determines a specific fitness function for the unmanned surface vessel (USV), which is preferably an unmanned surface vessel (USV). The calculation methods for each item are as follows: (1) The path length of the i-th path Coordinates of the starting path point Coordinates of the path from D intermediate path points to the final path point Cumulative distance: ,in Let be the distance between the coordinates of the j-th path point and the coordinates of the (j+1)-th path point in the i-th path. Preferably, the distance is the Euclidean distance, then the path length of the i-th path is... Coordinates of the starting path point Coordinates of the path from D intermediate path points to the final path point The cumulative Euclidean distance, Let be the Euclidean distance between the coordinates of the j-th path point and the coordinates of the (j+1)-th path point in the i-th path.
[0051] (2) Total energy consumption The calculation is based on introducing between adjacent path points. Each interpolated segment is equidistant. The ocean current velocity is extracted at each interpolated segment location. With angle Combined with the still water speed of the unmanned vessel With heading angle Calculate the ground composite speed And determined by the length of the interpolation segment. Solve for the flight time, and finally multiply by the rated power. The total energy consumption is obtained as follows: .
[0052] The calculation of the ground composite speed is as follows: (The calculation involves introducing...) between consecutive path nodes. The ground composite speed at each interpolated segment is calculated by vector synthesis using ocean current velocity fields and equidistant interpolation segments. The formula is:
[0053] in, Let represent the scalar velocity of the ocean current at the q-th interpolation segment between the j-th path point and the (j+1)-th path point of the i-th path. This represents the still water scalar speed of the unmanned vessel. Indicates the heading angle of the unmanned vessel and This indicates the direction angle of the ocean current; all angles are measured counterclockwise from the positive x-axis. Total energy consumption. It is the sum of the products of the travel time and the rated power of each interpolated segment.
[0054] (3) Collision violation indicators ,in The center point of the q-th interpolation segment between the j-th path point and the (j+1)-th path point of the i-th path is... Obstacle Center The distance is preferably Euclidean. The collision term has no weight, to strictly punish out-of-bounds behavior.
[0055] Specifically, for an environment containing P obstacles, the Euclidean distance from the center point of each interpolation segment to the center of the obstacle is calculated. If the distance is less than the sum of the unmanned surface vessel's feature size and the obstacle's radius, a penalty value is accumulated; for collision-free paths... It is 0.
[0056] Then, step S220 is executed to initialize the particle swarm population. Each particle includes a particle position and a particle velocity. The particle position is used to encode a candidate path consisting of the coordinates of multiple intermediate path points.
[0057] Specifically, a population of N particles is randomly initialized, and the particle position of each particle is... The encoding includes paths to D intermediate path points in a two-dimensional plane. Particle positions are represented as vectors, where the element in the j-th dimension of the vector represents the coordinates of the j-th intermediate path point within the encoded path; these are simply referred to as the j-th dimension path point coordinates of the particle position. Simultaneously, the particle velocity of each particle is randomly initialized. The particle position and particle velocity are both D×1 vectors.
[0058] Simultaneously, during initialization, the fitness value of each particle is calculated, and the optimal position of each particle is recorded. and the global optimal position .
[0059] Then, step S230 is executed, and multiple iterations of optimization are performed. In each iteration, based on the fitness value of the candidate path encoded by each particle position, the particle swarm optimization algorithm is executed to update the particle velocity and particle position, and to update the global optimal position and the individual optimal position of each particle.
[0060] Specifically, in the k-th iteration, the particle velocity and position of each particle i are updated according to the standard PSO formula to generate the particle velocity and position for the (k+1)-th iteration, as follows:
[0061] Where w is the inertia weight, For cognitive acceleration coefficient, As the social acceleration coefficient, and A random number in the range [0,1]. Let i be the position of the i-th particle in the (k+1)-th iteration. Let i be the position of the i-th particle in the k-th iteration. Let be the particle velocity of the i-th particle in the (k+1)-th iteration. Let be the particle velocity of the i-th particle in the k-th iteration. Let be the optimal position of the i-th particle in the k-th iteration. This is the globally optimal position in the k-th iteration.
[0062] After the update, the fitness values of all particles are calculated using the fitness function constructed above, and the results are updated accordingly. and .
[0063] Then, step S240 is executed. After each velocity and position update, a dimensional optimization operation is performed on the entire population. This dimensional optimization operation searches the path point coordinates of candidate paths encoded by the positions of all particles in the population dimension by dimension, and optimizes the path point coordinates corresponding to the globally optimal position. The dimensional optimization operation on the entire population includes: Perform feature searches D times in sequence, where D is the number of intermediate path points included in the path. In the j-th feature search, perform the following steps: Step S241: Extract the baseline configuration from the guiding vector, wherein the guiding vector is a node sequence consisting of the coordinates of the starting path point, the coordinates of all path points of the globally optimal position encoded path, and the coordinates of the ending path point. Step S242: Traverse all particles in the population, extract the path point coordinates of the j-th dimension of each particle's position, and construct the candidate configuration corresponding to each particle. Step S243: Calculate the fitness value of the local path formed by the baseline configuration and the fitness value of the local path formed by each candidate configuration. Step S244: Select the candidate configuration with the best fitness value as the optimal candidate configuration. If the fitness value of the optimal candidate configuration is greater than the fitness value of the baseline configuration, then update the global optimal position based on the optimal candidate configuration.
[0064] Specifically, step S240 performs a dimension-by-dimensional optimization operation based on the coordinate descent method.
[0065] Constructing the guiding vector The guiding vector is encoded by the coordinates of the starting path point at the beginning and the globally optimal position in the middle, corresponding to the path. A node sequence consisting of the coordinates of intermediate path points and the coordinates of the terminal path point at the end. The sequence index is defined as... to .in, Coordinates of the starting path point , Coordinates of the terminating path point , to Corresponding to the current global optimal position in sequence The coordinates of the first to Dth intermediate path points of the encoded path.
[0066] For the sequential search of spatial dimensions, at the th In secondary feature search Perform the following sub-steps, including steps S241, S242, S243, and S244: Sub-step S241: Extract the baseline configuration from the guiding vector, wherein the guiding vector is a node sequence consisting of the coordinates of the starting path point, the coordinates of all path points of the globally optimal position encoded path, and the coordinates of the ending path point.
[0067] Specifically, a locally optimal configuration is constructed by extracting multiple nodes from the guiding vector to form a baseline configuration.
[0068] In one embodiment, extracting the baseline configuration from the guiding vector includes: The coordinates of the j-th node, the (j+1)-th node, and the (j+2)-th node are extracted from the guiding vector to form the baseline configuration.
[0069] Specifically, three consecutive nodes are extracted from the guiding vector, namely the j-th, j+1-th, and j+2-th nodes, to form the baseline configuration. This baseline configuration represents the current optimization dimension node. The two local lines centered on this point. Because the guiding vector has more [positions] than the global optimum. and ,therefore: When j=1 ; When j=D ; When j≠1 and j≠D .
[0070] Then, sub-step S242 is executed to traverse all particles in the population, extract the path point coordinates of the j-th dimension of each particle's position, and construct the candidate configuration corresponding to each particle.
[0071] Specifically, the particle-by-particle feature replacement evaluation involves traversing all N particles in the population. The coordinates of the j-th dimension path points of each particle are extracted sequentially and combined with the corresponding positions of the baseline configuration to construct a candidate configuration for each particle.
[0072] In one embodiment, constructing the candidate configuration for each particle includes: Replace the center node of the baseline configuration with the coordinates of the j-th dimension path point of each particle position to construct a candidate configuration for the particle.
[0073] Specifically, for the m-th particle, its position is... Dimensional path point coordinates Extract it and replace the central node of the baseline configuration. Construct candidate configurations . Then, sub-step S243 is executed to calculate the fitness value of the local path formed by the baseline configuration and the fitness value of the local path formed by each candidate configuration.
[0074] Specifically, local fitness calculation is performed: for the baseline configuration and N candidate configurations, the fitness values of the local paths formed by the three nodes in the baseline configuration and the local paths formed by the three nodes in the candidate configurations are calculated respectively. The fitness value of the local path can be obtained by first calculating the path length, total energy consumption, and collision violation index of the local path, and then substituting these values into the fitness function.
[0075] The evaluation metrics in this embodiment include path length, local energy consumption, and local collision violations for the baseline and candidate configurations, avoiding repeated calculations of the fitness of the complete path.
[0076] Then, sub-step S244 is executed to select the candidate configuration with the best fitness value as the optimal candidate configuration. If the fitness value of the optimal candidate configuration is greater than the fitness value of the baseline configuration, the global optimal position is updated based on the optimal candidate configuration.
[0077] Specifically, the optimization and replacement process is performed: the candidate configuration with the best fitness is selected as the optimal candidate configuration. , where r is the optimal particle index. The candidate configuration with the best fitness is the one that forms the local path with the highest fitness value. If the optimal candidate configuration... Its adaptability is better than the baseline configuration. If the fitness value of the optimal candidate configuration is greater than the fitness value of the baseline configuration, then the global optimal position is updated based on the optimal candidate configuration.
[0078] In one embodiment, updating the globally optimal position based on the optimal candidate configuration includes: Update the j-th dimension path point coordinates of the globally optimal position to the j-th dimension path point coordinates of the particle position corresponding to the optimal candidate configuration.
[0079] Specifically, the globally optimal position is updated in the following manner:
[0080] in, This is the updated globally optimal position. This is the original globally optimal position. For the baseline configuration, To determine the optimal candidate configuration, construct a mapping matrix. , Columns j-1 to j+1 form the identity matrix, and the remaining columns are zero, responsible for setting the baseline configuration. and optimal candidate configuration Convert to a 1×D row vector. Update the guiding vector synchronously after the update. .
[0081] After completing one feature search, increment j by 1, and then re-execute steps S241-S244 until all feature searches are completed. Then determine whether the iteration termination condition is met. If the iteration termination condition is not met, execute the next iteration and execute steps S230-S240 again, and perform D feature searches in each iteration.
[0082] Finally, if the iteration termination condition is met, step S250 is executed. After the iteration ends, the optimal path is determined based on the path encoded by the globally optimal position.
[0083] In some embodiments, the iteration termination condition is: the maximum number of iterations has been reached. .
[0084] Specifically, if the maximum number of iterations has been reached... Then, combining the coordinates of the starting path point and the globally optimal position... The coordinates of the intermediate and final path points of the encoded path constitute the optimal path. .
[0085] This embodiment constructs a model incorporating obstacles and ocean currents, along with a multi-objective fitness function; initializes a particle swarm; and after updating the global optimum in each iteration, introduces a coordinate descent dimensional search mechanism: constructing a guiding vector containing the start and end points, and for each dimension, constructing candidate configurations using the corresponding dimensional positions of all particles in the swarm; calculating only the fitness increment of the local path (including local length, energy consumption, and collision risk), and replacing the corresponding dimension of the global optimum with the optimal local position information through comparison and selection. This embodiment effectively utilizes the potential high-quality path point information among low-fitness particles without significantly increasing computational cost, solving the problems of traditional PSO easily getting trapped in local optima and high computational overhead.
[0086] like Figure 3 The diagram shown is a flowchart of a mobile device path planning method according to a preferred embodiment of the present invention, including: Step S301: After constructing the fitness function, initialize the population; Step S302: The standard PSO algorithm performs velocity / position updates; Step S303: Calculate the global optimum ; Step S304: Coordinate descent feature extraction, exploring j=1,2,…,D dimension by dimension; Step S305, update the global optimum. ; Step S306: If the termination condition is met, output the optimal path; otherwise, execute step S302 again.
[0087] like Figure 4 The diagram illustrates a single feature search process. In the search for the j-th path point, from... The local configuration containing the (j-1), j, and j+1 path points (corresponding to three adjacent positions in the guiding vector Z) is extracted. Then, the j-th path point of each particle in the population is replaced sequentially, the local fitness is calculated, and the optimal replacement scheme is selected. The key advantage of this method is that each update only needs to calculate the fitness of the local configuration, rather than the fitness of the complete path, which significantly reduces the computational overhead.
[0088] The key parameters involved in this invention are shown in Table 1: Table 1 Key Parameters
[0089] The following is an experimental example of the present invention.
[0090] 1. Experimental Environment The experimental hardware environment consisted of an Intel Core i9-13900 processor and 64GB of memory, while the software environment consisted of Windows 11 and MATLAB R2022a.
[0091] 2. Experimental Scenario Two experimental scenarios were designed to comprehensively verify the algorithm's performance: Scenario 1 involved dispersed obstacles combined with a uniform ocean current (velocity 0.5 m / s, direction 90°); Scenario 2 involved dispersed obstacles combined with a Lamb-Oseen vortex (vortex center located at the geometric center of the domain, circulation intensity H = 10 m² / s, characteristic radius δ = 100 m). 3. Experimental Results like Figure 5 The diagram shows the result of dispersing obstacles in conjunction with a uniform ocean current environment. Figure 6 The diagram shows the result of the dispersion of obstacles combined with the Lamb-Oseen eddy current.
[0092] As shown in Figure 5 Figure 5 The circular area 51 on the left side represents the expanded obstacle, the arrow array 52 in the background represents the direction and intensity of the ocean current velocity field in the uniform ocean current, and the curve 53 (or broken line) that runs through the start and end points is the optimal path planned by the algorithm. Figure 5 The right-hand side of the curve shows the relationship between the fitness value and the number of iterations (54).
[0093] As shown in Figure 6 Figure 6 The circular area 61 on the left side represents the expanded obstacle, the arrow array 62 in the background represents the direction and intensity of the ocean current velocity field in the Lamb-Osin eddy current, and the curve 63 (or broken line) that runs through the beginning and end points is the optimal path planned by the algorithm. Figure 6 The right-hand side of the curve shows the relationship between the fitness value and the number of iterations.
[0094] Comparison of different ocean current environments shows that the algorithm can guide unmanned vessels to make reasonable use of ocean currents (with the current) and avoid obstacles, generating a smooth and energy-efficient safe path.
[0095] The method proposed in this embodiment can efficiently extract valuable path point feature information from population particles in complex environments (especially complex marine environments), and can be widely applied in fields such as unmanned vessel path planning, UAV trajectory planning, and mobile robot navigation.
[0096] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0097] like Figure 7 The diagram shown is a hardware structure schematic of an electronic device according to the present invention, comprising: At least one processor 701; and, A memory 702 is communicatively connected to at least one of the processors 701; wherein, The memory 702 stores instructions that are executed by at least one of the processors to enable the at least one of the processors to perform the mobile device path planning method as described above.
[0098] Figure 7 Take the 701 processor as an example.
[0099] The electronic device may also include an input device 703 and a display device 704.
[0100] The processor 701, memory 702, input device 703 and display device 704 can be connected by a bus or other means. The figure shows an example of connection by a bus.
[0101] The memory 702, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules, such as the program instructions / modules corresponding to the mobile device path planning method in the embodiments of this application, for example, Figure 1 , Figure 2 The method flow is shown. The processor 701 executes various functional applications and data processing by running non-volatile software programs, instructions, and modules stored in the memory 702, thereby implementing the mobile device path planning method in the above embodiments.
[0102] The memory 702 may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created based on the use of the mobile device path planning method. Furthermore, the memory 702 may include high-speed random access memory and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other non-volatile solid-state storage device. In some embodiments, the memory 702 may optionally include memory remotely located relative to the processor 701, and these remote memories may be connected via a network to the apparatus performing the mobile device path planning method. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0103] The input device 703 can receive user clicks and generate signal inputs related to user settings and function control for the mobile device path planning method. The display device 704 may include a display screen or other display device.
[0104] When one or more modules are stored in the memory 702, and are run by one or more processors 701, the mobile device path planning method in any of the above method embodiments is executed.
[0105] This invention introduces a dimension-wise local reconstruction mechanism based on a coordinate descent strategy, extracting the coordinates of path points with high fitness from all particles in the entire population dimension-wise to update the global optimum. This invention overcomes the deficiency of existing PSO algorithms, which suffer from the loss of effective local features due to the simple elimination of low-fitness particles. Furthermore, by calculating only the fitness increment of local paths to determine whether to replace them, it avoids the redundant calculation of full path evaluation, effectively improving optimization accuracy while ensuring the real-time performance and efficiency of the algorithm.
[0106] One embodiment of the present invention provides a storage medium that stores computer instructions, which, when executed by a computer, are used to perform all the steps of the mobile device path planning method described above.
[0107] In the context of this disclosure, a storage medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. The storage medium can be a machine-readable signal medium or a machine-readable storage medium. Optionally, the storage medium can be a non-transitory computer-readable storage medium, such as a ROM, random access memory (RAM), compact disc ROM (CD-ROM), magnetic tape, floppy disk, and optical data storage device.
[0108] One embodiment of the present invention provides a computer program product, including a computer program / instructions, which, when executed by a processor, implements the mobile device path planning method as described above.
[0109] The embodiments described above are merely illustrative of several implementations of the present invention, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these modifications and improvements all fall within the scope of protection of the present invention. Therefore, the scope of protection of this patent should be determined by the appended claims.
Claims
1. A path planning method for a mobile device, characterized in that, include: Construct a fitness function for mobile device path planning, wherein the fitness function is used to calculate the fitness value of the path; Initialize a particle swarm population, where each particle includes a particle position and a particle velocity. The particle position is used to encode a candidate path consisting of the coordinates of multiple intermediate path points. Multiple iterations of optimization are performed. In each iteration, based on the fitness value of the candidate path encoded by each particle position, the particle swarm optimization algorithm is executed to update the particle velocity and particle position, and to update the global optimal position and the individual optimal position of each particle. After each velocity and position update, a dimensional optimization operation is performed on the entire population. The dimensional optimization operation searches the path point coordinates of the candidate paths encoded by the positions of all particles in the population in each dimension, and optimizes the path point coordinates corresponding to the global optimal position. After the iteration is completed, the optimal path is determined based on the path encoded by the globally optimal position.
2. The mobile device path planning method according to claim 1, characterized in that, The fitness function for constructing mobile device path planning includes: The fitness function for mobile device path planning is as follows: ,in, Let be the fitness value of the i-th path. The first fitness weight coefficient, This is the second fitness weighting coefficient. Let be the path length of the i-th path. Let i be the total energy consumption of the i-th path. Let be the collision violation index for the i-th path.
3. The mobile device path planning method according to claim 2, characterized in that, The mobile device is an unmanned vessel: The path length is: Where D is the number of intermediate path points included in the path. Let J be the coordinates of the j-th path point of the i-th path. Let be the coordinates of the (j+1)th path point of the i-th path, and , The coordinates of the starting path point. The coordinates of the termination point; The total energy consumption is Where G is the rated power of the unmanned surface vessel, introduced between adjacent path points. Equally spaced interpolation segments, This represents the number of interpolation segments between adjacent path points. The ground composite speed of the unmanned surface vessel located in the q-th interpolation segment between the j-th path point and the (j+1)-th path point on the i-th path is given. The length of the q-th interpolation segment between the j-th path point and the (j+1)-th path point of the i-th path; The collision violation index is: ,in The center point of the q-th interpolation segment between the j-th path point and the (j+1)-th path point of the i-th path is... The distance between the centers of the obstacles, P, is the number of obstacles.
4. The mobile device path planning method according to claim 1, characterized in that, The stepwise optimization operation performed on the entire population includes: Perform feature searches D times in sequence, where D is the number of intermediate path points included in the path. In the j-th feature search, perform the following steps: The baseline configuration is extracted from the guiding vector, which is a node sequence consisting of the coordinates of the starting path point, the coordinates of all path points of the globally optimal position encoded path, and the coordinates of the ending path point. Traverse all particles in the population, extract the path point coordinates of the j-th dimension of each particle's position, and construct the candidate configuration corresponding to each particle. Calculate the fitness value of the local path formed by the baseline configuration and the fitness value of the local path formed by each candidate configuration, respectively. The candidate configuration with the best fitness value is selected as the optimal candidate configuration. If the fitness value of the optimal candidate configuration is greater than the fitness value of the baseline configuration, the global optimal position is updated based on the optimal candidate configuration.
5. The mobile device path planning method according to claim 4, characterized in that, The extraction of the baseline configuration from the guiding vector includes: The coordinates of the j-th node, the (j+1)-th node, and the (j+2)-th node are extracted from the guiding vector to form the baseline configuration.
6. The mobile device path planning method according to claim 4, characterized in that, The construction of candidate configurations for each particle includes: Replace the center node of the baseline configuration with the coordinates of the j-th dimension path point of each particle position to construct a candidate configuration for the particle.
7. The mobile device path planning method according to claim 4, characterized in that, The step of updating the globally optimal position based on the optimal candidate configuration includes: Update the j-th dimension path point coordinates of the globally optimal position to the j-th dimension path point coordinates of the particle position corresponding to the optimal candidate configuration.
8. An electronic device, characterized in that, include: At least one processor; as well as, A memory communicatively connected to at least one of the processors; wherein, The memory stores instructions that are executed by at least one of the processors to enable the at least one of the processors to perform the mobile device path planning method as described in any one of claims 1 to 7.
9. A storage medium, characterized in that, The storage medium stores computer instructions, which, when executed by a computer, are used to perform all the steps of the mobile device path planning method as described in any one of claims 1 to 7.
10. A computer program product comprising a computer program / instructions, characterized in that, When the computer program / instructions are executed by the processor, they implement the mobile device path planning method as described in any one of claims 1 to 7.