A collaborative robot optimal control method, device, medium and product

By constructing the dynamic model of the collaborative robot and using the five-order polynomial trajectory planning algorithm, combining a single-judgment neural network to reconstruct the Hamilton-Acobe Bellman equation, the problems of non-smooth angular velocity changes and acceleration jumps during the control process of the collaborative robot are solved, and the problem of non-smoothing changes in angular velocity and acceleration jumps are achieved. The smoothness and continuity of the trajectory are suitable for the needs of complex tasks.

CN118493411BActive Publication Date: 2024-11-05JILIN HENGCHUANG INTELLIGENT EQUIP CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410961925.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-18
Publication Date
2024-11-05
Estimated Expiration
2044-07-18

AI Technical Summary

Technical Problem

During the control process, the collaborative robot has problems of unsmooth angular velocity changes and acceleration jump, making it difficult to achieve smoothness and continuity of trajectory tracking control.

Method used

By constructing a dynamic model of a collaborative robot, using a five-order polynomial trajectory planning algorithm to plan the curve, and reconstructing the Hamilton-Acobe Belmann equation with a single-judgment neural network, approximately solving the optimal control law, and achieving optimized control of joint position, ensuring that Smoothing and continuity of the trajectory.

Benefits of technology

It effectively solves the problems of unsmooth angular velocity changes and acceleration jumps, maintains the system gradually and stability, reduces joint energy loss, and achieves smoothness and continuity of trajectory planning, which is suitable for the needs of complex tasks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118493411B_ABST
    Figure CN118493411B_ABST
Patent Text Reader

Abstract

The present invention discloses an optimal control method, device, medium and product for a collaborative robot, and relates to the technical field of robot trajectory planning and control algorithm. The present invention determines the expected joint position variables based on the inverse kinematics principle and the fifth-order polynomial trajectory planning curve; constructs a single-critique neural network using controller parameters and the expected joint position variables as parameters; updates the weights of the single-critique neural network to solve the approximate solution of the reconstructed Hamilton Jacobi Bellman equation; and then controls the collaborative robot. The present invention can overcome the problems of uneven angular velocity changes and acceleration jumps in the control process of the collaborative robot based on fifth-order polynomial trajectory planning and the single-critique neural network.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of robot trajectory planning and control algorithm, and in particular to an optimal control method, device, medium and product of a collaborative robot. Background Art

[0002] A collaborative robot is an intelligent robot system that can collaborate with humans or other robots to complete tasks. Depending on the configuration, it can be divided into single-arm robots and dual-arm robots. Collaborative robots have the ability to perceive, make decisions and execute, and have the characteristics of safe cooperation, flexible adaptation, human-computer interaction, multi-tasking and autonomous learning. They can work with humans in the same workspace to achieve efficient task completion. In recent years, collaborative robots have been successfully applied in fields such as home services, healthcare and industrial manufacturing. The research on collaborative robots is inseparable from the problem of tracking control. The premise for collaborative robots to achieve trajectory tracking is to use algorithms to obtain reasonable trajectory planning curves.

[0003] Trajectory planning is a basic research field of industrial robot motion control, which determines the robot's operating efficiency and motion performance. The trajectory planning of industrial robots can be divided into rectangular coordinate space and joint space. In addition, there are optimal trajectory planning such as time optimal, energy optimal and impact optimal. Joint space trajectory planning, as the name implies, refers to the use of appropriate algorithms to plan the required trajectory in the joint space. Since the robot's motion is directly controlled by the joints, trajectory planning in the joint space is simple to operate, the trajectory can be adjusted at any time, the real-time performance is high, and the amount of calculation is small. Once the trajectory planning is completed, tracking control will be performed. In order to achieve better trajectory tracking control, optimal control can be introduced. Optimal control is an important part of modern control theory. The core problem of its research is to select a suitable control strategy for a given controlled system to optimize certain performance indicators of the system. For collaborative robots, to obtain their optimal control strategy, it is necessary to solve the Bellman equation. This equation is a partial differential equation and is difficult to solve analytically. Adaptive dynamic programming (ADP) cleverly solves the problem of solving partial differential equations by fitting partial differential equations with neural networks and approximating the Hamilton-Jacobi Bellman equation. Summary of the invention

