Method for solving maximum stress of real-time motion of mechanical arm based on digital twinning
By creating a 3D model of the robotic arm in Soildworks and ANSYS and performing mesh generation, combined with a digital twin platform and the K-nearest neighbor algorithm, the computational resource problem of real-time stress analysis for multi-degree-of-freedom robotic arms was solved, enabling low-threshold real-time stress display and analysis.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-28
- Publication Date
- 2026-04-14
AI Technical Summary
Existing technologies cannot calculate the equivalent stress of a multi-degree-of-freedom robotic arm in any posture in real time, and the computational resources consumed are too high, which cannot meet the needs of real-time analysis.
By creating a 3D model of the robotic arm in Soildworks, meshing it, and using ANSYS software to solve for the equivalent stress data of the joints, the data is processed and interpolated using a digital twin platform and the K-nearest neighbor algorithm, and the stress cloud map and maximum stress curve are displayed in real time.
It enables real-time stress analysis of robotic arms in any posture under low computing resource conditions, saving computing resources, lowering the computing threshold, and intuitively displaying stress distribution to identify structural problems.
Smart Images

Figure CN116029172B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of digital twin stress analysis, and more specifically to a method for solving the maximum stress based on the real-time motion of a robotic arm using digital twins. Background Technology
[0002] A multi-degree-of-freedom robotic arm can perform any action at any time, and the stress on the arm is constantly changing during different actions. While we can perform equivalent stress analysis on a specific posture of the robotic arm and calculate the maximum stress in that state, we lack the computational resources to support stress analysis and maximum stress calculation for every arbitrary posture. Currently, the mainstream approach is to establish static analysis using simulation software to perform static analysis on a specific posture of the robotic arm; there is no method yet capable of calculating the equivalent stress of the robotic arm under different postures in real time. Summary of the Invention
[0003] To address the shortcomings of existing technologies, this invention provides a method for solving the maximum stress in real-time motion of a robotic arm based on digital twins, comprising the following steps:
[0004] Step 1: Measure the actual physical dimensions of the robotic arm, create a 3D model of the robotic arm in Solidworks software, and mesh the 3D model using ANSYS software.
[0005] For each joint in the robotic arm, the joint can rotate within the angle range of 0 to X. The number of sampling points is set to n. A sampling point is taken every X / n angle, and the equivalent stress data of these sampling points are solved.
[0006] Step 2: Perform node deduplication and interpolation training on the equivalent stress data obtained in Step 1; obtain the trained equivalent stress data for each node without duplication.
[0007] The node deduplication refers to the following: after completing the mesh division in step one, a triangular mesh is obtained, in which each triangular mesh includes 3 nodes. Adjacent triangular meshes will share two nodes. The shared nodes are removed, and after deduplication, the node index is re-established for the remaining nodes to obtain data without duplicate nodes.
[0008] Step 3: Import the trained equivalent stress data into the 3D model of the robotic arm, establish the host computer interface of the robotic arm based on the digital twin platform, and conduct serial communication between the host computer and the robotic arm. The host computer displays the stress data cloud map and maximum stress curve of the robotic arm in the current posture in real time.
[0009] Preferably, the interpolation training includes the following steps:
[0010] The first step is to save the unique node data into a table with headers “x”, “y”, “z”, and “pa”. The “x” column is the first column, which stores the x-coordinate information of the node; the “y” column is the second column, which stores the y-coordinate information of the node; the “z” column is the third column, which stores the z-coordinate information of the node; and the “pa” column is the fourth column, which stores the equivalent stress information corresponding to the node.
[0011] The second step is to save the equivalent stress data of each sampling point on a joint obtained in step one as database 1;
[0012] The third step is to call the KNeighborsClassifier class, which is a class that implements the K nearest neighbor algorithm. Based on the database 1, the K nearest neighbor algorithm is used to calculate the K nearest points near the unknown point by setting the K value. The unknown point refers to a point whose location information is known but whose stress information is unknown.
[0013] Each row in the table of data without repeating nodes is taken as the unknown point, and the values of "x", "y", and "z" are taken as the location information of the unknown point. The equivalent stress data of the node is obtained by interpolation based on the stress information of the K nearest points recorded in database 1 and written into the "pa" column as stress information. This step is repeated until the "pa" column of each row in the table of data without repeating nodes has data, and a copy of the training data is obtained.
[0014] Fourth, repeat steps two and three until all joint data samples have been trained.
[0015] Preferably, in the third step of the interpolation training, the value of K is set to 15.
[0016] Preferably, in step one, the number of sampling points n is 6 to 8.
[0017] Preferably, in step three: the digital twin platform is Unity; the host computer interface of the robotic arm is established based on the parent-child relationship in Unity and the mounting of C# scripts.
[0018] This invention can significantly save computing resources and lower the computational threshold, allowing for real-time calculation of the equivalent stress of a robotic arm based on available computing resources. Compared with existing technologies, this invention has the following advantages: The implementation basis of this invention is the same as existing static stress analysis, requiring no further special learning; the computational resource threshold required is lower, as data deduplication and interpolation training significantly reduce the amount of data to be calculated, enabling real-time stress analysis of any robotic arm posture without requiring more computing resources or higher computer configurations; this invention can display stress cloud diagrams and output maximum stress curves in real time, allowing for more intuitive identification of structural problems in the robotic arm and facilitating improvements. Attached Figure Description
[0019] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the accompanying drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Some specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings in an exemplary and non-limiting manner. The same reference numerals in the drawings indicate the same or similar parts or components. Those skilled in the art should understand that these drawings are not necessarily drawn to scale. In the drawings:
[0020] Figure 1 This is a schematic diagram of the technical route of the present invention;
[0021] Figure 2 This is a schematic diagram of the mesh division in this invention;
[0022] Figure 3 This is a schematic diagram of the maximum stress curve output by the present invention;
[0023] Figure 4 This is a schematic diagram of the real-time display of equivalent stress by the digital twin host computer of the present invention. Detailed Implementation
[0024] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0025] This invention provides a method for real-time calculation of equivalent stress in robotic arms during movement. Existing methods for calculating equivalent stress can only address the equivalent stress of static robotic arms. However, multi-degree-of-freedom robotic arms can perform arbitrary movements at any time, and the stress on the robotic arm is constantly changing during different movements. This invention mainly performs stress analysis on several specific postures of the robotic arm and derives stress data. This data is then processed to obtain stress data for other postures, and finally imported into a digital twin platform for data visualization. The method provided by this invention allows us to solve the problem of equivalent stress calculation for robotic arms in arbitrary postures with fewer computational resources, greatly saving computational resources and lowering the computational threshold.
[0026] The technical route of the present invention is as follows Figure 1 First, a 3D model for stress analysis is established based on the physical model of the robotic arm. This 3D model is then meshed to facilitate subsequent equivalent stress analysis. Note that if the number of meshes is too large at this stage, a simplified mesh model can be created, but it should not be solved directly. Solving the stress on a simplified mesh model will yield poor results. Instead, the data obtained from the previous mesh model is used for training, and the trained equivalent stress data is imported into this model. If the initial mesh has a small number of nodes, this step can be ignored. After solving for the equivalent stress, the equivalent stress contour data needs to be exported to an Excel spreadsheet. The exported result should include node numbers and node coordinates. After obtaining this data, the next step is data processing. The main processing methods are node deduplication, data training, and data import. If a simplified mesh model was previously created, the data is imported into that model. If the simplification step was skipped, the trained data can be directly imported into the twin model. Once the sensors are connected and the robotic arm is configured to communicate with the host computer, a digital twin can be used to solve the stress cloud diagram of the robotic arm in real time and achieve virtual-real linkage.
[0027] Specifically, this invention uses digital twin technology, combined with data processing and stress analysis, to perform real-time stress analysis on any posture of the robotic arm, and presents the stress data in the form of a cloud map. The specific implementation steps are as follows:
[0028] Step 1: Based on the physical model of the robotic arm, create its 3D model in software such as Solidworks or Blender. Then, mesh the 3D model of the robotic arm in ANSYS software. Perform attitude changes at each joint of the robotic arm in 30-degree intervals and solve for the equivalent stress data under these attitudes.
[0029] Step 2: Export the equivalent stress data obtained in Step 1, and perform node deduplication and interpolation training on the data;
[0030] Step 3: Import the trained equivalent stress data into the simplified mesh 3D model, and then use the data from the simplified mesh 3D model to establish the host computer interface of the robotic arm on the digital twin platform. Serial communication is established with the robotic arm to display the stress data cloud map and maximum stress curve under the current posture in real time.
[0031] In step one of this invention, specifically step 101 involves measuring the actual physical dimensions of the robotic arm, modeling it in software such as Solidworks or Blender, and then importing the established model of a joint of the robotic arm into ANSYS static analysis software to perform mesh generation on that joint. Figure 2 As shown. If the model has too many mesh nodes, consider building another model with fewer mesh nodes to further save computational resources;
[0032] In step one of this invention, specifically step 102 involves setting up the solution for the divided mesh model in ANSYS:
[0033] Based on the actual fixed support point and the force situation at that angle, set the fixed support and apply the load. After solving the equivalent stress at that angle, change the angle and solve the model again. For example, for joints with a motion range of 0 to 180°, the equivalent stress can be solved once every 30 degrees, and 7 results can be obtained. Export these results to an Excel spreadsheet for saving.
[0034] If the joint motion range is 0 to 120°, the solution can be set in 20-degree intervals, and so on. Each joint needs to output approximately 6 to 8 data samples, which can be selected according to the performance of your computer. The obtained equivalent stress data should include the XYZ axis position information of the mesh nodes and the equivalent stress information corresponding to each node.
[0035] In step two of the present invention, there is a specific step 201. For the obtained equivalent stress data, the node position information of each data is first processed. When the mesh is divided, the mesh is generated as a triangular facet mesh, so adjacent triangular facets will share two nodes. The data processing first is to remove duplicates from these nodes. After the deduplication is completed, a node index is established for the remaining nodes to facilitate data import in subsequent steps.
[0036] In step two of this invention, there is specifically step 202, which involves interpolating and training the obtained data. The specific training process is as follows:
[0037] The interpolation training approach is as follows: Based on the characteristic that triangular meshes are always continuous, if we want to know the stress magnitude corresponding to any given node, we can approximate the stress at that node using data from other points surrounding it. Conversely, if we know the data for most nodes within a region, we can estimate the stress at a nearby node. This can be aided by using a two-dimensional plane. For example, if we know the data for eight points (0,0), (0,1), (0,2), (1,0), (1,2), (2,0), (2,1), and (2,2), we can interpolate the data for point (1,1) based on these eight points. The same principle applies in three-dimensional coordinates. In this interpolation training, 15 surrounding points are selected for interpolation.
[0038] The first step is to read the unique node data from the simplified mesh model and save this data into a table with headers “x”, “y”, “z”, and “pa”. The “x” column is the first column, storing the x-coordinate information of the node; the “y” column is the second column, storing the y-coordinate information; the “z” column is the third column, storing the z-coordinate information; and the “pa” column is the fourth column, storing the equivalent stress information for each node. Since only location information is currently available, and there is no equivalent stress information, the “pa” column is empty.
[0039] The second step is to open a joint data sample obtained from the previous stress analysis. This sample contains all the data of the angles for which the equivalent stress solution has been performed on the joint. Read these data and record them as database 1.
[0040] The third step is to call the KNeighborsClassifier class. KNeighborsClassifier is a class that implements the K-nearest neighbor algorithm. Simply put, it's a class that can select the K nearest points to an unknown point (whose location information is known, but its stress information is unknown) for calculation. Set the value of K to 15, and set the database to database 1 opened in the second step.
[0041] The fourth step involves sequentially reading the "x", "y", and "z" values of each row of the non-repeating node data stored in the first step as unknown points. Based on the stress information of the 15 most recent points recorded in the database, interpolation is performed to obtain the equivalent stress data of the node, which is then written into the "pa" column. This step is repeated until all data is read, and a copy of the training data is saved.
[0042] Fifth, repeat steps two through four until all joint data samples have been trained.
[0043] In step three of this invention, specifically step 301, the digital twin platform used in this invention is Unity. Based on the parent-child relationships in Unity and the mounting of C# scripts, a host computer interface for the robotic arm is established to perform real-time control of the robotic arm and display a real-time equivalent stress cloud map. Then, Python processes the data and outputs the maximum stress curve. Similarly, Unreal Engine can also be used as a digital twin platform. The host computer interface for the robotic arm can be established using the physics simulation engine in Unreal Engine and Python, or it can be established using the digital twin module in ANSYS simulation software.
[0044] Example 2:
[0045] This invention is illustrated using a six-DOF robotic arm as an example. First, a three-dimensional model of the six-DOF robotic arm is created in Solidworks software. The robotic arm has six joints, each with a range of motion of 0–120°. The three-dimensional model is imported into ANSYS simulation software, and a mesh is generated. A denser mesh yields more accurate analysis results but consumes more computer resources. Here, a medium-density mesh is chosen. Simultaneously, a low-density three-dimensional model is created as the data source for subsequent digital twin generation, and its mesh node information is exported. Only the node position information is exported here, without equivalent stress data; this is called "simplified mesh model data." Subsequent equivalent stress analyses are performed using a medium-density mesh. Based on the joint's range of motion, equivalent stress analyses are conducted on the posture of each joint at 0°, 20°, 40°, 60°, 80°, 100°, and 120°. This section briefly describes the setup for equivalent stress analysis. The threaded connection between the joint and the servo motor is selected as the fixed support. Loads are set at the stress points of the joint. In ANSYS, "Equivalent Stress" (an option in the ANSYS simulation software interface) is selected to perform the equivalent stress analysis. After completing the equivalent stress analysis, the equivalent stress data is exported as an Excel spreadsheet. The exported equivalent stress data includes the XYZ axis position information of the mesh nodes and the equivalent stress information corresponding to each node. The exported data is then processed. First, duplicate data in the simplified mesh model is removed, keeping only one copy and deleting the rest. Then, interpolation training is performed.
[0046] The first step is to read the unique node data from the simplified mesh model and save this data into a table with headers “x”, “y”, “z”, and “pa”. The “x” column is the first column, storing the x-coordinate information of the node; the “y” column is the second column, storing the y-coordinate information; the “z” column is the third column, storing the z-coordinate information; and the “pa” column is the fourth column, storing the equivalent stress information for each node. Since only location information is currently available, and there is no equivalent stress information, the “pa” column is empty.
[0047] The second step is to open a joint data sample (one of six) obtained from the previous stress analysis. This sample contains all the data of the equivalent stress solution angles of the joint (equivalent stress analysis data at 0°, 20°, 40°, 60°, 80°, 100°, and 120°). Read these data and record them as database 1.
[0048] The third step is to call the KNeighborsClassifier class. KNeighborsClassifier is a class that implements the K-nearest neighbor algorithm. Simply put, it's a class that can select the K nearest points to an unknown point (whose location information is known, but its stress information is unknown) for calculation. Set the value of K to 15, and set the database to database 1 opened in the second step.
[0049] The fourth step involves sequentially reading the "x", "y", and "z" values of each row of the non-repeating node data stored in the first step as unknown points. Based on the stress information of the 15 most recent points recorded in the database, interpolation is performed to obtain the equivalent stress data of the node, which is then written into the "pa" column. This step is repeated until all data is read, and a copy of the training data is saved.
[0050] Fifth, repeat steps two through four until all data samples for all six joints have been trained.
[0051] This completes the data interpolation training and yields simplified mesh model data with equivalent stress data. This data is then imported into Unity software, which acts as the host computer for the robotic arm, enabling real-time control of the arm and displaying real-time equivalent stress cloud maps, as well as outputting the maximum stress curve.
[0052] The above description is only a part of the specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the protection scope of the present invention.
Claims
1. A method for solving the maximum stress in real-time motion of a robotic arm based on digital twins, characterized in that, Includes the following steps: Step 1: Measure the actual physical dimensions of the robotic arm, create a 3D model of the robotic arm in Solidworks software, and mesh the 3D model using ANSYS software. For each joint in the robotic arm, the joint can rotate within the angle range of 0 to X. The number of sampling points is set to n. A sampling point is taken every X / n angle, and the equivalent stress data of these sampling points are solved. Step 2: Perform node deduplication and interpolation training on the equivalent stress data obtained in Step 1; obtain the trained equivalent stress data for each node without duplication. The node deduplication refers to the following: after completing the mesh division in step one, a triangular mesh is obtained, in which each triangular mesh includes 3 nodes. Adjacent triangular meshes will share two nodes. The shared nodes are removed, and after deduplication, the node index is re-established for the remaining nodes to obtain data without duplicate nodes. Step 3: Import the trained equivalent stress data into the 3D model of the robotic arm, establish the host computer interface of the robotic arm based on the digital twin platform, and conduct serial communication between the host computer and the robotic arm. The host computer displays the stress data cloud map and maximum stress curve of the robotic arm in the current posture in real time.
2. The method for solving the maximum stress in real-time motion of a robotic arm based on digital twin as described in claim 1, characterized in that, The interpolation training includes the following steps: The first step is to save the unique node data into a table with headers "x", "y", "z", and "pa". The "x" column is the first column, which stores the x-coordinate information of the node; the "y" column is the second column, which stores the y-coordinate information of the node; the "z" column is the third column, which stores the z-coordinate information of the node; and the "pa" column is the fourth column, which stores the equivalent stress information corresponding to the node. The second step is to save the equivalent stress data of each sampling point on a joint obtained in step one as database 1; The third step is to call the KNeighborsClassifier class, which is a class that implements the K nearest neighbor algorithm. Based on the database 1, the K nearest neighbor algorithm is used to calculate the K nearest points near the unknown point by setting the K value. The unknown point refers to a point whose location information is known but whose stress information is unknown. Each row in the table of data without repeating nodes is taken as the unknown point, and the values of "x", "y", and "z" are taken as the location information of the unknown point. Interpolation is performed based on the stress information of the K nearest points recorded in database 1 to obtain the equivalent stress data of the node, which is written into the "pa" column as stress information. This step is repeated until the "pa" column of each row in the table of data without repeating nodes has data, thus obtaining a copy of the training data. Fourth, repeat steps two and three until all joint data samples have been trained.
3. The method for solving the maximum stress in real-time motion of a robotic arm based on digital twin as described in claim 2, characterized in that, In the third step of the interpolation training, K is set to 15.
4. The method for solving the maximum stress in real-time motion of a robotic arm based on digital twin as described in claim 1, characterized in that, In step one, the number of sampling points n ranges from 6 to 8.
5. The method for solving the maximum stress in real-time motion of a robotic arm based on digital twin as described in claim 1, characterized in that, In step three: the digital twin platform is Unity; the host computer interface of the robotic arm is established based on the parent-child relationship in Unity and the mounting of C# scripts.
Citation Information
Patent Citations
Vibration stress numerical analysis method for turbomachinery blades
CN106528932A
Mechanical arm three-dimensional reconstruction method and device, electronic equipment and storage medium
CN114952873A