Security constraint type inverse kinematics solving method and device and storage medium

By using an improved radial basis function network and particle swarm optimization algorithm, combined with joint angle and obstacle collision constraints, the safety constraint problem in inverse kinematics solution was solved, achieving precise and safe control of robot motion.

CN121821349APending Publication Date: 2026-04-10JIANGSU UNIV OF TECH
View PDF 0 Cites 2 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-05
Publication Date
2026-04-10

AI Technical Summary

Technical Problem

Existing inverse kinematics solutions are prone to exceeding the joint range of motion or colliding with the environment, making them unsuitable for direct use in real robot control and lacking effective safety constraint handling.

Method used

An improved radial basis function network combined with a particle swarm optimization algorithm is adopted, and joint angle and obstacle collision constraints are introduced. Through a comprehensive cost function with adaptive weight adjustment, the optimization solution is ensured to meet the robot's physical limits and environmental safety.

Benefits of technology

It significantly improves the stability and safety of inverse kinematics solutions, outputs accurate and feasible inverse solutions, and enhances the reliability and safety of robot operations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121821349A_ABST
    Figure CN121821349A_ABST
Patent Text Reader

Abstract

The invention discloses a security constraint type inverse kinematics solving method and device and a storage medium. The method comprises the following steps: firstly, forming a joint angle-tail end pose pairing data set by students through forward movement of a robot; training an improved RBF (Radial Basis Function) network by using the data set to establish initial mapping from a tail end pose to a joint angle to obtain an initial approximation model; taking the prediction output of the model as an initial population of a PSO algorithm, and updating the speed and position of particles in the initial population through iteration; designing a comprehensive cost function, introducing a joint angle constraint and an obstacle collision constraint, and evaluating the advantages and disadvantages of each particle; and when the PSO algorithm reaches the maximum number of iterations or the comprehensive cost function value is lower than a set threshold value, outputting a global optimal particle position as a final inverse kinematics solution. On the premise of ensuring the solving precision, the joint limit constraint and the obstacle avoidance constraint are explicitly processed, so that an accurate, safe and feasible inverse solution is output, and the reliability and the safety of robot operation are remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to a robot motion planning and control method, and more particularly to a safety-constrained inverse kinematics solution method, device, and storage medium that combines radial basis function neural networks, particle swarm optimization algorithms, and safety constraints. Background Technology

[0002] The inverse kinematics problem of a robotic arm refers to the process of finding the angles of each joint given the pose of the end effector. This is a core problem in robot trajectory planning and real-time control. For a seven-DOF redundant robotic arm, the inverse kinematics solution is more complex due to its redundancy, often resulting in multiple solutions and potentially encountering singular configuration problems.

[0003] Existing methods for solving inverse kinematics can be mainly classified into the following categories: Analytical methods: Closed-form solutions can be obtained for specific structures (such as a robotic arm with 6 degrees of freedom and satisfying the Pieper criterion). However, they are heavily dependent on the robot's geometry, and for robotic arms with redundant degrees of freedom or complex configurations, it is difficult or even impossible to obtain analytical solutions.

[0004] Numerical iterative methods, such as the Newton-Raphson method and the Jacobian matrix pseudo-inverse method, are highly versatile but computationally intensive, sensitive to initial values, prone to getting trapped in local optima, and their solution process does not consider joint physical constraints, which may lead to infeasible solutions.

[0005] Machine learning methods utilize neural networks (such as MLP and RBF) to learn complex nonlinear mappings from end-effector pose to joint angles. Once trained, they offer extremely fast solution speeds. However, they are essentially approximations, and their generalization ability and accuracy are difficult to guarantee. They also cannot naturally handle joint constraints and obstacle avoidance problems.

[0006] Optimization-based solutions: These methods transform the inverse kinematics problem into an optimization problem, employing intelligent optimization algorithms such as Genetic Algorithm (GA) and Particle Swarm Optimization (PSO) to search for the optimal solution in joint space. These methods have strong global search capabilities but slow convergence speed and high computational cost. Simple optimization algorithms typically only consider pose error in their objective function, neglecting safety constraints.