[0004] The purpose of the present invention is to provide a collaborative robot optimal control method, device, medium and product, which can overcome the problems of uneven angular velocity changes and acceleration jumps in the collaborative robot control process.

[0005] To achieve the above object, the present invention provides the following solutions:

[0006] An optimal control method for a collaborative robot, comprising:

[0007] Construct a dynamic model of the collaborative robot;

[0008] Construct a quintic polynomial trajectory planning curve based on the expected Cartesian space start and end points;

[0009] Determine the expected joint position variables based on the inverse kinematics principle and the fifth-order polynomial trajectory planning curve;

[0010] Construct the cost function and the Hamilton-Jacobi-Bellman equation;

[0011] The controller parameters and the expected joint position variables are used as parameters to construct a single-criteria neural network;

[0012] Reconstruct the cost function and the Hamilton Jacobi Bellman equation according to the weights of the single-judge neural network, and reconstruct an approximate solution to the Hamilton Jacobi Bellman equation based on the solution of the reconstructed cost function;

[0013] Determine the approximate solution of the reconstructed Hamilton Jacobi Bellman equation as the approximate optimal control law;

[0014] According to the approximate optimal control law and the dynamic model, determining the actual joint position variable corresponding to the approximate optimal control law;

[0015] Determine the absolute value of the difference between the actual joint position variable and the expected joint position variable as the position error;

[0016] When the position error reaches the position error threshold, the weight of the single-criteria neural network is updated and the process returns to the step of "reconstructing the cost function and the Hamilton Jacobi Bellman equation according to the weight of the single-criteria neural network, and obtaining the approximate solution of the Hamilton Jacobi Bellman equation based on the solution of the reconstructed cost function as the approximate optimal control law" until the position error is less than the position error threshold;

[0017] The approximate optimal control law at the last iteration is taken as the optimal control law, and the collaborative robot is controlled using the optimal control law.

[0018] Optionally, the kinetic model is:

[0019]

[0020] Among them, M as (θ) is the inertia matrix, θ is the joint position vector, is the joint acceleration vector, are the Coriolis force and centrifugal force terms, is the joint velocity vector, G ra (θ) is the gravity term and u is the control torque.

[0021] Optionally, the cost function is:

[0022] J * (s) is the cost function, v(s) is the additional utility term related to dynamic uncertainty, and s is the fusion error function; T is the transposed matrix of the fusion error function; u is the control torque; u T is the transposed matrix of the control torque; Q and R are positive definite matrices.

[0023] Alternatively, the Hamilton Jacobi-Bellman equation is:

[0024]

[0025] in, is the Hamiltonian function; Find the gradient of the cost function; is the transposed matrix of the cost function to find the gradient; λ is the synovial coefficient; is the drift dynamic matrix; B is the control input matrix; is the second derivative of the desired joint angle position; is the derivative of the actual joint angle position; is the derivative of the desired joint angle position.

[0026] Optionally, the cost function after reconstruction is:

[0027]

[0028] in, is the cost function after reconstruction; is the ideal weight W c The approximate weight of The transposed matrix of c (s) is the activation function.

[0029] Optionally, the reconstructed Hamilton Jacobi Bellman equation is:

[0030]

[0031] in, is the ideal weight W c The transposed matrix of c (s) is the approximation error of the neural network; is the derivative of the fusion error function.

[0032] Optionally, the approximate optimal control law is:

[0033]

[0034] in, is the approximate optimal control law; R -1 is the inverse matrix of the positive definite matrix R, A T(x) is the transpose of A(x) = λB; is the activation function δ c (s) Find the transposed matrix of the gradient.

[0035] A computer device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the optimal control method for a collaborative robot.

[0036] A computer-readable storage medium having a computer program stored thereon. Optionally, when the computer program is executed by a processor, the optimal control method for a collaborative robot is implemented.

