A method and device for inverse control of a robotic arm based on a diffusion model

Through the inverse solution control method of the manipulator based on the diffusion model, standard Gaussian distribution noise and hole position information are used to optimize network updates, solving the multi-valued problem in solving the inverse kinematics of the high-degree-of-freedom manipulator, and achieving more efficient trajectory planning and The smooth movement improves the hole-seeking accuracy and efficiency of the trolley.

CN118163112BActive Publication Date: 2024-09-10LIGHT IMAGE (BEIJING) TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410470434.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-04-18
Publication Date
2024-09-10
Estimated Expiration
2044-04-18

AI Technical Summary

Technical Problem

With the existing technology, it is difficult to efficiently obtain multiple sets of solutions and conduct reasonable trajectory planning in the inverse kinematics solution of high-degree-of-freedom manipulators, which affects the efficiency and accuracy of the robot's hole seeking.

Method used

An inverse solution control method for the manipulator based on the diffusion model is adopted. By constructing a diffusion model network, standard Gaussian distribution noise and hole position information are used to optimize target-driven network updates and achieve multimodal distribution and trajectory planning of joint variables.

Benefits of technology

It improves the accuracy of inverse kinematics solution, ensures the smoothness and smoothness of motion, generates multiple sets of different joint postures corresponding to the same target hole position, and enhances the hole-seeking efficiency and accuracy of the trolley.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118163112B
    Figure CN118163112B
Patent Text Reader

Abstract

The present invention relates to the field of mechanical arm control, and in particular to a mechanical arm inverse solution control method and device based on a diffusion model, the method comprising: obtaining target hole position data of a drilling rig arm to be controlled, inputting it into a trained drilling rig arm inverse solution control model, and obtaining various joint variables of the drill arm; according to each joint variable, obtaining a trajectory planning result, and completing the control of the drilling rig arm. The present invention has the advantages of a wide range of applications (data source real environment, no need to construct other label data), high precision (hole-finding objective function constantly approaches actual hole position coordinates), multiple options (multiple groups of different joint postures can correspond to the same target hole position), and high computational efficiency (compared with the traditional numerical method for inverse solution, the neural network solution speed can reach millisecond level), breaking through the bottlenecks of low precision, high-dimensional solution difficulty, and sudden change in motion speed in the existing unmanned drilling rig arm control inverse kinematics solution.
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 arm control, and in particular to a robot arm inverse control method and device based on a diffusion model. Background Art

[0002] The drilling rig is the core equipment for underground mines and tunnel drilling and blasting construction. Its main function is to position the drilling tool and perform drilling operations through the drill arm. Before the drilling operation, the control system adjusts the position or angle of each joint of the drill arm to align its end effector (drill bit) with the preset blast hole posture on the tunnel or tunnel face, which is the hole-finding control process. Inverse kinematics solution is the core of realizing accurate and fast hole-finding control of the drill arm. Its task is to calculate the angle and position of each joint according to the target posture information and provide a control reference target for the hydraulic actuator of the drill arm. Due to the complex requirements of the drilling operation on the working face, the drill arm must have multi-degree-of-freedom characteristics (usually more than eight degrees of freedom), which makes its inverse kinematics solution more cumbersome. Therefore, solving the appropriate joint posture has great potential in reducing enterprise production costs, reducing production safety accidents and improving production efficiency. At present, the main methods for inverse kinematics of manipulators include analytical methods, numerical methods, heuristic algorithms and learning methods. Among them, the analytical method is suitable for manipulators with specific structures between joints. It solves by constructing analytical equations of inverse kinematics. This method has high computational efficiency but poor versatility. The numerical method uses iterative calculation to gradually approach the target position and posture. This method has a wide range of applications, but the solution efficiency is relatively low. The heuristic algorithm relies on experience and heuristic information to guide the search for the optimal solution by simulating some biological or physical phenomena. This method is simple in structure, flexible and efficient, but its performance is highly dependent on parameter settings, and it is difficult to find the global optimal solution. The learning method adjusts the weight parameters in the neural network according to sample information and feedback information, constructs a mapping relationship, and automatically maps the corresponding joint values ​​through the neural network after inputting the redundant manipulator end effector posture to achieve inverse kinematics solution. This method has high solution accuracy and fast speed, but it relies on data set support and has the problem of mismatch between network input information and actual operation information.

[0003] In recent years, with the continuous development of diffusion model technology, the diffusion strategy generated by it has been widely used in the fields of image generation, optimal control, etc., which also provides a new research direction for solving the inverse kinematics problem of redundant mechanisms. At present, when solving the inverse kinematics of high-degree-of-freedom manipulators, we still face the situation that we cannot efficiently obtain multiple sets of solutions and reasonably plan trajectories. The given end-position input corresponds to a single joint output, which may ignore some other suitable joint positions, thereby affecting the efficiency and accuracy of the trolley hole finding. Summary of the invention

[0004] In order to solve the technical problem of how to improve the accuracy of inverse kinematics solution of the trolley drill arm and the stability of the motion process in the prior art, an embodiment of the present invention provides a method and device for inverse solution control of a mechanical arm based on a diffusion model. The technical solution is as follows:

[0005] On the one hand, a method for inverse control of a manipulator based on a diffusion model is provided, the method being implemented by an inverse control device for the manipulator, the method comprising:

[0006] S1. Obtain target hole position data of the drill arm of the rock drilling rig to be controlled.

[0007] S2. Input the target hole position data into the trained inverse control model of the drilling rig drill arm.

[0008] S3. Obtain the joint variables of the drill arm according to the target hole position data and the inverse control model of the drill arm of the rock drilling rig.

[0009] S4. According to the variables of each joint, the trajectory planning result is obtained to complete the control of the drilling rig's drill arm.

[0010] Optionally, the construction process of the inverse solution control model of the drilling rig arm in S2 includes:

[0011] S21, obtaining parameter data of the drill arm of the rock drilling rig, and obtaining the posture and position of the end effector of the drill arm according to the parameter data and the DH matrix method.

[0012] S22. Construct a diffusion model input according to the posture and position of the end effector of the drill arm.

[0013] The diffusion model input includes hole position information input and standard Gaussian distribution noise input.

[0014] S23. Build a diffusion model network based on the diffusion model input.

[0015] S24. Construct a hole-finding error function based on the diffusion model network.

[0016] S25. Update the diffusion model network parameters according to the hole-finding error function until the diffusion model network converges, and obtain a trained inverse solution control model of the drilling rig's drill arm.

[0017] Optionally, obtaining parameter data of the drilling rig boom in S21, and obtaining the posture and position of the end effector of the drilling boom according to the parameter data and the DH matrix method, includes:

