Rigid-flexible coupling mechanical arm trajectory planning and tracking dynamics simulation method based on intelligent algorithm
Through intelligent algorithms combined with particle swarm algorithm and deep reinforcement learning algorithm, integrated control of trajectory planning and tracking of rigid-flexible coupled robot arms is achieved, solving the problems of low efficiency and low accuracy caused by vibration deformation of robot arms, and significantly improving working accuracy and efficiency.
Patent Information
- Application Number
- CN202510240327.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-03
- Publication Date
- 2025-06-27
AI Technical Summary
The rigid-flexible coupled robot arm will experience vibration deformation after movement and stop, resulting in low working efficiency, short service life and low working accuracy. The existing technology mostly considers trajectory planning or trajectory tracking, and fails to effectively combine the two for integrated control.
Using an intelligent algorithm-based method, combining particle swarm algorithm and deep reinforcement learning algorithm, a dynamic model of a two-link rigid-flexible coupled robot arm is established, and an integrated simulation of trajectory planning and trajectory tracking is carried out. The ideal joint trajectory is generated to suppress residual vibrations by particle swarm algorithm, and a deep reinforcement learning algorithm is used to perform high-precision trajectory tracking.
It effectively suppresses residual vibration of flexible components, improves the working accuracy and efficiency of the robotic arm, extends the service life, and realizes both trajectory planning and trajectory tracking.
Smart Images

