CN-117444977-B - Method for building digital twin body model based on six-degree-of-freedom mechanical arm
Abstract
The invention discloses a method for constructing a digital twin body model based on a six-degree-of-freedom mechanical arm, which is used for describing the transmission of force in the mechanical arm, carrying out finite element analysis on a plurality of positions of each part by using finite element analysis software, extracting result data simultaneously, carrying out data preprocessing on the result data of the finite elements, carrying out K neighbor algorithm on each group of data, manufacturing a data set required by machine learning, carrying out data fitting on the data set by using machine learning to obtain proxy models for simplifying calculation of each part, integrating each proxy model by using a statics model to obtain an AI model of the complete mechanical arm, calculating received information by an AI model client, obtaining a stress distribution result of the mechanical arm at the moment, constructing a visual mechanical arm UI (user interface) under a Unity scene, sending joint position information to the AI model by the UI, receiving the calculation result of the AI model, and visualizing the stress of different regional grid points of the mechanical arm.
Inventors
- HUANG MING
- JIANG XIN
Assignees
- 江苏理工学院
Dates
- Publication Date
- 20260512
- Application Date
- 20231129
Claims (8)
- 1. A method for building a digital twin body model based on a six-degree-of-freedom mechanical arm is characterized by comprising the following steps: S1) drawing a three-dimensional model of the six-degree-of-freedom mechanical arm, splitting the six-degree-of-freedom mechanical arm, obtaining seven sub-components, and respectively importing each sub-component into finite element analysis software; S2) deriving the coordinates of the position nodes of each sub-component through finite element software, and obtaining new grid node coordinates and stress values corresponding to each node coordinate after the sub-components are deformed under the action of forces of different angles; S3) carrying out de-duplication processing on the coordinate data derived from each sub-component to obtain node indexes without repeated nodes and grids, taking a finite element equivalent stress result under each group of forces as a reference, predicting stress values of each node position under the group of forces in the non-repeated grids by using a KNN algorithm to obtain coordinate data with node stress, taking the coordinate data with node stress as a training set, and repeatedly operating the process to obtain training sets of all sub-components; S4) using RBF interpolation in scipy libraries, correlating data in training sets of all sub-components of the mechanical arm with force magnitude and direction input during analysis in finite elements, fitting the training sets of each sub-component, and obtaining continuous force direction change input and stress numerical relation of grid coordinates of each sub-component, and packaging to obtain a proxy model of each sub-component; S5) establishing a statics model, expressing force transmission of each sub-component, and sequentially recursively obtaining the stress condition of the whole mechanical arm; s6) associating the statics model and the proxy model to form an AI model, obtaining the magnitude and the direction of the force born by each sub-component in the statics model, setting the magnitude and the direction of the force born by each sub-component as the input of the proxy model, and obtaining the stress value of the position node of the whole mechanical arm through the calculation of the proxy model; S7) constructing a mechanical arm model in the Unity, guiding the node cables of the non-repeated nodes and grids corresponding to each sub-component into the Unity, drawing each part by using the non-repeated grid nodes and grid node indexes, and assembling and matching the parts; S8) recording the motion gesture of each sub-component, sending the motion state of each sub-component of the mechanical arm model to the AI model, calculating and processing the received information by the AI model to obtain a data result, returning the result to Unity, mapping the result interval to the color interval by Unity, and coloring each sub-component.
- 2. The method for building a digital twin body model based on a six-degree-of-freedom mechanical arm as set forth in claim 1, wherein in the step S2), finite element analysis is performed on each sub-component by finite element analysis software Ansys, and external forces added at different angles are 50N.
- 3. The method for building the digital twin body model based on the six-degree-of-freedom mechanical arm according to claim 1, wherein in the step S2), grids of each sub-component are drawn and exported, finite element stress analysis is carried out on the grids, coordinates of position nodes are extracted from the exported grids, in the finite element stress analysis, the finite element stress analysis is carried out on each sub-component under the action of a plurality of groups of forces with different angles, then finite element analysis data of all the angles of each sub-component are exported, and the data comprise new grid node coordinates after the sub-component is deformed under the action of stress and stress values corresponding to the node coordinates.
- 4. The method for building a digital twin body model based on a six-degree-of-freedom mechanical arm according to claim 1, wherein in the step S3), the coordinate data and the stress data of each sub-component are subjected to the de-duplication processing respectively through Python, and the node index is extracted.
- 5. The method for building the digital twin body model based on the six-degree-of-freedom mechanical arm according to claim 1, wherein in the step S3), the coordinate data of the nodes with the repeated positions removed and the stress result data derived from the finite element are taken as references, and the stress value of each position point of the non-repeated nodes is predicted through a KNN algorithm, so that the stress value of each position point of the non-repeated nodes under the acting force is obtained.
- 6. The method for building the digital twin body model based on the six-degree-of-freedom mechanical arm, which is disclosed in claim 1, is characterized in that the three-dimensional model of the six-degree-of-freedom mechanical arm is divided into seven parts, namely a base (1), a first joint (2), a large arm (3), a small arm (4), a second joint (5), a third joint (6) and an end effector (7).
- 7. The method for building a digital twin body model based on the six-degree-of-freedom mechanical arm according to claim 6, wherein in the step S5), a statics model is built, force transmission of each sub-component is expressed, the force applied to the sub-component of the next stage under each gesture by the jacobian matrix is drawn, the weight of the current sub-component is added to the force applied to each sub-stage, and the stress condition of the whole mechanical arm is sequentially recursively obtained.
- 8. The method for building a digital twin phantom based on a six-degree-of-freedom manipulator of claim 7, wherein the step S5) is specifically: seven parts are all compared into connecting rods, and the jacobian matrix is used for connecting static relations between the connecting rods, so that the concrete implementation mode is as follows: Establishing a connecting rod coordinate system, and setting the sum of static force and static moment applied to a connecting rod i to be 0, wherein the static force and the static moment are as follows: (1), (2), And (3) discussing the relation expression of the force and the moment of the end effector from the end effector as a starting point, solving the relation of the force and the moment of each connecting rod, calculating from the end effector to the base, and sorting the formulas (1) and (2) so as to iteratively solve from the connecting rod with a high sequence number to the connecting rod with a low sequence number, wherein the result is as follows: (3), (4), to transform the force and moment defined in the link's own coordinate system using the rotation matrix of the coordinate system { i+1} with respect to the coordinate system { i }, the expression of the static "transfer" between the links is obtained: (5), (6), The formula is deduced as follows, wherein the formula (5) and the formula (6) are applied, recursion is started from the end effector, and the force and the transmission of the force and the moment of the end effector to the third joint are calculated firstly: (7), (8), transmission of force and moment of the third joint to the second joint: (9), (10), force and moment transmission of the second joint to the forearm: (11), (12), force and moment transmission of the forearm to the forearm: (13), (14), transmission of first joint force and moment by the large arm: (15), (16), transfer of base force and moment by first joint: (17), (18); Wherein: And (3) with Is the static force acting on the connecting rods i and i+1 in the connecting rod coordinate system i; And (3) with The static moment acting on the connecting rods i and i+1 in the connecting rod coordinate system i; is a position vector of the coordinate system { i+1} relative to the coordinate system { i }; a rotation matrix of the coordinate system { i+1} relative to the coordinate system { i }; 、 Is a unit direction vector; 、 Is a component of force; 、 、 、 、 、 、 、 、 And Is a trigonometric function of the joint angle, wherein c is cos, s is sin; 、 、 、 、 And For each link length.
Description
Method for building digital twin body model based on six-degree-of-freedom mechanical arm Technical Field The invention relates to a method for building a digital twin body model based on a six-degree-of-freedom mechanical arm. Background Digital twinning is a concept of connecting a physical world and virtual objects by means of a data connection. Beginning in 2020, digital twin research has attracted extensive attention from practitioners and researchers. With the development of science and technology, the real world and the virtual world are connected by means of computer communication technology, a complex system of the physical world is mapped into a digital environment, and with the rapid development of computers and communication technology, the landing of digital twin projects becomes possible in recent years. The existing digital twin technology is only remained in the visualization stage, and the digital twin model is integrated into the mathematical model and the mechanism model, so that the digital twin body cannot truly express the internal real condition of the mechanical arm under the physical world working condition. Meanwhile, the finite element analysis software is used for transient dynamics analysis of motion under a given track, so that great calculation force and a great amount of time are needed, and interaction with a mechanical arm entity in the physical world is not completed. Disclosure of Invention The invention provides a method for constructing a digital twin body model based on a six-degree-of-freedom mechanical arm, which aims to solve the problems existing in the prior art. Digital twinning is not only to solve the problem of virtual world interaction with the real world, but also to improve the computational efficiency for synchronizing the virtual world and the real world. The digital twin constructed by the machine learning is introduced to truly express the state of the physical world mechanical arm, so that the operation load of a computer is greatly reduced, and a new research idea is provided for the subsequent digital twin technology landing. The invention adopts the technical scheme that: a method for building a digital twin body model based on a six-degree-of-freedom mechanical arm comprises the following steps: S1) drawing a three-dimensional model of the six-degree-of-freedom mechanical arm, splitting the six-degree-of-freedom mechanical arm, obtaining seven sub-components, and respectively importing each sub-component into finite element analysis software; S2) drawing and exporting grids of each sub-component, and then carrying out finite element stress analysis, wherein the exported grids extract coordinates of position nodes; when the finite element stress analysis is carried out, the finite element stress analysis is carried out on each sub-component under the action of 38 groups of forces with different angles, and then the finite element analysis data of all the forces with angles of each sub-component are exported, wherein the data comprise new grid node coordinates and stress values corresponding to each node coordinate after the sub-component is deformed under the action of the stress when each group of space forces is received; S3) carrying out de-duplication processing on the coordinate data derived from each sub-component to obtain node indexes without repeated nodes and grids, taking a finite element equivalent stress result under each group of forces as a reference, predicting stress values of each node position under the group of forces in the non-repeated grids by using a KNN algorithm to obtain coordinate data with node stress, taking the coordinate data with node stress as a training set, and repeatedly operating the process to obtain training sets of all sub-components; S4) using RBF interpolation in scipy libraries, correlating data in training sets of all sub-components of the mechanical arm with force magnitude and direction input during analysis in finite elements, fitting the training sets of each sub-component, and obtaining continuous force direction change input and stress numerical relation of grid coordinates of each sub-component, and packaging to obtain a proxy model of each sub-component; S5) establishing a statics model, expressing force transmission of each sub-component, drawing the magnitude and direction of force applied to the sub-component of the next stage under each gesture by using the jacobian matrix, adding the gravity of the current sub-component to the magnitude of the force of each next stage, and sequentially recursively obtaining the stress condition of the whole mechanical arm; S6) associating the statics model and the proxy model to form an AI model, obtaining the magnitude and the direction of the force born by each sub-component in the statics model, setting the magnitude and the direction of the force born by each sub-component as the input of the proxy model, and obtaining the stress value of the position nod