[0018] S211, obtaining parameter data of the drill boom of the rock drilling rig, establishing a DH coordinate system for each connecting rod of the drill boom according to the parameter data and the DH matrix method, and then obtaining DH parameter information of the drill boom.

[0019] S212. According to the DH coordinate system and DH parameter information, the homogeneous transformation matrix of each connecting rod is obtained, as shown in the following formula (1):

[0020]

[0021] Where: represents the homogeneous transformation matrix of each connecting rod, n represents the number of connecting rods of the drill arm, Rst(X, a n-1 ) represents the rotation matrix of each link around the x-axis, α n Represents the joint torsion angle, Rot(Z, θ n ) represents the rotation matrix of each link around the z axis, θ n represents the joint angle, Trans(X,a n-1 ) represents the translation matrix of each link along the x-axis, a n Indicates the connecting rod length, Trans(Z,d n ) represents the translation matrix of each link along the z-axis, d n Indicates the connecting rod offset.

[0022] S213, establishing a transformation method of the end effector of the drill arm relative to the base coordinate system.

[0023] S214 . Obtain a transformation matrix of the posture of the end effector according to the homogeneous transformation matrix and the conversion method, and obtain the posture and position of the end effector according to the transformation matrix.

[0024] Among them, the transformation matrix of the end effector's posture is shown in the following formula (2):

[0025]

[0026] Where: The transformation matrix representing the posture of the end effector, [n, o, a] represents the rotation matrix of the end effector of the drill arm relative to the base coordinate system, which is used to obtain the direction vector of the drill bit relative to the base coordinate system, x represents the x-axis, y represents the y-axis, z represents the z-axis, [x drill , Y drill , Z drill ] T represents the position of the end effector of the drill arm relative to the base coordinate system, x drill represents the x-axis coordinate of the end effector in the DH coordinate system, y drill represents the y-axis coordinate of the end effector in the DH coordinate system, z drill Represents the Z-axis coordinate of the end effector in the DH coordinate system.

[0027] Optionally, the hole position information input in S22 is as shown in the following formula (3):

[0028] [x1,y1,z1] T =[x drill ,y drill ,z drill ] T

[0029]

[0030] s=[(x1,y1,z1),(x2,y2,z2)] T (3)

[0031] Where: (x1, y1, z1) represents the coordinates of the starting point of the drilling, T represents the transpose of the matrix, [x drill ,y drill , z drill ] T represents the position of the end effector of the drill arm relative to the base coordinate system, (x2, y2, z2) represents the coordinates of the end point of the drilling, [n, o, a] represents the rotation matrix of the end effector of the drill arm relative to the base coordinate system, x represents the x-axis, y represents the y-axis, z represents the z-axis, depth represents the depth of the hole, and s represents the hole position information input.

[0032] Optionally, the diffusion model network in S23 is as shown in the following formula (4):

[0033]

[0034] Where: joint k represents the standard Gaussian distribution noise input, k represents the time series, α k =1-β k , β k Indicates time-related information. Represents α k Continuous multiplication from 1 to k, π θ represents the strategy to be learned, s represents the hole position information input, represents ∈ standard normal distribution, and I represents variance 1.

[0035] Optionally, the hole-finding error function in S24 is as shown in the following formula (5):

[0036]

[0037] Where: l pos represents the hole-finding error function, represents the mathematical expectation of each batch error, s represents the hole position information input, F represents the forward kinematics operation, joint 0 represents the model output, and θ represents the model parameters.

[0038] Optionally, in S4, a trajectory planning result is obtained according to each joint variable to complete the control of the drilling rig boom, including:

[0039] The fifth-order polynomial interpolation is performed on each joint variable. According to the interpolated joint variables and the set movement time of each joint, the trajectory planning result is obtained to complete the control of the drill arm of the rock drilling rig.

[0040] On the other hand, a diffusion model-based inverse control device for a robotic arm is provided, and the device is applied to a diffusion model-based inverse control method for a robotic arm, and the device comprises:

[0041] The acquisition module is used to acquire the target hole position data of the drill arm of the rock drilling rig to be controlled.

[0042] The input module is used to input the target hole position data into the trained inverse control model of the drilling rig drill arm.

[0043] The model output module is used to obtain the joint variables of the drill arm according to the target hole position data and the inverse control model of the drill arm of the rock drilling rig.

[0044] The output module is used to obtain trajectory planning results based on various joint variables and complete the control of the drilling rig's drill arm.

[0045] Optionally, the input module is further configured to:

[0046] S21, obtaining parameter data of the drill arm of the rock drilling rig, and obtaining the posture and position of the end effector of the drill arm according to the parameter data and the DH matrix method.

[0047] S22. Construct a diffusion model input according to the posture and position of the end effector of the drill arm.

[0048] The diffusion model input includes hole position information input and standard Gaussian distribution noise input.

[0049] S23. Build a diffusion model network based on the diffusion model input.

[0050] S24. Construct a hole-finding error function based on the diffusion model network.

[0051] S25. Update the diffusion model network parameters according to the hole-finding error function until the diffusion model network converges, and obtain a trained inverse solution control model of the drilling rig's drill arm.

[0052] Optionally, the input module is further configured to:

[0053] S211, obtaining parameter data of the drill boom of the rock drilling rig, establishing a DH coordinate system for each connecting rod of the drill boom according to the parameter data and the DH matrix method, and then obtaining DH parameter information of the drill boom.

[0054] S212. According to the DH coordinate system and DH parameter information, the homogeneous transformation matrix of each connecting rod is obtained, as shown in the following formula (1):

[0055]

[0056] Where: represents the homogeneous transformation matrix of each connecting rod, n represents the number of connecting rods of the drill arm, Rot(X, α n-1 ) represents the rotation matrix of each link around the x-axis, α n Represents the joint torsion angle, Rot(Z, θ n ) represents the rotation matrix of each link around the z axis, θ n represents the joint angle, Trans(X, a n-1 ) represents the translation matrix of each link along the x-axis, a n Indicates the connecting rod length, Trans(Z,d n ) represents the translation matrix of each link along the z-axis, d n Indicates the connecting rod offset.

[0057] S213, establishing a transformation method of the end effector of the drill arm relative to the base coordinate system.

[0058] S214 . Obtain a transformation matrix of the posture of the end effector according to the homogeneous transformation matrix and the conversion method, and obtain the posture and position of the end effector according to the transformation matrix.

[0059] Among them, the transformation matrix of the end effector's posture is shown in the following formula (2):

[0060]