[0007] In recent years, hybrid methods have emerged, such as the "RBF+PSO" strategy. This approach utilizes an RBF network to quickly provide a good initial solution, followed by fine-tuning with PSO, achieving a good balance between accuracy and speed. However, most existing hybrid methods still suffer from a critical drawback: their optimization objective function focuses solely on minimizing pose error, neglecting crucial safety constraints such as robot joint angle limitations, self-collision, and collisions with external obstacles. This results in solutions that may exceed the joint's range of motion or collide with the environment, rendering them unusable for real-world robot control and severely limiting their application value.

[0008] Therefore, there is an urgent need for a new method for solving inverse kinematics that can guarantee high accuracy while strictly meeting various safety constraints. Summary of the Invention

[0009] Objective of this invention: The objective of this invention is to provide a safety-constrained inverse kinematics solution method, addressing the problems of existing inverse kinematics solution methods, such as easily exceeding the joint range of motion, being prone to collisions with the environment, and being unsuitable for direct application in real-world robot control. Another objective of this invention is to propose a computer device and storage medium to address the problem of how to execute a safety-constrained inverse kinematics solution method.

[0010] Technical solution: The present invention provides a safety-constrained inverse kinematics solution method, comprising the following steps: Based on the DH parameters of the target robot, sampling is performed within its joint space constraints to generate a large number of joint angle combinations. For each joint angle combination, the pose data of the end effector is generated through forward kinematics calculation, and a joint angle-end effector pose pairing dataset is constructed. An improved radial basis function network was constructed and trained using a joint angle-end pose paired dataset to obtain an initial approximate model for the inverse kinematics problem. The target end pose to be solved is input into the initial approximation model, and the initial joint angle prediction value is output. This prediction value is used as the initial position of a particle in the particle swarm optimization algorithm. The positions of the remaining particles are randomly initialized near the initial joint angle prediction value to obtain a high-quality initial population. The velocity and position of the particles in the initial population are updated iteratively. Design a comprehensive cost function and introduce joint angle constraints and obstacle collision constraints into the comprehensive cost function to evaluate the performance of each particle; When the particle swarm optimization algorithm reaches the maximum number of iterations or the comprehensive cost function value is lower than the set threshold, the globally optimal particle position is output as the final safety-constrained inverse kinematics solution.

[0011] This invention first generates a dataset using the robot's forward motion and trains an RBF network to establish an initial mapping from end-effector pose to joint angles. Then, the predicted output of the RBF network is used as the initial population for a particle swarm optimization (PSO) algorithm, performing a fine-grained search in joint space. The core of this invention lies in introducing an adaptive constraint coupling mechanism on top of the traditional RBF-PSO structure: the RBF output layer encodes the feasible region of joint angles using a sigmoid mapping, ensuring that the network predictions naturally fall within a safe range. A comprehensive cost function is constructed, which not only includes position and pose error terms representing accuracy but also innovatively introduces joint angle constraint cost terms and obstacle collision cost terms. During PSO iteration, the constraint weights are dynamically adjusted based on the RBF prediction error, achieving real-time balance between position, pose, and safety constraints. Through L2 norm, double quaternions, augmented Lagrangian, and SDF obstacle avoidance constraint processing mechanisms, the optimized solution strictly satisfies the robot's physical limits and the safety of its interaction with the environment. This mechanism enables a closed-loop synergy between learning, optimization, and constraints, significantly improving the stability and safety of the solution. Preferably, the step of generating pose data for the end effector through forward kinematics calculation includes: A forward kinematic model of a 7-DOF robotic arm is established using the DH parameter method, and the end-effector pose expression is obtained according to the following formula:

[0012] The final transformation matrix is ​​obtained by multiplication:

[0013] in, It is the secondary transformation matrix based on the DH parameters, given the joint angles. Uniquely determine the end position The attitude rotation matrix is ; The obtained end pose rotation matrix is ​​converted into quaternions. :