Figure CN120217577A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of multi-body system dynamics control, and specifically to a trajectory planning and tracking dynamics simulation method for a rigid-flexible coupling robotic arm based on intelligent algorithms. Background Art
[0002] Rigid-flexible coupling robotic arms, with their excellent flexibility, lightweight design, and low energy consumption characteristics, have shown extensive application value in multiple fields such as space exploration, precision manufacturing, and medical services. However, due to the long length and high flexibility of flexible components, the robotic arm will experience vibration and deformation both during movement and after stopping. When performing motion tasks such as grasping, welding, and releasing, the rigid-flexible coupling robotic arm needs to wait for a long time to ensure that the end effector reaches a stable state before continuing with subsequent operation tasks. This not only reduces work efficiency but also affects the service life and working accuracy of the robotic arm. How to effectively suppress the residual vibration of flexible components and precisely control the rigid-flexible coupling robotic arm is the key to improving positioning accuracy and work efficiency, and is also a hot and difficult issue worthy of in-depth research. Trajectory planning and trajectory tracking together determine the motion performance and working accuracy of the robotic arm. Trajectory planning is responsible for defining the movement path of the robotic arm, and reasonable trajectory planning can effectively reduce the vibration of the flexible rod itself. Trajectory tracking is the key to ensuring that the robotic arm can accurately follow this path. Maintaining high-precision trajectory tracking ability can avoid errors caused by vibration and deformation. However, most studies only consider from a single aspect of trajectory planning or trajectory tracking. Therefore, combining the trajectory planning and trajectory tracking of the rigid-flexible coupling robotic arm to achieve integrated dynamics control has important value. Summary of the Invention
[0003] Based on intelligent algorithms and the dynamics model of the rigid-flexible coupling robotic arm, the purpose of the present invention is to provide a trajectory planning and tracking dynamics simulation method for a rigid-flexible coupling robotic arm based on intelligent algorithms, so as to achieve reasonable trajectory planning and high-quality trajectory tracking of the rigid-flexible coupling robotic arm.
[0004] The technical solution to achieve the purpose of the present invention is as follows: A trajectory planning and tracking dynamics simulation method for a rigid-flexible coupling robotic arm based on intelligent algorithms includes the following steps:
[0005] Step 1, establish a physical model of a two-link rigid-flexible coupling robotic arm and set relevant parameters of the two-link rigid-flexible coupling robotic arm;
[0006] Step 2, under the floating coordinate system, establish a system dynamics model of the two-link rigid-flexible coupling robotic arm. The flexible rod deformation consists of transverse bending deformation, longitudinal elongation deformation, and a non-linear coupling deformation term of the axial direction caused by the transverse direction, and use the second Lagrange equation to obtain the dynamics equation of the two-link rigid-flexible coupling robotic arm system;
[0007] Step 3: Perform a point-to-point trajectory planning task for the two-link rigid-flexible coupling manipulator. Set the motion states of each joint from the initial point to the end point, set n interpolation points between the starting point and the end point, select a seventh-degree polynomial function between the interpolation points to describe the joint trajectory, use the residual vibration energy of the flexible manipulator as the objective function, execute the particle swarm optimization algorithm, and generate an ideal joint trajectory that can suppress the residual vibration of the flexible component;
[0008] Step 4: Set the ideal joint trajectory generated by the trajectory planning as the tracking target, discretize the trajectory, execute the deep reinforcement learning algorithm, predict the actual joint angle, joint angular velocity, driving torque, and deformation of the flexible rod through the deep neural network, substitute them into the dynamic equation and limit conditions to construct an imbalance equation, thereby constructing a loss function, and determine whether the value of the loss function is within the set error threshold to generate the actual joint trajectory and complete the tracking of the ideal joint trajectory.
[0009] Compared with the prior art, the significant advantages of the present invention are: (1) Use intelligent algorithms to achieve the trajectory planning and trajectory tracking of the rigid-flexible coupling manipulator, and through tracking the ideal trajectory generated by the trajectory planning, realize the simulation solution of the integrated problem of dynamic modeling - trajectory planning - trajectory tracking, and solve the adverse effects of residual vibration deformation on the working accuracy and efficiency of the rigid-flexible coupling manipulator from both aspects of trajectory planning and trajectory tracking. (2) Combine the particle swarm optimization algorithm with the dynamic model of the rigid-flexible coupling manipulator to achieve reasonable trajectory planning and obtain an ideal joint trajectory that can effectively suppress residual vibration. Brief Description of the Drawings
[0010] Figure 1 is the flow chart of the present invention
[0011] Figure 2 is the schematic diagram of the two-link rigid-flexible coupling manipulator model
[0012] Figure 3 is the simplified schematic diagram of the flexible joint
[0013] Figure 4 is the ideal joint trajectory generated by the trajectory planning
[0014] Figure 5 is the speed and acceleration of the ideal joint trajectory
[0015] Figure 6 is the comparison of the residual vibration conditions of the two-link rigid-flexible coupling manipulator before and after the trajectory planning
[0016] Figure 7 is the graph of the change of the fitness value of the particle swarm optimization algorithm after 40 iterations
[0017] Figure 8Comparison between the ideal joint trajectory and the actual joint trajectory and their error DETAILED DESCRIPTION
[0018] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0019] The process of the rigid-flexible coupling robot arm trajectory planning and tracking dynamics simulation method based on intelligent algorithm is as follows: Figure 1 As shown, the trajectory planning simulation process based on the particle swarm algorithm and the trajectory tracking simulation process based on the deep reinforcement learning algorithm are combined to track the ideal joint trajectory obtained by trajectory planning, thereby realizing a dynamic simulation framework that integrates the rigid-flexible coupling manipulator dynamics model, trajectory planning and trajectory tracking, including the following steps:
[0020] Step 1: Establish a physical model of the two-link rigid-flexible coupling robot arm and set the parameters of the two-link rigid-flexible coupling robot arm.
[0021] The physical model of the two-link rigid-flexible coupling manipulator is a planar chain multi-body system. The two rods are a rigid rod and a flexible rod, respectively. The hinges are flexible joints, namely flexible hinge 1 and flexible hinge 2. The rigid rod can rotate around the flexible joint connected to its front end, and the end is connected to the flexible joint. The front end of the flexible rod bears the flexible joint at the end of the rigid rod. The whole system performs planar motion. The flexible joint is composed of a drive device, a harmonic reduction gear and a torsion spring.
[0022] Physical parameters of the two-link rigid-flexible coupling manipulator: rigid rod length L1, distance from center of mass to flexible hinge 1 l1, moment of inertia J1; flexible rod length L2, cross-sectional area S, density ρ, moment of inertia I of the cross section z , elastic modulus E; external driving torque τ of the robot joint i , the angular displacement q of the drive i , the angular displacement of the rod θ i , joint torsional stiffness K i , the flexible deformation of the joint q i -θ i , the moment of inertia of the drive device J mi .
[0023] Step 2. In the floating coordinate system, a dynamic model of the two-link rigid-flexible coupling robot arm system is established. The deformation of the flexible rod consists of lateral bending deformation, longitudinal elongation deformation, and axial nonlinear coupling deformation caused by the lateral direction. The dynamic equation of the two-link rigid-flexible coupling robot arm system is obtained using the second-kind Lagrangian equation.
[0024] Taking the center of the flexible joint connected to the front end of the rigid rod as the origin O, an inertial coordinate system OXY of the robotic arm and a floating coordinate system OX1Y1 fixed to the rigid rod are established. The X1 axis is along the axis of the rigid rod. Taking the center of the flexible joint connected to the front end of the flexible rod as O1, a floating coordinate system O1X2Y2 is established on the flexible rod, and the X2 axis is along the undeformed axis of the flexible rod;
[0025] The position vector r of point P on the flexible rod at a distance x from O1 after deformation relative to the inertial coordinate system OXY is:
[0026] r = (L1cosθ1 + (x + w1(x, t) + w c (x, t))cos(θ1 + θ2) - w2(x, t)sin(θ1 + θ2))e X + (L1 sinθ1 + (x + w1(x, t) + w c (x, t))sin(θ1 + θ2) + w2(x, t)cos(θ1 + θ2))e Y
[0027] where θ1 is the angular displacement of the rigid rod, θ2 is the angular displacement of the flexible rod, e X is the direction vector of the OX axis in the inertial coordinate system OXY, e Y is the direction vector of the OY axis in the inertial coordinate system OXY, w1(x, t) is the axial elongation of the axis, w2(x, t) is the transverse bending deformation, w c (x, t) is the longitudinal shortening caused by the transverse deformation of the rod, w c (x, t) is expressed as:
[0028]
[0029] Taking the derivative of the position vector of point P after deformation relative to the inertial coordinate system OXY with respect to time t, the velocity of point P on the flexible rod is obtained
[0030]
[0031] where, is the angular velocity of the rigid rod, is the angular velocity of the flexible rod, is the first derivative of w1(x, t), is the first derivative of w2(x, t), is the first derivative of w c (x, t);
[0032] Determine the kinetic energy K r :
[0033]
[0034] Among them, J m1 is the moment of inertia of the flexible hinge 1 driving device, and J m2 is the moment of inertia of the flexible hinge 2 driving device. The first term is the rotational kinetic energy of the rigid rod, the second term is the rotational kinetic energy of the flexible hinge, and the third term is the translational kinetic energy of the flexible rod;
[0035] Ignoring the influence of gravitational potential energy, determine the potential energy V of the two-link rigid-flexible coupling robotic arm system:
[0036]
[0037] Among them, K1 is the joint torsional stiffness of the flexible hinge 1, K2 is the joint torsional stiffness of the flexible hinge 2, q1 is the angular displacement of the driving device of the flexible hinge 1, and q2 is the angular displacement of the driving device of the flexible hinge 2. The first term is the tensile and compressive potential energy of the flexible rod, the second term is the bending potential energy of the flexible rod, and the third and fourth terms respectively represent the deformation potential energies of the flexible hinge 1 and the flexible hinge 2;
[0038] The deformation of the flexible rod is discretized by the assumed mode method. The axial deformation w1(x, t) and the transverse deformation w2(x, t) of the flexible rod are:
[0039]
[0040] Among them, Φ x (x) ∈ R 1×N and Φ y (x) ∈ R 1×N are respectively the row vectors of the mode functions of axial vibration and transverse vibration, A(t) ∈ R N=1 and B(t) ∈ R N×1 are respectively the column vectors of the mode coordinates of axial vibration and transverse vibration, expressed as:
[0041]
[0042] Among them, φ x1 (x), φ x2 (x), φ xN (x) are respectively the first row vector, the second row vector, and the Nth row vector of the mode function of axial vibration, A1(t), A2(t), A N (t) are respectively the first column vector, the second column vector, and the Nth column vector of the mode function of axial vibration, φ y1 (x), φ y2 (x), φ yN (x) are respectively the first row vector, the second row vector, and the Nth row vector of the mode function of transverse vibration, B1(t), B2(t), B N(t) are the first column vector, the second column vector, and the Nth column vector of the modal function of the transverse vibration, respectively, Φ x (x) and Φ y (x) adopt the modal function of a fixed - boundary cantilever beam, and the corresponding elements are:
[0043]
[0044]
[0045] φ yi (x) = (cosβ i x - chβ i x) + γ i (sinβ i x - shβ i x), i = 1, 2, …, N
[0046]
[0047] Among them, φ xi (x) is the ith row vector of the modal function of the axial vibration, φ yi (x) is the ith row vector of the modal function of the transverse vibration, β1, β2, β i and γ i are the calculation correlation coefficients, and N is the modal truncation number of the flexible rod;
[0048] The longitudinal shortening amount w c (x, t) caused by the transverse deformation of the rod is:
[0049]
[0050] Among them, B T (t) is the transpose of B(t), and H(x) is the coupling shape function, and the expression is:
[0051]
[0052] Among them, Φ y ′(ξ) is the first - order derivative of the row vector of the modal function of the transverse vibration, Φ′ y T (ξ) is the transpose of Φ y ′(ξ);
[0053] Take the generalized coordinates q = (θ1, θ2, q1, q2, A T , B T ) T , A T , Β T are the transposes of A(t) and B(t), A T (t), Β T(Abbreviation of \(A(t)\)), kinetic energy and potential energy of the two-link rigid-flexible coupling robotic arm system:
[0054]
[0055] where \(A\), \(B\), \(\varPhi\) x , \(\varPhi\) y are the abbreviations of \(A(t)\), \(B(t)\), \(\varPhi\) x (x), \(\varPhi\) y (x) respectively, and \(\varPhi\) x T , \(\varPhi\) y T are the abbreviations of \(\varPhi\) x (x), \(\varPhi\) y (x) transpose \(\varPhi\) x T (x), \(\varPhi\) y T (x) respectively, \(\varPhi\) x ′, \(\varPhi\) y ′ are the first-order derivatives of \(A(t)\), \(B(t)\), \(\varPhi\) x (x), \(\varPhi\) y (x) respectively \(\varPhi\) x ′(x), \(\varPhi\) y ′(x) respectively, are \(\varPhi'\) x (x), \(\varPhi'\) y (x) transpose abbreviations;
[0056] Substitute the kinetic energy \(K\) r and potential energy \(V\) of the two-link rigid-flexible coupling robotic arm system into the second kind of Lagrange equation:
[0057]
[0058] where, is the first-order derivative of the generalized coordinate \(q\);
[0059] Dynamics equation of the two-link rigid-flexible coupling robotic arm system:
[0060]
[0061] where, is the second-order derivative of the generalized coordinate \(q\), \(M\) is the generalized mass matrix, \(Q\) is the generalized force matrix, expressed as:
[0062]
[0063] τ1 is the external driving torque of the flexible hinge 1, and τ2 is the external driving torque of the flexible hinge 2.
[0064]
[0065]
[0066]
[0067] Q q1 = K1(θ1 - q1)
[0068] Q q2 = K2(θ2 - q2)
[0069] Among them, the underlined terms are the introduced non - linear coupling deformation quantities.
[0070] The related constant coefficient matrices S x , S y , M x , M y , C, K1, K2 and J ob are
[0071]
[0072] Among them, Φ y ″(x) is the second - order derivative of Φ y (x), and Φ y ″ T (x) is the transpose of Φ y "(x).
[0073] Step 3: For the two - link rigid - flexible coupling manipulator, perform a point - to - point trajectory planning task. Set the motion states (displacement, velocity, acceleration, jerk, and time) of each joint from the initial point to the termination point. Set n interpolation points between the starting point and the termination point, and select a seventh - order polynomial function between the interpolation points to describe the joint trajectory. Take the residual vibration energy of the flexible manipulator as the objective function, and execute the particle swarm algorithm to generate an ideal joint trajectory that can suppress the residual vibration of the flexible component.
[0074] Set the initial and termination motion states (displacement, velocity, acceleration, jerk, and time) when the manipulator performs a point - to - point work task. The given motion states C of each joint i are expressed as:
[0075] C i = [θ i0 , v i0 , a i0 , j i0 , t i0 , θ if , vif , a if , j if , t if where \(i = 1, 2\)
[0076] Among them, \(\theta\) i0 , \(v_{i0}\), \(a_{i0}\), \(j\) i0 and \(t\) i0 are the initial angular displacement, initial angular velocity, initial angular acceleration, initial jerk, and initial time respectively, and \(\theta\) if , \(v\) if , \(a\) if , \(j\) if and \(t\) if are the final angular displacement, final angular velocity, final angular acceleration, final jerk, and final time respectively;
[0077] Connect the given starting point and ending point to generate the initial joint trajectory, construct a seventh-degree polynomial function in the multiple interpolation method, and the trajectory function expression of joint \(i\), \(\theta\) i is:
[0078]
[0079] Among them, \(a\) i 7 , \(a\) i 6 , \(a\) i 5 , \(a\) i 4 , \(a\) i 3 , \(a\) i 2 , \(a\) i 1 and \(a\) i 0 are the undetermined parameters of the \(i\)-th joint trajectory, and are respectively:
[0080]
[0081]
[0082] Set \(n\) interpolation points between the starting point and the ending point of each joint. Each interpolation point has corresponding displacement, velocity, acceleration, and jerk. The motion states of each interpolation point are used as the search variables \(X\) of the single-objective trajectory planning and are expressed as:
[0083] \(X = X_1 + X_2\)
[0084] = [\(\theta\) 11 , \(v\) 11 , \(a\) 11 , \(j\) 11 , …, \(\theta\)1n , v 1n , a 1n , j 1n + [θ 21 , v 21 , a 21 , j 21 , …, θ 2n , v 2n , a 2n , j 2n
[0085] Among them, X1 is the search variable of the rigid rod, X2 is the search variable of the flexible rod, θ 11 , v 11 , a 11 , j 11 are the displacement, velocity, acceleration, and jerk corresponding to the first interpolation point of the rigid rod, θ 1n , v 1n , a 1n , j 1n are the displacement, velocity, acceleration, and jerk corresponding to the nth interpolation point of the rigid rod, θ 21 , v 21 , a 21 , j 21 are the displacement, velocity, acceleration, and jerk corresponding to the first interpolation point of the flexible rod, θ 2n , v 2n , a 2n , j 2n are the displacement, velocity, acceleration, and jerk corresponding to the nth interpolation point of the flexible rod;
[0086] Discretize the initial joint trajectory, construct the initial parameters of n interpolation points as the initial positions of the initial particle swarm, set the relevant parameters of the particle swarm algorithm, and generate the initial population with a scale of N;
[0087] Input the search variables of the initial population into the dynamic theory model of the two-link rigid-flexible coupling manipulator, and take the residual vibration energy within 1 s after the flexible rod stops moving as the optimization objective. The objective function is expressed as:
[0088]
[0089] Among them, the objective function J is the residual vibration energy of the system within 1 s after the running termination time t f later, where V t is the residual vibration energy at time t. Calculate the fitness value J corresponding to the initial population through the objective function, and determine the individual optimal solution and the global optimal solution;
[0090] Update the positions and velocities of the particles:
[0091]
[0092] Among them, w is the inertia weight; c1 is the individual learning factor, which reflects the learning ability of the particle towards its individual best position; c2 is the global learning factor, which reflects the learning ability of the particle towards the global best position; r1, r2 are random numbers within the range of [0, 1], and v id (k+1) is the d-dimensional component of the velocity of particle i in the (k + 1)-th iteration, and v id (k) is the d-dimensional component of the velocity in the k-th iteration, and P id (k) is the d-dimensional component of the individual optimal position in the k-th iteration, and g d (k) is the d-dimensional component of the global optimal position in the k-th iteration, and x id (k+1) is the d-dimensional component of the position of particle i in the (k + 1)-th iteration, and x id (k) is the d-dimensional component of the position in the k-th iteration, and v id (k+1) is the d-dimensional component of the velocity in the (k + 1)-th iteration;
[0093] Input the particle search variables in the newly generated population into the dynamic theory model of the flexible manipulator, calculate the fitness value, and update the global optimal solution and the local optimal solution;
[0094] Judge whether the number of iterations has reached the set maximum number of iterations. If the number of iterations has reached the set maximum number of iterations, the optimization ends;
[0095] Output the search variables that meet the iteration conditions, that is, the motion states of each interpolation point of each joint of the two-link rigid-flexible coupling manipulator, and use the seventh-order polynomial function for fitting to obtain the ideal joint trajectory.
[0096] Step 4: Set the ideal joint trajectory generated by the trajectory planning as the tracking target, discretize the trajectory, execute the deep reinforcement learning algorithm, predict the actual joint angle, joint angular velocity, driving torque, and flexible rod deformation amount through the deep neural network, substitute them into the dynamic equation and the limit condition (the error between the output value and the expected value) to construct an imbalance equation, thereby constructing a loss function, and judge whether the value of the loss function is within the set error threshold to generate the actual joint trajectory and complete the tracking of the ideal joint trajectory.
[0097] Take the ideal joint trajectory generated by the trajectory planning as the tracking control target, discretize the running time of the flexible manipulator to obtain the ideal joint angle corresponding to each discrete time step;
[0098] The deep reinforcement learning model constructs a probability policy through a deep neural network. The first deep neural network has an input layer with 32 neurons, a hidden layer with 64 neurons, and an output layer with 32 neurons. The average value of the output includes the actual joint angle, joint angular velocity, driving torque, and deformation of the flexible rod. The quantities corresponding to those in the dynamic equation of the two-link rigid-flexible coupling robotic arm are the output solutions of the dynamic equation [μ x1 , μ x2 , μ x3 , μ x4 , μ x5 , μ x6 . The first derivative of the output solution of the dynamic equation [μ y1 , μ y2 , μ y3 , μ y4 , μ y5 , μ y6 and the joint torque output by the motor [μ τ1 , μ τ2 . The second deep neural network has only one layer, which is the input-output layer with a total of 32 neurons, and the output standard deviation [σ x1 , σ x2 , σ x3 , σ x4 , σ x5 , σ x6 , σ y1 , σ y2 , σ y3 , σ y4 , σ y5 , σ y6 , σ τ1 , σ τ2 ;
[0099] Let μ x = [μ x1 , μ x2 , μ x3 , μ x4 , μ x5 , μ x6 T , μ y = [μ y1 , μ y2 , μ y3 , μ y4 , μ y5 , μ y6 T , μ τ = [μ τ1 , μ τ2 T ,
[0100] A Gaussian - form probability strategy is jointly established based on the mean and standard deviation output by two networks, and candidate joint angle values are output from the probability strategy;
[0101] Using the dynamic equation of a two - link rigid - flexible coupling robotic arm and the limit condition (the error between the output value and the expected value), an imbalance equation is constructed:
[0102]
[0103] θ 1输出 =μ x1
[0104] θ 2输出 =μ x2
[0105] where \(r_1\) and \(r_2\) are the imbalance terms of the dynamic equation of the two - link rigid - flexible coupling robotic arm, \(r_3\) is the imbalance term between the expectation and the output of the two - link rigid - flexible coupling robotic arm, \(\theta\) 1输出 and \(\theta\) 2输出 are the angular displacements output by the rigid rod and the flexible rod respectively, and \(\theta\) 1期望 and \(\theta\) 2期望 are the expected angular displacements of the rigid rod and the flexible rod respectively;
[0106] A loss function is constructed from the imbalance equation. If the value of the loss function exceeds the set error threshold, the Adam optimizer is used to update the parameters of the deep neural network and the next iteration is carried out. Conversely, if the value of the loss function is within the set error threshold, the iteration is terminated and the actual joint angle value is output;
[0107] The actual joint angle values at each time step are output to generate an actual joint trajectory, and the trajectory tracking of the flexible robotic arm is completed.
[0108] Embodiment
[0109] To verify the effectiveness of the method of the present invention, trajectory planning simulation calculations for a two - link rigid - flexible coupling robotic arm are carried out based on Matlab, and trajectory tracking simulation calculations for a two - link rigid - flexible coupling robotic arm are carried out based on PyCharm. The specific method is as follows:
[0110] Step 1: In this example, simulation calculations are carried out for a two - link rigid - flexible coupling robotic arm. The physical model of the two - link rigid - flexible coupling robotic arm is as Figure 2 shown, and the flexible joint is as Figure 3 shown. The parameter settings of the two - link rigid - flexible coupling robotic arm are shown in Table 1, and then go to Step 2.
[0111] Table 1 Parameter settings of the two - link rigid - flexible coupling robotic arm
[0112]
[0113] Step 2. Based on the physical model and parameters of the two-link flexible-rigid coupling manipulator, substitute the specific physical parameters of the two-link flexible-rigid coupling manipulator into its dynamic equation, and then go to Step 3.
[0114] Step 3. Based on the dynamic equation of the two-link flexible-rigid coupling manipulator, use the particle swarm optimization algorithm to simulate the two-link flexible-rigid coupling manipulator. Set the initial motion state and the final motion state in the point-to-point motion task of the two-link flexible-rigid coupling manipulator, and set the motion states of Joint 1 and Joint 2 as follows:
[0115]
[0116] Set the number of interpolation points n between the starting point and the ending point to be 3, and set the algorithm parameters of the particle swarm optimization algorithm as shown in Table 2:
[0117] Table 2 Parameter Settings of the Particle Swarm Optimization Algorithm
[0118]
[0119] After the two-link flexible-rigid coupling manipulator is searched by the particle swarm optimization algorithm, the trajectory planning simulation results are obtained. The ideal joint trajectory for suppressing the residual vibration of the flexible rod is as Figure 4 shown, and the velocity and acceleration of the trajectory are as Figure 5 shown. Compare the lateral deformation of the flexible link of the two-link flexible-rigid coupling manipulator within 0 - 6 seconds after trajectory planning as Figure 6 shown. The lateral deformation of the maximum residual vibration of the flexible link is significantly reduced from 0.0136 m to 8.3738×10 -5 m, and the residual vibration deformation is eliminated by about 99.38%. During the search process of the particle swarm optimization algorithm, the variation of the fitness with the number of iterations is as Figure 7 shown, where the fitness value decreases with the increase of the number of iterations, and converges to the optimal solution at the 36th iteration, indicating that the particle swarm optimization algorithm continuously optimizes the objective function during the process of searching for the optimal solution. Through the simulation of the trajectory planning of the two-link flexible-rigid coupling manipulator, the ideal joint trajectory for effectively suppressing the residual vibration of the flexible rod is obtained, and then go to Step 4.
[0120] Step 4. Based on the dynamic equation of the two-link flexible-rigid coupling manipulator and the ideal joint trajectory obtained from the trajectory planning. Use deep reinforcement learning to perform tracking simulation on the ideal joint trajectory of the two-link flexible-rigid coupling manipulator. For the policy network π θ (s,a), set the learning rate lr = 0.01, the number of training samples N = 100, the reward discount factor γ = 1, and set the error threshold of the loss function to 1×10 -6 , and obtain the tracking simulation results of the two-link flexible-rigid coupling manipulator.
[0121] By tracking the ideal joint trajectories obtained from trajectory planning, the displacements, velocities, and accelerations of the actual trajectories of each joint are obtained. The variation trends of the actual trajectories and ideal joint trajectories of each joint and the errors over time are as follows Figure 8 shown. When tracking the ideal trajectory generated by single-objective trajectory planning, the maximum displacement tracking error is 7.9266×10 -5 , the maximum velocity tracking error is 7.0839×10 -5 , and the maximum acceleration tracking error is 7.0493×10 -5 . Whether in terms of angular displacement, velocity, or acceleration, the maximum errors in tracking the ideal joint trajectories are all maintained at the 10 -5 magnitude level.
[0122] Based on the previous research in the fields of trajectory planning or trajectory tracking, the present invention provides a new idea for reducing the adverse effects of residual vibration deformation on the working accuracy and efficiency of a rigid-flexible coupling robotic arm by combining dynamic modeling, trajectory planning, and trajectory tracking.
[0123] The simulation method of the two-link rigid-flexible coupling robotic arm in the above embodiments can be extended to two-link rigid-flexible coupling robotic arms with other physical parameters and robotic arm systems containing flexible rods. Although simulation calculations have not been performed on all flexible robotic arms containing flexible rods, it should not be construed as a limitation of the scope of this application. Without departing from the scope of this application, deformations and improvements can still be made, and these all fall within the protection scope of this application. Therefore, the protection scope of the patent of this application shall be subject to the appended claims.
Claims
1. A trajectory planning and tracking dynamics simulation method for a rigid-flexible coupling manipulator based on an intelligent algorithm, characterized in that: The following steps are involved: Step 1, establish a physical model of the two-link rigid-flexible coupling robot arm, and set relevant parameters of the two-link rigid-flexible coupling robot arm; Step 2: In a floating coordinate system, a dynamic model of a two-link rigid-flexible coupling manipulator system is established. The deformation of the flexible rod consists of lateral bending deformation, longitudinal elongation deformation, and axial nonlinear coupling deformation caused by the lateral direction. The dynamic equation of the two-link rigid-flexible coupling manipulator system is obtained using the second-kind Lagrangian equation. Step 3, for the two-link rigid-flexible coupling robot arm, a point-to-point trajectory planning task is performed, the motion state of each joint from the initial point to the end point is set, n interpolation points are set between the starting point and the end point, and a seventh-order polynomial function is selected between the interpolation points to describe the joint trajectory. The residual vibration energy of the flexible robot arm is used as the objective function, and the particle swarm algorithm is executed to generate an ideal joint trajectory that can suppress the residual vibration of the flexible component; Step 4: Set the ideal joint trajectory generated by trajectory planning as the tracking target, discretize the trajectory, execute the deep reinforcement learning algorithm, predict the actual joint angle, joint angular velocity, driving torque, and flexible rod deformation through the deep neural network, substitute the dynamic equation and limit conditions to construct the unbalanced equation, and then construct the loss function. It is judged whether the value of the loss function is within the set error threshold, generate the actual joint trajectory, and complete the tracking of the ideal joint trajectory.
2. The trajectory planning and tracking dynamics simulation method of a rigid-flexible coupling manipulator based on an intelligent algorithm according to claim 1, characterized in that: The physical model of the two-link rigid-flexible coupling robot arm established in step 1 is a planar chain multi-body system. The two rods are a rigid rod and a flexible rod respectively, and the hinges are flexible joints, namely flexible hinge 1 and flexible hinge 2 respectively. The rigid rod can rotate around the flexible joint connected to the front end, and the end is connected to the flexible joint. The front end of the flexible rod supports the flexible joint at the end of the rigid rod, and the entire planar chain multi-body system performs planar motion.
3. The trajectory planning and tracking dynamics simulation method of a rigid-flexible coupling manipulator based on an intelligent algorithm according to claim 1, characterized in that: The physical parameters of the two-link rigid-flexible coupling manipulator are as follows: the length of the rigid rod L1, the distance from the center of mass to the flexible hinge 1 l1, the moment of inertia J1; the length of the flexible rod L2, the cross-sectional area S, the density ρ, the moment of inertia I of the cross section z , elastic modulus E; external driving torque τ of the robot joint i , the angular displacement q of the drive i , the angular displacement of the rod θ i , joint torsional stiffness K i , the flexible deformation of the joint q i -θ i , the moment of inertia of the drive device J mi .
4. The trajectory planning and tracking dynamics simulation method of a rigid-flexible coupling manipulator based on an intelligent algorithm according to claim 1, characterized in that: Step 2: In the floating coordinate system, a dynamic model of the two-link rigid-flexible coupling manipulator system is established, and the dynamic equation of the two-link rigid-flexible coupling manipulator system is obtained using the second-kind Lagrangian equation. The specific method is as follows: With the center of the flexible joint connected to the front end of the rigid rod as the origin O, the inertial coordinate system OXY of the robot arm and the floating coordinate system OX1Y1 fixed to the rigid rod are established, with the X1 axis along the axis of the rigid rod. With the center of the flexible joint connected to the front end of the flexible rod as O1, the floating coordinate system O1X2Y2 is established on the flexible rod, with the X2 axis along the undeformed axis of the flexible rod. The position vector r of point P on the flexible rod at a distance x from O1 relative to the inertial coordinate system OXY after deformation is: r=(L1cosθ1+(x+w1(x,t)+w c (x,t))cos(θ1+θ2)-w2(x,t)sin(θ1+θ2))e X +(L1sinθ1+(x+w1(x,t)+w c (x,t))sin(θ1+θ2)+w2(x,t)cos(θ1+θ2))e Y Among them, θ1 is the angular displacement of the rigid rod, θ2 is the angular displacement of the flexible rod, w1(x, t) is the axial elongation of the axis, w2(x, t) is the lateral bending deformation, and w c (x,t) is the longitudinal shortening caused by the lateral deformation of the rod, e X is the direction vector of the OX axis in the inertial coordinate system OXY, e Y is the direction vector of the OY axis in the inertial coordinate system OXY; The velocity of point P on the flexible rod is obtained by taking the derivative of the position vector of point P relative to the inertial coordinate system OXY with respect to time t. in, is the angular velocity of the rigid rod, is the angular velocity of the flexible rod, is the first-order derivative of w1(x,t), is the first-order derivative of w2(x,t), w c The first derivative of (x, t); Determine the kinetic energy K of the two-link rigid-flexible coupling manipulator system r : Among them, J m1 is the moment of inertia of the flexible hinge 1 drive device, J m2 is the rotational inertia of the driving device of the flexible hinge 2; Ignoring the influence of gravitational potential energy, determine the potential energy V of the two-link rigid-flexible coupling manipulator system: Wherein, K1 is the joint torsional stiffness of flexible hinge 1, K2 is the joint torsional stiffness of flexible hinge 2, q1 is the angular displacement of the driving device of flexible hinge 1, and q2 is the angular displacement of the driving device of flexible hinge 2; The assumed modal method is used to discretize the deformation of the flexible rod. The axial deformation w1(x, t) and lateral deformation w2(x, t) of the flexible rod are: Among them, Φ x (x)∈R 1×N and Φ y (x)∈R 1×N are the row vectors of the modal functions of axial vibration and lateral vibration, respectively, A(t)∈R N×1 and B(t)∈R N×1 are the modal coordinate column vectors of axial vibration and lateral vibration, respectively, expressed as: Among them, φ x1 (x),φ x2 (x),φ xN (x) are the first row vector, the second row vector, and the Nth row vector of the modal function of axial vibration, A1(t), A2(t), A N (t) are the first column vector, the second column vector, and the Nth column vector of the modal function of axial vibration, respectively, φ y1 (x),φ y2 (x),φ yN (x) are the first row vector, the second row vector, and the Nth row vector of the modal function of lateral vibration, respectively. B1(t), B2(t), B N (t) are the first column vector, the second column vector, and the Nth column vector of the modal function of lateral vibration, respectively, Φ x (x) and Φ y (x) Using the modal function of a fixed boundary cantilever beam, the corresponding elements are: f yi (x)=(cosβ i x-chβ i x)+c i (sinβ i x-shβ i x),i=1,2,…,N Among them, φ xi (x) is the i-th row vector of the modal function of axial vibration, φ yi (x) is the i-th row vector of the mode function of lateral vibration, β1, β2, β i and γ i To calculate the correlation coefficient, N is the modal cutoff number of the flexible rod; The longitudinal shortening w caused by the transverse deformation of the rod c (x,t) is: Among them, B T (t) is the transpose of B(t), H(x) is the coupling shape function, and the expression is: Among them, Φ y ′(ξ) is the first-order derivative of the row vector of the modal function of lateral vibration, Φ′ y T (ξ) is Φ y The transpose of ′(ξ); Take the generalized coordinates q = (θ1, θ2, q1, q2, A T ,B T ) T , A T , Β T Transpose A(t) and B(t) respectively T (t), Β T (t), the kinetic energy and potential energy of the two-link rigid-flexible coupling manipulator system: Among them, A, B, Φ x , Φ y A(t), B(t), Φ x (x), Φ y (x) abbreviation, Φ x T , Φ y T They are Φ x (x), Φ y The transpose Φ of (x) x T (x), Φ y T (x) abbreviation, Φ x ′、Φ y ′ are A(t), B(t), Φ x (x), Φ y The first derivative of (x) Φ x ′(x), Φ y ′(x) is short for Φ x ' T , Φ y ' T They are Φ x ′(x), Φ y The transpose of ′(x) Φ x ' T (x), Φ y ' T (x) abbreviation; The kinetic energy K of the two-link rigid-flexible coupling robot system is r Substitute the potential energy V into the Lagrangian equation of the second kind: in, is the first-order derivative of the generalized coordinate q; Dynamic equations of a two-link rigid-flexible coupling manipulator system: in, is the second-order derivative of the generalized coordinate q, M is the generalized mass matrix, and Q is the generalized force matrix, expressed as: τ1 is the external driving torque of flexible hinge 1, τ2 is the external driving torque of flexible hinge 2, Among them, the underlined item is the introduced nonlinear coupling deformation; The constant coefficient matrix S x ,S y ,M x ,M y ,C,K1,K2 and J ob for: Among them, Φ″ y (x) is Φ y The second derivative of (x), Φ″ y The transpose of (x).
5. The trajectory planning and tracking dynamics simulation method of a rigid-flexible coupling manipulator based on an intelligent algorithm according to claim 1, characterized in that: The specific method of step 3 is: Set the initial and final motion states of the robot arm when performing point-to-point tasks. The motion states include displacement, velocity, acceleration, jerk, and time. The given motion state C of each joint i It is expressed as: C i =[θ i0 ,v i0 ,a i0 ,j i0 ,t i0 ,θ if ,v if ,a if ,j if ,t if ] i=1,2 Among them, θ i0 ,vi0,ai0,j i0 and t i0 are the initial angular displacement, initial angular velocity, initial angular acceleration, initial angular jerk and initial time, θ if 、v if 、a if 、j if and t if They are the terminal angular displacement, terminal angular velocity, terminal angular acceleration, terminal angular jerk and terminal time respectively; Connect the given starting point and end point to generate the initial joint trajectory, construct the seventh-order polynomial function in the multinomial interpolation method, and the trajectory function expression of joint i is θ i for: Among them, a i 7 、a i 6 、a i 5 、a i 4 、a i 3 、a i 2 、a i 1 and a i 0 are the undetermined parameters of the i-th joint trajectory, which are: n interpolation points are set between the starting point and the end point of each joint. Each interpolation point has a corresponding displacement, velocity, acceleration and jerk. The motion state of each interpolation point is expressed as the search variable X of the single-target trajectory planning: X=X1+X2 =[θ 11 ,v 11 ,a 11 ,j 11 ,…,θ 1n ,v 1n ,a 1n ,j 1n ]+[θ 21 ,v 21 ,a 21 ,j 21 ,…,θ 2n ,v 2n ,a 2n ,j 2n ] Among them, X1 is the search variable of the rigid rod, X2 is the search variable of the flexible rod, and θ 11 、v 11 、a 11 、j 11 is the displacement, velocity, acceleration and jerk corresponding to the first interpolation point of the rigid rod, θ 1n 、v 1n 、a 1n 、j 1n is the displacement, velocity, acceleration and jerk corresponding to the nth interpolation point of the rigid rod, θ 21 、v 21 、a 21 、j 21 is the displacement, velocity, acceleration and jerk corresponding to the first interpolation point of the flexible rod, θ 2n 、v 2n 、a 2n 、j 2n is the displacement, velocity, acceleration and jerk corresponding to the nth interpolation point of the flexible rod; Discretize the initial joint trajectory, construct the initial parameters of n interpolation points as the initial position of the initial particle swarm, set the relevant parameters of the particle swarm algorithm, and generate an initial population of size N; The search variables of the initial population are input into the dynamics theory model of the two-link rigid-flexible coupling manipulator, and the residual vibration energy of the flexible rod is taken as the optimization target. The objective function is expressed as: Among them, the objective function J is the system at the end time t f The residual vibration energy within the last 1s, where V t is the residual vibration energy at time t, the fitness value J corresponding to the initial population is calculated through the objective function, and the individual optimal solution and the global optimal solution are determined; Update the particle's position and velocity: Among them, w is the inertia weight; c1 is the individual learning factor, which reflects the particle's ability to learn to the individual optimal position; c2 is the global learning factor, which reflects the particle's ability to learn to the global optimal position; r1 and r2 are random numbers in the interval [0,1], and v id (k+1) is the d-dimensional component of the velocity of particle i in the k+1th iteration, v id (k) is the d-dimensional component of the k-th iteration velocity, P id (k) is the d-dimensional component of the optimal position of the individual at the kth iteration, g d (k) is the d-dimensional component of the global optimal position at the kth iteration, x id (k+1) is the d-dimensional component of the position of particle i in the k+1th iteration, x id (k) is the d-dimensional component of the k-th iteration position, v id (k+1) is the d-dimensional component of the velocity in the k+1th iteration; The particle search variables in the obtained new generation population are input into the dynamic theory model of the flexible manipulator, the fitness value is calculated and the global optimal solution and the local optimal solution are updated; Determine whether the number of iterations reaches the set maximum number of iterations. If the number of iterations reaches the set maximum number of iterations, the optimization ends. The search variables that meet the iteration conditions are output, that is, the motion state of each interpolation point of each joint of the two-link rigid-flexible coupling robot arm, and the seventh-order polynomial function is used for fitting to obtain the ideal joint trajectory.
6. The trajectory planning and tracking dynamics simulation method of a rigid-flexible coupling manipulator based on an intelligent algorithm according to claim 1, characterized in that: The specific method of step 4 is: The ideal joint trajectory generated by trajectory planning is used as the tracking control target, the running time of the flexible robot is discretized, and the ideal joint angle corresponding to each discrete time step is obtained; Tracking the discretized joint trajectory using a deep reinforcement learning model, wherein the deep reinforcement learning model includes two deep neural networks, and a Gaussian probability strategy is established by using the average value and standard deviation of the outputs of the two deep neural networks to output candidate joint angle values from the probability strategy; The unbalanced equation is constructed using the dynamic equations and limit conditions of the two-link rigid-flexible coupling manipulator: The loss function is constructed by the unbalanced equation. If the value of the loss function exceeds the set error threshold, the Adam optimizer is used to update the deep neural network parameters and perform the next iteration. Otherwise, if the value of the loss function is within the set error threshold, the iteration is exited and the actual joint angle value is output. Output the actual joint angle value of each time step, generate the actual joint trajectory, and complete the trajectory tracking of the flexible robotic arm.
7. The trajectory planning and tracking dynamics simulation method of a rigid-flexible coupling manipulator based on an intelligent algorithm according to claim 5, characterized in that: The deep reinforcement learning model constructs a probabilistic strategy through a deep neural network. The first deep neural network has an input layer containing 32 neurons, a hidden layer containing 64 neurons, and an output layer containing 32 neurons. The average value of the output includes the actual joint angle, joint angular velocity, driving torque, and deformation of the flexible rod. The corresponding quantities in the dynamic equation of the two-link rigid-flexible coupling robot are the output solutions of the dynamic equation [μ x1 ,μ x2 ,μ x3 ,μ x4 ,μ x5 ,μ x6 ], the first-order derivative of the output solution of the dynamic equation [μ y1 ,μ y2 ,μ y3 ,μ y4 ,μ y5 ,μ y6 ] and the joint torque [μ τ1 ,μ τ2 ], the second deep neural network has only one layer, which is the input-output layer, with a total of 32 neurons and an output standard deviation [σ x1 ,σ x2 ,σ x3 ,σ x4 ,σ x5 ,σ x6 ,σ y1 ,σ y2 ,σ y3 ,σ y4 ,σ y5 ,σ y6 ,σ τ1 ,σ τ2 ]; Let μ x =[μ x1 ,μ x2 ,μ x3 ,μ x4 ,μ x5 ,μ x6 ] T , μ y =[μ y1 ,μ y2 ,μ y3 ,μ y4 ,μ y5 ,μ y6 ] T , μ τ =[μ τ1 ,μ τ2 ] T , The unbalance equation of the two-link rigid-flexible coupling manipulator is: i 1输出 =μ x1 i 2输出 =μ x2 Among them, r1 and r2 are the unbalanced terms of the dynamic equation of the two-link rigid-flexible coupling manipulator, r3 is the unbalanced term between the expectation and output of the two-link rigid-flexible coupling manipulator, θ 1输出 and θ 2输出 are the angular displacements of the rigid rod and the flexible rod, θ 1期望 and θ 2期望 are the desired angular displacements of the rigid rod and the flexible rod, respectively.
Citation Information
Cited By
Trajectory planning method for autonomous underwater vehicle-rope-driven manipulator
CN121340301A
Vibration suppression method for flexible mechanical arm
CN122185301A
A mechanical arm trajectory tracking control method and system based on a double-layer controller
CN122683733A