[0037] A computer program product includes a computer program. Optionally, when the computer program is executed by a processor, it implements the optimal control method of a collaborative robot.

[0038] According to the specific embodiments provided by the present invention, the present invention discloses the following technical effects:

[0039] The present invention provides an optimal control method, device, medium and product for a collaborative robot. In terms of task requirements, a collaborative robot system is introduced, which has perception, decision-making and execution capabilities, and has the characteristics of safe cooperation, flexible adaptation, human-computer interaction, multi-tasking and autonomous learning. It can work collaboratively with humans in the same workspace to achieve efficient task completion; in terms of trajectory planning, a quintic polynomial trajectory planning algorithm is used to make the planning curve smooth and continuous; in terms of control torque, the control torque is more continuous and smooth, which can not only maintain the asymptotic stability of the system, but also reduce the energy loss of each joint, solving the problems of uneven angular velocity changes and acceleration jumps in cubic polynomial trajectory planning, and can meet the needs of various complex tasks. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0041] Figure 1 A flow chart of an optimal control method for a collaborative robot provided in Example 1 of the present invention;

[0042] Figure 2 This is a schematic diagram of the optimal control principle of a collaborative robot single-criteria neural network based on quintic polynomial trajectory planning provided in Example 2 of the present invention.

[0043] Figure 3 Flowchart of the optimal control method of a collaborative robot single-criteria neural network based on quintic polynomial trajectory planning provided in Example 2 of the present invention. DETAILED DESCRIPTION

[0044] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0045] The purpose of the present invention is to provide a collaborative robot optimal control method, device, medium and product, which can overcome the problems of uneven angular velocity changes and acceleration jumps in the collaborative robot control process.

[0046] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.

[0047] Example 1

[0048] like Figure 1 As shown, an optimal control method for a collaborative robot in this embodiment includes:

[0049] Step 101: Construct a dynamic model of the collaborative robot.

[0050] Step 102: construct a quintic polynomial trajectory planning curve according to the expected Cartesian space start and end points.

[0051] Step 103: Determine the expected joint position variables according to the inverse kinematics principle and the fifth-order polynomial trajectory planning curve.

[0052] Step 104: Construct the cost function and the Hamilton-Jacobi-Bellman equation.

[0053] Step 105: Construct a single-criteria neural network using controller parameters and expected joint position variables as parameters.

[0054] Step 106: reconstructing the cost function and the Hamilton-Jacobi-Bellman equation according to the weights of the single-criteria neural network, and reconstructing an approximate solution to the Hamilton-Jacobi-Bellman equation based on the solution of the reconstructed cost function.

[0055] Step 107: Determine that the approximate solution of the reconstructed Hamilton Jacobi Bellman equation is the approximate optimal control law. The word "approximate" in the approximate optimal control law is a modifier added to reflect the approximate solution in the naming. The approximate solution is a definite data, not a general and unclear description, so the approximate optimal control law is also a definite data.

[0056] Step 108: According to the approximate optimal control law and the dynamics model, the actual joint position variables corresponding to the approximate optimal control law are determined.

[0057] Step 109: Determine the absolute value of the difference between the actual joint position variable and the expected joint position variable as the position error.

[0058] Step 1010: When the position error reaches the position error threshold, update the weight of the single-criteria neural network and return to step 106 until the position error is less than the position error threshold.

[0059] Step 1011: The approximate optimal control law at the last iteration is used as the optimal control law, and the collaborative robot is controlled using the optimal control law.

[0060] Among them, the single-criteria neural network optimal control method, the dynamic model is:

[0061]

[0062] Among them, M as (θ) is the inertia matrix, θ is the joint position vector, is the joint acceleration vector, are the Coriolis force and centrifugal force terms, is the joint velocity vector, G ra (θ) is the gravity term and u is the control torque.

[0063] The cost function is:

[0064] J * (s) is the cost function, v(s) is the additional utility term related to dynamic uncertainty, and s is the fusion error function; T is the transposed matrix of the fusion error function; u is the control torque; u T is the transposed matrix of the control torque; Q and R are positive definite matrices.