[0014]

[0015]

[0016]

[0017]

[0018]

[0019] The real part of the quaternion represents the cosine component of half the total rotation angle. The imaginary part, the imaginary part of the quaternion, constitutes the three-dimensional vector part, representing the sine component of the rotation axis direction (unit vector) multiplied by half the rotation angle.

[0020] Obtain the end position:

[0021] The homogeneous transformation matrix represents the joint angle.

[0022] Preferably, the construction of the joint angle-end pose pairing dataset includes: Dataset obtained from Monte Carlo sampling: Randomly sampled joint angles:

[0023] For the first One joint angle, This represents the lower physical limit of the joint. The physical upper limit; This is the set of all joint angles.

[0024] The corresponding end-effector pose is:

[0025] Sampling is performed within the joint space constraints. The joint angle-end pose mapping data is obtained. , The end position, It is a quaternion of attitude.

[0026] Preferably, the improved radial basis function network structure is as follows: (1) Input layer: Input vector:

[0027] The input layer only performs standardization and does not involve weights:

[0028] in The training set means and standard deviation; (2) Hidden layer: Depend on Composed of radial basis function units, the first The response of each node is defined as follows:

[0029] in, No. One radial center, This represents the standard deviation of the basis function in the input space. The hidden layer output vector is:

[0030] (3) Output layer: The output layer implements linear combination:

[0031] in, This is the weight matrix. For bias terms, To output the predicted joint angle vector values, This is a matrix transpose operation; (4) Feasible region mapping layer:

[0032] This is used to limit the predicted joint angles to a physically feasible range, where, For the first One joint angle, For joints The lower limit, For joints The upper limit, For the first Predicted values ​​for each joint angle; The complete RBF network output structure is as follows:

[0033]

[0034] in, The radial base center, For the kernel width matrix, To output the weight matrix, For bias terms; Its optimization objective function is:

[0035] in, For regularization terms, For the actual joint angle, The pose parameters of the end effector are a multi-dimensional input vector. To obtain the optimal training Mapping relationship.

[0036] Preferably, the improved radial basis function network trained using a joint angle-end pose paired dataset includes: Based on the improved radial basis function, the network is trained with the end pose as input and the corresponding joint angle as output. The predicted joint angle is restricted to a physically feasible range as the final output. The network is trained under supervision using a joint angle-end pose pairing dataset to learn the initial mapping of the inverse kinematic relationship.

[0037] Preferably, the comprehensive cost function Represented as:

[0038]

[0039] Where h(·) is the adaptive weight update function, For indicator functions, To control the magnitude of weight changes, To adjust the sensitivity coefficient, As the initial weights, i =1,2,3,4; To prevent weighting To mitigate the drastic fluctuations, a time-based filter normalization is introduced:

[0040]

[0041] in, These are the time filtering coefficients (values ​​between 0 and 1). These are the smoothed weights; Position error cost : Calculate the current joint angle The Euclidean distance between the corresponding endpoint and the target position; Attitude error cost The error metric method based on quaternions is used to calculate the difference between the current end pose and the target pose. Joint angle constraint cost Check if each joint angle exceeds its lower and upper limits. If it does, generate a huge penalty value proportional to the amount of excess. This is achieved through the external penalty function method or the augmented Lagrange method. Obstacle collision cost Based on pre-built environmental obstacle information, the robot links are simplified using a symbolic distance field, and the minimum distance between them and the obstacles is calculated. If the distance is less than a safety threshold, a penalty value related to the intrusion depth is generated. Adaptive weight adjustment: In each iteration, the dynamic weight vector... The system dynamically adjusts based on the error magnitude and constraint status, and introduces time-based filtering and normalization to prevent weight imbalances. drastic fluctuations; The final cost function is: .

[0042] Furthermore, the position error cost The calculation formula is as follows: Based on the definition of Euclidean distance, using the L2 norm as the position error, the following calculation is performed: The generated end position and target position The deviation is expressed by the following formula:

[0043] in, The end position is calculated from the joint angle. The target end position; Attitude error cost The calculation formula is as follows: According to Clifford operator theory, the computation is performed by... The generated end pose and the target pose To mitigate deviations and avoid singularities in Euler angles, double quaternions are used. To characterize attitude error, the following formula is used: ; Joint angle constraint cost The calculation formula is as follows: Using the augmented Lagrange method as the joint angle error, if the joint angle Exceeding the limit range If the condition is met, then a strong penalty is imposed, expressed by the following formula:

[0044] Obstacle collision cost The calculation formula is as follows: Using the symbolic distance field as the collision error, it is expressed by the following formula:

[0045] in, Indicates the minimum safe distance. Indicates the joint angle The sampling points on the robotic arm were determined. This represents the signed distance from a point to an obstacle; a negative value indicates a collision.

[0046] Preferably, the rate at which particles in the initial population are updated includes: Each particle represents a set of joint angle solutions:

[0047] For the first The first joint The velocity vector of each particle For the first The first joint Joint angle vectors of each particle; The speed update formula is:

[0048] in, For inertial weights, For individual learning factors, This is the optimal position in the particle's history. To be the globally optimal position As a group learning factor, These are uniformly random numbers.

[0049] A second aspect of the present invention discloses a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the above-described method.

[0050] A third aspect of the present invention provides a computer storage medium storing instructions that, when executed on a computer, cause the computer to perform the above-described method.

[0051] Beneficial effects: Compared with the prior art, the present invention has the following significant advantages: This invention explicitly handles joint limit constraints and obstacle avoidance constraints while ensuring solution accuracy, thereby outputting an inverse solution that is both accurate and safe, significantly improving the reliability and safety of robot operations.

[0052] The core of this invention lies in embedding an adaptive weight adjustment comprehensive cost function that considers multiple security constraints into the PSO optimization framework, and adding a feasible region mapping layer after the output layer of the RBF network as a high-quality initial value to guide the optimization to converge quickly to a safe and feasible solution. Attached Figure Description

[0053] Figure 1 This is the overall flowchart of the method of the present invention; Figure 2 This is a schematic diagram of the seven-degree-of-freedom robotic arm model used in this embodiment of the invention; Figure 3 This invention describes the trend of the adaptive weights of the four sub-items of the comprehensive cost function changing over time during 60 PSO iterations. Figure 4 This is a comparison chart of the average position error and average attitude error of the present invention and the comparative method under noisy conditions. Detailed Implementation

[0054] The technical solution of the present invention will be further described below with reference to the accompanying drawings.

[0055] like Figure 1 As shown, a safety-constrained inverse kinematics solution method includes the following steps: (1) Targeting Figure 2 The xMate ER7 Pro seven-DOF robotic arm shown here has its actual DH parameters set as follows:

[0056] in, m, m, m, m, ; Based on the aforementioned DH parameters, within the joint limits, random sampling is performed on each joint, and the corresponding end-effector pose is calculated using the forward kinematics formula. A large number of joint angle combinations are generated. For each joint angle combination, the pose data of the end effector is generated through forward kinematics calculations, and a joint angle-end effector pose pairing dataset is constructed, specifically as follows: A forward kinematic model of a 7-DOF robotic arm is established using the DH parameter method, and the end-effector pose expression is obtained according to the following formula:

[0057] The final transformation matrix is ​​obtained by multiplication:

[0058] in, It is the secondary transformation matrix based on the DH parameters, given the joint angles. Uniquely determine the end position The attitude rotation matrix is ; The obtained end pose rotation matrix is ​​converted into quaternions. :

[0059]

[0060]

[0061]

[0062]

[0063]

[0064] The real part of the quaternion represents the cosine component of half the total rotation angle. The imaginary part, the imaginary part of the quaternion, constitutes the three-dimensional vector part, representing the sine component of the rotation axis direction (unit vector) multiplied by half the rotation angle.

[0065] Obtain the end position:

[0066] The homogeneous transformation matrix represents the joint angle.