[0061] Where: The transformation matrix representing the posture of the end effector, [n, o, a] represents the rotation matrix of the end effector of the drill arm relative to the base coordinate system, which is used to obtain the direction vector of the drill bit relative to the base coordinate system, x represents the x-axis, y represents the y-axis, z represents the z-axis, [x drill ,y drill, z drill ] T represents the position of the end effector of the drill arm relative to the base coordinate system, x drill represents the x-axis coordinate of the end effector in the DH coordinate system, y drill represents the y-axis coordinate of the end effector in the DH coordinate system, z drillRepresents the z-axis coordinate of the end effector in the DH coordinate system.

[0062] Optionally, the hole position information is input as shown in the following formula (3):

[0063] [x1, y1, z1] T =[x drill ,y drill , z drill ] T

[0064]

[0065] s=[(x1, y1, z1), (x2, y2, z2)] T (3)

[0066] Where: (x1, y1, z1) represents the coordinates of the starting point of the drilling, T represents the transpose of the matrix, [x drill ,y drill , z drill ] T represents the position of the end effector of the drill arm relative to the base coordinate system, (x2, y2, z2) represents the coordinates of the end point of the drilling, [n, o, a] represents the rotation matrix of the end effector of the drill arm relative to the base coordinate system, x represents the x-axis, y represents the y-axis, z represents the z-axis, depth represents the depth of the hole, and s represents the hole position information input.

[0067] Optionally, the diffusion model network is as shown in the following formula (4):

[0068]

[0069] Where: joint k represents the standard Gaussian distribution noise input, k represents the time series, α k =1-β k , β k Indicates time-related information. Represents α k Continuous multiplication from 1 to k, π θ represents the strategy to be learned, s represents the hole position information input, represents ∈ standard normal distribution, and I represents variance 1.

[0070] Optionally, the hole-finding error function is as shown in the following formula (5):

[0071]

[0072] Where: l pos represents the hole-finding error function, represents the mathematical expectation of each batch error, s represents the hole position information input, F represents the forward kinematics operation, joint 0 represents the model output, and θ represents the model parameters.

[0073] Optionally, the output module is further configured to:

[0074] The fifth-order polynomial interpolation is performed on each joint variable. According to the interpolated joint variables and the set movement time of each joint, the trajectory planning result is obtained to complete the control of the drill arm of the rock drilling rig.

[0075] On the other hand, a robot arm inverse control device is provided, which includes: a processor; a memory, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, any one of the above-mentioned diffusion model-based robot arm inverse control methods is implemented.

[0076] On the other hand, a computer-readable storage medium is provided, wherein at least one instruction is stored in the storage medium, and the at least one instruction is loaded and executed by a processor to implement any one of the above-mentioned diffusion model-based robotic arm inverse control methods.

[0077] The beneficial effects brought about by the technical solution provided by the embodiment of the present invention include at least:

[0078] In an embodiment of the present invention, coordinate information consistent with the actual tunnel is established as a data set of the diffusion model. Different from the data obtained by the traditional neural network model through the forward kinematics of joint variables, the data is more realistic and has a simple structure. The present invention designs the structure of the diffusion model, and uses the information of known target blastholes to encourage the standard normally distributed noise to be restored to joint quantities, thereby realizing the reconstruction of data samples. The present invention constructs an inverse kinematics solution for the diffusion model, and optimizes the target drive network update by constructing the difference between the target hole position and the inverse kinematics hole position, thereby greatly improving the accuracy of the inverse kinematics solution. The present invention constructs the trajectory planning curve of each joint, and ensures continuity without mutation in terms of angular displacement, angular velocity and angular acceleration, thereby realizing the smoothness and smoothness of the motion. BRIEF DESCRIPTION OF THE DRAWINGS

[0079] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. 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 creative work.

[0080] Figure 1 is a flow chart of a method for inverse control of a robotic arm based on a diffusion model provided by an embodiment of the present invention;

[0081] Figure 2 It is a schematic diagram of the overall flow chart of the inverse control method of a mechanical arm based on a diffusion model provided by an embodiment of the present invention;

[0082] Figure 3 is a schematic diagram of an input data set of a diffusion model-based inverse control method for a robotic arm provided in an embodiment of the present invention;

[0083] Figure 4 is a schematic diagram of a hole-finding error curve of a diffusion model-based inverse control method for a robotic arm provided in an embodiment of the present invention;

[0084] Figure 5 is a joint motion curve (I) of the inverse control method of a robotic arm based on a diffusion model provided by an embodiment of the present invention;

[0085] Figure 6 is a joint motion curve (II) of the inverse control method of a robotic arm based on a diffusion model provided by an embodiment of the present invention;

[0086] Figure 7 is a joint motion curve (III) of the inverse control method of a robotic arm based on a diffusion model provided by an embodiment of the present invention;

[0087] Figure 8 It is a block diagram of a mechanical arm inverse control device based on a diffusion model provided by an embodiment of the present invention;

[0088] Fig. 9 It is a structural schematic diagram of a robotic arm inverse control device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0089] The technical solution of the present invention is described below in conjunction with the accompanying drawings.

[0090] In the embodiments of the present invention, words such as "exemplarily" and "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "example" in the present invention should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of the word "example" is intended to present the concept in a specific way. In addition, in the embodiments of the present invention, the meaning expressed by "and / or" can be both, or it can be either of the two.

[0091] In the embodiments of the present invention, "image" and "picture" can sometimes be used interchangeably. It should be noted that when the difference between them is not emphasized, the meanings they intend to express are the same. "of", "corresponding, relevant" and "corresponding" can sometimes be used interchangeably. It should be noted that when the difference between them is not emphasized, the meanings they intend to express are the same.

[0092] In the embodiments of the present invention, sometimes a subscript such as W1 may be expressed in a non-subscript form such as W1. When the difference is not emphasized, the meanings to be expressed are consistent.

[0093] In order to make the technical problems, technical solutions and advantages to be solved by the present invention more clear, a detailed description will be given below with reference to the accompanying drawings and specific embodiments.

[0094] The embodiment of the present invention provides a method for inverse control of a robotic arm based on a diffusion model. The method can be implemented by an inverse control device for the robotic arm, which can be a terminal or a server. Figure 1 The flowchart of the inverse control method of the manipulator based on the diffusion model is shown in FIG. 1 . The processing flow of the method may include the following steps:

[0095] S1. Obtain target hole position data of the drill arm of the rock drilling rig to be controlled.

[0096] S2. Input the target hole position data into the trained inverse control model of the drilling rig drill arm.

[0097] Optionally, the process of constructing the inverse solution control model of the drilling rig boom in S2 may include the following steps S21-S25:

[0098] S21, obtaining parameter data of the drill arm of the rock drilling rig, and obtaining the posture and position of the end effector of the drill arm according to the parameter data and the DH matrix method.

