CN-121973216-A - Mechanical arm track optimization method and system based on variant sparrow search algorithm
Abstract
The invention provides a mechanical arm track optimization method and a system based on a variant sparrow search algorithm, which relate to the technical field of mechanical arm control, and the method comprises the steps of introducing random variables into Tent chaotic mapping to generate an initial population; the method comprises the steps of carrying out iterative optimization by adopting a variant sparrow search algorithm based on an initial population with minimum time as a target to obtain an optimal track, specifically, applying Cauchy variation to sparrow individuals in the population in each iteration, dynamically adjusting step parameters of early warning person position update based on a cosine annealing algorithm according to the current iteration times in each iteration, wherein the step parameters comprise step factors and random numbers, and dynamically adjusting the number of explorers and the number of followers according to the current iteration times and the maximum iteration times in each iteration. The method and the device realize the track planning and simultaneously improve the planning precision, stability and convergence speed.
Inventors
- XU YUDONG
- XU DINGWANG
- YU YICHEN
- LI XIAOJING
- GAO YAPENG
- WANG WANTING
- JING XIANG
- WANG QI
- LU ZHENYU
- FAN ZHENHUA
Assignees
- 国网山西省电力有限公司电力科学研究院
- 太原理工大学
Dates
- Publication Date
- 20260505
- Application Date
- 20260205
Claims (10)
- 1. The mechanical arm track optimization method based on the variant sparrow search algorithm is characterized by comprising the following steps of: introducing random variables into the Tent chaotic map to generate an initial population; based on the initial population, taking the minimum time as a target, and adopting a variant sparrow search algorithm to perform iterative optimization to obtain an optimal track; Specifically, in each iteration, cauchy variation is applied to individual sparrows in the population; in each iteration, dynamically adjusting the step length parameter of the position update of the early warning person based on a cosine annealing algorithm according to the current iteration times, wherein the step length parameter comprises a step length factor and a random number; The adjustment formula of the step factor is as follows: ; The adjustment formula of the random number is as follows: ; Wherein, the As a step-size factor, For the current number of iterations, For the maximum number of iterations to be performed, As a minimum value of the step-size factor, At the maximum value of the step-size factor, In the form of a random number, As a lower limit of the random number, Is the upper limit of the random number; in each iteration, dynamically adjusting the number of explorers and the number of followers according to the current iteration times and the maximum iteration times.
- 2. The method for optimizing the track of the mechanical arm based on the variant sparrow search algorithm according to claim 1, wherein the method is characterized in that a random variable is introduced into the Tent chaotic map to generate an initial population, and specifically comprises the following steps: introducing random variables into the Tent chaotic map to generate an initial sequence, wherein the expression is as follows: ; Wherein, the For the position of the ith individual sparrow, Is the position of the (i+1) th sparrow individual, Is the minimum value of the position of the sparrow individual, Is the maximum value of the position of the sparrow individual, As a result of the random variable, The number of elements in a single sparrow unit; and mapping the initial sequence into a d-dimensional search space, and carrying out normalization and interval scaling processing. Obtaining the initial population.
- 3. The method for optimizing a trajectory of a robotic arm based on a variant sparrow search algorithm according to claim 1, wherein, in each iteration, cauchy variants are applied to individual sparrows in the population, in particular, cauchy variants are applied to the current individual sparrow positions, and a new position is generated, expressed as: ; Wherein x represents the original position of the sparrow individual, the mutation (x) represents the position of the sparrow individual after Cauchy variation, and u is a random number in the interval (0, 1).
- 4. The method for optimizing the trajectory of the mechanical arm based on the variant sparrow search algorithm according to claim 2, wherein in each iteration, the number of explorers and the number of followers are dynamically adjusted according to the current iteration number and the maximum iteration number, specifically: Based on the ratio of the current iteration times to the maximum iteration times, adding a disturbance deviation factor to obtain the proportional relation between the explorer and the follower of the current iteration, wherein the expression is as follows: ; Obtaining the number of explorers and the number of followers according to the proportional relation between the explorers and the followers, wherein the expression is as follows: ; Wherein pNum is the number of seekers, sNum is the number of followers, b is the scaling factor, K is a disturbance deviation factor for the proportional relationship between the seeker and the follower.
- 5. The method for optimizing the track of the mechanical arm based on the variant sparrow search algorithm according to claim 1, wherein the iterative optimization is performed by adopting the variant sparrow search algorithm based on the initial population with minimum time as a target to obtain an optimal track, specifically: based on the initial population, the time is minimum as a target, constraint is carried out by limiting conditions, and iterative optimization is carried out by adopting a variant sparrow searching algorithm to obtain an optimal track, wherein the limiting conditions comprise speed limitation, acceleration limitation and collision-free limitation.
- 6. The utility model provides a robotic arm orbit optimizing system based on variant sparrow search algorithm which characterized in that it includes: The population generation module is used for introducing random variables into the Tent chaotic map to generate an initial population; the track optimization module is used for carrying out iterative optimization by adopting a variant sparrow search algorithm based on the initial population and with the minimum time as a target to obtain an optimal track; Specifically, in each iteration, cauchy variation is applied to individual sparrows in the population; in each iteration, dynamically adjusting the step length parameter of the position update of the early warning person based on a cosine annealing algorithm according to the current iteration times, wherein the step length parameter comprises a step length factor and a random number; The adjustment formula of the step factor is as follows: ; The adjustment formula of the random number is as follows: ; Wherein, the As a step-size factor, For the current number of iterations, For the maximum number of iterations to be performed, As a minimum value of the step-size factor, At the maximum value of the step-size factor, In the form of a random number, As a lower limit of the random number, Is the upper limit of the random number; in each iteration, dynamically adjusting the number of explorers and the number of followers according to the current iteration times and the maximum iteration times.
- 7. The system for optimizing a trajectory of a robotic arm based on a variant sparrow search algorithm of claim 6, wherein the population generation module is specifically configured to: introducing random variables into the Tent chaotic map to generate an initial sequence, wherein the expression is as follows: ; Wherein, the For the position of the ith individual sparrow, Is the position of the (i+1) th sparrow individual, Is the minimum value of the position of the sparrow individual, Is the maximum value of the position of the sparrow individual, As a result of the random variable, The number of elements in a single sparrow unit; and mapping the initial sequence into a d-dimensional search space, and carrying out normalization and interval scaling processing. Obtaining the initial population.
- 8. The system for optimizing a trajectory of a robotic arm based on a variant sparrow search algorithm of claim 6, wherein, in each iteration, cauchy variants are applied to individual sparrows in the population, in particular, cauchy variants are applied to the positions of individual current sparrows, resulting in new positions expressed as: ; Wherein x represents the original position of the sparrow individual, the mutation (x) represents the position of the sparrow individual after Cauchy variation, and u is a random number in the interval (0, 1).
- 9. The system for optimizing the trajectory of the mechanical arm based on the variant sparrow search algorithm according to claim 7, wherein in each iteration, the number of explorers and the number of followers are dynamically adjusted according to the current iteration number and the maximum iteration number, specifically: Based on the ratio of the current iteration times to the maximum iteration times, adding a disturbance deviation factor to obtain the proportional relation between the explorer and the follower of the current iteration, wherein the expression is as follows: ; Obtaining the number of explorers and the number of followers according to the proportional relation between the explorers and the followers, wherein the expression is as follows: ; Wherein pNum is the number of seekers, sNum is the number of followers, b is the scaling factor, K is a disturbance deviation factor for the proportional relationship between the seeker and the follower.
- 10. The system for optimizing the trajectory of the mechanical arm based on the variant sparrow search algorithm according to claim 6, wherein the trajectory optimization module is specifically: based on the initial population, the time is minimum as a target, constraint is carried out by limiting conditions, and iterative optimization is carried out by adopting a variant sparrow searching algorithm to obtain an optimal track, wherein the limiting conditions comprise speed limitation, acceleration limitation and collision-free limitation.
Description
Mechanical arm track optimization method and system based on variant sparrow search algorithm Technical Field The invention relates to the technical field of mechanical arm control, in particular to a mechanical arm track optimization method and system based on a variant sparrow search algorithm. Background One of the core targets of the mechanical arm track planning is to realize 'time optimal', namely on the premise that the speed and the acceleration do not exceed the hardware limit, the time consumption of the mechanical arm moving from the initial gesture to the target gesture is shortest, and meanwhile smooth and continuous track is ensured. In the prior art, the track is generally interpolated by adopting a polynomial or a multi-segment polynomial, but the coefficient calculation of the track needs to rely on an optimization algorithm so as to meet the time optimal requirement. The group intelligent optimization algorithm is widely applied to track planning due to simple realization and high search efficiency. The sparrow search algorithm SSA searches for an optimal solution through a cooperative mechanism of a seeker, a follower and an early warning person, and has good global optimization capability. However, the conventional SSA still has the defects of easy local extremum in the early stage, low precision in the later stage optimization, low convergence speed and the like. Disclosure of Invention The invention aims to provide a method and a system for optimizing a mechanical arm track based on a variant sparrow search algorithm, which can plan the track and improve planning precision, stability and convergence speed. A mechanical arm track optimization method based on a variant sparrow search algorithm comprises the following steps: introducing random variables into the Tent chaotic map to generate an initial population; based on the initial population, taking the minimum time as a target, and adopting a variant sparrow search algorithm to perform iterative optimization to obtain an optimal track; Specifically, in each iteration, cauchy variation is applied to individual sparrows in the population; in each iteration, dynamically adjusting the step length parameter of the position update of the early warning person based on a cosine annealing algorithm according to the current iteration times, wherein the step length parameter comprises a step length factor and a random number; The adjustment formula of the step factor is as follows: ; The adjustment formula of the random number is as follows: ; Wherein, the As a step-size factor,For the current number of iterations,For the maximum number of iterations to be performed,As a minimum value of the step-size factor,At the maximum value of the step-size factor,In the form of a random number,As a lower limit of the random number,Is the upper limit of the random number; in each iteration, dynamically adjusting the number of explorers and the number of followers according to the current iteration times and the maximum iteration times. Optionally, introducing random variables into the Tent chaotic map to generate an initial population, which specifically comprises the following steps: introducing random variables into the Tent chaotic map to generate an initial sequence, wherein the expression is as follows: ; Wherein, the For the position of the ith individual sparrow,Is the position of the (i+1) th sparrow individual,Is the minimum value of the position of the sparrow individual,Is the maximum value of the position of the sparrow individual,As a result of the random variable,The number of elements in a single sparrow unit; and mapping the initial sequence into a d-dimensional search space, and carrying out normalization and interval scaling processing. Obtaining the initial population. Optionally, in each iteration, a cauchy mutation is applied to the sparrow individuals in the population, specifically, a cauchy mutation is applied to the current position of the sparrow individuals, and a new position is generated, where the expression is: ; Wherein x represents the original position of the sparrow individual, the mutation (x) represents the position of the sparrow individual after Cauchy variation, and u is a random number in the interval (0, 1). Optionally, in each iteration, dynamically adjusting the number of explorers and the number of followers according to the current iteration number and the maximum iteration number, specifically: Based on the ratio of the current iteration times to the maximum iteration times, adding a disturbance deviation factor to obtain the proportional relation between the explorer and the follower of the current iteration, wherein the expression is as follows: ; Obtaining the number of explorers and the number of followers according to the proportional relation between the explorers and the followers, wherein the expression is as follows: ; Wherein pNum is the number of seekers, sNum is the number of followers, b is the s