[0067] Dataset obtained from Monte Carlo sampling: Randomly sampled joint angles:

[0068] For the first One joint angle, This represents the lower physical limit of the joint. The physical upper limit; This is the set of all joint angles.

[0069] The corresponding end-effector pose is:

[0070] Sampling is performed within the joint space constraints. The joint angle-end pose mapping data is obtained. , The end position, It is a pose quaternion, which is a set of joint angle-end pose pairing datasets.

[0071] (2) Add a feasible region mapping layer after the output layer of the radial basis function (RBF) network to construct an improved radial basis function network, the structure of which is as follows: (2.1) Input layer: Input vector:

[0072] The input layer only performs standardization and does not involve weights:

[0073] in The training set means and standard deviation; (2.2) Hidden layer: Depend on Composed of radial basis function units, the first The response of each node is defined as follows:

[0074] in, No. One radial center, This represents the standard deviation of the basis function in the input space. The hidden layer output vector is:

[0075] (2.3) Output layer: The output layer implements linear combination:

[0076] in, This is the weight matrix. For bias terms, To output the predicted joint angle vector values, This is a matrix transpose operation; (2.4) Feasible region mapping layer:

[0077] This is used to limit the predicted joint angles to a physically feasible range, where, For the first One joint angle, For joints The lower limit, For joints The upper limit, For the first Predicted values ​​for each joint angle; The complete improved RBF network output structure is as follows:

[0078]

[0079] in, The radial base center, For the kernel width matrix, To output the weight matrix, For bias terms; Its optimization objective function is:

[0080] in, For regularization terms, For the actual joint angle, The pose parameters of the end effector are a multi-dimensional input vector. To obtain the optimal training Mapping relationship.

[0081] The network was trained using a joint angle-endpoint pose paired dataset, specifically as follows: Based on the improved radial basis function, the network is trained with the end pose as input and the corresponding joint angle as output. The predicted joint angle is restricted to a physically feasible range as the final output. The network is trained under supervision using a joint angle-end pose pairing dataset to learn the initial mapping of the inverse kinematic relationship.

[0082] The joint angle-end pose pairing dataset was divided into training and test sets in a 9:1 ratio, with 20,000 training samples and 2,000 test samples. The improved RBF network has 7 nodes in the input layer and 7 nodes in the output layer, with 1024 center points. It undergoes 50 training epochs and uses logarithmic parameterization for the width to ensure it remains positive. The hidden layers consist of several radial basis function units, providing an initial approximate model for the inverse kinematics problem.

[0083] (3) Input the target end pose to be solved into the initial approximation model, output the initial joint angle prediction value, and use the prediction value as the initial position of a particle (i.e., a joint angle solution) in the particle swarm optimization algorithm (PSO). The positions of the remaining particles are randomly initialized near the initial joint angle prediction value to obtain a high-quality initial population. The velocity and position of the particles in the initial population are updated iteratively, specifically as follows: The initial population size of the PSO parameters is set to 128, the maximum number of iterations is 200, and the inertia weight decreases linearly. In the cost function weights, the position error weight is set to 1.0, the attitude error weight is set to 0.1, the joint constraint error weight is set to 20.0, and the collision constraint error weight is set to 20.0. The joint constraint processing adopts the external penalty method, and the constraint potential energy term Vc is introduced during the velocity update process. The search direction is adjusted according to the distance between the current particle and the feasible region boundary, forming a constraint-oriented dynamic search strategy. The RBF network error is used to adjust the weights of each constraint term, so that the optimization process adaptively achieves a balance between accuracy and safety.

[0084]

[0085] Collision detection pre-calculates the SDF of environmental obstacles, and the collision cost is...

[0086] in Set to 0.02m. For the first The signed SDF distance from each sampling point to the obstacle. Joint angle Collision constraint function; Updating the velocity of particles in the initial population includes: Each particle represents a set of joint angle solutions:

[0087] For the first The first joint The velocity vector of each particle For the first The first joint Joint angle vectors of each particle; The speed update formula is:

[0088] in, For inertial weights, For individual learning factors, This is the optimal position in the particle's history. To be the globally optimal position As a group learning factor, These are uniformly random numbers.

[0089] The PSO algorithm minimizes pose error by iteratively updating the particle's velocity and position.

[0090] (4) Design a comprehensive cost function, and introduce joint angle constraints and obstacle collision constraints into the comprehensive cost function to evaluate the merits of each particle, specifically: Comprehensive cost function Represented as:

[0091]

[0092] Where h(·) is the adaptive weight update function, For indicator functions, To control the magnitude of weight changes, To adjust the sensitivity coefficient, As the initial weights, i =1,2,3,4; Adaptive weight adjustment: In each iteration, the dynamic weight vector... The system dynamically adjusts based on the error magnitude and constraint status, and introduces time-based filtering and normalization to prevent weight imbalances. drastic fluctuations;

[0093]

[0094] in, These are the time filter coefficients (between 0 and 1). These are the smoothed weights; Position error cost : Calculate the current joint angle The Euclidean distance between the corresponding endpoint and the target position is determined by the following method: Based on the definition of Euclidean distance, using the L2 norm as the position error, the following calculation is performed: The generated end position and target position The deviation is expressed by the following formula:

[0095] in, The end position is calculated from the joint angle. The target end position; Attitude error cost The difference between the current end-effector pose and the target pose is calculated using a quaternion-based error metric. The method is as follows: According to Clifford operator theory, the computation is performed by... The generated end pose and the target pose To mitigate deviations and avoid singularities in Euler angles, double quaternions are used. To characterize attitude error, the following formula is used: ; Joint angle constraint cost : Check if each joint angle exceeds its lower and upper limits. If it does, generate a large penalty value proportional to the amount of excess. This is achieved using an external penalty function or an augmented Lagrange method. Using the augmented Lagrange method as the joint angle error, if the joint angle Exceeding the limit range If the condition is met, then a strong penalty is imposed, expressed by the following formula: ; Obstacle collision cost Based on pre-built environmental obstacle information, a symbolic distance field is used to simplify the robot links, and the minimum distance between them and obstacles is calculated. If the distance is less than a safety threshold, a penalty value related to the intrusion depth is generated. The method is as follows: Using the symbolic distance field (SDF) as the collision error, it is expressed by the following formula:

[0096] in, Indicates the minimum safe distance. Indicates the joint angle The sampling points on the robotic arm were determined. This represents the signed distance from a point to an obstacle; a negative value indicates a collision. The final cost function is: .

[0097] in, for The comprehensive cost function for each joint angle.

[0098] (5) When the particle swarm optimization algorithm reaches the maximum number of iterations or the comprehensive cost function value is lower than the set threshold, the global optimal particle position is output as the final safety-constrained inverse kinematic solution. Figure 3 This paper demonstrates the trend of adaptive weights of the four sub-items of the comprehensive cost function changing over time during 60 PSO iterations using the RBF-PSO-SafeIK algorithm of this invention. Initially, when the robot's end effector or link is close to an obstacle, the SDF distance is small, so the collision cost weight w_col is activated, gradually increasing in the first 20 iterations. As the search progresses, the PSO gradually finds a direction away from the obstacle, thus reducing the collision risk. When the SDF distance exceeds the safety threshold, the collision constraint is no longer activated, so the weight w_col decreases rapidly and stabilizes at around 10. Initially, the PSO particle position error is large, so the position error indicator function is activated, and the position error weight w_pos increases slightly. As the path gradually approaches the target position, the position error decreases, and the dynamic weight adjustment function reduces the weight, so w_pos then decreases slowly and eventually converges to about 2.0. The attitude error weight w_ang, after reducing the attitude error to a sufficiently small value in the early stages of iteration, the attitude constraint is no longer activated, and the weight dynamically decays from 2.0 to a minimum value of 0, making the optimization more focused on position and safety. The joint angle constraint weight w_jnt, throughout the solution process, does not approach its upper or lower limits for any joint angle, so the joint amplitude constraint is not activated and is almost a smooth straight line.