[0065] The Hamilton Jacobi Bellman equation is:

[0066]

[0067] in, is the Hamiltonian function; Find the gradient of the cost function; is the transposed matrix of the cost function to find the gradient; λ is the synovial coefficient; is the drift dynamic matrix; B is the control input matrix; is the second derivative of the desired joint angle position; is the derivative of the actual joint angle position; is the derivative of the desired joint angle position.

[0068] The cost function after reconstruction is:

[0069]

[0070] in, is the cost function after reconstruction; is the ideal weight W c The approximate weight of The transposed matrix of c (s) is the activation function.

[0071] The reconstructed Hamilton Jacobi Bellman equation is:

[0072]

[0073] in, is the ideal weight W c The transposed matrix of ε. c (s) is the approximation error of the neural network. is the derivative of the fusion error function.

[0074] The approximate optimal control law is:

[0075]

[0076] in, is the approximate optimal control law; R -1 is the inverse matrix of the positive definite matrix R, A T (x) is the transpose of A(x) = λB; is the activation function δ c (s) Find the transposed matrix of the gradient.

[0077] Example 2

[0078] like Figure 2 As shown, in this embodiment, first, a quintic polynomial trajectory planning curve is obtained according to the expected Cartesian space start and end points, and the expected joint position variables are obtained by inverse kinematics, and then compared with the expected position variables according to the controller parameters and the expected dynamic information. The Hamiltonian function is approximated by establishing a single-criteria neural network, thereby further updating the neural network weights. The optimal control law u based on adaptive dynamic programming is obtained by the single-criteria neural network * (s).* (s) Combined with the dynamics model, the joint position variables are obtained, compared with the expected position variables to obtain the position error, and the neural network weights are updated.

[0079] like Figure 3 As shown in the figure, a single-critic neural network optimal control method for collaborative robots based on quintic polynomial trajectory planning is proposed. This method first establishes the dynamic model of the collaborative robot system, then uses the quintic polynomial to construct the trajectory planning curve, and then constructs the cost function and Hamiltonian function equation. The cost function is approximated based on the single-critic neural network and the optimal control law is obtained. Finally, the effectiveness of the proposed control method is verified through simulation.

[0080] 1. Establishment of dynamic model.

[0081] The dynamics model of the collaborative robot system is established as follows:

[0082]

[0083] In the above formula, u represents the control torque, θ represents the joint position vector, represents the joint velocity vector, Represents the joint acceleration vector, M as (θ) represents the inertia matrix, Represents the Gordian and centrifugal force terms, G ra (θ) represents the gravity term.

[0084] make Then the collaborative robot system dynamics model shown in (1) can be transformed into the following state space expression:

[0085]

[0086] in, represents the derivative of the joint position vector, i.e. the joint velocity, represents the derivative of the joint velocity vector, i.e. the joint acceleration vector, y represents the joint position vector, B(x) represents drift dynamics and control input respectively, and has:

[0087]

[0088] 2. Construction of trajectory planning curve.

[0089] Step 2: Use the quintic polynomial to construct the trajectory planning curve. The expressions of joint position, velocity and acceleration are as follows:

[0090]

[0091] Among them, a, b, c, d, e, and f all represent unknown coefficients.

[0092] Use t s and t m They represent the start time and the end time respectively. The joint angle position, velocity and acceleration at the start time and the end time are known, as shown below:

[0093]

[0094] The solution is:

[0095]

[0096] Knowing the joint position, velocity and acceleration at the start and end time, we can get an ideal trajectory with smooth angular velocity changes and continuous acceleration.

[0097] 3. Construction of cost function and Hamiltonian function.

[0098] The cost function is constructed as follows:

[0099]

[0100] in, Represents the fusion error function, e1=x1-x 1d represents the position error, x1 represents the actual joint angle position, represents the derivative of the actual joint angle position, x 1d =θ(t) represents the desired joint angle position, represents the derivative of the desired joint angle position, λ represents the synovial coefficient, represents the derivative of the fusion error function, and u represents the control torque.