[0099] Optionally, the above step S21 may include the following steps S211-S214:

[0100] S211, obtaining parameter data of the drill boom of the rock drilling rig, establishing a DH coordinate system for each connecting rod of the drill boom according to the parameter data and the DH matrix method, and then obtaining DH parameter information of the drill boom.

[0101] First, for ease of understanding, the relevant terms of the diffusion model are explained.

[0102] The dataset is the basis for training and testing diffusion models. It is a collection of reference information required by the real physical world. Gaussian noise is a common type of random noise, also known as Gaussian distribution noise or normal distribution noise. It is a random signal generated by a normal distribution (also known as a Gaussian distribution). Model strategy refers to a method of building, training, and evaluating models to solve specific problems or achieve specific goals. Model strategy covers the entire process from data preprocessing to model selection, training, and evaluation. The loss function is a function used to measure the difference between the model prediction and the actual target. The main purpose of the loss function is to quantify the performance of the model and help the model learn to adjust parameters to minimize the prediction error.

[0103] In the present invention, the data set can be the entire blasthole position composed of the actual working space of the drill arm, or it can be the active range of the end of the drill arm obtained by performing positive kinematic operations on a given joint motion range. The model strategy is to learn the output and output of a given task based on the parameterization process of a multi-layer perceptron. The input is known physical information and arbitrary standard Gaussian noise, and the output is joint structure information that can achieve the hole-finding target. The result of the loss function calculation is a scalar value, which represents the difference between the positive kinematic hole position information of the high-dimensional joint variables output by the network model and the target hole position value. A lower loss value indicates better model performance, while a higher loss value indicates poor model performance. Back propagation is the process of neural network training, which adjusts the network weights and biases by calculating the gradient of the above-mentioned loss function to reduce the prediction error. This is an iterative process, and the network gradually learns better parameters by back-propagating the error signal.

[0104] The inverse kinematics solution and trajectory planning method of the drilling rig arm is constructed under the diffusion model framework, aiming to obtain more appropriate rig joint reference information based on the actual hole-finding target information in a more realistic and flexible way. The solution process includes two important indicators, namely, multi-solution and accuracy. Multi-solution means that the target hole position of the same end effector can correspond to multiple sets of joint quantities at different positions; accuracy refers to the difference between the predicted hole position and the actual hole position during the solution process. Often a good model can output joint variables that meet the conditions.

[0105] In a feasible implementation, based on the known range of changes in each joint of the drill arm of the actual rock drilling rig, the forward kinematic model of the end effector relative to the base coordinate system is established by utilizing the posture and joint changes between each connecting rod; based on the DH method, the DH parameter information of each joint is listed, and the homogeneous transformation matrix of each connecting rod is derived, thereby obtaining the transformation matrix of the end posture.

[0106] Specifically, Figure 2As shown in the figure, the drill arm of the known rock drilling trolley belongs to a multi-degree-of-freedom redundant mechanism, and the structure can be regarded as a multi-link series. In order to determine whether the end of the drill arm has reached the target point, it is necessary to calculate the end position of the drill arm based on the current joint posture information. According to the DH matrix method, the x, y, and z axis coordinate systems are established for each link of the drill arm. For the moving joint, the link offset d is the joint variable; for the rotating joint, the joint angle θ is the joint variable; the joint torsion angle α and the link length a are determined by the specific drill arm parameters. The DH coordinate system of the drill arm is unified with the geodetic coordinate system where the trolley is located, and the position of each joint is intuitively obtained.

[0107] S212. After establishing the DH parameter table by combining the relevant parameters and constraint relationships of the drill boom structure, the homogeneous transformation matrix of each connecting rod can be derived according to the established DH coordinate system and the given DH parameters. for:

[0108]

[0109] Where: represents the homogeneous transformation matrix of each connecting rod, n represents the number of connecting rods of the drill arm, Rot(X,α n-1 ) represents the rotation matrix of each link around the x-axis, α n Represents the joint torsion angle, Rot(Z, θ n ) represents the rotation matrix of each link around the z axis, θ n represents the joint angle, Trans(X, a n-1 ) represents the translation matrix of each link along the x-axis, a n Indicates the connecting rod length, Trans(Z, d n ) represents the translation matrix of each link along the z-axis, d n Indicates the connecting rod offset.

[0110] S213, establishing a transformation method of the end effector of the drill arm relative to the base coordinate system, as shown in the following formula (2):

[0111]

[0112] S214, obtaining a transformation matrix of the end posture according to the homogeneous transformation matrix and the conversion method, and obtaining the posture and position of the end effector according to the transformation matrix.

[0113] Taking an eight-degree-of-freedom robotic arm as an example, the transformation matrix of the end posture is as shown in the following formula (3):

[0114]

[0115] Where: The transformation matrix representing the terminal posture, [n, o, a] represents the rotation matrix of the eighth joint end (drill arm end) relative to the base coordinate system, which can be used to obtain the direction vector of the drill bit relative to the base coordinate system, indicating its direction relative to the base coordinate system, x represents the x-axis, y represents the y-axis, z represents the z-axis, [x drill ,y drill ,z drill ] T Indicates the position of the eighth joint drill arm end (drill arm end) relative to the base coordinate system, x drill ,y drill 、z drill They respectively represent the coordinates of the drill arm end actuator in the DH coordinate system.

[0116] S22. Construct a diffusion model input according to the posture and position of the end effector of the drill arm.

[0117] The diffusion model input includes hole position information input and standard Gaussian distribution noise input.

[0118] Optionally, the main information that needs to be paid attention to in the actual drilling process is the starting point and the end point of the hole. Therefore, combined with the drilling depth, it is necessary to construct a six-dimensional input in the diffusion model solution process. The calculation method is as follows:

[0119] [x1,y1,z1] T =[x drill ,y drill , z drill ] T

[0120]

[0121] Where: (x1, y1, z1) represents the coordinates of the starting point of the drilling, such as Figure 3 As shown, the drilling end point is along the rotation matrix direction vector of the end effector, [x drill ,y drill , z drill ] T It represents the position of the end effector of the drill arm relative to the base coordinate system. T represents the transpose of the matrix, which is often represented in transposed form in coordinate operations. (x2, y2, z2) represents the coordinates of the end point of the borehole. [n, o, a] represents the rotation matrix of the end effector of the drill arm relative to the base coordinate system. x represents the x-axis, y represents the y-axis, z represents the z-axis, and depth represents the depth of the hole, which can be up to 3.5m. The position of the end point is solved by the projection of the rotation matrix in the z-axis direction.

[0122] The coordinates of the starting point and the end point are combined to form a six-dimensional input, which is expressed as:

[0123] s=[(x1,y1,z1),(x2,y2,z2)] T (5)

[0124] Furthermore, standard Gaussian distribution noise input: When inputting hole position information, it is necessary to follow the standard normal distribution For an 8-DOF robot, the input is an 8-dimensional vector of noise, corresponding to eight groups of joints.

[0125] S23. Build a diffusion model network based on the diffusion model input.

[0126] Optionally, after the model input is given, it is necessary to use a neural network for parameterized operations. In order to fit complex nonlinear functions, a multi-layer feedforward network is selected as the network type, in which the hidden layer is designed to be at least three layers, and each layer contains multiple nodes. In the network structure of this model, the Mish function is selected as the activation function of each hidden layer, which can show good robustness in more data sets. The optimizer chooses to use the Adam optimizer to handle linear regression problems, and the adaptive gradient changes the parameter update step size; the learning rate is set to linear annealing through the scheduler. During the training process, the oscillation is continuously reduced and the accuracy is improved.

[0127] Taking the given hole position state information s as the condition of the diffusion model, its strategy learning process is expressed as:

[0128]

[0129] Where: π is the strategy to be learned, joint K is the Gaussian noise input of the model, joint 0 is the joint finally output by the model, p θ (joint k-1 |joint k , s) is the distribution shaped by the input and output, and the sample data distribution is reconstructed, and finally expressed as

[0130] Furthermore, let the covariance matrix ∑ θ (joint k , s, k) = β k I, the mean is defined as:

[0131]

[0132] Where: β k is the time-related information, the time series k starts from the initial K to 0, the initial β0 = 0.1, β K =100, increases linearly, and α k =1-β k .

[0133] The final diffusion process is expressed as:

[0134]

[0135] Where: indicates that ∈ obeys the standard normal distribution, I indicates that the variance is 1, and the entire restoration process is described in Figure 3 , the resulting joint 0 It is a set of information containing the joint quantities. Taking the 8-DOF trolley drill arm as an example, the joints generated are 0 It is an eight-dimensional joint volume.

[0136] S24. Construct a hole-finding error function based on the diffusion model network.

[0137] Optionally, different from the traditional neural network solution, the solution based on the diffusion model calculates the predicted hole position by performing a forward kinematics solution on the joint quantity directly output by the network, and constructs the error term l with the difference between the expected hole position coordinates and the predicted hole position coordinates. pos , calculated as follows:

[0138]

[0139] Where: s is the input six-dimensional sample data, F is the forward kinematics operation, joint 0 Is the model output. During the training process, the hole-finding error loss function is continuously reduced to improve the hole-finding accuracy.

[0140] In a feasible implementation, the starting point and end point of the target blasthole on the actual tunnel face are used as the conditional information of the diffusion model, high-dimensional normal distribution noise is used as input, and the joint variables of the drill arm are used as parameterized network outputs to convert complex analytical problems into offline solutions of network parameters.

[0141] S25. Update the diffusion model network parameters according to the hole-finding error function until the diffusion model network converges, and obtain a trained inverse solution control model of the drilling rig's drill arm.

[0142] In a feasible implementation, an objective function is constructed based on the predicted coordinate information obtained by network input and output of the forward kinematics of each joint, and a loss function for offline training is designed.

[0143] Specifically, the policy network parameter update is: the gradient is calculated using the objective function value obtained by solving, the network gradient of the batch calculated value is averaged, and the network parameters are subjected to gradient descent, and the expression is:

[0144]

[0145] θ′=θ+Δθ (11)

[0146] Where: θ′ is the updated weight, θ is the current weight, the initial value is set to 0.001, α is the learning rate, which controls the update step size; It is the gradient of the objective function with respect to the weight, indicating the direction of change of the objective function at the current weight value, and adjusting the connection weight according to the objective function value.

[0147] Further, determine whether the result converges: if the hole-finding error function l pos >1mm, it indicates that the strategy has not converged yet, and the solution is continued by returning to step S24; otherwise, it indicates that the strategy has converged within the error range, the hole-finding error is small at this time, and the output is the optimal parameterized strategy.

[0148] S3. Obtain the joint variables of the drill arm according to the target hole position data and the inverse control model of the drill arm of the rock drilling rig.

[0149] In a feasible implementation, the strategy network is pre-trained offline as above to obtain the optimal parameters, and the strategy network corresponding to the parameters is combined with the current state hole position information to directly identify the joint variables corresponding to the minimum output error from the model and output each joint variable Θ = [θ1, θ2, θ3...] T , such as the moving joint d and the rotating joint θ of the propulsion beam.

[0150] S4. According to the variables of each joint, the trajectory planning result is obtained to complete the control of the drilling rig's drill arm.

[0151] Optionally, the above step S4 may be:

[0152] The fifth-order polynomial interpolation is performed on each joint variable. According to the interpolated joint variables and the set movement time of each joint, the trajectory planning result is obtained to complete the control of the drill arm of the rock drilling rig.

[0153] In a feasible implementation method, when applied online, the strategy network obtained through training is used to directly output the joint value corresponding to the drill arm according to the target hole position at the current moment. The drill arm executes the corresponding control action to reach the target joint position, and the hole position information at this time is fed back to the strategy network to realize closed-loop control. Finally, trajectory planning is performed based on the target joint posture to complete the overall design of the upper computer.

[0154] Specifically, in order to ensure the smooth operation of the joints at all times during the movement, the joints are interpolated with a fifth-order polynomial and trajectory planning is performed. The target trajectory interpolation function is:

[0155] θ(t)=a0+a1t+a2t 2 +a3t3+a4t4+a5t 5 (12)

[0156] Where: a0~a5 represent coefficients, and their speed and acceleration curves are:

[0157]

[0158] Given the joint angle θ0 at the start time and the end time θ d , the angular velocity and angular acceleration of the joint at the two moments are 0, satisfying the conditions:

[0159]

[0160] Substitute the above conditions into (12) and (13) to solve for coefficients a0 to a5:

[0161]

[0162] Finally, the present invention solves θ according to the inverse kinematics. d As well as the initial moment θ0=0, by setting the movement time of each joint, the trajectory curve equation of each joint can be solved.

[0163] The present invention adopts an inverse control method for a robotic arm based on a diffusion model. By constructing a suitable data set to guide the noise that obeys the standard Gaussian distribution to generate joint vectors, a multi-peak distribution of joint vectors is achieved, and then multiple groups of different joint postures are formed corresponding to the same target hole position; the actual hole position generated continuously approaches the expected hole position, the network solution accuracy is improved, and in the parameterized update process, the corresponding network parameter settings with high precision are learned, and finally the trajectory planning is performed on the joint position corresponding to the target posture, so as to achieve the stability of the entire drilling arm movement process.