[0099] Comparative Experiment and Result Analysis: A target end pose was set, and various types of noise were added to simulate obstacles placed near the robotic arm. Three methods were compared: Method A: using only the RBF network output; Method B: based on the RBF-PSO method (without setting the comprehensive cost function in step (4)); Method C: the RBF-PSO-SafeIK method used in this invention. The average position error and average attitude error of this invention (RBF-PSO-SafeIK method) and the comparison methods (RBF-PSO method, simple PSO method) in a noisy environment were compared, and the results are as follows. Figure 4 As shown, in noisy environments, this method also outperforms other methods in terms of both average position error and average attitude error.

Claims

1. A method for solving inverse kinematics under safety constraints, characterized in that, Includes the following steps: Based on the DH parameters of the target robot, sampling is performed within its joint space constraints to generate a large number of joint angle combinations. For each joint angle combination, the pose data of the end effector is generated through forward kinematics calculation, and a joint angle-end effector pose pairing dataset is constructed. An improved radial basis function network was constructed and trained using a joint angle-end pose paired dataset to obtain an initial approximate model for the inverse kinematics problem. The target end pose to be solved is input into the initial approximation model, and the initial joint angle prediction value is output. This prediction value is used as the initial position of a particle in the particle swarm optimization algorithm. The positions of the remaining particles are randomly initialized near the initial joint angle prediction value to obtain a high-quality initial population. The velocity and position of the particles in the initial population are updated iteratively. Design a comprehensive cost function and introduce joint angle constraints and obstacle collision constraints into the comprehensive cost function to evaluate the performance of each particle; When the particle swarm optimization algorithm reaches the maximum number of iterations or the comprehensive cost function value is lower than the set threshold, the globally optimal particle position is output as the final safety-constrained inverse kinematics solution.

2. The safety-constrained inverse kinematics solution method according to claim 1, characterized in that, The generation of pose data for the end effector through forward kinematics calculation includes: A forward kinematic model of a 7-DOF robotic arm is established using the DH parameter method, and the end-effector pose expression is obtained according to the following formula: The final transformation matrix is ​​obtained by multiplication: in, It is the secondary transformation matrix based on the DH parameters, given the joint angles. Uniquely determine the end position The attitude rotation matrix is ; The obtained end pose rotation matrix is ​​converted into quaternions. : The real part of the quaternion represents the cosine component of half the total rotation angle. The imaginary part, the imaginary part of the quaternion, constitutes the three-dimensional vector part, representing the sine component of the rotation axis direction (unit vector) multiplied by half the rotation angle; Obtain the end position: The homogeneous transformation matrix represents the joint angle.

3. The safety-constrained inverse kinematics solution method according to claim 1, characterized in that, The constructed joint angle-endpoint pose pairing dataset includes: Dataset obtained from Monte Carlo sampling: Randomly sampled joint angles: For the first One joint angle, This represents the lower physical limit of the joint. The physical upper limit; For the set of all joint angles; The corresponding end-effector pose is: Sampling is performed within the joint space constraints. The joint angle-end pose mapping data is obtained. , The end position, It is a quaternion of attitude.

4. The safety-constrained inverse kinematics solution method according to claim 1, characterized in that, The improved radial basis function network structure is as follows: (1) Input layer: Input vector: The input layer only performs standardization and does not involve weights: in The training set means and standard deviation; (2) Hidden layer: Depend on Composed of radial basis function units, the first The response of each node is defined as follows: in, No. One radial center, This represents the standard deviation of the basis function in the input space. The hidden layer output vector is: (3) Output layer: The output layer implements linear combination: in, This is the weight matrix. For bias terms, To output the predicted values ​​of the joint angle vectors; This is a matrix transpose operation; (4) Feasible region mapping layer: This is used to limit the predicted joint angles to a physically feasible range, where, For the first One joint angle, For joints The lower limit, For joints The upper limit, For the first Predicted values ​​for each joint angle; The complete RBF network output structure is as follows: in, The radial base center, For the kernel width matrix, To output the weight matrix, For bias terms, Represents the global mapping function of the improved RBF neural network; Its optimization objective function is: in, For regularization terms, For the actual joint angle, The pose parameters of the end effector are a multi-dimensional input vector. To obtain the optimal training Mapping relationship.