[0101] Q and R are positive definite matrices, Represents the optimal cost function to find the gradient.

[0102] Write out the Lyapunov expression as follows:

[0103]

[0104] in, Represents the cost function to find the gradient. When u(x)∈R,J(0)=0, the Hamiltonian function is defined as follows:

[0105]

[0106] The optimal cost function is defined as:

[0107]

[0108] Then the Hamilton Jacobi Bellman (HJB) equation is:

[0109]

[0110] Get the optimal control strategy:

[0111] Among them, A(x)=λB.

[0112] 4. Approximate implementation of cost function based on single-critic neural network.

[0113] The cost function J(s) is approximated using a single-criteria neural network, which is defined as follows:

[0114]

[0115] Among them, W c is the ideal weight vector; ε c is the approximation error of the neural network, δ c is the activation function. The gradient of J(s) is approximated by the neural network as:

[0116]

[0117] in: and Represent the gradients of the activation function and the approximation error respectively.

[0118] The HJB equation of the system can be rewritten as:

[0119]

[0120] Substituting (14) into (11), the Hamiltonian equation is transformed as follows:

[0121]

[0122] Among them, e Jh Represents the approximation residual of the neural network. Due to the ideal weight W c is unknown, so use approximate weights Establish a cost function based on a single-critic neural network to estimate:

[0123]

[0124] Derivative (16) yields

[0125]

[0126] The approximate Hamiltonian function is as follows:

[0127]

[0128] Among them, eJ Represents the approximate value of the approximation residual of the neural network and defines the objective function:

[0129] Using the gradient descent method we get:

[0130]

[0131] Among them, α is the update rate of the neural network.

[0132] The approximate error of the weights is:

[0133]

[0134] Using (16), (19) and (20), we can infer that:

[0135]

[0136] The dynamic weight approximation error is:

[0137]

[0138] The optimal control ratio is transformed into the following:

[0139]

[0140] Then the approximate optimal control law is:

[0141]

[0142] 5. Simulation verification.

[0143] The effectiveness of the proposed single-criteria neural network optimal control method based on quintic polynomial estimation planning is verified, and a two-degree-of-freedom collaborative robot model is simulated and verified. The expression of the robot's terminal trajectory in the rectangular coordinate space is obtained based on the quintic polynomial algorithm.

[0144]

[0145] The expressions of the two joint angles changing with time in the joint space are obtained by inverse kinematics:

[0146]

[0147] Matlab simulation results show that the proposed single-criteria neural network optimal control method based on quintic polynomial estimation planning can make the trajectory planning curve smooth and continuous, and can meet the needs of various complex tasks.

[0148] Example 3

[0149] A computer device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of a collaborative robot optimal control method in Example 1.

[0150] Example 4

[0151] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of a collaborative robot optimal control method in Example 1.

[0152] Example 5

[0153] A computer program product includes a computer program, which, when executed by a processor, implements the steps of an optimal control method for a collaborative robot in Example 1.

[0154] Example 6

[0155] A computer device, which may be a database. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected via a system bus, and the communication interface is connected to the system bus via the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store pending transactions. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, a collaborative robot optimal control method in Example 1 is implemented.

[0156] It should be noted that the object information (including but not limited to object device information, object personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in the present invention are all information and data authorized by the object or fully authorized by all parties, and the collection, use and processing of relevant data need to comply with relevant laws, regulations and standards of relevant countries and regions.

[0157] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided by the present invention can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided by the present invention may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited thereto. The processor involved in each embodiment provided by the present invention may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited thereto.

[0158] The technical features of the above embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0159] The principles and implementation methods of the present invention are described in this article using specific examples. The description of the above embodiments is only used to help understand the method and core idea of ​​the present invention. At the same time, for those skilled in the art, according to the idea of ​​the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting the present invention.

Claims