[0164] The present invention solves the inverse kinematics of the redundant manipulator arm by building a diffusion model of the drilling rig arm, and generates multiple groups of different joint postures corresponding to the same target hole position. Table 1 lists the same target hole position data corresponding to three groups of joint postures:

[0165] Table 1

[0166]

[0167]

[0168] The results show that the method proposed in the present invention can effectively solve the problem of multi-value of high-degree-of-freedom manipulator, and provide more options for actual working conditions. The present invention trains the drilling rig arm model, outputs the optimal parameter strategy network learned after 100,000 iterations of 100,000 sets of tunnel input data, and compares it with the traditional neural network solution to obtain the hole-finding error curve as shown in the figure. Figure 4The results show that the hole-finding function proposed in the present invention can maintain a high accuracy in the test set, with a hole-finding error of mm level, and optimizes the traditional neural network solution method; the partial trajectory planning curve constructed by the present invention taking the joint 1 running for 15 seconds as an example is shown in Figure 5 , Figure 6 , Figure 7 As shown. It can be observed that the polynomial interpolation method can ensure continuity without mutation in angular displacement, angular velocity and angular acceleration, and will not produce rigid impact and flexible impact. In summary, the present invention has great practical significance and achieves the purpose of diversity, accuracy and smoothness of the inverse kinematics solution of the drilling rig drill arm.

[0169] In an embodiment of the present invention, coordinate information consistent with the actual tunnel is established as a data set of the diffusion model. Different from the data obtained by the traditional neural network model through the forward kinematics of joint variables, the data is more realistic and has a simple structure. The present invention designs the structure of the diffusion model, and uses the information of known target blastholes to encourage the standard normally distributed noise to be restored to joint quantities, thereby realizing the reconstruction of data samples. The present invention constructs an inverse kinematics solution for the diffusion model, and optimizes the target drive network update by constructing the difference between the target hole position and the inverse kinematics hole position, thereby greatly improving the accuracy of the inverse kinematics solution. The present invention constructs the trajectory planning curve of each joint, and ensures continuity without mutation in terms of angular displacement, angular velocity and angular acceleration, thereby realizing the smoothness and smoothness of the motion.

[0170] Figure 8 is a block diagram of a device for inverse control of a manipulator based on a diffusion model according to an exemplary embodiment, and the device is used for an inverse control method of a manipulator based on a diffusion model. Figure 8 The device includes an acquisition module 310, an input module 320, a model output module 330, and an output module 340.

[0171] in:

[0172] The acquisition module 310 is used to acquire target hole position data of the drill arm of the drilling rig to be controlled.

[0173] The input module 320 is used to input the target hole position data into the trained drilling rig drill arm inverse control model.

[0174] The model output module 330 is used to obtain various joint variables of the drill arm according to the target hole position data and the inverse control model of the drill arm of the rock drilling rig.

[0175] The output module 340 is used to obtain trajectory planning results according to various joint variables and complete the control of the drilling rig's drill arm.

[0176] Optionally, the input module 320 is further configured to:

[0177] S21, obtaining parameter data of the drill arm of the rock drilling rig, and obtaining the posture and position of the end effector of the drill arm according to the parameter data and the DH matrix method.

[0178] S22. Construct a diffusion model input according to the posture and position of the end effector of the drill arm.

[0179] The diffusion model input includes hole position information input and standard Gaussian distribution noise input.

[0180] S23. Build a diffusion model network based on the diffusion model input.

[0181] S24. Construct a hole-finding error function based on the diffusion model network.

[0182] S25. Update the diffusion model network parameters according to the hole-finding error function until the diffusion model network converges, and obtain a trained inverse solution control model of the drilling rig's drill arm.

[0183] Optionally, the input module 320 is further configured to:

[0184] S211, obtaining parameter data of the drill boom of the rock drilling rig, establishing a DH coordinate system for each connecting rod of the drill boom according to the parameter data and the DH matrix method, and then obtaining DH parameter information of the drill boom.

[0185] S212. According to the DH coordinate system and DH parameter information, the homogeneous transformation matrix of each connecting rod is obtained, as shown in the following formula (1):

[0186]

[0187] Where: represents the homogeneous transformation matrix of each connecting rod, n represents the number of connecting rods of the drill arm, Rot(X, α n-1 ) represents the rotation matrix of each link around the x-axis, α n Represents the joint torsion angle, Rot(Z, θ n ) represents the rotation matrix of each link around the z axis, θ n represents the joint angle, Trans(X, a n-1 ) represents the translation matrix of each link along the x-axis, a n Indicates the connecting rod length, Trans(Z, d n ) represents the translation matrix of each link along the z-axis, d n Indicates the connecting rod offset.

[0188] S213, establishing a transformation method of the end effector of the drill arm relative to the base coordinate system.

[0189] S214 . Obtain a transformation matrix of the posture of the end effector according to the homogeneous transformation matrix and the conversion method, and obtain the posture and position of the end effector according to the transformation matrix.

[0190] Among them, the transformation matrix of the end effector's posture is shown in the following formula (2):

[0191]

[0192] Where: The transformation matrix representing the posture of the end effector, [n, o, a] represents the rotation matrix of the end effector of the drill arm relative to the base coordinate system, which is used to obtain the direction vector of the drill bit relative to the base coordinate system, x represents the x-axis, y represents the y-axis, z represents the z-axis, [x drill ,y drill , z drill ] T represents the position of the end effector of the drill arm relative to the base coordinate system, x drill represents the x-axis coordinate of the end effector in the DH coordinate system, y drill represents the y-axis coordinate of the end effector in the DH coordinate system, z drill Represents the z-axis coordinate of the end effector in the DH coordinate system.

[0193] Optionally, the hole position information is input as shown in the following formula (3):

[0194] [x1, y1, z1] T =[x drill ,y arill , z drill ] T

[0195]

[0196] s=[(x1,y1,z1),(x2,y2,z2)] T (3)

[0197] Where: (x1, y1, z1) represents the coordinates of the starting point of the drilling, T represents the transpose of the matrix, [x drill ,y drill ,z drill ] T represents the position of the end effector of the drill arm relative to the base coordinate system, (x2, y2, z2) represents the coordinates of the end point of the drilling, [n, o, a] represents the rotation matrix of the end effector of the drill arm relative to the base coordinate system, x represents the x-axis, y represents the y-axis, z represents the z-axis, depth represents the depth of the hole, and s represents the hole position information input.

[0198] Optionally, the diffusion model network is as shown in the following formula (4):

[0199]