5. The safety-constrained inverse kinematics solution method according to claim 1, characterized in that, The improved radial basis function network trained using a joint angle-endpoint pose paired dataset includes: Based on the improved radial basis function, the network is trained with the end pose as input and the corresponding joint angle as output. The predicted joint angle is restricted to a physically feasible range as the final output. The network is trained under supervision using a joint angle-end pose pairing dataset to learn the initial mapping of the inverse kinematic relationship.

6. The safety-constrained inverse kinematics solution method according to claim 1, characterized in that, The comprehensive cost function Represented as: Where h(·) is the adaptive weight update function, For indicator functions, To control the magnitude of weight changes, To adjust the sensitivity coefficient, As the initial weights, i =1,2,3,4; Introducing time-based filtering and normalization: in, These are the time filter coefficients. These are the smoothed weights; Position error cost : Calculate the current joint angle The Euclidean distance between the corresponding endpoint and the target position; Attitude error cost The error metric method based on quaternions is used to calculate the difference between the current end pose and the target pose. Joint angle constraint cost Check if each joint angle exceeds its lower and upper limits. If it does, generate a huge penalty value proportional to the amount of excess. This is achieved through the external penalty function method or the augmented Lagrange method. Obstacle collision cost Based on pre-built environmental obstacle information, the robot links are simplified using a symbolic distance field, and the minimum distance between them and the obstacles is calculated. If the distance is less than a safety threshold, a penalty value related to the intrusion depth is generated. Adaptive weight adjustment: In each iteration, the dynamic weight vector... The system dynamically adjusts based on the error magnitude and constraint status, and introduces time-based filtering and normalization to prevent weight imbalances. drastic fluctuations; The final cost function is: 。 7. The safety-constrained inverse kinematics solution method according to claim 6, characterized in that, The position error cost The calculation formula is as follows: Based on the definition of Euclidean distance, using the L2 norm as the position error, the following calculation is performed: The generated end position and target position The deviation is expressed by the following formula: in, The end position is calculated from the joint angle. The target end position; Attitude error cost The calculation formula is as follows: According to Clifford operator theory, the computation is performed by... The generated end pose and the target pose To mitigate deviations and avoid singularities in Euler angles, double quaternions are used. To characterize attitude error, the following formula is used: ; Joint angle constraint cost The calculation formula is as follows: Using the augmented Lagrange method as the joint angle error, if the joint angle Exceeding the limit range If the condition is met, then a strong penalty is imposed, expressed by the following formula: Obstacle collision cost The calculation formula is as follows: Using the symbolic distance field as the collision error, it is expressed by the following formula: in, Indicates the minimum safe distance. Indicates the joint angle The sampling points on the robotic arm were determined. This represents the signed distance from a point to an obstacle; a negative value indicates a collision.

8. The safety-constrained inverse kinematics solution method according to claim 1, characterized in that, Updating the velocity of particles in the initial population includes: Each particle represents a set of joint angle solutions: For the first The first joint The velocity vector of each particle For the first The first joint Joint angle vectors of each particle; The speed update formula is: in, For inertial weights, For individual learning factors, This is the optimal position in the particle's history. To be the globally optimal position As a group learning factor, These are uniformly random numbers.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the method as described in any one of claims 1-8.

10. A computer storage medium, characterized in that, The computer storage medium stores instructions that, when executed on the computer, cause the computer to perform the method as described in any one of claims 1-8.

Citation Information

Cited By

  • Multi-degree-of-freedom robot inverse kinematics decoupling method based on tornado optimization algorithm

    CN122034006A

  • Tornado optimization algorithm-based inverse kinematics decoupling method for multi-degree-of-freedom robot

    CN122034006B