1. A collaborative robot optimal control method, characterized in that: include: Construct a dynamic model of the collaborative robot; the dynamic model is: Among them, M as (θ) is the inertia matrix, θ is the joint position vector, is the joint acceleration vector, are the Coriolis force and centrifugal force terms, is the joint velocity vector, G ra (θ) is the gravity term, u is the control torque; Construct a quintic polynomial trajectory planning curve based on the expected Cartesian space start and end points; Determine the expected joint position variables based on the inverse kinematics principle and the fifth-order polynomial trajectory planning curve; Construct a cost function and a Hamilton Jacobi Bellman equation; the cost function is: J * (s) is the cost function, v(s) is the additional utility term related to dynamic uncertainty, and s T is the transposed matrix of the fusion error function; u T is the transposed matrix of the control torque; Q and R are positive definite matrices; s is the fusion error function, Represents the fusion error function, e1=x1-x 1d represents the position error, x1 represents the actual joint angle position, represents the derivative of the actual joint angle position, x 1d =θ(t) represents the desired joint angle position, is the derivative of the desired joint angle position, λ represents the synovial coefficient, Represents the derivative of the fusion error function; is the second derivative of the desired joint angle position; The Hamilton Jacobi Bellman equation is: in, is the Hamiltonian function; Find the gradient of the cost function; The transposed matrix for finding the gradient of the cost function; is the drift dynamic matrix; B is the control input matrix; The controller parameters and the expected joint position variables are used as parameters to construct a single-critic neural network; Reconstruct the cost function and the Hamilton Jacobi Bellman equation according to the weights of the single-judge neural network, and reconstruct an approximate solution to the Hamilton Jacobi Bellman equation based on the solution of the reconstructed cost function; It is determined that the approximate solution of the reconstructed Hamilton Jacobi Bellman equation is the approximate optimal control law; the approximate optimal control law is: in, is the approximate optimal control law; R -1 is the inverse matrix of the positive definite matrix R, A T (x) is the transpose of A(x) = λB; is the activation function δ c (s) Find the transposed matrix of the gradient; According to the approximate optimal control law and the dynamic model, determining the actual joint position variable corresponding to the approximate optimal control law; Determine the absolute value of the difference between the actual joint position variable and the expected joint position variable as the position error; When the position error reaches the position error threshold, the weight of the single-criteria neural network is updated and the process returns to step "reconstructing the cost function and the Hamilton Jacobi Bellman equation according to the weight of the single-criteria neural network, and obtaining the approximate solution of the reconstructed Hamilton Jacobi Bellman equation based on the solution of the reconstructed cost function as the approximate optimal control law" until the position error is less than the position error threshold; The approximate optimal control law at the last iteration is used as the optimal control law, and the collaborative robot is controlled using the optimal control law; Construct a quintic polynomial trajectory planning curve, including: The trajectory planning curve is constructed using a quintic polynomial. The expressions for joint position, velocity, and acceleration are as follows: Among them, a, b, c, d, e, and f all represent unknown coefficients; Get the joint position, velocity and acceleration at the start time, as well as the joint position, velocity and acceleration at the end time Substitute into the formula In the solution Then determine the fifth-order polynomial trajectory planning curve; t s Indicates the start time; t m Indicates the termination time; the angular velocity of the quintic polynomial trajectory planning curve changes smoothly and the acceleration is continuous.

2. The optimal control method of a collaborative robot according to claim 1, characterized in that: The cost function after reconstruction is: in, is the cost function after reconstruction; is the ideal weight W c The approximate weight of The transposed matrix of .

3. The optimal control method of a collaborative robot according to claim 2, characterized in that: The reconstructed Hamilton Jacobi Bellman equation is: in, is the ideal weight W c The transposed matrix of c (s) is the approximation error of the neural network.

4. A computer device comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement an optimal control method for a collaborative robot as described in any one of claims 1-3.

5. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, an optimal control method for a collaborative robot according to any one of claims 1 to 3 is implemented.

6. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, an optimal control method for a collaborative robot according to any one of claims 1 to 3 is implemented.