[0200] Where: joint k represents the standard Gaussian distribution noise input, k represents the time series, α k =1-β k , β k Indicates time-related information. Represents α k Continuous multiplication from 1 to k, π θ represents the strategy to be learned, s represents the hole position information input, represents ∈ standard normal distribution, and I represents variance 1.

[0201] Optionally, the hole-finding error function is as shown in the following formula (5):

[0202]

[0203] Where: l pos represents the hole-finding error function, represents the mathematical expectation of each batch error, s represents the hole position information input, F represents the forward kinematics operation, joint 0 represents the model output, and θ represents the model parameters.

[0204] Optionally, the output module 340 is further configured to:

[0205] The fifth-order polynomial interpolation is performed on each joint variable. According to the interpolated joint variables and the set movement time of each joint, the trajectory planning result is obtained to complete the control of the drill arm of the rock drilling rig.

[0206] In an embodiment of the present invention, coordinate information consistent with the actual tunnel is established as a data set of the diffusion model. Different from the data obtained by the traditional neural network model through the forward kinematics of joint variables, the data is more realistic and has a simple structure. The present invention designs the structure of the diffusion model, and uses the information of known target blastholes to encourage the standard normally distributed noise to be restored to joint quantities, thereby realizing the reconstruction of data samples. The present invention constructs an inverse kinematics solution for the diffusion model, and optimizes the target drive network update by constructing the difference between the target hole position and the inverse kinematics hole position, thereby greatly improving the accuracy of the inverse kinematics solution. The present invention constructs the trajectory planning curve of each joint, and ensures continuity without mutation in terms of angular displacement, angular velocity and angular acceleration, thereby realizing the smoothness and smoothness of the motion.

[0207] Fig. 9 is a schematic diagram of the structure of a mechanical arm inverse control device provided by an embodiment of the present invention, such as Fig. 9 As shown, the robot arm inverse control device may include the above Figure 8 The inverse control device for a robotic arm based on a diffusion model is shown. Optionally, the inverse control device for a robotic arm 410 may include a first processor 2001 .

[0208] Optionally, the robot arm inverse control device 410 may further include a memory 2002 and a transceiver 2003 .

[0209] The first processor 2001, the memory 2002 and the transceiver 2003 may be connected via a communication bus.

[0210] Combine the following Fig. 9 The components of the robot arm inverse control device 410 are specifically introduced as follows:

[0211] The first processor 2001 is the control center of the robot arm inverse solution control device 410, which can be a processor or a general term for multiple processing elements. For example, the first processor 2001 is one or more central processing units (CPUs), or an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present invention, such as one or more microprocessors (digital signal processors, DSPs), or one or more field programmable gate arrays (field programmable gate arrays, FPGAs).

[0212] Optionally, the first processor 2001 can perform various functions of the robot arm inverse control device 410 by running or executing a software program stored in the memory 2002 and calling data stored in the memory 2002.

[0213] In a specific implementation, as an embodiment, the first processor 2001 may include one or more CPUs, such as Fig. 9 CPU0 and CPU1 are shown in FIG.

[0214] In a specific implementation, as an embodiment, the robot arm inverse control device 410 may also include multiple processors, such as Fig. 9 The first processor 2001 and the second processor 2004 are shown in FIG. Each of these processors can be a single-core processor (single-CPU) or a multi-core processor (multi-CPU). The processor here can refer to one or more devices, circuits, and / or processing cores for processing data (e.g., computer program instructions).

[0215] The memory 2002 is used to store the software program for executing the solution of the present invention, and is controlled to be executed by the first processor 2001. The specific implementation method can refer to the above method embodiment, which will not be repeated here.

[0216] Optionally, the memory 2002 may be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (RAM) or other types of dynamic storage devices that can store information and instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory 2002 may be integrated with the first processor 2001, or may exist independently, and may be accessed through the interface circuit ( Fig. 9 (not shown) is coupled to the first processor 2001, which is not specifically limited in this embodiment of the present invention.

[0217] The transceiver 2003 is used to communicate with a network device or a terminal device.

[0218] Optionally, the transceiver 2003 may include a receiver and a transmitter ( Fig. 9 The receiver is used to implement a receiving function, and the transmitter is used to implement a sending function.

[0219] Optionally, the transceiver 2003 may be integrated with the first processor 2001, or may exist independently, and control the interface circuit of the device 410 through the robot arm inverse solution ( Fig. 9 (not shown) is coupled to the first processor 2001, which is not specifically limited in this embodiment of the present invention.

[0220] It should be noted that Fig. 9 The structure of the robot arm inverse control device 410 shown in the figure does not constitute a limitation on the router, and the actual knowledge structure recognition device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.

[0221] In addition, the technical effects of the robot arm inverse control device 410 can refer to the technical effects of the robot arm inverse control method based on the diffusion model described in the above method embodiment, and will not be repeated here.

[0222] It should be understood that the first processor 2001 in the embodiment of the present invention may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0223] It should also be understood that the memory in the embodiments of the present invention may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of random access memory (RAM) are available, such as static RAM (SRAM), dynamic random access memory (DRAM), synchronous DRAM (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct rambus RAM (DR RAM).

[0224] The above embodiments can be implemented in whole or in part by software, hardware (such as circuits), firmware or any other combination. When implemented by software, the above embodiments can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center by wired (such as infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that contains one or more available media sets. The available medium can be a magnetic medium (for example, a floppy disk, a hard disk, a tape), an optical medium (for example, a DVD), or a semiconductor medium. The semiconductor medium can be a solid-state hard disk.

[0225] It should be understood that the term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. A and B can be singular or plural. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship, but it may also indicate an "and / or" relationship. Please refer to the context for specific understanding.

[0226] In the present invention, "at least one" means one or more, and "more than one" means two or more. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can be represented by: a, b, c, ab, ac, bc, or abc, where a, b, c can be single or multiple.

[0227] It should be understood that in various embodiments of the present invention, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.

[0228] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0229] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described equipment, devices and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0230] In the several embodiments provided by the present invention, it should be understood that the disclosed devices, apparatuses and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0231] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0232] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0233] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0234] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

Claims

