Mechanical arm sliding mode control method
By adopting the sliding mode control method on the robot's robot's robot, a forward kinematic model was established, and a parameter approximation was used to use the improved gradient descent method and a single hidden radial basis neural network for parameter approximation, and a nonlinear interference observer was designed, which solved the control problem of robotic arms that did not meet the Pieper law in complex environments, and achieved high-precision and stable motion control.
Patent Information
- Application Number
- CN202411583720.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-07
- Publication Date
- 2025-02-28
AI Technical Summary
A type of robotic arms that do not meet the Pieper law when performing tasks in complex and changing environments, face problems such as dynamic model uncertainty, external interference and joint friction, which makes it difficult to achieve precise and stable control.
A method for sliding mode control of robotic arm is proposed, including establishing a forward kinematic model of robotic arm that does not meet the Pieper law, establishing a dynamic model using the Lagrangian method, and using external interference and joint friction as interference terms. The inverse kinematic equation is solved by improving the gradient descent method, the linear sliding mode surface is designed, and the switching function in sliding mode control is optimized using the hyperbolic tangent function. At the same time, a single hidden layer radial base neural network is used for parameter approximation, a nonlinear interference observer is designed, and a sliding mode control law is combined to achieve sliding mode control of joint angles.
High-precision and stable motion control of robotic arms that do not meet the Pieper law is realized, effectively reducing the torque shaking problem in sliding mode control, and improving the control accuracy and stability of system response.
Smart Images