1. A method for inverse control of a robotic arm based on a diffusion model, characterized in that: The method comprises: S1. Obtaining target hole position data of the drill arm of the drilling rig to be controlled; S2, inputting the target hole position data into the trained inverse control model of the drilling rig drill arm; S3, obtaining various joint variables of the drill arm according to the target hole position data and the inverse control model of the drill arm of the rock drilling rig; S4. Obtain trajectory planning results according to the various joint variables, and complete the control of the drilling rig's drill arm; The construction process of the inverse solution control model of the drilling rig arm in S2 includes: S21, obtaining parameter data of the drill arm of the rock drilling rig, and obtaining the posture and position of the end effector of the drill arm according to the parameter data and the DH matrix method; S22, constructing a diffusion model input according to the posture and position of the end effector of the drill arm; Wherein, the diffusion model input includes hole position information input and standard Gaussian distribution noise input; S23, building a diffusion model network according to the diffusion model input; S24, constructing a hole-finding error function according to the diffusion model network; S25, updating the diffusion model network parameters according to the hole-finding error function until the diffusion model network converges, thereby obtaining a trained inverse solution control model of the drilling rig drill arm; The diffusion model network in S23 is shown in the following formula (1): Where: joint k represents the standard Gaussian distribution noise input, k represents the time series, α k =1-β k , β k Indicates time-related information. Represents α k Continuous multiplication from 1 to k, π θ represents the strategy to be learned, s represents the hole position information input, represents ∈ standard normal distribution, I represents variance 1; The hole-finding error function in S24 is shown in the following formula (2): Where: l pos represents the hole-finding error function, represents the mathematical expectation of each batch error, s represents the hole position information input, F represents the forward kinematics operation, joint 0 represents the model output, and θ represents the model parameters.

2. The inverse control method for a robotic arm based on a diffusion model according to claim 1, characterized in that: The step of obtaining parameter data of the drilling rig boom in S21, and obtaining the posture and position of the end effector of the drilling boom according to the parameter data and the DH matrix method, includes: S211, acquiring parameter data of the drill arm of the drilling rig, and establishing a DH coordinate system for each connecting rod of the drill arm according to the parameter data and the DH matrix method, thereby obtaining DH parameter information of the drill arm; S212. Obtain the homogeneous transformation matrix of each connecting rod according to the DH coordinate system and DH parameter information, as shown in the following formula (3): Where: represents the homogeneous transformation matrix of each connecting rod, n represents the number of connecting rods of the drill arm, Rot(X, α n-1 ) represents the rotation matrix of each link around the x-axis, α n Represents the joint torsion angle, Rot(Z, θ n ) represents the rotation matrix of each link around the z axis, θ n represents the joint angle, Trans(X, a n-1 ) represents the translation matrix of each link along the x-axis, a n Indicates the connecting rod length, Trans(Z, d n ) represents the translation matrix of each link along the z-axis, d n Indicates the connecting rod offset; S213, establishing a transformation mode of the end effector of the drill arm relative to the base coordinate system; S214, obtaining a transformation matrix of the posture of the end effector according to the homogeneous transformation matrix and the conversion method, and obtaining the posture and position of the end effector according to the transformation matrix; Among them, the transformation matrix of the end effector's posture is shown in the following formula (4): Where: The transformation matrix representing the posture of the end effector, [n, o, a] represents the rotation matrix of the end effector of the drill arm relative to the base coordinate system, which is used to obtain the direction vector of the drill bit relative to the base coordinate system, x represents the x-axis, y represents the y-axis, z represents the z-axis, [x drill ,y drill ,z drill ] T represents the position of the end effector of the drill arm relative to the base coordinate system, x drill represents the x-axis coordinate of the end effector in the DH coordinate system, y drill represents the y-axis coordinate of the end effector in the DH coordinate system, z drill Represents the z-axis coordinate of the end effector in the DH coordinate system.

3. The inverse control method for a robotic arm based on a diffusion model according to claim 1, characterized in that: The hole position information input in S22 is shown in the following formula (5): [x1,y1,z1] T [x drill y drill ,z drill ] T s=[(x1,y1,z1),(x2,y2,z2)] T (5) Where: (x1, y1, z1) represents the coordinates of the starting point of the drilling, T represents the transpose of the matrix, [x drill ,y drill , z drill ] T represents the position of the end effector of the drill arm relative to the base coordinate system, (x2, y2, z2) represents the coordinates of the end point of the drilling, [n, o, a] represents the rotation matrix of the end effector of the drill arm relative to the base coordinate system, x represents the x-axis, y represents the y-axis, z represents the z-axis, depth represents the depth of the hole, and s represents the hole position information input.

4. The inverse control method for a robotic arm based on a diffusion model according to claim 1, characterized in that: The step S4 obtains the trajectory planning result according to the joint variables to complete the control of the drilling rig boom, including: A fifth-order polynomial interpolation is performed on the joint variables, and a trajectory planning result is obtained according to the interpolated joint variables and the set movement time of each joint, thereby completing the control of the drill arm of the rock drilling rig.

5. A robotic arm inverse control device based on a diffusion model, wherein the robotic arm inverse control device based on a diffusion model is used to implement the robotic arm inverse control method based on a diffusion model as claimed in any one of claims 1 to 4, characterized in that: The device comprises: An acquisition module, used to acquire target hole position data of a drilling arm of a rock drilling rig to be controlled; An input module, used for inputting the target hole position data into a trained inverse control model of the drilling rig drill arm; A model output module, used to obtain various joint variables of the drill arm according to the target hole position data and the inverse control model of the drill arm of the rock drilling rig; An output module is used to obtain trajectory planning results according to the various joint variables to complete the control of the drilling rig’s drill arm; The construction process of the inverse solution control model of the drilling rig drill arm includes: S21, obtaining parameter data of the drill arm of the rock drilling rig, and obtaining the posture and position of the end effector of the drill arm according to the parameter data and the DH matrix method; S22, constructing a diffusion model input according to the posture and position of the end effector of the drill arm; Wherein, the diffusion model input includes hole position information input and standard Gaussian distribution noise input; S23, building a diffusion model network according to the diffusion model input; S24, constructing a hole-finding error function according to the diffusion model network; S25, updating the diffusion model network parameters according to the hole-finding error function until the diffusion model network converges, thereby obtaining a trained inverse solution control model of the drilling rig drill arm; The diffusion model network in S23 is shown in the following formula (1): Where: joint k represents the standard Gaussian distribution noise input, k represents the time series, α k =1-β k , β k Indicates time-related information. Represents α k Continuous multiplication from 1 to k, π θ represents the strategy to be learned, s represents the hole position information input, represents ∈ standard normal distribution, I represents variance 1; The hole-finding error function in S24 is shown in the following formula (2): Where: l pos represents the hole-finding error function, represents the mathematical expectation of each batch error, s represents the hole position information input, F represents the forward kinematics operation, joint 0 represents the model output, and θ represents the model parameters.

6. A robot arm inverse control device, characterized in that: The mechanical arm inverse solution control device comprises: processor; A memory having computer-readable instructions stored thereon, wherein when the computer-readable instructions are executed by the processor, the method according to any one of claims 1 to 4 is implemented.

7. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores program codes, which can be called by a processor to execute the method according to any one of claims 1 to 4.