Figure CN119526389A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of robot control, and in particular relates to a mechanical arm sliding mode control method. Background Art
[0002] Nursing robots can not only replace nursing staff to a certain extent, but also improve the accuracy and efficiency of operations, optimize the nursing process, and enhance patients' nursing experience.
[0003] However, a type of nursing robot that does not satisfy the Pieper law needs to perform tasks in complex and changing environments, including work scenes with dense personnel and cluttered objects. The Pieper law is satisfied only when the three adjacent joint axes of the robot intersect at one point or the three adjacent joint axes are parallel to each other. In these scenarios, the path of the nursing task is often not fixed and has strong randomness. This type of robot faces problems such as uncertainty in the dynamic model, external interference that is difficult to accurately predict, and joint friction. Therefore, how to achieve precise and stable control of this type of robot has become a very challenging technical issue. Summary of the invention
[0004] In view of the shortcomings of the prior art, the present application proposes a mechanical arm sliding mode control method, comprising:
[0005] Get robot arm data;
[0006] According to the robot data, a forward kinematics model of the robot that does not satisfy the Piper law is established;
[0007] According to the forward kinematics model, a mechanical arm dynamics model is established by using the Lagrangian method, and external interference and joint friction are used as interference terms of the mechanical arm dynamics model;
[0008] The improved gradient descent method based on Jacobian matrix is used to solve the inverse kinematics equation corresponding to the forward kinematics model of the robot arm, and the solved joint angle value of the robot arm is obtained;
[0009] Calculate the joint angle error according to the solved joint angle value of the robot arm and the expected joint angle value;
[0010] According to the joint angle error, a linear sliding surface is designed to perform sliding mode control on the joint angle, wherein the sliding mode control law is constructed based on the modeling estimation value in the robot arm dynamics model, and the sign function in the sliding mode control law is replaced by a hyperbolic tangent function.
[0011] The robot arm data includes: joint angle, joint offset, connecting rod torsion angle and connecting rod length.
[0012] The mechanical arm sliding mode control method further includes:
[0013] For each item in the robot arm dynamics model, a single hidden layer radial basis function neural network is used for parameter approximation. The approximation parameters of the single hidden layer radial basis function neural network are used to improve the modeling estimation value of the robot arm dynamics model. The hyperbolic tangent function is used as the robust term of the sliding mode control law, thereby realizing the sliding mode control of the joint angle based on the single hidden layer radial basis function neural network.
[0014] The mechanical arm sliding mode control method further includes:
[0015] According to the characteristics of the robot arm, a nonlinear disturbance observer is designed for the disturbance term of the robot arm dynamics model;
[0016] Combining the sliding mode control law with the nonlinear disturbance observer, a combined control strategy is obtained;
[0017] According to the joint angle error, a combined control strategy is adopted to perform sliding mode control on the joint angle.
[0018] According to the robot data, a forward kinematics model of the robot that does not satisfy the Piper law is established, and the calculation formula is as follows:
[0019]
[0020]
[0021] Where n′ is the number of coordinate systems from the base coordinate system to the end effector coordinate system, i is the i-th coordinate system, 0 T n' For the forward kinematics model of the robot arm that does not satisfy the Pieper law, i-1 T is the transformation matrix from the i-1th coordinate system to the i-th coordinate system of the robot, q i is the joint rotation angle, d i is the joint offset, α i is the connecting rod torsion angle, a i is the connecting rod length, Rot(z,q i ) is the rotation q around the z axis i Angle rotation transformation matrix, Trans(0,0,d i ) is the translation d along the z-axis i The translation transformation matrix of the distance. Trans(a i ,0,0) is a translation along the x-axis i The translation transformation matrix of the distance, Rot(x,α i ) represents a rotation α around the x-axis i The rotation transformation matrix of angle.
[0022] According to the forward kinematics model, the Lagrangian method is used to establish the dynamics model of the robot arm, and the external interference and joint friction force are used as interference items of the dynamics model of the robot arm. The calculation formula is as follows:
[0023]
[0024]
[0025] Among them, τ l is the joint control input vector of link l, L is the Lagrangian function, which is the difference between the kinetic energy and potential energy of the system, l, j, k and o are the numbers of different links, n is the total number of links in the system, m j is the mass of the jth connecting rod, and g is the acceleration due to gravity. lj is an element of the inertia matrix, representing the inertial coupling relationship between link l and link j, C ljk is a coefficient in the Coriolis force matrix, describing the inertial coupling effect of the velocities of the connecting rods l and j on the connecting rod k, G l is the gravity torque term, which describes the torque generated on the lth connecting rod under the action of gravity. is the modeling estimate of M(q), for The modeling estimate of is the modeling estimate of G(q), q is the joint angle vector, is the angular velocity vector, is the angular acceleration vector, is a symmetric positive definite inertia matrix, is the Coriolis force matrix, is the gravitational acceleration matrix, is the joint control input vector, The friction force of the joint is and external interference As the composite interference ρ, T l is the pose matrix of the link l, l r is the position vector of the point in the coordinate system {l}, J j =∫ j r( j r) T dm is the pseudo-inertia matrix.
[0026] The improved gradient descent method based on the Jacobian matrix is used to solve the inverse kinematics equation corresponding to the forward kinematics model of the robotic arm to obtain the solved joint angle value of the robotic arm. The calculation formula is as follows:
[0027]
[0028]
[0029]
[0030]
[0031] Among them, θ is the actual joint angle of the robot arm, X d is the desired position of the end of the robot, X = f(θ) is the actual position of the robot. F(θ) is the target cost function, β is the learning rate, which controls the step size of the parameter update in each iteration, J Τ (θ) is the Jacobian matrix, Δθ is the update step of the joint angle, Δθ′ is the update step of the joint angle after adding the momentum term, σ is a preset constant to avoid the denominator being zero, and pv t-1 is the gradient at time t-1, p is the decay term of the momentum term, r t is the second-order momentum term at time t, r t-1 is the second-order momentum term at time t-1.
[0032] The sliding mode control law is constructed based on the modeling estimate in the forward kinematics model of the manipulator, and the sign function in the sliding mode control law is replaced by the hyperbolic tangent function. The calculation formula is as follows:
[0033]
[0034] Where F is the sliding mode control law, is the modeling estimate of M(q), for The modeling estimate of is the modeling estimate of G(q), K = diag(K1,,K i ) is the gain matrix of the sliding mode controller, A=diag(a1,,a i ) are all positive definite matrices, is the hyperbolic tangent function, and ε is a smoothing factor, which mainly adjusts the effect of the change of s on the function output. e=q d -q is the sliding mode control joint angle error, q d is the desired joint angle vector, q is the joint angle vector, is the desired joint angular velocity vector, is the desired joint angular acceleration vector,
[0035] λ=diag(λ1,λ i ),λ i >0,
[0036] The method uses a single hidden layer radial basis function neural network to approximate parameters of each item in the dynamic model of the manipulator, uses the approximation parameters of the single hidden layer radial basis function neural network to improve the modeling estimation value of the dynamic model of the manipulator, and uses the hyperbolic tangent function as the robust item of the sliding mode control law, including:
[0037] For each item in the robot arm dynamics model, a single hidden layer radial basis neural network is used for parameter approximation, and the calculation formula is as follows:
[0038]
[0039] in, is the modeling estimate of M(q), for The modeling estimate of is the modeling estimate of G(q), W M for The weight matrix, W C for The weight matrix, W G for The weight matrix of and are a kind of basis function vectors used to describe and feature item.
[0040] The approximation parameters of the single hidden layer radial basis neural network are used to improve the modeling estimation value of the robot arm dynamics model. The calculation formula is as follows:
[0041]
[0042] in, is the input vector of the single hidden layer radial basis neural network, is the Gaussian basis function,
[0043] is the modeling estimate, W is the weight matrix, e = q d -q is the sliding mode control joint angle error, is the first-order derivative of e, q d is the desired joint angle vector, q is the joint angle vector, is the desired joint angular velocity vector, is the desired joint angular acceleration vector, Λ is a feedback gain matrix used to accelerate the convergence of the error so that the system can track the desired target state faster.
[0044] The sliding mode robust control law based on a single hidden layer radial basis function neural network and the hyperbolic tangent function as the robust term calculation formula of the sliding mode control law are as follows:
[0045]
[0046] Where v = -(ε N +b d )tanh(s) is the robust term of the sliding mode control law, is the weight of the neural network, τ' is the sliding mode robust control law of the single hidden layer radial basis neural network, A = diag(a1,,a i ) are all positive definite matrices, is the Gaussian basis function, ε N is a term used to represent the noise or disturbance that may exist in the system. By considering this term, the controller can better handle uncertainties, making the system more stable and robust.
[0047] According to the characteristics of the robot arm, a nonlinear disturbance observer is designed for the disturbance term of the robot arm dynamics model. The calculation formula is as follows:
[0048]
[0049] in, is the estimated value of the composite disturbance by the nonlinear disturbance observer, is the gain matrix, and defines the auxiliary parameter vector Where z∈R 2 , is the function vector to be designed;
[0050] Combining the sliding mode control law with the nonlinear disturbance observer, we get the combined control strategy, which is calculated as follows:
[0051]
[0052] Where F is the sliding mode control law, is the modeling estimate of M(q), for The modeling estimate of is the modeling estimate of G(q), K = diag(K1,,K i ) is the gain matrix of the sliding mode controller, A=diag(a1,,a i ) are all positive definite matrices, is the hyperbolic tangent function, ε is a smoothing factor used to adjust the impact of changes in s on the function output, e = q d -q is the sliding mode control joint angle error, q d is the desired joint angle vector, q is the joint angle vector, is the desired joint angular velocity vector, is the desired joint angular acceleration vector, λ=diag(λ1,λ i ),λ i >0,
[0053] Beneficial effects:
[0054] In order to enable a type of robot arm that does not satisfy the pipe law to complete high-precision and stable motion control tasks, this application proposes a sliding mode control method for the robot arm. First, in view of the problem that this type of robot arm does not meet the Pieper criterion and makes inverse kinematics difficult to solve, an improved gradient descent method based on the Jacobian matrix is proposed, which adopts a numerical iterative optimization solution and can adaptively and dynamically adjust the learning rate to ensure the accuracy of the inverse kinematics solution. Secondly, the hyperbolic tangent function is used to dynamically optimize the switching function in the sliding mode control, and a sliding mode control strategy based on the hyperbolic tangent is proposed, so as to maintain good control performance and effectively reduce the torque jitter problem in the sliding mode control. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] Figure 1 A flow chart of a sliding mode control method for a robotic arm according to an embodiment of the present application;
[0056] Figure 2 A type of mechanical arm structure that does not satisfy the Pieper law in the embodiment of the present application;
[0057] Figure 3 Schematic diagram of the gradient descent method in the embodiment of the present application;
[0058] Figure 4 Schematic diagram of an improved gradient descent method based on numerical iteration in an embodiment of the present application;
[0059] Figure 5 Schematic diagram of the hyperbolic tangent function of the embodiment of the present application;
[0060] Figure 6 Schematic diagram of the RBF neural network structure of the embodiment of the present application;
[0061] Figure 7 The RBF neural network sliding mode robust control diagram of the embodiment of the present application;
[0062] Figure 8 A schematic diagram of the structure of the interference observer according to an embodiment of the present application;
[0063] Fig. 9 Schematic diagram of the expected trajectory of the end effector of the humanoid robot arm in the embodiment of the present application;
[0064] Fig.10 Comparison diagram of position errors between the improved embodiment of the present application and the traditional gradient descent method, wherein (a) is a position error diagram of the improved gradient descent method, and (b) is a position error diagram of the traditional gradient descent method;
[0065] Fig.11 Schematic diagram of the torque of the hyperbolic tangent sliding mode control and the ordinary sliding mode control in the embodiment of the present application, wherein (a) is the first torque diagram and (b) is the second torque diagram;
[0066] Fig.12 Schematic diagram of RBF neural network model fitting in the embodiment of the present application;
[0067] Fig.13 Schematic diagram of composite disturbance estimation of nonlinear disturbance observer according to an embodiment of the present application;
[0068] Fig.14 Schematic diagram comparing the spatial trajectories of the embodiment of the present application with various control strategies;
[0069] Fig.15 Schematic diagram of position error comparison between an embodiment of the present application and various control strategies. DETAILED DESCRIPTION
[0070] The specific implementation of the present application is further described in detail below in conjunction with the drawings and examples.
[0071] Example:
[0072] This embodiment proposes a mechanical arm sliding mode control method, such as Figure 1 As shown, including:
[0073] Step S1: Obtaining robot arm data;
[0074] In this embodiment, the robot arm data includes: joint angle, joint offset, connecting rod torsion angle and connecting rod length, as shown in Table 1:
[0075] Table 1 Robotic arm data
[0076]
[0077] Among them, q is the joint angle, d is the joint offset, α is the connecting rod torsion angle, and a is the connecting rod length.
[0078] Step S2: establishing a forward kinematics model of the robot arm that does not satisfy the Piper's law according to the robot arm data;
[0079] Step S3: According to the forward kinematics model, a mechanical arm dynamics model is established by using the Lagrangian method, and external interference and joint friction are used as interference terms of the mechanical arm dynamics model;
[0080] Step S4: using an improved gradient descent method based on the Jacobian matrix to solve the inverse kinematics equation corresponding to the forward kinematics model of the robotic arm, and obtaining the solved joint angle values of the robotic arm;
[0081] Step S5: Calculate the joint angle error according to the solved joint angle value of the robot arm and the expected joint angle value;
[0082] Step S6: According to the joint angle error, a linear sliding surface is designed to perform sliding mode control on the joint angle, wherein the sliding mode control law is constructed according to the modeling estimation value in the robot arm dynamics model, and the sign function in the sliding mode control law is replaced by a hyperbolic tangent function.
[0083] In step S2, based on the acquired robot data, a forward kinematics model of the robot that does not satisfy the Piper law is established, specifically including:
[0084] Step 2.1: Based on the definition of the Modified DH parameter method, the transformation matrix formula from the i-1th coordinate system to the i-th coordinate system is:
[0085]
[0086] Where n' is the number of coordinate systems from the base coordinate system to the end effector coordinate system, i is the i-th coordinate system, 0 T n' For the forward kinematics model of the robot arm that does not satisfy the Pieper law, i-1 T is the transformation matrix from the i-1th coordinate system to the i-th coordinate system of the robot, q i is the joint rotation angle, d i is the joint offset, α i is the connecting rod torsion angle, a i is the connecting rod length, Rot(z,q i ) is the rotation q around the z axis i Angle rotation transformation matrix, Trans(0,0,d i ) is the translation d along the z-axis i The translation transformation matrix of the distance. Trans(a i ,0,0) is a translation along the x-axis i The translation transformation matrix of the distance, Rot(x,α i ) represents a rotation α around the x-axis i The rotation transformation matrix of angle.
[0087] From the base coordinate system {0} to the end effector coordinate system {6}, multiply the transformation matrices of adjacent joints in sequence, and then derive the following: Figure 2 The forward kinematics model of a robot arm that does not satisfy the pipe law is shown as follows:
[0088]
[0089] In step S3, according to the forward kinematics model, the Lagrangian method is used to establish a mechanical arm dynamics model, and external interference and joint friction are used as interference items of the mechanical arm dynamics model, specifically including:
[0090] Step S3.1: According to the forward kinematics model, the Lagrangian method is used to establish the dynamics model of the robot arm and obtain the complete expression:
[0091]
[0092] Among them, τ l represents the joint control input vector of link l, L represents the Lagrangian function, which is the difference between the kinetic energy and potential energy of the system, l, j, k and o represent the link numbers, n represents the total number of links in the system, and m j M represents the mass of the jth connecting rod, and g is the acceleration due to gravity. lj is an element of the inertia matrix, representing the inertial coupling relationship between link l and link j, C ljk G represents a coefficient in the Coriolis force matrix, describing the inertial coupling effect of the velocities of the connecting rods l and j on the connecting rod k. j represents the gravity torque term, which describes the torque generated on the j-th link under the action of gravity.
[0093] Step S3.2: Taking external disturbance and joint friction as disturbance items of the robot dynamics model, specifically including:
[0094] Facing the random and complex working environment, the influence of unknown external interference and joint friction should be taken into account, and the dynamic equation of this type of robotic arm is derived as follows:
[0095]
[0096] in, They are defined as joint angle vector, angular velocity vector and angular acceleration vector respectively. is a symmetric positive definite inertia matrix, is the Coriolis force matrix, is the gravitational acceleration matrix, Joint friction matrix, is the joint control input vector, There is an upper limit for external interference.
[0097] The unmodeled part, joint friction and external interference Considered as a composite disturbance ρ, and assuming that the composite disturbance ρ changes slowly. The complete dynamic model considering external unknown disturbance and joint friction can be rewritten as:
[0098]
[0099] in, and They are M(q), and modeled estimates of G(q).
[0100] In step S4, the inverse kinematics equation corresponding to the forward kinematics model of the robot arm is solved by using an improved gradient descent method based on the Jacobian matrix to obtain the solved joint angle values of the robot arm, including:
[0101] Step 4.1: Define the target cost function using the difference between the desired and actual poses of the end effector of the robot arm;
[0102] In this embodiment, for example Figure 2 The robot arm shown does not meet the Pieper criterion, which makes inverse kinematics difficult to solve. The target cost function F(θ) is defined as the difference between the desired pose and the actual pose of the end effector of the robot arm. Then the gradient of the target function with respect to each joint angle is calculated, and the gradient information is used to perform negative gradient search, update the joint angle, and iterate continuously until the termination condition is met, so as to output the accurate joint angle value.
[0103]
[0104] Among them, X d is the desired position of the end, X = f(θ) is the actual position of the robot, θ is the actual joint angle of the robot, and X d is the desired position of the end of the robot, X = f(θ) is the actual position of the robot, and F(θ) is the target cost function.
[0105] Step S4.2: Improved gradient descent method based on Jacobian matrix, specifically including:
[0106] According to Figure 3 Schematic diagram of the calculation formula for the standard gradient, Among them, L(θ) is the loss function, is the partial derivative calculation. Define the iterative formula of the gradient descent algorithm: θ←θ-ηg. Where η is the learning rate.
[0107] According to the above standard gradient calculation formula, the gradient calculation formula of the robotic arm is derived as follows:
[0108]
[0109] Among them, β is the learning rate, which controls the step size of parameter update in each iteration, J Τ (θ) is the Jacobian matrix.
[0110] Based on the iterative calculation formula of the gradient descent method, the joint angle θ i The iterative update formula is:
[0111]
[0112] Among them, Δθ is the update step size of the joint angle.
[0113] Step S4.3: Introduce the momentum term and the second-order momentum term to obtain the iterative calculation formula of the adaptive momentum gradient descent algorithm, which specifically includes:
[0114] like Figure 4 As shown, on this basis, the momentum term pv is introduced t-1 The concept is to add the weighted sum of historical gradients and define the calculation formula of the momentum gradient descent method:
[0115] Δθ=pv t-1 +αJ Τ (θ)ΔX (9)
[0116] Among them, pv t-1 is the gradient at the previous moment, and p is the attenuation term of the momentum term.
[0117] Introducing a second-order momentum term Improve the calculation accuracy of step 3. Define the iterative formula of the improved adaptive momentum gradient descent algorithm:
[0118]
[0119] Among them, σ is a small constant used to stabilize numerical calculations and avoid the denominator being zero, Δθ is the update step size of the joint angle, Δθ′ is the update step size of the joint angle after adding the momentum term, and pv t-1 is the gradient at time t-1, p is the decay term of the momentum term, r t is the second-order momentum term at time t, r t-1 is the second-order momentum term at time t-1.
[0120] In step S6, a linear sliding surface is designed according to the joint angle error, and sliding mode control is performed on the joint angle, wherein the sliding mode control law is constructed according to the modeling estimation value in the mechanical arm dynamics model, and the sign function in the sliding mode control law is replaced by a hyperbolic tangent function, specifically including:
[0121] Step S6.1: Design a linear sliding surface according to the joint angle error, specifically including:
[0122] In this embodiment, a hyperbolic tangent function is used to optimize the switching function in the sliding mode control, and a sliding mode control strategy based on the hyperbolic tangent function is designed. The implementation process is as follows:
[0123] Define the sliding mode control joint angle error as e(t)=q d (t)-q(t), the designed linear sliding surface function is:
[0124]
[0125] Where Λ=diag(λ1,λ i )>0, its selection needs to ensure s n-1 +λ n-1 s n-2 ++λ1 is the Hurwitz polynomial, that is, when s→0, e→0.
[0126] Written in the form with the desired joint angles:
[0127]
[0128] Step S6.2: The sliding mode control law is constructed based on the modeling estimate in the robot dynamics model, including:
[0129] Design the general sliding mode control law as:
[0130]
[0131] in, are the estimated values of M, C, and G respectively, K=diag(K1,,K i ) is the gain matrix of the sliding mode controller, A=diag(a1,,a i ) are all positive definite matrices.
[0132] Step S6.3: Replace the sign function in the sliding mode control law with a hyperbolic tangent function, specifically including:
[0133] In order to overcome the jitter of the system output torque, the symbol function sgn(s) in the control law is replaced by Figure 5 The hyperbolic tangent function is shown:
[0134]
[0135] Among them, 0<ε<1, and its size determines the rate of change of the inflection point of the hyperbolic tangent function.
[0136] In step S7, for each item in the dynamic model of the manipulator, a single hidden layer radial basis function neural network is used for parameter approximation, the approximation parameters of the single hidden layer radial basis function neural network are used to improve the modeling estimation value of the dynamic model of the manipulator, and the hyperbolic tangent function is used as the robust term of the sliding mode control law, thereby realizing the sliding mode control of the joint angle based on the single hidden layer radial basis function neural network, which specifically includes:
[0137] In order to further enhance the compensation for system nonlinearity and uncertainty, a sliding mode control strategy based on radial basis function neural network (RBFNN) is designed. The uncertainty of the system model is identified and compensated in real time using a single hidden layer RBF neural network. The implementation process is as follows:
[0138] Step S7.1: For each item in the robot arm dynamics model, the dynamics model that needs to be approximated by the RBF neural network is: is the input vector of the RBF neural network.
[0139] Step S7.2: constructing the Gaussian basis function in the RBF neural network structure;
[0140] like Figure 6 The Gaussian basis function expression in the RBF neural network structure shown is as follows:
[0141]
[0142] in, is the Gaussian activation function of the i-th hidden layer node, b i is the basis width of the i-th Gaussian basis function, c i =[c i1 ,,c im ] is the center vector of the Gaussian basis function of the i-th node, x i -c i 2 For sample x i With the center point c i The Euclidean distance between them. The output of the RBF neural network is composed of the weighted sum of all nodes:
[0143]
[0144] Among them, W T =[ω1,ω2,,ω m ] T The weight vector of the neural network.
[0145] Step S7.3: Using the hyperbolic tangent function as the robust term of the sliding mode control law, specifically including:
[0146] Consider the ideal RBF neural network output as in, is the estimated value of the RBF neural network for the dynamic model f(x), is the weight of the neural network, is the Gaussian basis function.
[0147] Design as Figure 7 The sliding mode robust control law based on RBF neural network is shown as follows:
[0148]
[0149] Where v = -(ε N +b d )tanh(s) is a robust term used to overcome the approximation error of the RBF neural network.
[0150] The adaptive law for updating weights is:
[0151] Among them, F is the factor used to adjust the learning speed in the weight update law to ensure the stability and convergence of the weight update.
[0152] exist Figure 7 In this embodiment, for a type of robot arm that does not meet the Pieper criterion, Figure 7 A control method combining sliding mode control, adaptive law and RBF neural network approximation is shown to effectively deal with the nonlinearity, coupling and uncertainty problems in the system, thereby stably and accurately controlling the robotic arm.
[0153] Step S7.4: For each item in the robot arm dynamics model, use a single hidden layer radial basis neural network to perform parameter approximation, specifically including:
[0154] Since the dynamic model contains matrices M, C and G, we can use RBF neural network to approximate the parameters of each item in the dynamic model f(x). The dynamic model f(x) can be rewritten as:
[0155]
[0156] in,
[0157] Step S7.5: using the approximation parameters of the single hidden layer radial basis neural network to improve the modeling estimate of the robot arm dynamics model, specifically including:
[0158] Approximate each term in the dynamic model f(x):
[0159]
[0160] The estimated value of the kinetic model f(x) is rewritten as:
[0161]
[0162] Based on the adaptive law of updating weights To do this:
[0163]
[0164] Among them, k M >0,k C >0,k G >0.
[0165] In step S8, a nonlinear disturbance observer is designed to observe the unmodeled part and unknown disturbance in real time and accurately compensate the control output, including:
[0166] For the composite disturbance term proposed in step S3.2, a nonlinear disturbance observer is designed to estimate the equivalent disturbance in real time and compensate it. The disturbance observer is combined with step S7 to further improve the control accuracy and robustness of the system. The implementation process is as follows:
[0167] Step S8.1: designing a nonlinear disturbance observer for the disturbance term of the dynamic model of the robot arm according to the characteristics of the robot arm;
[0168] Considering that the composite disturbance ρ in step S3.2 is bounded, the nonlinear disturbance observer equation is designed according to the characteristics of the humanoid robot arm:
[0169]
[0170] in, is the estimated value of the composite disturbance by the nonlinear disturbance observer, is the gain matrix.
[0171] Step S8.2: Combining the sliding mode control law with the nonlinear disturbance observer to obtain a combined control strategy, specifically including:
[0172] Define auxiliary parameter vector There is no need to use joint acceleration, where z∈R 2 , is the function vector to be designed. Gain matrix It can be given by the following nonlinear equation:
[0173]
[0174] Rewrite step S8.1 as follows Figure 8 The nonlinear disturbance observer shown is:
[0175]
[0176] Combining the RBFNN sliding mode robust control strategy in step S7 with the disturbance observer in equation (24) yields equation (25):
[0177]
[0178] Where F is the sliding mode control law, is the modeling estimate of M(q), for The modeling estimate of is the modeling estimate of G(q), K = diag(K1,,K i ) is the gain matrix of the sliding mode controller, A=diag(a1,,a i ) are all positive definite matrices, is the hyperbolic tangent function, ε is a smoothing factor used to adjust the impact of changes in s on the function output, e = q d -q is the sliding mode control joint angle error, q d is the desired joint angle vector, q is the joint angle vector, is the desired joint angular velocity vector, is the desired joint angular acceleration vector, λ=diag(λ1,λ i ),λ i >0,
[0179] Formula (25) can also be written as:
[0180]
[0181] Step S8.3: Based on the joint angle error, a combined control strategy is adopted to perform sliding mode control on the joint angle.
[0182] In this embodiment, the desired position and posture of the end effector are input, and the joint angle obtained in step 3 is used as the desired joint angle of the control strategy of formula (25). The joint angle tracking error is obtained by comparing it with the actual joint angle measured by the sensor, and the robotic arm is controlled to complete high-precision and stable operation tasks.
[0183] In this embodiment, in order to further enhance the compensation for system nonlinearity and uncertainty, a sliding mode control strategy based on radial basis function neural network (RBFNN) is designed. The uncertainty of the system model is identified and compensated in real time using a single hidden layer RBF neural network, thereby assisting the sliding mode control to achieve more accurate motion control. In addition, by designing a nonlinear disturbance observer, it is possible to observe the unmodeled part and unknown disturbance in real time, and accurately compensate the control output, thereby effectively reducing the control error and significantly improving the control accuracy and stability of the system response.
[0184] Test experiment: Conduct simulation experiment on the sliding mode control of the robotic arm based on numerical iteration and RBF neural network.
[0185] 401 continuous pose transformation matrices were selected in Cartesian space, with a time range of 0 to 4 seconds and a time interval of 0.01 seconds. Among them, the parameters of the improved gradient descent method are: p = 0.9, σ = 0.02, α = 0.33 and θ2 ≤ 220. Parameters in sliding mode control: λ = diag (15, 15, ..., 15), K = diag (10, 10, ..., 10). The ε of the hyperbolic tangent function is 0.02. Among the influencing factors, the joint friction considers Coulomb friction and viscous friction respectively: The external disturbance is given to the six joints respectively: d = 0.8sin(t); the design parameters of the nonlinear disturbance observer are:
[0186] and
[0187] The model uncertainty is taken as:
[0188] M=M+0.5M; C=C+0.5C; G=G+0.5G.
[0189] The number of hidden layer nodes of the RBF neural network is set to 11, the width of the Gaussian basis function is selected as b = 50, and the weight adaptive law coefficient matrix of the matrices M, C and G is Γ = diag (100, 100, 100). Given the desired posture trajectory equation of the end effector of the humanoid robot arm:
[0190]
[0191] Where x, y and z are the position variables in the Cartesian coordinate system, and α, β and γ are the Euler angles of rotation around the x-axis, y-axis and z-axis respectively. The above equation describes a spiral line in Cartesian space, such as Fig. 9 shown.
[0192] In order to verify the accuracy of the joint trajectory obtained by the improved gradient descent method in Cartesian space, this application compares the trajectory errors obtained by the improved gradient descent method and the traditional gradient descent method. The comparison results are as follows Fig.10 As shown, Fig.10 (a) is the position error map of the improved gradient descent method, Fig.10 (b) is the position error diagram of the traditional gradient descent method. It can be seen that the improved gradient descent method proposed in this application has better performance in the accuracy of inverse kinematics solution. Fig.11 This application is based on the output torque comparison diagram of Hyperbolic Tangent Sliding Mode Control (HT-SMC) and Sliding Mode Control (SMC). In the torque diagram (a), the output torque of the first joint has a large amplitude and high frequency, and the torque output of other joints also has obvious floating changes. In contrast, although the HT-SMC strategy in the torque diagram (b) still has a jitter phenomenon, its amplitude and frequency are significantly reduced compared to the SMC strategy. Fig.12 This is a comparison chart of the results of RBF neural network fitting the approximate dynamic model. The degree of fitting is expressed by calculating the norm value of the dynamic model for numerical comparison. After the response, it can be seen that the degree of fitting is relatively close to the actual dynamic model. Fig.13 It is demonstrated that the nonlinear disturbance observer can accurately estimate even complex composite disturbances.
[0193] In order to verify the effectiveness of the final proposed system, the proposed RBF Neural Network-based Sliding Mode control with Numerical Iteration and Nonlinear Disturbance Observer (RBF+NDO) with nonlinear disturbance observer-based sliding mode control (Sliding Mode Control based on Nonlinear Disturbance Observer, SMC+NDO), proportional differential control (Proportional Differential Control based on Nonlinear Disturbance Observer, PD+NDO), and fuzzy adaptive sliding mode control strategy (Fuzzy Adaptive Sliding Mode Control, FA-SMC) are compared and simulated for control performance. The simulation results are shown in Figure 2. Fig.14 and Fig.15As shown. Fig.14 It can be seen that these four controllers can achieve the tracking of the desired trajectory by the end effector of the robot arm. Fig.15 The position error comparison results clearly show that the RBF+NDO and FA-SMC of this application perform well in control accuracy and anti-interference, but the Z-axis error of FA-SMC is large in the initial position. In contrast, the PD+NDO control strategy performs poorly in control accuracy, and the SMC+NDO control strategy has an up-and-down fluctuation in error changes when facing uncertain factors, and its robust performance is significantly poor.
[0194] In summary, the robotic arm sliding mode control method based on numerical iteration and RBF neural network proposed in this application demonstrates excellent control performance and significant anti-interference ability when facing problems such as model uncertainty, external unknown interference and joint friction.
[0195] This embodiment proposes that the present invention provides a sliding mode control method for a robotic arm, uses a hyperbolic tangent function to optimize the switching function in the sliding mode control, uses a single hidden layer radial basis function (RBF) neural network to identify the uncertainty of the dynamic model, uses a nonlinear disturbance observer to estimate and compensate for external unknown interference and joint friction, and controls the robotic arm to complete high-precision motion control operation tasks.
[0196] The various embodiments in the present application are described in a progressive manner, and the same or similar parts between the various embodiments can be referenced to each other, and each embodiment focuses on the differences from other embodiments.
[0197] The protection scope of the present application is not limited to the above-mentioned embodiments. Obviously, those skilled in the art can make various changes and modifications to the present disclosure without departing from the scope and spirit of the present disclosure. If these changes and modifications fall within the scope of the claims of the present disclosure and their equivalents, the intention of the present disclosure also includes these changes and modifications.
Claims
1. A sliding mode control method for a robotic arm, characterized in that: include: Get robot arm data; According to the robot data, a forward kinematics model of the robot that does not satisfy the Pieper law is established; According to the forward kinematics model, a mechanical arm dynamics model is established by using the Lagrangian method, and external interference and joint friction are used as interference terms of the mechanical arm dynamics model; The improved gradient descent method based on Jacobian matrix is used to solve the inverse kinematics equation corresponding to the forward kinematics model of the robot arm, and the solved joint angle value of the robot arm is obtained; Calculate the joint angle error according to the solved joint angle value of the robot arm and the expected joint angle value; According to the joint angle error, a linear sliding surface is designed to perform sliding mode control on the joint angle, wherein the sliding mode control law is constructed based on the modeling estimation value in the robot arm dynamics model, and the sign function in the sliding mode control law is replaced by a hyperbolic tangent function.
2. The mechanical arm sliding mode control method according to claim 1, characterized in that: The robot arm data includes: joint angle, joint offset, connecting rod torsion angle and connecting rod length.
3. The mechanical arm sliding mode control method according to claim 1, characterized in that: The mechanical arm sliding mode control method further includes: For each item in the robot arm dynamics model, a single hidden layer radial basis function neural network is used for parameter approximation. The approximation parameters of the single hidden layer radial basis function neural network are used to improve the modeling estimation value of the robot arm dynamics model. The hyperbolic tangent function is used as the robust term of the sliding mode control law, thereby realizing the sliding mode control of the joint angle based on the single hidden layer radial basis function neural network.
4. The mechanical arm sliding mode control method according to claim 2, characterized in that: The mechanical arm sliding mode control method further includes: According to the characteristics of the robot arm, a nonlinear disturbance observer is designed for the disturbance term of the robot arm dynamics model; Combining the sliding mode control law with the nonlinear disturbance observer, a combined control strategy is obtained; According to the joint angle error, a combined control strategy is adopted to perform sliding mode control on the joint angle.
5. The mechanical arm sliding mode control method according to claim 1, characterized in that: According to the robot data, a forward kinematics model of the robot that does not satisfy the Piper law is established, and the calculation formula is as follows: Where n′ is the number of coordinate systems from the base coordinate system to the end effector coordinate system, i is the i-th coordinate system, 0 T n' For the forward kinematics model of the robot arm that does not satisfy the Pieper law, i-1 T is the transformation matrix from the i-1th coordinate system to the i-th coordinate system of the robot, q i is the joint rotation angle, d i is the joint offset, α i is the connecting rod torsion angle, a i is the connecting rod length, Rot(z,q i ) is the rotation q around the z axis i Angle rotation transformation matrix, Trans(0,0,d i ) is the translation d along the z-axis i The translation transformation matrix of the distance, Trans(a i ,0,0) is a translation along the x-axis i The translation transformation matrix of the distance, Rot(x,α i ) represents a rotation α around the x-axis i The rotation transformation matrix of angle.
6. The mechanical arm sliding mode control method according to claim 5, characterized in that: According to the forward kinematics model, the Lagrangian method is used to establish the dynamics model of the robot arm, and the external interference and joint friction force are used as interference items of the dynamics model of the robot arm. The calculation formula is as follows: Among them, τ l is the joint control input vector of link l, L is the Lagrangian function, which is the difference between the kinetic energy and potential energy of the system, l, j, k and o are the numbers of different links, n is the total number of links in the system, m j is the mass of the jth connecting rod, g is the acceleration due to gravity, M lj is an element of the inertia matrix, representing the inertial coupling relationship between link l and link j, C ljk is a coefficient in the Coriolis force matrix, describing the inertial coupling effect of the velocities of the connecting rods l and j on the connecting rod k, G l is the gravity torque term, which describes the torque generated on the lth connecting rod under the action of gravity, is the modeling estimate of M(q), for The modeling estimate of is the modeling estimate of G(q), q is the joint angle vector, is the angular velocity vector, is the angular acceleration vector, is a symmetric positive definite inertia matrix, is the Coriolis force matrix, is the gravitational acceleration matrix, is the joint control input vector, The friction force of the joint is and external interference As the composite interference ρ, T l is the pose matrix of the link l, l r is the position vector of the point in the coordinate system {l}, J j =∫ j r( j r) T dm is the pseudo-inertia matrix.
7. The mechanical arm sliding mode control method according to claim 6, characterized in that: The improved gradient descent method based on the Jacobian matrix is used to solve the inverse kinematics equation corresponding to the forward kinematics model of the robotic arm to obtain the solved joint angle value of the robotic arm. The calculation formula is as follows: Among them, θ is the actual joint angle of the robot arm, X d is the desired position of the end of the robot, X = f(θ) is the actual position of the robot, F(θ) is the target cost function, β is the learning rate, J Τ (θ) is the Jacobian matrix, Δθ is the update step of the joint angle, Δθ′ is the update step of the joint angle after adding the momentum term, σ is a preset constant to avoid the denominator being zero, and pv t-1 is the gradient at time t-1, p is the decay term of the momentum term, r t is the second-order momentum term at time t, r t-1 is the second-order momentum term at time t-1.
8. The mechanical arm sliding mode control method according to claim 7, characterized in that: The sliding mode control law is constructed based on the modeling estimation value in the robot dynamics model, and the sign function in the sliding mode control law is replaced by the hyperbolic tangent function. The calculation formula is as follows: Where F is the sliding mode control law, is the modeling estimate of M(q), for The modeling estimate of is the modeling estimate of G(q), K=diag(K1,…,K i ) is the gain matrix of the sliding mode controller, A=diag(a1,…,a i ) are all positive definite matrices, is the hyperbolic tangent function, ε is a smoothing factor used to adjust the impact of changes in s on the function output, e = q d -q is the sliding mode control joint angle error, q d is the desired joint angle vector, q is the joint angle vector, is the desired joint angular velocity vector, is the desired joint angular acceleration vector, λ=diag(λ1,…,λ i ),λ i >0, 9. The mechanical arm sliding mode control method according to claim 3, characterized in that: The method uses a single hidden layer radial basis function neural network to approximate parameters of each item in the dynamic model of the manipulator, uses the approximation parameters of the single hidden layer radial basis function neural network to improve the modeling estimation value of the dynamic model of the manipulator, and uses the hyperbolic tangent function as the robust item of the sliding mode control law, including: For each item in the robot arm dynamics model, a single hidden layer radial basis neural network is used for parameter approximation, and the calculation formula is as follows: in, is the modeling estimate of M(q), for The modeling estimate of is the modeling estimate of G(q), W M for The weight matrix, W C for The weight matrix, W G for The weight matrix of and are a kind of basis function vectors used to describe and The characteristic items of The approximation parameters of the single hidden layer radial basis neural network are used to improve the modeling estimation value of the robot arm dynamics model. The calculation formula is as follows: in, is the input vector of the single hidden layer radial basis neural network, is the Gaussian basis function, is the modeling estimate, W is the weight matrix, e = q d -q is the sliding mode control joint angle error, is the first-order derivative of e, q d is the desired joint angle vector, q is the joint angle vector, is the desired joint angular velocity vector, is the desired joint angular acceleration vector, Λ is a feedback gain matrix; Based on the sliding mode robust control law of a single hidden layer radial basis function neural network, the hyperbolic tangent function is used as the robust term of the sliding mode control law. The calculation formula is as follows: Where v = -(ε N +b d )tanh(s) is the robust term of the sliding mode control law, is the weight of the neural network, τ' is the sliding mode robust control law of the single hidden layer radial basis neural network, A=diag(a1,…,a i ) are all positive definite matrices, ε N The term is noise or interference.
10. The mechanical arm sliding mode control method according to claim 4, characterized in that: According to the characteristics of the robot arm, a nonlinear disturbance observer is designed for the disturbance term of the robot arm dynamics model. The calculation formula is as follows: in, is the estimated value of the composite disturbance by the nonlinear disturbance observer, is the gain matrix, and defines the auxiliary parameter vector Where z∈R 2 , is the function vector to be designed; Combining the sliding mode control law with the nonlinear disturbance observer, we get the combined control strategy, which is calculated as follows: Where F is the sliding mode control law, is the modeling estimate of M(q), for The modeling estimate of is the modeling estimate of G(q), K=diag(K1,…,K i ) is the gain matrix of the sliding mode controller, A=diag(a1,…,a i ) are all positive definite matrices, is the hyperbolic tangent function, ε is a smoothing factor used to adjust the impact of changes in s on the function output, e = q d -q is the sliding mode control joint angle error, q d is the desired joint angle vector, q is the joint angle vector, is the desired joint angular velocity vector, is the desired joint angular acceleration vector, λ=diag(λ1,…,λ i ),λ i >0,
Citation Information
Cited By
Electromechanical system kinetic parameter identification method and system based on inverse model
CN119903679A
Track control method based on high-order finite time observer
CN120010273A
Robust control method and system for turning and lifting mechanical arm
CN120680514A